PageSourceSearch

https://app.maslow.hr/_next/static/chunks/pages/company/settings-24021d345bbbd330.js

js maslow.hr collected 2026-10-05 04:05:45 UTC 11,370 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4586],{91435:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/company/settings",function(){return n(71502)}])},71866:function(e,t,n){"use strict";n.d(t,{OL:function(){return r},PU:function(){return i},j9:function(){return a},vV:function(){return o}});let r={SAAS:"saas",BACKOFFICE:"backoffice"},o={SAAS:"admin_saas",MASLOW:"admin_maslow",MARKETPLACE:"admin_marketplace"},a=[o.MASLOW,o.SAAS],i={[o.SAAS]:"PERMISSION_LEVEL_ADMIN_SAAS",[o.MASLOW]:"PERMISSION_LEVEL_ADMIN_MASLOW",[o.MARKETPLACE]:"PERMISSION_LEVEL_ADMIN_MARKETPLACE"}},77317:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});let r={employees:{view:"employees.view"},benefits:{view:"benefits.view"},companies:{update:"companies.update",config:{update:"companies.config.update"}},incentives:{view:"incentives.view"},recognitions:{view:"recognitions.view"},news:{view:"news.view"},"benefit-subscriptions":{view:"benefit-subscriptions.view"},billing:{view:"billing.view"},stats:{marketplace:{view:"stats.marketplace.view"},"external-app":{view:"stats.external-app.view"}}}},64649:function(e,t,n){"use strict";n.d(t,{R:function(){return r}});let r=!1},32073:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});let r=e=>{console.error(e)}},50925:function(e,t,n){"use strict";n.d(t,{a:function(){return w}});var r=n(67294),o=n(11163),a=n(85874),i=n(58192),u=n(88767),c=n(32073),l=n(69723),s=n(34513),f=n(63904),p=n(15123),d=n(81119),g=n(78184);let w=function(){let{middleware:e,redirectIfAuthenticated:t,redirectWhenLogin:n,reload:w}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},y=(0,o.useRouter)(),{i18n:v}=(0,a.useTranslation)(),m=(0,i.U0)(),S=()=>(0,l.Z)().get("/sanctum/csrf-cookie"),{token:h}=y.query,{data:E,refetch:_,isFetched:A,isSuccess:b,remove:O}=(0,u.useQuery)("user",p.PR,{retry:(e,t)=>{var n;return(null==t?void 0:null===(n=t.response)||void 0===n?void 0:n.status)!==401&&e<2},refetchOnWindowFocus:!1,refetchOnMount:!1,enabled:y.isReady&&!h&&"/login/sso"!==y.pathname}),{clearLanguage:I}=(0,d.Z)({userLanguage:null==E?void 0:E.language}),R=async e=>{let{...t}=e;await S(),await (0,l.Z)().post("/register?translate="+t.language,t).then(_)},k=async e=>{let{...t}=e;await (0,l.Z)().post("/api/register-by-invite-link?translate="+t.language,t)},N=async e=>{let{...t}=e;return await S(),await (0,l.Z)().post("/login-v2?translate="+t.language,t).then(e=>e)},P=async e=>{let{...t}=e;return await S(),await (0,l.Z)().post("/login-by-external?translate="+t.language,t).then(e=>e)},L=async e=>{let{...t}=e;return await S(),await (0,l.Z)().post("/login-with-mfa?translate="+t.language,t).then(_)},M=async e=>{let{...t}=e;return(0,l.Z)().post("/api/login-v2?translate="+t.language,t).then(e=>e.data.access_token)},x=async()=>(0,l.Z)().get("/api/token").then(e=>e.data.access_token),Z=async e=>{let{language:t,...n}=e;return await S(),(0,l.Z)().post("/forgot-password?translate="+t,n)},C=async e=>{let{...t}=e;return await S(),(0,l.Z)().post("/reset-password?translate="+t.language,{token:y.query.token,...t}).then(e=>y.push("/login?reset="+btoa(e.data.status)))},T=async e=>{let{password:t}=e;return await S(),(0,l.Z)().post("/validate-password",{password:t}).then(e=>e).catch(e=>{if(e.response)return{status:422};throw e})};(0,r.useEffect)(()=>{if((null==E?void 0:E.company_id)!=null)try{localStorage.setItem(s.r,String(E.company_id))}catch(e){}},[E]);let j=async e=>{let t=null==E?void 0:E.company_id;if((0,f.$4)((0,f.iJ)(e)),await (0,l.Z)("").post("/logout").catch(()=>{}),"serviceWorker"in navigator)for(let e of(await navigator.serviceWorker.getRegistrations()))e.active&&e.active.scriptURL.includes("firebase-messaging-sw.js")&&e.unregister().catch(e=>(0,c.N)(e));O(),I(),m.reset(),window.fcWidget&&window.fcWidget.destroy(),sessionStorage.clear();let n=localStorage.getItem("d"),r=localStorage.getItem("storageRedirect"),o=localStorage.getItem(s.r);localStorage.clear(),(0,g.sL)(),n&&localStorage.setItem("d",n),r&&localStorage.setItem("storageRedirect",r),o&&localStorage.setItem(s.r,o);let a=(0,s.B)({companyId:t,hostname:window.location.hostname});if(a){window.location.href=a;return}y.push("".concat(window.location.origin,"/login")).then(()=>y.reload())};return(0,r.useEffect)(()=>
1{if("guest"==e&&t&&E&&A&&v.changeLanguage(E.language,()=>{let e="/".concat(E.language).concat(t);w?window.location.href=e:(y.locale=E.language,y.push(e))}),"auth"==e&&b&&!E){(0,f.$4)({source:f.mn.useAuthNoUser,attempted_path:y.asPath});let e=(0,s.B)({hostname:window.location.hostname});if(e){window.location.href=e;return}y.push("/login".concat(n?"?redirect=".concat(n):""))}},[E,A,b]),{user:E,refetch:_,register:R,registerByToken:k,login:N,loginAPI:M,tokenAPI:x,forgotPassword:Z,resetPassword:C,resendEmailVerification:()=>(0,l.Z)().post("/email/verification-notification"),logout:j,loginWithMFA:L,loginByExternal:P,validatePassword:T}}},81119:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(67294),o=n(11163),a=n(85874);let i="language",u=()=>{try{let e=localStorage.getItem(i);if(!e||"undefined"===e)return null;return JSON.parse(e)}catch(e){return null}},c=function(){let{userLanguage:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{i18n:t}=(0,a.useTranslation)(),n=(0,o.useRouter)(),[c,l]=(0,r.useState)(null),s=e=>{var t;return!!e&&(null!==(t=n.locales)&&void 0!==t?t:[]).includes(e)},f=s(c)?c:s(e)?e:null;async function p(e){d(e)}(0,r.useEffect)(()=>
1{l(u())},[]),(0,r.useEffect)(()=>{(null==n?void 0:n.isReady)&&f&&(f!==t.language&&t.changeLanguage(f),f!==n.locale&&n.replace(n.asPath,void 0,{locale:f}))},[f,n,t]);let d=e=>{localStorage.setItem(i,JSON.stringify(e)),l(e)};return{updateLanguage:p,setLanguage:d,clearLanguage:function(){localStorage.removeItem(i)},language:f}}},37556:function(e,t,n){"use strict";n.d(t,{N:function(){return u}});var r=n(67294),o=n(63904),a=n(80165),i=n(50925);let u=function(e){let{doLogout:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{logout:n}=(0,i.a)();(0,r.useEffect)(()=>{let r=!0;return(0,a.a9)().then(()=>{if(!r)return;let i=(0,a.zd)();i&&!(i.all||!0===i.keys[e])&&t&&n({source:o.mn.useSaasPermissionDenied,permission:e})}),()=>{r=!1}},[])}},80165:function(e,t,n){"use strict";n.d(t,{Di:function(){return l},GY:function(){return u},LT:function(){return I},MA:function(){return f},NV:function(){return b},Ne:function(){return E},PF:function(){return p},Sl:function(){return h},WM:function(){return y},a9:function(){return m},bL:function(){return c},h6:function(){return P},mR:function(){return s},nO:function(){return _},vo:function(){return S},xj:function(){return R},yw:function(){return N},zB:function(){return O},zd:function(){return v}});var r=n(71866),o=n(64649),a=n(74544);let i="Zu9KRSYSdxFmA43R",u=(e,t)=>{var n;return e?Array.isArray(e)?e:null!==(n=e[t])&&void 0!==n?n:[]:[]},c=e=>{let t=new Set((null!=e?e:[]).map(e=>e.name));return r.j9.filter(e=>t.has(e))},l=e=>{let t=null!=e?e:[];if(o.R)return t.length;let n=new Set;for(let e of t)n.add(e.split(".")[0]);return n.size},s=e=>!!e&&(Array.isArray(e)?e.length>0:r.j9.some(t=>{var n,r;return(null!==(r=null===(n=e[t])||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0})),f=(e,t)=>e?Array.isArray(e)?l(e):(null!=t?t:r.j9).map(t=>e[t]).reduce((e,t)=>e+l(t),0):0,p={all:!1,keys:{},features:{}},d=function(e){let{legacyKeyToDrop:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,o=new Set,u=()=>{o.forEach(e=>e())};return{read:()=>n,subscribe:e=>(o.add(e),()=>{o.delete(e)}),hydrate:()=>null!==n?Promise.resolve():r||(r=(async()=>{t&&localStorage.removeItem(t);let r=localStorage.getItem(e);if(r)try{let e=await (0,a.o)(JSON.parse(r),i);n=JSON.parse(e),u()}catch(e){n=null}})()),write:async t=>{let r=k(t);n=r,u();let o=await (0,a.q)(JSON.stringify(r),i);localStorage.setItem(e,JSON.stringify(o))}}},g=d("p",{legacyKeyToDrop:"permissions"}),w=d("pb"),y=g.subscribe,v=g.read,m=g.hydrate,S=w.subscribe,h=w.read,E=w.hydrate,_={EMPLOYEES_PERMISSIONS_VIEW:"employees.permissions.view",EMPLOYEES_PERMISSIONS_UPDATE:"employees.permissions.update",ROLES_VIEW:"roles.view",ROLES_UPDATE:"roles.update"},A="view",b=(e,t)=>{let n=e.split("."),r=n[n.length-1]===A?n.slice(0,-2):n.slice(0,-1);for(;r.length>0;){let n="".concat(r.join("."),".").concat(A);if(n!==e&&t.has(n))return n;r=r.slice(0,-1)}return null},O=(e,t)=>{let n=0,r=b(e,t);for(;r;)n++,r=b(r,t);return n},I=(e,t,n)=>{let r=b(e,n);return!r||!!t[r]},R=(e,t)=>{let n={...e},r=!0;for(;r;)r=!1,t.forEach(e=>{n[e]&&!I(e,n,t)&&(n[e]=!1,r=!0)});return n},k=e=>{let t={},n={};for(let r of null!=e?e:[]){t[r]=!0;let e=r.split(".")[0];e&&(n[e]=!0)}return{all:!1,keys:t,features:n}},N=g.write,P=w.write},71502:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return u}});var r=n(67294),o=n(11163),a=n(77317),i=n(37556),u=!0;t.default=()=>{let e=(0,o.useRouter)();return(0,i.N)(a.J.companies.config.update),(0,r.useEffect)(()=>{e.replace("/company/settings/modules")},[e]),null}},74544:function(e,t,n){"use strict";function r(e){return new TextEncoder().encode(e)}async function o(e,t){let n=new TextEncoder().encode(e),o=r(t),a=await crypto.subtle.importKey("raw",o,{name:"AES-GCM"},!1,["encrypt"]),i=crypto.getRandomValues(new Uint8Array(12)),u=await crypto.subtle.encrypt({name:"AES-GCM",iv:i},a,n);return{coord:Array.from(i),points:Array.from(new Uint8Array(u))}}async function a(e,t){let n=r(t),o=await crypto.subtle.importKey("raw",n,{name:"AES-GCM"},!1,["decrypt"]),a=new Uint8Array(e.coord),i=new Uint8Array(e.points),u=await crypto.subtle.decrypt({
1name:"AES-GCM",iv:a},o,i);return new TextDecoder().decode(u)}n.d(t,{o:function(){return a},q:function(){return o}})},58192:function(e,t,n){"use strict";n.d(t,{U0:function(){return u}});var r=n(34651),o=n(67294),a=(0,o.createContext)({client:r.ZP,bootstrap:void 0}),i=function(e){return"function"==typeof e},u=function(){return(0,o.useContext)(a).client},c=function(e,t){return(c=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};"function"==typeof SuppressedError&&SuppressedError;var l={componentStack:null,exceptionEvent:null,error:null};!function(e){function t(t){var n=e.call(this,t)||this;return n.state=l,n}!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidCatch=function(e,t){var n,r=this.props.additionalProperties;i(r)?n=r(e):"object"==typeof r&&(n=r);var o=this.context.client.captureException(e,n),a=t.componentStack;this.setState({error:e,componentStack:null!=a?a:null,exceptionEvent:o})},t.prototype.render=function(){var e=this.props,t=e.children,n=e.fallback,r=this.state;if(null==r.componentStack)return i(t)?t():t;var a=i(n)?o.createElement(n,{error:r.error,componentStack:r.componentStack,exceptionEvent:r.exceptionEvent}):n;return o.isValidElement(a)?a:(console.warn("[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."),o.createElement(o.Fragment,null))},t.contextType=a}(o.Component)}},function(e){e.O(0,[92888,49774,40179],function(){return e(e.s=91435)}),_N_E=e.O()}]);

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.