"use strict";(self.webpackChunk_1js_people_in_taskbar=self.webpackChunk_1js_people_in_taskbar||[]).push([[2652],{75283:(e,t,n)=>{function s(e){return["lpc/presence",e]}n.d(t,{A:()=>s})},8529:(e,t,n)=>{n.d(t,{g:()=>d});var s=n(71317),o=n(50812),c=n(85969),r=n(90838),a=n(66766),i=n(13214),u=n(14130),f=n(93823);const l=(e,t)=>()=>(0,f.w)(new Promise((n=>{e.getRichPresence?e.getRichPresence((0,a.Q)(t),((e,t)=>{n(t?{state:"error",errorCode:"host_app_callback"}:e?{state:"success",data:{oofMessage:e.oofMessage,statusNoteV2:e.statusNoteV2,statusNoteV1:e.statusNote,isOutOfOffice:e.isOutOfOffice,presence:e.presence||i.As.none,presenceText:e.presenceText,presenceTextLong:e.presenceTextLong,presenceStatus:e.presenceStatus,workLocation:e.workLocation}}:{state:"no_data"})})):n({state:"no_data"})})),u.he,{state:"error"});var p=n(75283);function d(e,t){const n=(0,o.us)(),a=(0,r.dW)(c.G)((()=>l(n,t))),i=(0,p.A)(e),[u]=(0,s.st)(a,i,{fetchOnce:!0});return u}},96707:(e,t,n)=>{n.d(t,{y:()=>k});var s=n(71317),o=n(85969),c=n(90838),r=n(75283),a=n(76799),i=n(323),u=n(46960);function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,i.ZX)(e,(e=>function(e,t,n){return e.request("getPresence","GET","/api/v2/presence",void 0,u.A,n,t,(e=>e),u.a)}(e,(0,i.Vf)(n),t)))}var l=n(41584),p=n(13042),d=n(15852),v=n(1901),O=n(48077);const h=e=>{var t;if(e)return{oofMessage:void 0,statusNoteV1:(0,d.W)(null==e?void 0:e.note),statusNoteV2:(0,v.P)(null==e?void 0:e.note),isOutOfOffice:Boolean(null==e||null===(t=e.calendarData)||void 0===t?void 0:t.isOutOfOffice),presence:(0,l.P)(null==e?void 0:e.availability),presenceText:(0,p.N)((0,p.m)(null==e?void 0:e.activity)),workLocation:(0,O.l)(null==e?void 0:e.workLocation)}};function _(e){if(e.presence)return h(e.presence)}function k(e,t){const n=(0,c.H5)(o.G)((n=>function(e,t,n){const s=f(e,t,n);return()=>s().then((0,a.Wm)(_))}(e,t,n))),i=(0,r.A)(t.aadObjectId),[u]=(0,s.st)(n,i,{fetchOnce:!0});return u}},85969:(e,t,n)=>{n.d(t,{G:()=>s,Q:()=>o});const s={scenario:"RichPresence"},o={scenario:"BatchRichPresence"}}}]);