(this.webpackChunk_msteams_react_web_client=this.webpackChunk_msteams_react_web_client||[]).push([[683094],{930803:e=>{e.exports=[{types:{CopilotImageV2:[2,{id:10,blobUrl:6,fullSizeHeight:3,fullSizeWidth:3,size:3}]}},{types:{Query:[2,{copilotImageV2:["CopilotImageV2!",{url:6,vRoomId:1,recordingLocationUrl:1,backupMasImageUrl:1}]}],Mutation:[2,{sendVisualInsightsPrimingSignal:[7,{organizerId:6,threadId:6,callId:6,messageId:6}]}]}}]},781369:(e,r,t)=>{"use strict";t.r(r),t.d(r,{resolvers:()=>c,typeDefs:()=>i});var i=t(930803),o=t(120278),a=t(845097),s=t(912435),l=t(183111),n=t(868022);const c={Query:{async copilotImageV2(e,{url:r,backupMasImageUrl:t},{loggerFactory:i,coreSettings:a,getMeetingArtifactsService:n,getVideoFileService:c}){const u=i.newLogger("copilot-image-resolver","data-resolvers-browser-visual-insights");if((0,o.bV)(r,a))return g(r,n,u);if(m(r))try{return await d(r,c,u)}catch(e){if(t)return u.errorToTelemetry?.(`Failed to fetch image from Vroom API in resolver. url=${r} error=${(0,s.Nw)(e)}. Trying backup url=${t}`,"copilot_visual_insights"),g(t,n,u);throw e}const h=`Image URL. url=${r}. Expecting either MAS or Vroom url in resolver`;return u.errorToTelemetry?.(h,"copilot_visual_insights"),Promise.reject((0,s.$5)("CopilotImageResolver",l.O4.InvalidUrl,"downloadImage",void 0,h))}},Mutation:{async sendVisualInsightsPrimingSignal(e,{organizerId:r,threadId:t,callId:i,messageId:o},{loggerFactory:a,getMeetingArtifactsService:n}){const c=a.newLogger("copilot-image-resolver","data-resolvers-browser-visual-insights");try{const e=await n();await e.sendVisualInsightsPrimingSignal(r,t,i,o)}catch(e){const a=`Failed to send priming signal. error=${e.message} organizerId=${r}, threadId=${t}, callId=${i} messageId=${o}`;throw c.errorToTelemetry?.(a,"copilot_visual_insights"),(0,s.$5)("CopilotImageResolver",l.O4.FailedToUpdate,"sendVisualInsightsPrimingSignal",void 0,a)}return!0}}},g=async(e,r,t)=>{try{const t=await r(),i=await t.downloadImage((0,a.v4)(),e);return{id:e,blobUrl:URL.createObjectURL(i.blob),size:i.blob.size,fullSizeHeight:i.fullSizeHeight,fullSizeWidth:i.fullSizeWidth}}catch(r){const i=`Failed to fetch image from MAS in resolver. error=${(0,s.Nw)(r)} url=${e} }`;return t.errorToTelemetry?.(i,"copilot_visual_insights"),Promise.reject((0,s.$5)("CopilotImageResolver",l.O4.Unknown,"downloadImage",void 0,i))}},d=async(e,r,t)=>{const i=await r();try{const r=await i.fetchOdspVisualSegmentFrame(e);if(!r){const r=`Failed to fetch image from Vroom API in resolver. url=${e}`;return t.errorToTelemetry?.(r,"copilot_visual_insights"),Promise.reject((0,s.$5)("CopilotImageResolver",l.O4.InvalidUrl,"downloadImage",void 0,r))}return{id:e,blobUrl:URL.createObjectURL(r.blob),size:r.blob.size,fullSizeHeight:r.fullSizeHeight,fullSizeWidth:r.fullSizeWidth}}catch(r){const i=`Failed to fetch image from Vroom API in resolver. url=${e} error=${(0,s.Nw)(r)}`;return t.errorToTelemetry?.(i,"copilot_visual_insights"),Promise.reject((0,s.$5)("CopilotImageResolver",l.O4.InvalidUrl,"downloadImage",void 0,i))}},m=e=>{const r=new URL(e);return!!(0,n.Jp)(r.hostname)&&r.pathname.endsWith("/content")}},120278:(e,r,t)=>{"use strict";t.d(r,{bV:()=>o,o_:()=>a,kO:()=>s,Jv:()=>l,en:()=>n});var i=t(401368);function o(e,r){const t=r.get(i.w.MeetingArtifacts).meetingArtifactsServiceEndpoint||"";if(!e)return!1;const o=new URL(e).hostname;return!!o?.endsWith(".cortana.ai")||!!t&&!!e&&e.startsWith(t)}const a=e=>({"x-ms-correlation-id":e,Accept:"application/json"}),s=(e,r,t,i)=>`/organizer(${e})/thread(${r})/message(${i})/call(${t})`,l=(e,r,t,i)=>`/organizer(${e})/thread(${r})${i?.callId?`/call(${i.callId})`:""}?artifactTypes=${t.join(",")}${i?.seedTimestampUtc?`&seedTimestampUtc=${i.seedTimestampUtc}`:""}${i?.maxArtifactsPerType?`&maxArtifactsPerType=${i.maxArtifactsPerType}`:""}`,n=(e,r,t,i)=>`/organizer(${e})/thread(${r})${i?.callId?`/call(${i.callId})`:""}/artifacttype(${t})`}}]);
//# sourceMappingURL=https://local.teams.office.com/sourcemaps/hashed-assets/r_data-resolvers-browser-visual-insights-2f8a7c68d8f6747e.js.map