PageSourceSearch

https://app.cogram.com/static/js/hooks.BG2BCto9.js

js cogram.com collected 2026-10-02 08:03:05 UTC 11,921 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="52eaa2ba-0fb9-53dd-b485-8d82db8c6697")}catch(e){}}();
3import{t as e}from"./rolldown-runtime.C0FnF6B9.js";import{G as t,H as n,r,t as i,wt as a}from"./axios-instance.gM_qJJ36.js";import{i as o,t as s}from"./es.ebwlm7vG.js";import{c}from"./core.toyMLC-Q.js";var l=e(((e,t)=>{t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)})),u=e(((e,t)=>{var n=`%[a-f0-9]{2}`,r=RegExp(`(`+n+`)|([^%]+?)`,`gi`),i=RegExp(`(`+n+`)+`,`gi`);function a(e,t){try{return[decodeURIComponent(e.join(``))]}catch{}if(e.length===1)return e;t||=1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function o(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(r)||[],n=1;n<t.length;n++)e=a(t,n).join(``),t=e.match(r)||[];return e}}function s(e){for(var t={"%FE%FF":`��`,"%FF%FE":`��`},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=o(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t[`%C2`]=`�`;for(var a=Object.keys(t),s=0;s<a.length;s++){var c=a[s];e=e.replace(new RegExp(c,`g`),t[c])}return e}t.exports=function(e){if(typeof e!=`string`)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g,` `),decodeURIComponent(e)}catch{return s(e)}}})),d=e(((e,t)=>{t.exports=(e,t)=>{if(typeof e!=`string`||typeof t!=`string`)throw TypeError("Expected the arguments to be of type `string`");if(t===``)return[e];let n=e.indexOf(t);return n===-1?[e]:[e.slice(0,n),e.slice(n+t.length)]}})),f=e(((e,t)=>{t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),a=0;a<r.length;a++){var o=r[a],s=e[o];(i?t.indexOf(o)!==-1:t(o,s,e))&&(n[o]=s)}return n}})),p=e((e=>{var t=l(),n=u(),r=d(),i=f(),a=e=>e==null,o=Symbol(`encodeFragmentIdentifier`);function s(e){switch(e.arrayFormat){case`index`:return t=>(n,r)=>{let i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,[m(t,e),`[`,i,`]`].join(``)]:[...n,[m(t,e),`[`,m(i,e),`]=`,m(r,e)].join(``)]};case`bracket`:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,[m(t,e),`[]`].join(``)]:[...n,[m(t,e),`[]=`,m(r,e)].join(``)];case`colon-list-separator`:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,[m(t,e),`:list=`].join(``)]:[...n,[m(t,e),`:list=`,m(r,e)].join(``)];case`comma`:case`separator`:case`bracket-separator`:{let t=e.arrayFormat===`bracket-separator`?`[]=`:`=`;return n=>(r,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===``?r:(i=i===null?``:i,r.length===0?[[m(n,e),t,m(i,e)].join(``)]:[[r,m(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,m(t,e)]:[...n,[m(t,e),`=`,m(r,e)].join(``)]}}function c(e){let t;switch(e.arrayFormat){case`index`:return(e,n,r)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,``),!t){r[e]=n;return}r[e]===void 0&&(r[e]={}),r[e][t[1]]=n};case`bracket`:return(e,n,r)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,``),!t){r[e]=n;return}if(r[e]===void 0){r[e]=[n];return}r[e]=[].concat(r[e],n)};case`colon-list-separator`:return(e,n,r)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,``),!t){r[e]=n;return}if(r[e]===void 0){r[e]=[n];return}r[e]=[].concat(r[e],n)};case`comma`:case`separator`:return(t,n,r)=>{let i=typeof n==`string`&&n.includes(e.arrayFormatSeparator),a=typeof n==`string`&&!i&&h(n,e).includes(e.arrayFormatSeparator);n=a?h(n,e):n,r[t]=i||a?n.split(e.arrayFormatSeparator).map(t=>h(t,e)):n===null?n:h(n,e)};case`bracket-separator`:return(t,n,r)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,``),!i){r[t]=n&&h(n,e);return}let a=n===null?[]:n.split(e.arrayFormatSeparator).map(t=>h(t,e));if(r[t]===void 0){r[t]=a;return}r[t]=[].concat(r[t],a)};default:return(e,t,n)=>{if(n[e]===void 0){n[e]=t;return}n[e]=[].concat(n[e],t)}}}function p(e){if(typeof e!=`string`||e.length!==1)throw TypeError(`arrayFormatSeparator must be single character string`)}function m(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function h(e,t){return t.decode?n(e):e}function g(e){return Array.isArray(e)?e.sort():typeof e==`object`?g(Object.keys(e)).sort((e,t)=>
3Number(e)-Number(t)).map(t=>e[t]):e}function _(e){let t=e.indexOf(`#`);return t!==-1&&(e=e.slice(0,t)),e}function v(e){let t=``,n=e.indexOf(`#`);return n!==-1&&(t=e.slice(n)),t}function y(e){e=_(e);let t=e.indexOf(`?`);return t===-1?``:e.slice(t+1)}function b(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e==`string`&&e.trim()!==``?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()===`true`||e.toLowerCase()===`false`)&&(e=e.toLowerCase()===`true`),e}function x(e,t){t=Object.assign({decode:!0,sort:!0,arrayFormat:`none`,arrayFormatSeparator:`,`,parseNumbers:!1,parseBooleans:!1},t),p(t.arrayFormatSeparator);let n=c(t),i=Object.create(null);if(typeof e!=`string`||(e=e.trim().replace(/^[?#&]/,``),!e))return i;for(let a of e.split(`&`)){if(a===``)continue;let[e,o]=r(t.decode?a.replace(/\+/g,` `):a,`=`);o=o===void 0?null:[`comma`,`separator`,`bracket-separator`].includes(t.arrayFormat)?o:h(o,t),n(h(e,t),o,i)}for(let e of Object.keys(i)){let n=i[e];if(typeof n==`object`&&n)for(let e of Object.keys(n))n[e]=b(n[e],t);else i[e]=b(n,t)}return t.sort===!1?i:(t.sort===!0?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce((e,t)=>{let n=i[t];return e[t]=n&&typeof n==`object`&&!Array.isArray(n)?g(n):n,e},Object.create(null))}e.extract=y,e.parse=x,e.stringify=(e,t)=>{if(!e)return``;t=Object.assign({encode:!0,strict:!0,arrayFormat:`none`,arrayFormatSeparator:`,`},t),p(t.arrayFormatSeparator);let n=n=>t.skipNull&&a(e[n])||t.skipEmptyString&&e[n]===``,r=s(t),i={};for(let t of Object.keys(e))n(t)||(i[t]=e[t]);let o=Object.keys(i);return t.sort!==!1&&o.sort(t.sort),o.map(n=>{let i=e[n];return i===void 0?``:i===null?m(n,t):Array.isArray(i)?i.length===0&&t.arrayFormat===`bracket-separator`?m(n,t)+`[]`:i.reduce(r(n),[]).join(`&`):m(n,t)+`=`+m(i,t)}).filter(e=>e.length>0).join(`&`)},e.parseUrl=(e,t)=>
3{t=Object.assign({decode:!0},t);let[n,i]=r(e,`#`);return Object.assign({url:n.split(`?`)[0]||``,query:x(y(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:h(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[o]:!0},n);let r=_(t.url).split(`?`)[0]||``,i=e.extract(t.url),a=e.parse(i,{sort:!1}),s=Object.assign(a,t.query),c=e.stringify(s,n);c&&=`?${c}`;let l=v(t.url);return t.fragmentIdentifier&&(l=`#${n[o]?m(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${c}${l}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);let{url:a,query:s,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:a,query:i(s,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{let i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}})),m=`/auth`,h=`/outlook-email`,g=`/auth/sharepoint`,_=class{static{this.GetOauthUrl=async e=>{let t=e.toLowerCase();return r.get(`${m}/${t}/get-auth-url`)}}static{this.DisconnectOAuth=e=>{let t=e.toLowerCase();return r.delete(`${m}/${t}/oauth`)}}static{this.GetEmailOauthUrl=async()=>r.get(`${h}/get-auth-url`)}static{this.DisconnectEmailOAuth=()=>r.delete(`${h}/oauth`)}static{this.TestEmailConnection=()=>r.get(`${h}/test`)}static{this.GetSharePointOauthUrl=async()=>r.get(`${g}/get-auth-url`)}static{this.DisconnectSharePointOAuth=()=>r.delete(`${g}/oauth`)}static{this.TestSharePointConnection=()=>r.get(`${g}/test`)}},v=p(),y=`/settings`,b=class{static{this.GetSettings=async()=>r.get(`${y}/user/infos`)}static{this.PatchUserSettings=e=>r.patch(`${y}/user`,e)}static{this.GetStripePortalSessionUrl=e=>{let t=(0,v.stringify)({returnUrl:e});return r.post(`/create-stripe-customer-portal-session?${t}`)}}static{this.GetAuthorizedEmails=()=>r.get(`/authorized-emails`)}static{this.PatchAuthorizedEmails=e=>r.patch(`/authorized-emails`,e)}},x=`/users`,S=class{static{this.UpdateUserData=async(e,t)=>r.patch(`${x}/${t}`,e)}static{this.UploadProfilePhoto=async(e,t)=>{let n=new FormData;return n.append(`photo`,e),r.post(`${x}/${t}/profile-photo`,n,{headers:{"Content-Type":`multipart/form-data`}})}}},{DEFAULT_HTTP_ERROR:C}=a,w=n(`auth/updateUserIdentity`,async({updates:e,user_id:t},{rejectWithValue:n})=>{try{return(await S.UpdateUserData(e,t)).data}catch(e){return e instanceof c?n(e.response?.data??C):n(C)}}),T=n(`auth/uploadProfilePhoto`,async({photo:e,user_id:t},{rejectWithValue:n})=>{try{return(await S.UploadProfilePhoto(e,t)).data}catch(e){return n(i(e)??{message:`An error occurred while uploading your profile photo`})}}),E=n(`auth/getSettings`,async(e,{rejectWithValue:t,dispatch:n})=>{try{let e=await b.GetSettings(),t=e.data.settings?.timezone,r=Intl.DateTimeFormat().resolvedOptions().timeZone;return r&&r!==t&&n(k({timezone:r})),e.data}catch(e){return t(i(e)??{message:`An error occurred while fetching your settings`})}}),D=n(`auth/disconnectOAuth`,async({type:e},{rejectWithValue:t})=>{try{return(await _.DisconnectOAuth(e)).data}catch(e){return e instanceof c?t(e.response?.data.detail):t(`An error occurred while disconnecting your account`)}}),O=n(`auth/disconnectSharePointOAuth`,async(e,{rejectWithValue:t})=>{try{return(await _.DisconnectSharePointOAuth()).data}catch(e){return e instanceof c?t(e.response?.data.details):t(`An error occurred while disconnecting SharePoint`)}}),k=n(`auth/updateUserSettings`,async(e,{rejectWithValue:t})=>{try{return(await b.PatchUserSettings(e)).data}catch(e){return e instanceof c?t(e.response?.data.detail):t(`An error occurred while updating your settings`)}}),A={userDataUpdating:!1,session:null,settings:void 0,updateUserSettingsLoading:!1,settingsInitialized:!1},j=t({name:`auth`,initialState:A,reducers:{setAuthState:(e,t)=>t.payload,updateAuthState:(e,t)=>({...e,...t.payload}),resetAuth(){return A}},extraReducers(e){e.addCase(E.fulfilled,(e,t)=>{t.payload&&(e.settings=t.payload,e.settingsInitialized=!0)}),e.addCase(E.rejected,e=>{e.settingsInitialized=!1}),e.addCase(k.pending,e=>{e.updateUserSettingsLoading=!0}),e.addCase(k.fulfilled,(e,t)=>{e.settings={...e.settings,settings:{...e.settings?.settings,...t.payload}},e.updateUserSettingsLoading=!1}),e.addCase(k.rejected,e=>{e.updateUserSettingsLoading=!1}),e.addCase(D.pending,e=>{e.updateUserSettingsLoading=!0}),e.addCase(D.fulfilled,e=>{e.settings={...e.settings,calendar_auth_info:void 0},e.updateUserSettingsLoading=!1}),e.addCase(D.rejected,e=>{e.updateUserSettingsLoading=!1}),e.addCase(O.pending,e=>{e.updateUserSettingsLoading=!0}),e.addCase(O.fulfilled,e=>{e.settings={...e.settings,sharepoint_auth_info:void 0},e.updateUserSettingsLoading=!1}),e.addCase(O.rejected,e=>{e.updateUserSettingsLoading=!1}),e.addCase(T.pending,e=>{e.userDataUpdating=!0}),e.addCase(T.fulfilled,(e,t)=>{t.payload&&(e.settings={...e.settings,...t.payload}),e.userDataUpdating=!1}),e.addCase(T.rejected,e=>{e.userDataUpdating=!1}),e.addCase(w.pending,e=>{e.userDataUpdating=!0}),e.addCase(w.fulfilled,(e,t)=>{t.payload&&(e.settings={...e.settings,...t.payload}),e.userDataUpdating=!1}),e.addCase(w.rejected,e=>{e.userDataUpdating=!1})}}),{setAuthState:M,updateAuthState:N,resetAuth:P}
3=j.actions,F=e=>e.auth,I=e=>e.auth.session,L=e=>e.auth.settings,R=e=>e.auth.settings?.user_roles,z=e=>e.auth.settingsInitialized,B=e=>e.auth.settings?.vantagepoint_integration_enabled,V=e=>e.auth.settings?.user_id,H=e=>e.auth.settings?.email,U=j.reducer,W=s,G=o;export{p as S,w as _,O as a,b,F as c,I as d,L as f,N as g,B as h,D as i,H as l,R as m,G as n,E as o,z as p,U as r,P as s,W as t,V as u,k as v,_ as x,T as y};
4//# sourceMappingURL=hooks.BG2BCto9.js.map
5//# debugId=52eaa2ba-0fb9-53dd-b485-8d82db8c6697

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.