@microsoft/teams-js 2.40.0 → 2.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],u=i[1],l=new o(c(e,a,u)),d=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(l(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?u(e,i,o,"day"):i>=r?u(e,i,r,"hour"):i>=n?u(e,i,n,"minute"):i>=t?u(e,i,t,"second"):e+" ms"}function u(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>ke,AppId:()=>Xr,ChannelType:()=>dn,ChildAppWindow:()=>Um,DialogDimension:()=>ln,EduType:()=>He,EmailAddress:()=>Jp,ErrorCode:()=>Ne,FileOpenPreference:()=>Fe,FrameContexts:()=>an,HostClientType:()=>rn,HostName:()=>on,LiveShareHost:()=>lC,NotificationTypes:()=>qc,ParentAppWindow:()=>Lm,RenderingSurfaces:()=>sn,SecondaryM365ContentIdName:()=>Me,TaskModuleDimension:()=>ln,TeamType:()=>cn,UUID:()=>Wn,UserSettingTypes:()=>Jc,UserTeamRole:()=>un,ValidatedSafeString:()=>Zr,ViewerActionTypes:()=>Gc,activateChildProxyingCommunication:()=>Sr,app:()=>i,appEntity:()=>B,appInitialization:()=>Ie,appInstallDialog:()=>Z,authentication:()=>Q,barCode:()=>Y,calendar:()=>le,call:()=>Ae,chat:()=>ee,clipboard:()=>te,conversations:()=>b,copilot:()=>P,dialog:()=>f,enablePrintCapability:()=>bw,executeDeepLink:()=>Hw,externalAppAuthentication:()=>O,externalAppAuthenticationForCEA:()=>R,externalAppCardActions:()=>F,externalAppCardActionsForCEA:()=>k,externalAppCardActionsForDA:()=>M,externalAppCommands:()=>N,files:()=>x,geoLocation:()=>oe,getAdaptiveCardSchemaVersion:()=>xm,getContext:()=>Aw,getCurrentFeatureFlagsState:()=>Ar,getMruTabInstances:()=>Uw,getTabInstances:()=>Dw,hostEntity:()=>J,initialize:()=>Sw,initializeWithFrameContext:()=>Vw,liveShare:()=>Re,location:()=>ae,logs:()=>S,mail:()=>fe,marketplace:()=>Ve,media:()=>X,meeting:()=>ce,meetingRoom:()=>D,menus:()=>p,messageChannels:()=>U,monetization:()=>ue,navigateBack:()=>$w,navigateCrossDomain:()=>zw,navigateToTab:()=>jw,nestedAppAuth:()=>ne,nestedAppAuthBridge:()=>L,notifications:()=>H,openFilePreview:()=>tu,otherAppStateChange:()=>_,overwriteFeatureFlagsState:()=>Tr,pages:()=>y,people:()=>ge,print:()=>Ew,profile:()=>me,registerAppButtonClickHandler:()=>Pw,registerAppButtonHoverEnterHandler:()=>Ow,registerAppButtonHoverLeaveHandler:()=>Rw,registerBackButtonHandler:()=>Fw,registerBeforeUnloadHandler:()=>Mw,registerChangeSettingsHandler:()=>xw,registerCustomHandler:()=>Yc,registerFocusEnterHandler:()=>Nw,registerFullScreenHandler:()=>Tw,registerOnLoadHandler:()=>kw,registerOnThemeChangeHandler:()=>Iw,registerUserSettingsChangeHandler:()=>eu,remoteCamera:()=>V,returnFocus:()=>Ww,search:()=>he,secondaryBrowser:()=>ie,sendCustomEvent:()=>Xc,sendCustomMessage:()=>Zc,setFeatureFlagsState:()=>Ir,setFrameContext:()=>_w,settings:()=>Pe,shareDeepLink:()=>Lw,sharing:()=>we,sidePanelInterfaces:()=>I,stageView:()=>ye,store:()=>K,tasks:()=>Oe,teams:()=>z,teamsCore:()=>pe,thirdPartyCloudStorage:()=>Te,uploadCustomApp:()=>Qc,version:()=>Cr,videoEffects:()=>$,videoEffectsEx:()=>q,visualMedia:()=>be,webStorage:()=>Ee});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>ao,getTelemetryPort:()=>oo,isSupported:()=>io});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>go,getDataLayerPort:()=>fo,isSupported:()=>po});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>mo,registerOnResumeHandler:()=>ho});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>So,FailedReason:()=>yo,Messages:()=>Co,_initialize:()=>Io,_uninitialize:()=>To,getContext:()=>Po,getFrameContext:()=>Eo,initialize:()=>Ao,isInitialized:()=>bo,lifecycle:()=>o,notifyAppLoaded:()=>Oo,notifyExpectedFailure:()=>ko,notifyFailure:()=>Fo,notifySuccess:()=>Ro,openLink:()=>xo,registerHostToAppPerformanceMetricsHandler:()=>No,registerOnThemeChangeHandler:()=>Mo});var a={};n.r(a),n.d(a,{isSupported:()=>Lo,resize:()=>Uo});var s={};n.r(s),n.d(s,{isSupported:()=>_o,open:()=>Ho});var c={};n.r(c),n.d(c,{isSupported:()=>jo,registerOnMessageFromParent:()=>Wo,sendMessageToDialog:()=>Bo,sendMessageToParentFromDialog:()=>Vo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Jo,getDialogInfoFromUrlDialogInfo:()=>Go,isSupported:()=>qo,open:()=>zo,parentCommunication:()=>c,submit:()=>$o});var l={};n.r(l),n.d(l,{isSupported:()=>ai,open:()=>ii});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>ci,open:()=>si});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>ui,isSupported:()=>li,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>fi,MenuItem:()=>gi,MenuListType:()=>pi,initialize:()=>yi,isSupported:()=>Pi,setNavBarMenu:()=>Ei,setUpViews:()=>Si,showActionMenu:()=>Ii});var g={};n.r(g),n.d(g,{initialize:()=>Oi,isSupported:()=>Vi,registerChangeConfigHandler:()=>Ui,registerOnRemoveHandler:()=>Ni,registerOnRemoveHandlerHelper:()=>xi,registerOnSaveHandler:()=>ki,registerOnSaveHandlerHelper:()=>Mi,setConfig:()=>Fi,setValidityState:()=>Ri});var m={};n.r(m),n.d(m,{isSupported:()=>va,onClick:()=>ga,onHoverEnter:()=>ma,onHoverLeave:()=>ha});var h={};n.r(h),n.d(h,{_initialize:()=>wa,isSupported:()=>ba,navigateBack:()=>Ca,registerBackButtonHandler:()=>ya,registerBackButtonHandlerHelper:()=>Sa});var v={};n.r(v),n.d(v,{isSupported:()=>Ia,navigateTo:()=>Ea,navigateToDefaultPage:()=>Aa});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Ta,exitFullscreen:()=>Pa,isSupported:()=>Oa});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>ka,getTabInstances:()=>Fa,isSupported:()=>Ma,navigateToTab:()=>Ra});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Na,ReturnFocusType:()=>xa,appButton:()=>m,backStack:()=>h,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>_a,initializeWithFrameContext:()=>Ha,isSupported:()=>za,navigateCrossDomain:()=>Va,navigateToApp:()=>Ba,registerFocusEnterHandler:()=>Ua,registerFullScreenHandler:()=>ja,returnFocus:()=>Da,setCurrentFrame:()=>La,shareDeepLink:()=>Wa,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>$c,registerGetLogHandler:()=>zc});var b={};n.r(b),n.d(b,{closeConversation:()=>ou,getChatMembers:()=>iu,isSupported:()=>au,openConversation:()=>ru});var E={};n.r(E),n.d(E,{isSupported:()=>lu,sendCustomTelemetryData:()=>du});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>hu,isSupported:()=>mu});var I={};n.r(I),n.d(I,{ContentItemType:()=>wu,CopilotMode:()=>bu,MediaSelectionType:()=>Cu,SidePanelErrorCode:()=>Tu,SidePanelErrorImpl:()=>Pu,TeamsContextType:()=>Au,TeamsDimensionName:()=>Su,TeamsSessionType:()=>yu,TranscriptState:()=>Eu,UserConsent:()=>Iu});var T={};n.r(T),n.d(T,{copilotSidePanelNotSupportedOnPlatformError:()=>Du,getContent:()=>Mu,isResponseAReportableError:()=>ku,isSupported:()=>Fu,preCheckUserConsent:()=>Nu,registerUserActionContentSelect:()=>xu});var P={};n.r(P),n.d(P,{customTelemetry:()=>E,eligibility:()=>A,sidePanel:()=>T});var O={};n.r(O),n.d(O,{ActionExecuteInvokeRequestType:()=>Wu,ActionExecuteResponseHandler:()=>qu,InvokeErrorCode:()=>$u,InvokeResponseType:()=>zu,OriginalRequestType:()=>ju,SerializableActionExecuteInvokeRequest:()=>Vu,authenticateAndResendRequest:()=>Zu,authenticateWithOauth2:()=>el,authenticateWithPowerPlatformConnectorPlugins:()=>tl,authenticateWithSSO:()=>Xu,authenticateWithSSOAndResendRequest:()=>Yu,isActionExecuteResponse:()=>Bu,isInvokeError:()=>Gu,isSupported:()=>nl,validateActionExecuteInvokeRequest:()=>Ku});var R={};n.r(R),n.d(R,{authenticateAndResendRequest:()=>sl,authenticateWithOauth:()=>al,authenticateWithSSO:()=>il,authenticateWithSSOAndResendRequest:()=>cl,isSupported:()=>ul,validateInput:()=>ll});var F={};n.r(F),n.d(F,{ActionOpenUrlErrorCode:()=>pl,ActionOpenUrlType:()=>fl,isSupported:()=>hl,processActionOpenUrl:()=>ml,processActionSubmit:()=>gl});var k={};n.r(k),n.d(k,{isSupported:()=>Sl,processActionOpenUrl:()=>Cl,processActionSubmit:()=>yl});var M={};n.r(M),n.d(M,{SerializableActionOpenUrlDialogInfo:()=>Rl,isSupported:()=>Pl,processActionOpenUrlDialog:()=>Tl});var N={};n.r(N),n.d(N,{isSupported:()=>Nl,processActionCommand:()=>Ml});var x={};n.r(x),n.d(x,{CloudStorageProvider:()=>Dl,CloudStorageProviderFileAction:()=>Vl,CloudStorageProviderType:()=>Ul,DocumentLibraryAccessType:()=>Hl,FileDownloadStatus:()=>_l,SpecialDocumentLibraryType:()=>Ll,addCloudStorageFolder:()=>Wl,addCloudStorageProvider:()=>Ql,addCloudStorageProviderFile:()=>Xl,copyMoveFiles:()=>Gl,deleteCloudStorageFolder:()=>jl,deleteCloudStorageProviderFile:()=>ed,downloadCloudStorageProviderFile:()=>td,getCloudStorageFolderContents:()=>zl,getCloudStorageFolders:()=>Bl,getExternalProviders:()=>ql,getFileDownloads:()=>Jl,openCloudStorageFile:()=>$l,openDownloadFolder:()=>Kl,registerCloudStorageProviderContentChangeHandler:()=>od,registerCloudStorageProviderListChangeHandler:()=>rd,removeCloudStorageProvider:()=>Zl,renameCloudStorageProviderFile:()=>Yl,uploadCloudStorageProviderFile:()=>nd});var D={};n.r(D),n.d(D,{getPairedMeetingRoomInfo:()=>sd,isSupported:()=>dd,registerMeetingRoomCapabilitiesUpdateHandler:()=>ud,registerMeetingRoomStatesUpdateHandler:()=>ld,sendCommandToPairedMeetingRoom:()=>cd});var U={};n.r(U),n.d(U,{dataLayer:()=>t,isSupported:()=>fd,telemetry:()=>e});var L={};n.r(L),n.d(L,{initialize:()=>vd,version:()=>pd});var H={};n.r(H),n.d(H,{isSupported:()=>Td,showNotification:()=>Id});var _={};n.r(_),n.d(_,{isSupported:()=>kd,notifyInstallCompleted:()=>Fd,registerAppInstallationHandler:()=>Od,unregisterAppInstallationHandler:()=>Rd});var V={};n.r(V),n.d(V,{ControlCommand:()=>Nd,ErrorReason:()=>xd,SessionTerminatedReason:()=>Dd,getCapableParticipants:()=>Ud,isSupported:()=>zd,registerOnCapableParticipantsChangeHandler:()=>Vd,registerOnDeviceStateChangeHandler:()=>Wd,registerOnErrorHandler:()=>Bd,registerOnSessionStatusChangeHandler:()=>jd,requestControl:()=>Ld,sendControlCommand:()=>Hd,terminateSession:()=>_d});var B={};n.r(B),n.d(B,{isSupported:()=>Gd,selectAppEntity:()=>qd});var W={};n.r(W),n.d(W,{getUserJoinedTeams:()=>Kd,isSupported:()=>Qd});var j={};n.r(j),n.d(j,{getConfigSetting:()=>Xd,isSupported:()=>Yd,joinedTeams:()=>W});var z={};n.r(z),n.d(z,{ChannelType:()=>tf,fullTrust:()=>j,getTeamChannels:()=>nf,isSupported:()=>of,refreshSiteUrl:()=>rf});var $={};n.r($),n.d($,{EffectChangeType:()=>mf,EffectFailureReason:()=>hf,VideoFrameFormat:()=>gf,isSupported:()=>bf,notifySelectedVideoEffectChanged:()=>wf,registerForVideoEffect:()=>Cf,registerForVideoFrame:()=>vf});var q={};n.r(q),n.d(q,{ErrorLevel:()=>qf,frameProcessingTimeoutInMs:()=>zf,isSupported:()=>ep,notifyFatalError:()=>rp,notifySelectedVideoEffectChanged:()=>Zf,registerForVideoEffect:()=>Xf,registerForVideoFrame:()=>Gf,updatePersonalizedEffects:()=>Yf});var G={};n.r(G),n.d(G,{addAndConfigure:()=>dp,getAll:()=>fp,isSupported:()=>hp,reconfigure:()=>pp,remove:()=>mp,rename:()=>gp});var J={};n.r(J),n.d(J,{AppTypes:()=>Cp,isSupported:()=>yp,tab:()=>G});var K={};n.r(K),n.d(K,{isSupported:()=>Fp,openAppDetail:()=>Pp,openFullStore:()=>Tp,openInContextStore:()=>Op,openSpecificStore:()=>Rp});var Q={};n.r(Q),n.d(Q,{DataResidency:()=>qp,authenticate:()=>Hp,getAuthToken:()=>Vp,getUser:()=>Wp,notifyFailure:()=>$p,notifySuccess:()=>zp,registerAuthenticationHandlers:()=>Lp});var Z={};n.r(Z),n.d(Z,{isSupported:()=>mg,openAppInstallDialog:()=>gg});var X={};n.r(X),n.d(X,{CameraStartMode:()=>yg,File:()=>Ig,FileFormat:()=>wg,ImageOutputFormats:()=>Ag,ImageUriType:()=>Eg,Media:()=>Fg,MediaControllerEvent:()=>Cg,MediaType:()=>bg,Source:()=>Sg,VideoController:()=>Mg,captureImage:()=>Tg,hasPermission:()=>Pg,requestPermission:()=>Og,scanBarCode:()=>Dg,selectMedia:()=>Ng,viewImages:()=>xg});var Y={};n.r(Y),n.d(Y,{hasPermission:()=>Qg,isSupported:()=>Xg,requestPermission:()=>Zg,scanBarCode:()=>Kg});var ee={};n.r(ee),n.d(ee,{isSupported:()=>rm,openChat:()=>em,openGroupChat:()=>nm});var te={};n.r(te),n.d(te,{isSupported:()=>cm,read:()=>sm,write:()=>am});var ne={};n.r(ne),n.d(ne,{addNAATrustedOrigins:()=>ym,canParentManageNAATrustedOrigins:()=>mm,deleteNAATrustedOrigins:()=>Sm,getParentOrigin:()=>gm,isDeeplyNestedAuthSupported:()=>hm,isNAAChannelRecommended:()=>pm});var re={};n.r(re),n.d(re,{chooseLocation:()=>Tm,isSupported:()=>Om,showLocation:()=>Pm});var oe={};n.r(oe),n.d(oe,{getCurrentLocation:()=>Fm,hasPermission:()=>km,isSupported:()=>Nm,map:()=>re,requestPermission:()=>Mm});var ie={};n.r(ie),n.d(ie,{isSupported:()=>Vm,open:()=>_m});var ae={};n.r(ae),n.d(ae,{getLocation:()=>Wm,isSupported:()=>zm,showLocation:()=>jm});var se={};n.r(se),n.d(se,{setOptions:()=>qm});var ce={};n.r(ce),n.d(ce,{CallType:()=>Xm,EventActionSource:()=>eh,MeetingReactionType:()=>Qm,MeetingType:()=>Zm,SharingProtocol:()=>Ym,appShareButton:()=>se,getAppContentStageSharingCapabilities:()=>dh,getAppContentStageSharingState:()=>ph,getAuthenticationTokenForAnonymousUser:()=>ih,getIncomingClientAudioState:()=>th,getLiveStreamState:()=>ah,getMeetingDetails:()=>rh,getMeetingDetailsVerbose:()=>oh,joinMeeting:()=>vh,registerLiveStreamChangedHandler:()=>uh,registerMeetingReactionReceivedHandler:()=>hh,registerRaiseHandStateChangedHandler:()=>mh,registerSpeakingStateChangeHandler:()=>gh,requestAppAudioHandling:()=>wh,requestStartLiveStreaming:()=>sh,requestStopLiveStreaming:()=>ch,shareAppContentToStage:()=>lh,stopSharingAppContentToStage:()=>fh,toggleIncomingClientAudio:()=>nh,updateMicState:()=>Sh});var ue={};n.r(ue),n.d(ue,{isSupported:()=>Th,openPurchaseExperience:()=>Ih});var le={};n.r(le),n.d(le,{composeMeeting:()=>Rh,isSupported:()=>Fh,openCalendarItem:()=>Oh});var de={};n.r(de),n.d(de,{composeMailWithHandoff:()=>xh,isSupported:()=>Dh});var fe={};n.r(fe),n.d(fe,{ComposeMailType:()=>Bh,composeMail:()=>_h,handoff:()=>de,isSupported:()=>Vh,openMailItem:()=>Hh});var pe={};n.r(pe),n.d(pe,{enablePrintCapability:()=>jh,isSupported:()=>Kh,print:()=>zh,registerBeforeUnloadHandler:()=>Gh,registerBeforeUnloadHandlerHelper:()=>Jh,registerOnLoadHandler:()=>$h,registerOnLoadHandlerHelper:()=>qh});var ge={};n.r(ge),n.d(ge,{isSupported:()=>ev,selectPeople:()=>Xh});var me={};n.r(me),n.d(me,{isSupported:()=>iv,showProfile:()=>ov});var he={};n.r(he),n.d(he,{closeSearch:()=>pv,isSupported:()=>fv,registerHandlers:()=>lv,unregisterHandlers:()=>dv});var ve={};n.r(ve),n.d(ve,{getContent:()=>hv,isSupported:()=>vv});var we={};n.r(we),n.d(we,{SharingAPIMessages:()=>yv,history:()=>ve,isSupported:()=>Tv,shareWebContent:()=>Sv});var Ce={};n.r(Ce),n.d(Ce,{close:()=>Ov,isSupported:()=>Rv});var ye={};n.r(ye),n.d(ye,{StageViewOpenMode:()=>kv,isSupported:()=>Nv,open:()=>Mv,self:()=>Ce});var Se={};n.r(Se),n.d(Se,{captureImages:()=>Lv,isSupported:()=>_v,retrieveImages:()=>Hv});var be={};n.r(be),n.d(be,{CameraRestriction:()=>zv,Source:()=>$v,hasPermission:()=>qv,image:()=>Se,requestPermission:()=>Gv});var Ee={};n.r(Ee),n.d(Ee,{isSupported:()=>ew,isWebStorageClearedOnUserLogOut:()=>Xv});var Ae={};n.r(Ae),n.d(Ae,{CallModalities:()=>nw,isSupported:()=>ow,startCall:()=>rw});var Ie={};n.r(Ie),n.d(Ie,{ExpectedFailureReason:()=>So,FailedReason:()=>yo,Messages:()=>Co,notifyAppLoaded:()=>aw,notifyExpectedFailure:()=>uw,notifyFailure:()=>cw,notifySuccess:()=>sw});var Te={};n.r(Te),n.d(Te,{getDragAndDropFiles:()=>vw,isSupported:()=>Cw});var Pe={};n.r(Pe),n.d(Pe,{getSettings:()=>Jw,registerOnRemoveHandler:()=>Zw,registerOnSaveHandler:()=>Qw,setSettings:()=>Kw,setValidityState:()=>Gw});var Oe={};n.r(Oe),n.d(Oe,{getDefaultSizeIfNotProvided:()=>iC,startTask:()=>eC,submitTask:()=>nC,updateTask:()=>tC});var Re={};n.r(Re),n.d(Re,{ContainerState:()=>cC,LiveShareHost:()=>lC,UserMeetingRole:()=>sC,isSupported:()=>uC});var Fe,ke,Me,Ne,xe,De,Ue,Le,He,_e,Ve={};function Be(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(Ve),n.d(Ve,{CartStatus:()=>TC,Intent:()=>IC,addOrUpdateCartItems:()=>OC,cartVersion:()=>AC,getCart:()=>PC,isSupported:()=>kC,removeCartItems:()=>RC,updateCartStatus:()=>FC}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Fe||(Fe={})),function(e){e.M365Content="m365content"}(ke||(ke={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Me||(Me={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(Ne||(Ne={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(xe||(xe={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(De||(De={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Ue||(Ue={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Le||(Le={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(He||(He={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(_e||(_e={}));const We=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","*.outlook.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const je="2.0.1",ze="2.0.2",$e="2.0.3",qe="2.0.4",Ge="2.0.1",Je="1.9.0",Ke="2.0.0",Qe="1.7.0",Ze="1.8.0",Xe="1.9.0",Ye=n.t(We,2).validOrigins,et=1500,tt=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),nt=/^https:\/\//,rt="https",ot="teams.microsoft.com",it="The library has not yet been initialized",at="The runtime has not yet been initialized",st="The runtime version is not supported",ct="The call was not properly started";var ut=n(933);const lt=ft,dt=2147483647;function ft(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return gt(e)}return pt(e,t,n)}function pt(e,t,n){if("string"==typeof e)return wt(e,t);if(ArrayBuffer.isView(e))return It(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(yt(e,ArrayBuffer)||e&&yt(e.buffer,ArrayBuffer))return Tt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(yt(e,SharedArrayBuffer)||e&&yt(e.buffer,SharedArrayBuffer)))return Tt(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return ft.from(r,t,n);const o=Gt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ft.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function gt(e){return mt(e),ht(e<0?0:0|vt(e))}function mt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ht(e){if(e>dt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ft.prototype),t}function vt(e){if(e>=dt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+dt.toString(16)+" bytes");return 0|e}function wt(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ft.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|Ct(e,t);let r=ht(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function Ct(e,t){if(ft.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||yt(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return St(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return bt(e).length;default:if(o)return r?-1:St(e).length;t=(""+t).toLowerCase(),o=!0}}function yt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function St(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function bt(e){return ut.toByteArray(At(e))}ft.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),ft.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ft.from=function(e,t,n){return pt(e,t,n)},Object.setPrototypeOf(ft.prototype,Uint8Array.prototype),Object.setPrototypeOf(ft,Uint8Array),ft.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ft.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ft.prototype};const Et=/[^+/0-9A-Za-z-_]/g;function At(e){if((e=(e=e.split("=")[0]).trim().replace(Et,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function It(e){if(yt(e,Uint8Array)){const t=new Uint8Array(e);return Tt(t.buffer,t.byteOffset,t.byteLength)}return Pt(e)}function Tt(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,ft.prototype),r}function Pt(e){const t=e.length<0?0:0|vt(e.length),n=ht(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Ot(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return kt(r)}function Rt(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Mt(this,t,n);case"utf8":case"utf-8":return Ot(this,t,n);case"ascii":return Nt(this,t,n);case"latin1":case"binary":return xt(this,t,n);case"base64":return Dt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ut(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ft.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Ot(this,0,e):Rt.apply(this,arguments)};const Ft=4096;function kt(e){const t=e.length;if(t<=Ft)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ft));return n}function Mt(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=qt[e[r]];return o}function Nt(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function xt(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function Dt(e,t,n){return 0===t&&n===e.length?ut.fromByteArray(e):ut.fromByteArray(e.slice(t,n))}function Ut(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function Lt(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if($t(r))return a;e[n+a]=r}return a}function Ht(e,t,n,r){return zt(St(t,e.length-n),e,n,r)}function _t(e,t,n,r){return zt(Wt(t),e,n,r)}function Vt(e,t,n,r){return zt(bt(t),e,n,r)}function Bt(e,t,n,r){return zt(jt(t,e.length-n),e,n,r)}function Wt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function jt(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function zt(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function $t(e){return e!=e}ft.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return Lt(this,e,t,n);case"utf8":case"utf-8":return Ht(this,e,t,n);case"ascii":case"latin1":case"binary":return _t(this,e,t,n);case"base64":return Vt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const qt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Gt(e){if(ft.isBuffer(e)){const t=0|vt(e.length),n=ht(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||$t(e.length)?ht(0):Pt(e):"Buffer"===e.type&&Array.isArray(e.data)?Pt(e.data):void 0}const Jt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Kt;const Qt=new Uint8Array(16);function Zt(){if(!Kt&&(Kt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Kt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Kt(Qt)}const Xt=[];for(let e=0;e<256;++e)Xt.push((e+256).toString(16).slice(1));function Yt(e,t=0){return Xt[e[t+0]]+Xt[e[t+1]]+Xt[e[t+2]]+Xt[e[t+3]]+"-"+Xt[e[t+4]]+Xt[e[t+5]]+"-"+Xt[e[t+6]]+Xt[e[t+7]]+"-"+Xt[e[t+8]]+Xt[e[t+9]]+"-"+Xt[e[t+10]]+Xt[e[t+11]]+Xt[e[t+12]]+Xt[e[t+13]]+Xt[e[t+14]]+Xt[e[t+15]]}const en=function(e,t,n){if(Jt.randomUUID&&!t&&!e)return Jt.randomUUID();const r=(e=e||{}).random||(e.rng||Zt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Yt(r)},tn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const nn=function(e){return"string"==typeof e&&tn.test(e)};var rn,on,an,sn,cn,un,ln,dn;!function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(rn||(rn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(on||(on={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(an||(an={})),function(e){e.copilotSidePanel="copilotSidePanel"}(sn||(sn={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(cn||(cn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(un||(un={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(ln||(ln={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(dn||(dn={}));const fn={errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM},pn={majorVersion:1,minorVersion:5},gn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},mn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),hn=new Error("Invalid response: Received more images than the specified max limit in the response.");function vn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function wn(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),r=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(let e=0;e<n.length;++e)if(Number(n[e])!=Number(r[e]))return Number(n[e])>Number(r[e])?1:-1;return 0}function Cn(){return en()}function yn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&yn(e[t])})),Object.freeze(e)}function Sn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function bn(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function En(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function An(e,t,n){return new Promise(((r,o)=>{const i=setTimeout(o,t,n);e().then((e=>{clearTimeout(i),r(e)})).catch((e=>{clearTimeout(i),o(e)}))}))}function In(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId.toString())+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl.toString()),(e.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function Tn(e){return!(wn(`${e.majorVersion}.${e.minorVersion}`,`${pn.majorVersion}.${pn.minorVersion}`)>=0)}function Pn(e){return"https:"===e.protocol}function On(e,t){return new Promise(((n,r)=>{if(e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty."),e.startsWith("image/")){const r=atob(t),o=new Uint8Array(r.length);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);n(new Blob([o],{type:e}))}const o=lt.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Rn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function Fn(){if(kn())throw new Error("window object undefined at SSR check");return window}function kn(){return"undefined"==typeof window}function Mn(e,t){if(Dn(e)||!Un(e)||!Ln(e))throw t||new Error("id is not valid.")}function Nn(e,t){const n=e.toString().toLocaleLowerCase();if(Dn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Pn(e))throw t||new Error("Url should be a valid https url")}function xn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Dn(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Un(e){return e.length<256&&e.length>4}function Ln(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Hn(e){if(!e)throw new Error("id must not be empty");if(!1===nn(e))throw new Error("id must be a valid UUID")}const _n=!!performance&&"now"in performance;function Vn(){return _n?performance.now()+performance.timeOrigin:void 0}function Bn(e,t=0){if(t>1e3)return!1;if(void 0===e||"boolean"==typeof e||"number"==typeof e||"bigint"==typeof e||"string"==typeof e||null===e)return!0;if(Array.isArray(e))return e.every((e=>Bn(e,t+1)));return!("object"!=typeof e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype&&null!==Object.getPrototypeOf(e))&&Object.keys(e).every((n=>Bn(e[n],t+1)))}class Wn{constructor(e=Cn()){this.uuid=e,Hn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function jn(e){if(!(e instanceof Wn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class zn{}zn.initializeCalled=!1,zn.initializeCompleted=!1,zn.additionalValidOrigins=[],zn.initializePromise=void 0,zn.isFramelessWindow=!1,zn.frameContext=void 0,zn.hostClientType=void 0,zn.printCapabilityEnabled=!1,zn.teamsJsInstanceId=(new Wn).toString();var $n=n(815);const qn=new Wn,Gn=$n.debug.formatArgs;$n.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${qn.toString()}]`,Gn.call(this,e)};const Jn=(0,$n.debug)("teamsJs");function Kn(e){return Jn.extend(e)}function Qn(e,t){return`${e}_${t}`}function Zn(e){return/^v\d+_[\w.]+$/.test(e)}var Xn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Yn=Kn("runtime"),er=4;function tr(e){return e.apiVersion===er}const nr={apiVersion:-1,supports:{}};function rr(e){if(tr(e))return!0;throw-1===e.apiVersion?new Error(at):new Error(st)}let or=nr;const ir={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:gn,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},ar=[rn.desktop,rn.web,rn.rigel,rn.surfaceHub,rn.teamsRoomsWindows,rn.teamsRoomsAndroid,rn.teamsPhones,rn.teamsDisplays],sr=[rn.android,rn.ios,rn.ipados,rn.visionOS],cr=[...ar,...sr];function ur(e){let t=e;if(t.apiVersion<er&&lr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),tr(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const lr=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=Xn(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],dr="2.1.2",fr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:ar}],"1.9.0":[{capability:{location:{}},hostClientTypes:cr}],"2.0.0":[{capability:{people:{}},hostClientTypes:cr},{capability:{sharing:{}},hostClientTypes:[rn.desktop,rn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[rn.android,rn.desktop,rn.ios,rn.teamsRoomsAndroid,rn.teamsPhones,rn.teamsDisplays,rn.web]},{capability:{webStorage:{}},hostClientTypes:[rn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[rn.android,rn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[rn.android,rn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[rn.android,rn.ios,rn.ipados,rn.visionOS]}],"2.1.2":[]},pr=Yn.extend("generateBackCompatRuntimeConfig");function gr(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"!=typeof t[r]||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=gr(e[r]||{},t[r]));return n}function mr(e,t,n){pr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);pr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{wn(e,t)>=0&&n[t].forEach((e=>{void 0!==zn.hostClientType&&e.hostClientTypes.includes(zn.hostClientType)&&(r=gr(r,e.capability))}))}));const o={apiVersion:er,hostVersionsInfo:gn,isLegacyTeams:!0,supports:r};return pr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const hr=Yn.extend("applyRuntimeConfig");function vr(e){"string"==typeof e.apiVersion&&(hr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),hr("Fast-forwarding runtime %o",e);const t=ur(e);hr("Applying runtime %o",t),or=yn(t)}function wr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Cr="2.40.0",yr={childProxyingCommunication:!1};function Sr(){yr.childProxyingCommunication=!0}function br(){return yr.childProxyingCommunication}let Er={disableEnforceOriginMatchForChildResponses:!1};function Ar(){return Er}function Ir(e){Er=e}function Tr(e){return Ir(Object.assign(Object.assign({},Er),e)),Ar()}var Pr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Or=e=>{const{uuid:t}=e,n=Pr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Rr=e=>{const{uuidAsString:t}=e,n=Pr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Wn(t):void 0})},Fr=e=>{const{uuidAsString:t}=e,n=Pr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Wn(t):void 0})},kr=e=>{const{uuid:t}=e,n=Pr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Mr(e){return void 0!==e.uuidAsString?`${e.uuidAsString} (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Nr=Kn("flushMessageQueue");function xr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Or(o);Nr("Flushing message %s from %s message queue via postMessage.",Mr(n),r),e.postMessage(n,t)}}}const Dr=Kn("internal"),Ur=Dr.extend("ensureInitializeCalled"),Lr=Dr.extend("ensureInitialized");function Hr(){if(!zn.initializeCalled)throw Ur(it),new Error(it)}function _r(e,...t){if(!zn.initializeCompleted)throw Lr("%s. initializeCalled: %s",it,zn.initializeCalled.toString()),new Error(it);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===zn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${zn.frameContext}".`)}return rr(e)}function Vr(e=je){const t=wn(zn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Br(){return zn.hostClientType==rn.android||zn.hostClientType==rn.ios||zn.hostClientType==rn.ipados||zn.hostClientType==rn.visionOS}function Wr(e=je){if(!Br()){throw{errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM}}if(!Vr(e)){throw{errorCode:Ne.OLD_PLATFORM}}}function jr(e){let t=zn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&nt.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),zn.additionalValidOrigins=t}function zr(e){if(!Jr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${qr}-${Gr}).`)}function $r(e){if(Dn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(Kr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const qr=4,Gr=256;function Jr(e){return e.length<Gr&&e.length>qr}function Kr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Qr(e){if(!(e instanceof Xr))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Zr{constructor(e){this.idAsString=e,$r(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class Xr extends Zr{constructor(e){super(e),zr(e)}toJSON(){return{appIdAsString:this.toString()}}}function Yr(e){return null==e}var eo=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let to;const no="v1",ro=Kn("messageChannels.telemetry");function oo(){return eo(this,void 0,void 0,(function*(){if(to)return ro("Returning telemetry port from cache"),to;if(!io())throw fn;return to=yield pc(Qn(no,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),to}))}function io(){var e;return!(!_r(or)||!(null===(e=or.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function ao(){to=void 0}var so=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let co;const uo="v1",lo=Kn("messageChannels.dataLayer");function fo(){return so(this,void 0,void 0,(function*(){if(co)return lo("Returning dataLayer port from cache"),co;if(!po())throw fn;return co=yield pc(Qn(uo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),co}))}function po(){var e;return!(!_r(or)||!(null===(e=or.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function go(){co=void 0}function mo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");_r(or),Fs(e)}function ho(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");_r(or),ks(e)}const vo="v2",wo=Kn("app"),Co={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var yo,So;function bo(){return zn.initializeCompleted}function Eo(){return zn.frameContext}function Ao(e){return qi(Qn(vo,"app.initialize"),e)}function Io(e){tc.currentWindow=e}function To(){zn.initializeCalled&&(gs(),zn.initializeCalled=!1,zn.initializeCompleted=!1,zn.initializePromise=void 0,zn.additionalValidOrigins=[],zn.frameContext=void 0,zn.hostClientType=void 0,zn.isFramelessWindow=!1,ao(),go(),oc())}function Po(){return new Promise((e=>{Hr(),e(ic(Qn(vo,"app.getContext"),"getContext"))})).then((e=>Do(e)))}function Oo(){Hr(),Gi(Qn(vo,"app.notifyAppLoaded"))}function Ro(){return Qi(Qn(vo,"app.notifySuccess"))}function Fo(e){Hr(),Ki(Qn(vo,"app.notifyFailure"),e)}function ko(e){Hr(),Ji(Qn(vo,"app.notifyExpectedFailure"),e)}function Mo(e){ta(Qn(vo,"app.registerOnThemeChangeHandler"),e)}function No(e){Es(e)}function xo(e){return na(Qn(vo,"app.openLink"),e)}function Do(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:on.teams,clientType:e.hostClientType?e.hostClientType:rn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Xr(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:zn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}function Uo(e){Zo(Qn(Ko,"dialog.update.resize"),e)}function Lo(){return!(!_r(or)||!or.supports.dialog)&&!!or.supports.dialog.update}function Ho(e,t,n){Yo(Qn(Ko,"dialog.url.bot.open"),e,t,n)}function _o(){return _r(or)&&void 0!==(or.supports.dialog&&or.supports.dialog.url&&or.supports.dialog.url.bot)}function Vo(e){if(_r(or,an.task),!jo())throw fn;hc(Qn(Ko,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Bo(e){if(_r(or,an.content,an.sidePanel,an.meetingStage),!jo())throw fn;hc(Qn(Ko,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Wo(e){if(_r(or,an.task),!jo())throw fn;for(ws("messageForChild"),vs(Qn(Ko,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ri.reverse();ri.length>0;){e(ri.pop())}}function jo(){var e,t;return _r(or)&&!!(null===(t=null===(e=or.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function zo(e,t,n){Xo(Qn(Ko,"dialog.url.open"),e,t,n)}function $o(e,t){ei(Qn(Ko,"dialog.url.submit"),e,t)}function qo(){return _r(or)&&void 0!==(or.supports.dialog&&or.supports.dialog.url)}function Go(e){return{url:e.url,height:e.size?e.size.height:ln.Small,width:e.size?e.size.width:ln.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Jo(e){const t=Go(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(yo||(yo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(So||(So={})),wo("teamsjs instance is version %s, starting at %s UTC (%s local)",Cr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(kn())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,n="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?wo("teamsjs is being used from %s. %s",t,n):wo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const Ko="v2",Qo="dialog.submit should not be called from FrameContext.content.\nIf dialog.submit was called from inside the dialog, please disregard this message.\nThis issue occurs due to a bug in Teams mobile where the dialog is incorrectly identified as being in the content FrameContext.\nWe are working to resolve this.";function Zo(e,t){if(_r(or,an.content,an.sidePanel,an.task,an.meetingStage),!Lo())throw fn;hc(e,"tasks.updateTask",[t])}function Xo(e,t,n,r){if(_r(or,an.content,an.sidePanel,an.meetingStage),!qo())throw fn;r&&vs(Qn(Ko,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);hc(e,"tasks.startTask",[Go(t)],((e,t)=>{null==n||n({err:e,result:t}),ws("messageForParent")}))}function Yo(e,t,n,r){if(_r(or,an.content,an.sidePanel,an.meetingStage),!_o())throw fn;r&&vs(Qn(Ko,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);hc(e,"tasks.startTask",[Jo(t)],((e,t)=>{null==n||n({err:e,result:t}),ws("messageForParent")}))}function ei(e,t,n){if(_r(or,an.content,an.task),!qo())throw fn;zn.frameContext===an.content&&console.warn(Qo),hc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function ti(e){return{card:e.card,height:e.size?e.size.height:ln.Small,width:e.size?e.size.width:ln.Small,title:e.title}}function ni(e){const t=ti(e);return t.completionBotId=e.completionBotId,t}const ri=[];function oi(e){zn.frameContext&&(zn.frameContext===an.task?ri.push(e):ws("messageForChild"))}function ii(e,t){if(_r(or,an.content,an.sidePanel,an.meetingStage),!ai())throw fn;const n=ni(e);hc(Qn(Ko,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ai(){const e=or.hostVersionsInfo&&or.hostVersionsInfo.adaptiveCardSchemaVersion&&!Tn(or.hostVersionsInfo.adaptiveCardSchemaVersion);return _r(or)&&void 0!==(e&&or.supports.dialog&&or.supports.dialog.card&&or.supports.dialog.card.bot)}function si(e,t){if(_r(or,an.content,an.sidePanel,an.meetingStage),!ci())throw fn;const n=ti(e);hc(Qn(Ko,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ci(){const e=or.hostVersionsInfo&&or.hostVersionsInfo.adaptiveCardSchemaVersion&&!Tn(or.hostVersionsInfo.adaptiveCardSchemaVersion);return _r(or)&&void 0!==(e&&or.supports.dialog&&or.supports.dialog.card)}function ui(){vs(Qn(Ko,"dialog.registerMessageForChildHandler"),"messageForChild",oi,!1)}function li(){return!(!_r(or)||!or.supports.dialog)}const di="v2";var fi,pi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(fi||(fi={}));class gi{constructor(){this.enabled=!0,this.selected=!1}}let mi,hi,vi,wi,Ci;function yi(){vs(Qn(di,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ai,!1),vs(Qn(di,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ti,!1),vs(Qn(di,"menus.registerSetModuleViewHandler"),"setModuleView",bi,!1)}function Si(e,t){if(_r(or),!Pi())throw fn;vi=t,hc(Qn(di,"menus.setUpViews"),"setUpViews",[e])}function bi(e){vi&&vi(e)||(_r(or),hc(Qn(di,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ei(e,t){if(_r(or),!Pi())throw fn;mi=t,hc(Qn(di,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ai(e){mi&&mi(e)||(_r(or),hc(Qn(di,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Ii(e,t){if(_r(or),!Pi())throw fn;hi=t,hc(Qn(di,"menus.showActionMenu"),"showActionMenu",[e])}function Ti(e){hi&&hi(e)||(_r(or),hc(Qn(di,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Pi(){return!(!_r(or)||!or.supports.menus)}function Oi(){vs(Qn($a,"pages.config.registerSettingsSaveHandler"),"settings.save",Di,!1),vs(Qn($a,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Hi,!1)}function Ri(e){return es(Qn($a,"pages.config.setValidityState"),e)}function Fi(e){return ns(Qn($a,"pages.config.setConfig"),e)}function ki(e){Mi(Qn($a,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Yr(e)&&!Vi())throw fn}))}function Mi(e,t,n){!Yr(t)&&_r(or,an.settings),n&&n(),wi=t,!Yr(t)&&hc(e,"registerHandler",["save"])}function Ni(e){xi(Qn($a,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Yr(e)&&!Vi())throw fn}))}function xi(e,t,n){!Yr(t)&&_r(or,an.remove,an.settings),n&&n(),Ci=t,!Yr(t)&&hc(e,"registerHandler",["remove"])}function Di(e){const t=new Li(e);wi?wi(t):Us()?js("settings.save",[e]):t.notifySuccess()}function Ui(e){ys(Qn($a,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[an.content],(()=>{if(!Vi())throw fn}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(pi||(pi={}));class Li{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),hc(Qn($a,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),hc(Qn($a,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function Hi(){const e=new _i;Ci?Ci(e):Us()?js("settings.remove",[]):e.notifySuccess()}class _i{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),hc(Qn($a,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),hc(Qn($a,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function Vi(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.config}class Bi{}class Wi extends Bi{validate(e){return!0}deserialize(e){return e}}var ji=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const zi=6e4,$i=Kn("app");function qi(e,t){if(kn()){return $i.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return An((()=>ea(e,t)),zi,new Error("SDK initialization timed out."))}function Gi(e){hc(e,Co.AppLoaded,[Cr])}function Ji(e,t){hc(e,Co.ExpectedFailure,[t.reason,t.message])}function Ki(e,t){hc(e,Co.Failure,[t.reason,t.message])}function Qi(e){return ji(this,void 0,void 0,(function*(){if(zn.initializeCompleted)return Xi(e);if(!zn.initializePromise)throw new Error(it);return zn.initializePromise.then((()=>Xi(e)))}))}function Zi(){var e;return _r(or)&&!!(null===(e=or.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Xi(e){return ji(this,void 0,void 0,(function*(){return Zi()?dc(Co.Success,[Cr],new Wi,e).then((()=>({hasFinishedSuccessfully:!0}))):(hc(e,Co.Success,[Cr]),{hasFinishedSuccessfully:"unknown"})}))}const Yi=$i.extend("initializeHelper");function ea(e,t){return new Promise((n=>{zn.initializeCalled||(zn.initializeCalled=!0,ps(),zn.initializePromise=rc(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=je})=>{zn.frameContext=e,zn.hostClientType=t,zn.clientSupportedSDKVersion=r;try{Yi("Parsing %s",n);const e=JSON.parse(n);if(Yi("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&vr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Yi("Attempting to parse %s as an SDK version",n),isNaN(wn(n,je))||(zn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Yi("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");vr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;vr(mr(zn.clientSupportedSDKVersion,ir,fr))}}zn.initializeCompleted=!0})),yi(),Oi(),ui()),Array.isArray(t)&&jr(t),void 0!==zn.initializePromise?n(zn.initializePromise):Yi("GlobalVars.initializePromise is unexpectedly undefined")}))}function ta(e,t){!Yr(t)&&Hr(),Ss(e,t)}function na(e,t){return new Promise((n=>{_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),n(ac(e,"executeDeepLink",t))}))}var ra=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let oa=[];const ia=Kn("validateOrigin");let aa;function sa(){return ra(this,void 0,void 0,(function*(){aa||(yield ua())}))}function ca(){return 0===oa.length}function ua(e=!1){return ra(this,void 0,void 0,(function*(){if(!ca()&&!e)return oa;if(aa)return aa;if(kn())return oa=Ye,Ye;{ia("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),et);return aa=fetch(tt,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ia("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(la(JSON.stringify(e)))return oa=e.validOrigins,oa;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?ia(`validOrigins fetch call to CDN failed due to Timeout of ${et} ms. Defaulting to fallback list`):ia("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),oa=Ye,oa))),aa}}))}function la(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return ia("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function da(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function fa(e,t){const n=t||ca()?Ye:oa;return pa(e,n)?Promise.resolve(!0):(ia("Origin %s is not in the local valid origins list, fetching from CDN",e),ua(t).then((t=>pa(e,t))))}function pa(e,t){if(!Pn(e))return ia("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>da(e,n))))return!0;for(const e of zn.additionalValidOrigins){if(da("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return ia("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,zn.additionalValidOrigins),!1}function ga(e){ys(Qn($a,"pages.appButton.onClick"),"appButtonClick",e,[an.content],(()=>{if(!va())throw fn}))}function ma(e){ys(Qn($a,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[an.content],(()=>{if(!va())throw fn}))}function ha(e){ys(Qn($a,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[an.content],(()=>{if(!va())throw fn}))}function va(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.appButton}function wa(){cs()}function Ca(){return Ga(Qn($a,"pages.backStack.navigateBack"))}function ya(e){Sa(Qn($a,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Yr(e)&&!ba())throw fn}))}function Sa(e,t,n){!Yr(t)&&_r(or),n&&n(),ss(t),!Yr(t)&&hc(e,"registerHandler",["backButton"])}function ba(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.backStack}function Ea(e){return new Promise((t=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!Ia())throw fn;t(cc(Qn($a,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Aa(){return new Promise((e=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!Ia())throw fn;e(cc(Qn($a,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Ia(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.currentApp}function Ta(){if(_r(or,an.content),!Oa())throw fn;hc(Qn($a,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Pa(){if(_r(or,an.content),!Oa())throw fn;hc(Qn($a,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Oa(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.fullTrust}function Ra(e){return Ja(Qn($a,"pages.tabs.navigateToTab"),e)}function Fa(e){return Qa(Qn($a,"pages.tabs.getTabInstances"),e)}function ka(e){return Za(Qn($a,"pages.tabs.getMruTabInstances"),e)}function Ma(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.tabs}var Na,xa;function Da(e){const t=Qn($a,"pages.returnFocus");if(_r(or),!za())throw fn;if(void 0===e&&hc(t,"returnFocus",[!1]),"boolean"==typeof e)hc(t,"returnFocus",[e]);else switch(e){case xa.PreviousLandmark:case xa.GoToActivityFeed:hc(t,"returnFocus",[!1,e]);break;case xa.NextLandmark:hc(t,"returnFocus",[!0,e])}}function Ua(e){ys(Qn($a,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!za())throw fn}))}function La(e){Ya(Qn($a,"pages.setCurrentFrame"),e)}function Ha(e,t,n){sa(),qi(Qn($a,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),La(e)}function _a(){return ts(Qn($a,"pages.getConfig."))}function Va(e){return qa(Qn($a,"pages.navigateCrossDomain"),e)}function Ba(e){return new Promise((t=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!za())throw fn;const n=Qn($a,"pages.navigateToApp");if(or.isLegacyTeams){t(ac(n,"executeDeepLink",In(rs(e)?e:os(e))))}else{t(ac(n,"pages.navigateToApp",rs(e)?is(e):e))}}))}function Wa(e){return Xa(Qn($a,"pages.shareDeepLink"),e)}function ja(e){ys(Qn($a,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Yr(e)&&!za())throw fn}))}function za(){return!(!_r(or)||!or.supports.pages)}sa(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Na||(Na={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(xa||(xa={}));const $a="v2";function qa(e,t){return new Promise((n=>{if(_r(or,an.content,an.sidePanel,an.settings,an.remove,an.task,an.stage,an.meetingStage),!za())throw fn;n(sc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Ga(e){return new Promise((t=>{if(_r(or),!ba())throw fn;t(sc(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Ja(e,t){return new Promise((n=>{if(_r(or),!Ma())throw fn;n(sc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Ka(e,t){if(_r(or),!za())throw fn;hc(e,"returnFocus",[t])}function Qa(e,t){return new Promise((n=>{if(_r(or),!Ma())throw fn;n(ic(e,"getTabInstances",t))}))}function Za(e,t){return new Promise((n=>{if(_r(or),!Ma())throw fn;n(ic(e,"getMruTabInstances",t))}))}function Xa(e,t){if(_r(or,an.content,an.sidePanel,an.meetingStage),!za())throw fn;hc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Ya(e,t){if(_r(or,an.content),!za())throw fn;hc(e,"setFrameContext",[t])}function es(e,t){if(_r(or,an.settings,an.remove),!Vi())throw fn;hc(e,"settings.setValidityState",[t])}function ts(e){return new Promise((t=>{if(_r(or,an.content,an.settings,an.remove,an.sidePanel),!za())throw fn;t(ic(e,"settings.getSettings"))}))}function ns(e,t){return new Promise((n=>{if(_r(or,an.content,an.settings,an.sidePanel),!Vi())throw fn;n(ac(e,"settings.setSettings",t))}))}function rs(e){return e.appId instanceof Xr}function os(e){return Object.assign(Object.assign({},e),{appId:new Xr(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function is(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let as;function ss(e){as=e}function cs(){vs(Qn($a,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",us,!1)}function us(){as&&as()||(Us()?js("backButtonPress",[]):Ca())}var ls=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ds=Kn("handlers");class fs{static initializeHandlers(){fs.handlers.themeChange=bs,fs.handlers.load=Ts,fs.handlers.beforeUnload=Rs,cs()}static uninitializeHandlers(){fs.handlers={},fs.themeChangeHandler=null,fs.loadHandler=null,fs.beforeUnloadHandler=null,fs.beforeSuspendOrTerminateHandler=null,fs.resumeHandler=null}}function ps(){fs.initializeHandlers()}function gs(){fs.uninitializeHandlers()}fs.handlers={},fs.themeChangeHandler=null,fs.loadHandler=null,fs.beforeUnloadHandler=null,fs.beforeSuspendOrTerminateHandler=null,fs.resumeHandler=null,fs.hostToAppPerformanceMetricsHandler=null;const ms=ds.extend("callHandler");function hs(e,t){const n=fs.handlers[e];if(n){ms("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Us()?(js(e,t),[!1,void 0]):(ms("Handler for action message %s not found.",e),[!1,void 0])}function vs(e,t,n,r=!0,o=[]){n?(fs.handlers[t]=n,r&&hc(e,"registerHandler",[t,...o])):delete fs.handlers[t]}function ws(e){delete fs.handlers[e]}function Cs(e){return null!=fs.handlers[e]}function ys(e,t,n,r,o){n&&_r(or,...r),o&&o(),vs(e,t,n)}function Ss(e,t){fs.themeChangeHandler=t,!Yr(t)&&hc(e,"registerHandler",["themeChange"])}function bs(e){fs.themeChangeHandler&&fs.themeChangeHandler(e),Us()&&js("themeChange",[e])}function Es(e){fs.hostToAppPerformanceMetricsHandler=e}function As(e){fs.hostToAppPerformanceMetricsHandler&&fs.hostToAppPerformanceMetricsHandler(e)}function Is(e,t){fs.loadHandler=t,!Yr(t)&&hc(e,"registerHandler",["load"])}function Ts(e){const t=Ps(e);fs.resumeHandler?(fs.resumeHandler(t),Us()&&js("load",[t])):fs.loadHandler&&(fs.loadHandler(e),Us()&&js("load",[e]))}function Ps(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Os(e,t){fs.beforeUnloadHandler=t,!Yr(t)&&hc(e,"registerHandler",["beforeUnload"])}function Rs(){return ls(this,void 0,void 0,(function*(){const e=()=>{hc(Qn("v2","handleBeforeUnload"),"readyToUnload",[])};fs.beforeSuspendOrTerminateHandler?(yield fs.beforeSuspendOrTerminateHandler(),Us()?js("beforeUnload"):e()):fs.beforeUnloadHandler&&fs.beforeUnloadHandler(e)||(Us()?js("beforeUnload"):e())}))}function Fs(e){fs.beforeSuspendOrTerminateHandler=e,!Yr(e)&&hc(Qn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function ks(e){fs.resumeHandler=e,!Yr(e)&&hc(Qn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Ms=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ns=Kn("childProxyingCommunication");class xs{}function Ds(){xs.window=null,xs.origin=null,xs.messageQueue=[]}function Us(){return!!br()&&!!xs.window}function Ls(e,t){return!!br()&&(xs.window&&!xs.window.closed&&e!==xs.window||(xs.window=e,xs.origin=t),xs.window&&xs.window.closed?(xs.window=null,xs.origin=null,!1):xs.window===e)}function Hs(e,t,n,r){return Ms(this,void 0,void 0,(function*(){xs.window===t&&(xr(xs.window,xs.origin,xs.messageQueue,"child"),Vs(e,n,r))}))}xs.messageQueue=[];const _s=Ns.extend("handleIncomingMessageFromChild");function Vs(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Rr(e.data),[o,i]=hs(r.func,r.args);if(o&&void 0!==i)return _s("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Mr(r),r.func),void Ws(r.id,r.uuid,Array.isArray(i)?i:[i]);_s("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Mr(r),r.func),Bs(r,t,n)}function Bs(e,t,n){const r=t(Qn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=xs.origin;n(r.uuid,((...t)=>{if(!xs.window)return;if(!Ar().disableEnforceOriginMatchForChildResponses&&o!==xs.origin)return void _s("Origin of child window has changed, not sending response back to child window");const n=t.pop();_s("Message from parent being relayed to child, id: %s",Mr(e)),Ws(e.id,e.uuid,t,n)}))}function Ws(e,t,n,r){const o=xs.window,i=zs(e,t,n,r),a=kr(i),s=xs.origin;o&&s&&(_s("Sending message %s to %s via postMessage, args = %o",Mr(a),"child",a.args),o.postMessage(a,s))}function js(e,t){const n=xs.window,r=$s(e,t),o=xs.origin;n&&o?n.postMessage(r,o):xs.messageQueue.push(r)}function zs(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function $s(e,t){return{func:e,args:t||[]}}class qs{static storeCallbackInformation(e,t){qs.callbackInformation.set(e,t)}static clearMessages(){qs.callbackInformation.clear()}static deleteMessageInformation(e){qs.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?As({actionName:e.func,messageDelay:n-r,requestStartedAt:r}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(e,t,n,r){const o=qs.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(As({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),qs.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}qs.callbackInformation=new Map;const Gs=Kn("nestedAppAuthUtils"),Js=Gs.extend("tryPolyfillWithNestedAppAuthBridge"),Ks="v2";function Qs(e,t,n){var r;const o=Js;if(zn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=Xs(a,n);s&&(a.nestedAppAuthBridge=s)}const Zs=Gs.extend("createNestedAppAuthBridge");function Xs(e,t){const n=Zs;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=Qn(Ks,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var Ys=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ec=Kn("communication");class tc{}class nc{}function rc(e,t){if(nc.messageListener=e=>Ac(e),tc.currentWindow=tc.currentWindow||Fn(),tc.parentWindow=tc.currentWindow.parent!==tc.currentWindow.self?tc.currentWindow.parent:tc.currentWindow.opener,tc.topWindow=tc.currentWindow.top,(tc.parentWindow||e)&&tc.currentWindow.addEventListener("message",nc.messageListener,!1),!tc.parentWindow){const e=tc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));zn.isFramelessWindow=!0,e.onNativeMessage=xc}try{return tc.parentOrigin="*",uc(t,"initialize",[Cr,er,e]).then((([e,t,n,r])=>(Qs(r,tc.currentWindow,{onMessage:Tc,sendPostMessage:wc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{tc.parentOrigin=null}}function oc(){tc.currentWindow&&tc.currentWindow.removeEventListener("message",nc.messageListener,!1),tc.currentWindow=null,tc.parentWindow=null,tc.parentOrigin=null,nc.parentMessageQueue=[],nc.nextMessageId=0,nc.callbacks.clear(),nc.promiseCallbacks.clear(),nc.portCallbacks.clear(),nc.legacyMessageIdsToUuidMap={},qs.clearMessages(),Ds()}function ic(e,t,...n){return uc(e,t,n).then((([e])=>e))}function ac(e,t,...n){return uc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function sc(e,t,n,...r){return uc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function cc(e,t,...n){return uc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function uc(e,t,n=void 0){if(!Zn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((r=>{r(mc(bc(e,t,n).uuid))}))}function lc(e){return e.map((e=>wr(e)?e.serialize():e))}function dc(e,t,n,r,o){var i;return Ys(this,void 0,void 0,(function*(){const a=lc(t),[s]=yield uc(r,e,a);if(o&&o(s)||!o&&Be(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${Ne.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function fc(e,t,n,r){var o;return Ys(this,void 0,void 0,(function*(){const i=lc(t),[a]=yield uc(n,e,i);if(r&&r(a)||!r&&Be(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Ne.INTERNAL_ERROR}, message: Invalid response from host`)}))}function pc(e,t,n=void 0){if(!Zn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return gc(bc(e,t,n).uuid)}function gc(e){return new Promise(((t,n)=>{nc.portCallbacks.set(e,((e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}))}))}function mc(e){return new Promise((t=>{nc.promiseCallbacks.set(e,t)}))}function hc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Zn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=bc(e,t,o);r&&nc.callbacks.set(i.uuid,r)}nc.parentMessageQueue=[],nc.topMessageQueue=[],nc.nextMessageId=0,nc.callbacks=new Map,nc.promiseCallbacks=new Map,nc.portCallbacks=new Map,nc.legacyMessageIdsToUuidMap={};const vc=ec.extend("sendNestedAuthRequestToTopWindow");function wc(e,t){const n=vc,r=tc.topWindow,o=Wc(e,t);return n("Message %s information: %o",Mr(o),{actionName:o.func}),yc(r,o)}const Cc=ec.extend("sendRequestToTargetWindowHelper");function yc(e,t){const n=Cc,r=_c(e),o=Or(t);if(zn.isFramelessWindow)tc.currentWindow&&tc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Mr(o),r),tc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Hc(e);e&&i?(n("Sending message %s to %s via postMessage",Mr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Mr(o),r),Lc(e).push(t))}return t}const Sc=ec.extend("sendMessageToParentHelper");function bc(e,t,n,r,o){const i=Sc,a=tc.parentWindow,s=Bc(e,t,n,r,o);return qs.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Mr(s),{actionName:t,args:n}),yc(a,s)}const Ec=ec.extend("processIncomingMessage");function Ac(e){return Ys(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Ec("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return Oc(t,n).then((r=>{r?(Rc(t,n),t!==tc.parentWindow?Ls(t,n)&&Hs(e,t,bc,((e,t)=>nc.callbacks.set(e,t))):xc(e)):Ec("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const Ic=ec.extend("processAuthBridgeMessage");function Tc(e,t){var n,r;const o=Ic;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),u=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Oc(c,u)?(tc.topWindow&&!tc.topWindow.closed&&c!==tc.topWindow||(tc.topWindow=c,tc.topOrigin=u),tc.topWindow&&tc.topWindow.closed&&(tc.topWindow=null,tc.topOrigin=null),xr(tc.topWindow,tc.topOrigin,nc.topMessageQueue,"top"),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const Pc=ec.extend("shouldProcessIncomingMessage");function Oc(e,t){return Ys(this,void 0,void 0,(function*(){if(tc.currentWindow&&e===tc.currentWindow)return Pc("Should not process message because it is coming from the current window"),!1;if(tc.currentWindow&&tc.currentWindow.location&&t&&t===tc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Pc("Message has an invalid origin of %s",t),!1}const n=yield fa(e);return n||Pc("Message has an invalid origin of %s",t),n}}))}function Rc(e,t){zn.isFramelessWindow||tc.parentWindow&&!tc.parentWindow.closed&&e!==tc.parentWindow||(tc.parentWindow=e,tc.parentOrigin=t),tc.parentWindow&&tc.parentWindow.closed&&(tc.parentWindow=null,tc.parentOrigin=null),xr(tc.parentWindow,tc.parentOrigin,nc.parentMessageQueue,"parent")}const Fc=ec.extend("handleIncomingMessageFromParent");function kc(e){const t=Fc;if(!e.uuid)return nc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Mc(nc.callbacks,t);if(n)return n;const r=Mc(nc.promiseCallbacks,t);if(r)return r;const o=Mc(nc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Mr(e))}function Mc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Nc(e,t){const n=Mc(t,e.uuid);n&&t.delete(n),e.uuid?nc.legacyMessageIdsToUuidMap={}:delete nc.legacyMessageIdsToUuidMap[e.id]}function xc(e){const t=Fc,n=Vn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Fr(r),i=kc(o);if(i){const r=nc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),qs.handlePerformanceMetrics(i,o,t,n),r&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),r.apply(null,[...o.args,o.isPartialResponse]),Dc(e)||(t("Removing registered callback for message %s",i.toString()),Nc(o,nc.callbacks)));const a=nc.promiseCallbacks.get(i);a&&(t("Invoking the registered promise callback for message %s with arguments %o",i.toString(),o.args),a(o.args),t("Removing registered promise callback for message %s",i.toString()),Nc(o,nc.promiseCallbacks));const s=nc.portCallbacks.get(i);if(s){let n;t("Invoking the registered port callback for message %s with arguments %o",i.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),s(n,o.args),t("Removing registered port callback for message %s",i.toString()),Nc(o,nc.portCallbacks)}o.uuid&&(nc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;qs.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Mr(r),r.func),hs(r.func,r.args)}else t("Received an unknown message: %O",e)}function Dc(e){return!0===e.data.isPartialResponse}function Uc(){return tc.topWindow!==tc.parentWindow}function Lc(e){return e===tc.topWindow&&Uc()?nc.topMessageQueue:e===tc.parentWindow?nc.parentMessageQueue:[]}function Hc(e){return e===tc.topWindow&&Uc()?tc.topOrigin:e===tc.parentWindow?tc.parentOrigin:null}function _c(e){return e===tc.topWindow&&Uc()?"top":e===tc.parentWindow?"parent":null}function Vc(e,t){let n;n=tc.currentWindow.setInterval((()=>{0===Lc(e).length&&(clearInterval(n),t())}),100)}function Bc(e,t,n,r,o){const i=nc.nextMessageId++,a=new Wn;nc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:zn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Vn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function Wc(e,t){const n=nc.nextMessageId++,r=new Wn;return nc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Vn(),apiVersionTag:t,args:[],data:e}}const jc="v1";function zc(e){if(!Yr(e)&&_r(or),!Yr(e)&&!$c())throw fn;e?vs(Qn(jc,"log.request"),"log.request",(()=>{const t=e();hc(Qn(jc,"log.receive"),"log.receive",[t])})):ws("log.request")}function $c(){return!(!_r(or)||!or.supports.logs)}var qc,Gc,Jc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(qc||(qc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Gc||(Gc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Jc||(Jc={}));const Kc="v1";function Qc(e,t){_r(or),hc(Qn(Kc,"uploadCustomApp"),"uploadCustomApp",[e],t||vn())}function Zc(e,t,n){_r(or),hc(Qn(Kc,"sendCustomMessage"),e,t,n)}function Xc(e,t){if(_r(or),!Us())throw new Error("The child window has not yet been initialized or is not present");js(e,t)}function Yc(e,t){_r(or),vs(Qn(Kc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function eu(e,t){_r(or),vs(Qn(Kc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function tu(e){_r(or,an.content,an.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];hc(Qn(Kc,"openFilePreview"),"openFilePreview",t)}const nu="v1";function ru(e){return new Promise((t=>{if(_r(or,an.content),!au())throw fn;const n=ac(Qn(nu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&vs(Qn(nu,"conversations.registerStartConversationHandler"),"startConversation",((t,n,r,o)=>{var i;return null===(i=e.onStartConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&vs(Qn(nu,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),t(n)}))}function ou(){if(_r(or,an.content),!au())throw fn;hc(Qn(nu,"conversations.closeConversation"),"conversations.closeConversation"),ws("startConversation"),ws("closeConversation")}function iu(){return new Promise((e=>{if(_r(or),!au())throw fn;e(ic(Qn(nu,"conversations.getChatMember"),"getChatMembers"))}))}function au(){return!(!_r(or)||!or.supports.conversations)}var su=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const cu="v2",uu=Kn("copilot");function lu(){var e;return _r(or)&&!!(null===(e=or.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function du(e,t){var n;return void 0===t&&(t=null!==(n=Vn())&&void 0!==n?n:Date.now()),su(this,void 0,void 0,(function*(){return _r(or),uu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),fc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Qn(cu,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var fu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const pu="v2",gu=Kn("copilot");function mu(){var e,t;return _r(or)&&(!!(null===(e=or.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=or.supports.copilot)||void 0===t?void 0:t.eligibility))}function hu(e){var t,n;return fu(this,void 0,void 0,(function*(){if(_r(or),!mu())throw new Error(`Error code: ${fn.errorCode}, message: Not supported on platform`);if((null===(t=or.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return gu("Eligibility information is already available on runtime."),or.hostVersionsInfo.appEligibilityInformation;gu("Eligibility information is not available on runtime. Requesting from host.");const r=yield ic(Qn(pu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Be(r))throw new Error(`Error code: ${r.errorCode}, message: ${null!==(n=r.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!vu(r))throw new Error("Error deserializing eligibility information");return r}))}function vu(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}var wu,Cu,yu,Su,bu,Eu,Au,Iu,Tu;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed",e.TEAMS="teams",e.FILE="file"}(wu||(wu={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(Cu||(Cu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(yu||(yu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Su||(Su={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(bu||(bu={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Eu||(Eu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Au||(Au={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Iu||(Iu={})),function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"}(Tu||(Tu={}));class Pu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Ou=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ru="v2";function Fu(){var e;return _r(or)&&!!(null===(e=or.supports.copilot)||void 0===e?void 0:e.sidePanel)}function ku(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Tu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||Be(e)}function Mu(e){return Ou(this,void 0,void 0,(function*(){_r(or);return dc("copilot.sidePanel.getContent",e?[new Hu(e)]:[],new Uu,Qn(Ru,"copilot.sidePanel.getContent"),ku)}))}function Nu(){return Ou(this,void 0,void 0,(function*(){return _r(or),dc("copilot.sidePanel.preCheckUserConsent",[],new Lu,Qn(Ru,"copilot.sidePanel.preCheckUserConsent"),ku)}))}function xu(e){ys(Qn(Ru,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[an.content],(()=>{if(!Fu())throw Du}))}const Du=new Pu(Tu.NotSupportedOnPlatform,"This API is not supported on the current platform.");class Uu extends Bi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Lu extends Bi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Hu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}const _u="v2";class Vu{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function Bu(e){const t=e;return t.responseType===zu.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Wu="Action.Execute";var ju,zu,$u;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(ju||(ju={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(zu||(zu={}));class qu extends Bi{validate(e){return Bu(e)}deserialize(e){return e}}function Gu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values($u).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function Ju(e){e.requestType===ju.ActionExecuteInvokeRequest?Ku(e):e.requestType===ju.QueryMessageExtensionRequest&&Qu(e)}function Ku(e){if(e.type!==Wu){throw{errorCode:$u.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Wu}"`}}if(!Bn(e.data)){throw{errorCode:$u.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Qu(e){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}function Zu(e,t,n){if(_r(or,an.content),!nl())throw fn;const r=new Xr(e);return Ju(n),uc(Qn(_u,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[r.toString(),n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Xu(e,t){if(_r(or,an.content),!nl())throw fn;const n=new Xr(e);return uc(Qn(_u,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function Yu(e,t,n){if(_r(or,an.content),!nl())throw fn;const r=new Xr(e);return Ju(n),uc(Qn(_u,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function el(e,t,n){if(_r(or,an.content),!nl())throw fn;return Mn(e,new Error("titleId is Invalid.")),Mn(t,new Error("oauthConfigId is Invalid.")),uc(Qn(_u,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function tl(e,t,n){if(_r(or,an.content),!nl())throw fn;return Mn(e,new Error("titleId is Invalid.")),t&&Nn(t),uc(Qn(_u,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,null==t?void 0:t.toString(),null==n?void 0:n.width,null==n?void 0:n.height,null==n?void 0:n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function nl(){return!(!_r(or)||!or.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}($u||($u={}));var rl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ol="v2";function il(e,t,n){return rl(this,void 0,void 0,(function*(){if(_r(or,an.content),!ul())throw fn;return ll(e,t),fc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Qn(ol,"externalAppAuthenticationForCEA.authenticateWithSSO"),Gu)}))}function al(e,t,n){return rl(this,void 0,void 0,(function*(){if(_r(or,an.content),!ul())throw fn;return ll(e,t),fc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Qn(ol,"externalAppAuthenticationForCEA.authenticateWithOauth"),Gu)}))}function sl(e,t,n,r){return rl(this,void 0,void 0,(function*(){if(_r(or,an.content),!ul())throw fn;return ll(e,t),Ku(r),dc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new Vu(r),n.url.href,n.width,n.height,n.isExternal],new qu,Qn(ol,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Gu)}))}function cl(e,t,n,r){return rl(this,void 0,void 0,(function*(){if(_r(or,an.content),!ul())throw fn;return ll(e,t),Ku(r),dc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new Vu(r),n.authId,n.connectionName,n.claims,n.silent],new qu,Qn(ol,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Gu)}))}function ul(){return!(!_r(or)||!or.supports.externalAppAuthenticationForCEA)}function ll(e,t){Mn(t,new Error("conversation id is not valid.")),Qr(e)}const dl="v2";var fl,pl;function gl(e,t){if(_r(or,an.content),!hl())throw fn;const n=new Xr(e);return uc(Qn(dl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function ml(e,t,n){if(_r(or,an.content),!hl())throw fn;const r=new Xr(e);return uc(Qn(dl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function hl(){return!(!_r(or)||!or.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(fl||(fl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(pl||(pl={}));var vl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const wl="v2";function Cl(e,t,n){return vl(this,void 0,void 0,(function*(){if(_r(or,an.content),!Sl())throw fn;ll(e,t);const[r,o]=yield uc(Qn(wl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function yl(e,t,n){return vl(this,void 0,void 0,(function*(){if(_r(or,an.content),!Sl())throw fn;ll(e,t);const r=yield ic(Qn(wl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Sl(){return!(!_r(or)||!or.supports.externalAppCardActionsForCEA)}var bl;function El(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(bl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(bl||(bl={}));var Al=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Il="v2";function Tl(e,t,n){return Al(this,void 0,void 0,(function*(){if(_r(or,an.content),!Pl())throw fn;return Ol(e,n),fc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new Rl(t),n],Qn(Il,"externalAppCardActionsForDA.processActionOpenUrlDialog"),El)}))}function Pl(){return!(!_r(or)||!or.supports.externalAppCardActionsForDA)}function Ol(e,t){Qr(e),jn(t)}class Rl{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var Fl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const kl="v2";function Ml(e,t,n){return Fl(this,void 0,void 0,(function*(){if(_r(or,an.content),!Nl())throw fn;const r=new Xr(e),[o,i]=yield uc(Qn(kl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Nl(){return!(!_r(or)||!or.supports.externalAppCommands)}const xl="v1";var Dl,Ul,Ll,Hl,_l,Vl;function Bl(e,t){if(_r(or,an.content),!e||0===e.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");hc(Qn(xl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Wl(e,t){if(_r(or,an.content),!e||0===e.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");hc(Qn(xl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function jl(e,t,n){if(_r(or,an.content),!e)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");hc(Qn(xl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function zl(e,t,n){if(_r(or,an.content),!e||!t)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in e&&!e.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");hc(Qn(xl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function $l(e,t,n){if(_r(or,an.content),!e||!t)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(e.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");hc(Qn(xl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function ql(e=!1,t){if(_r(or,an.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");hc(Qn(xl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Gl(e,t,n,r,o=!1,i){if(_r(or,an.content),!e||0===e.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!t)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!r)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] callback cannot be null");hc(Qn(xl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Jl(e){if(_r(or,an.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");hc(Qn(xl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Kl(e=void 0,t){if(_r(or,an.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");hc(Qn(xl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Ql(e){if(_r(or,an.content),!e)throw id(Ne.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");hc(Qn(xl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Zl(e,t){if(_r(or,an.content),!t)throw id(Ne.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw id(Ne.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");hc(Qn(xl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Xl(e,t){if(_r(or,an.content),!t)throw id(Ne.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw id(Ne.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");hc(Qn(xl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Yl(e,t){if(_r(or,an.content),!t)throw id(Ne.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw id(Ne.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");hc(Qn(xl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function ed(e,t){if(_r(or,an.content),!t)throw id(Ne.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw id(Ne.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");hc(Qn(xl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function td(e,t){if(_r(or,an.content),!t)throw id(Ne.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw id(Ne.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");hc(Qn(xl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function nd(e,t){if(_r(or,an.content),!t)throw id(Ne.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw id(Ne.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw id(Ne.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");hc(Qn(xl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function rd(e){if(_r(or),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");vs(Qn(xl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function od(e){if(_r(or),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");vs(Qn(xl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function id(e,t){return{errorCode:e,message:t}}!function(e){e.Dropbox="DROPBOX",e.Box="BOX",e.Sharefile="SHAREFILE",e.GoogleDrive="GOOGLEDRIVE",e.Egnyte="EGNYTE",e.SharePoint="SharePoint"}(Dl||(Dl={})),function(e){e[e.Sharepoint=0]="Sharepoint",e[e.WopiIntegration=1]="WopiIntegration",e[e.Google=2]="Google",e[e.OneDrive=3]="OneDrive",e[e.Recent=4]="Recent",e[e.Aggregate=5]="Aggregate",e[e.FileSystem=6]="FileSystem",e[e.Search=7]="Search",e[e.AllFiles=8]="AllFiles",e[e.SharedWithMe=9]="SharedWithMe"}(Ul||(Ul={})),function(e){e.ClassMaterials="classMaterials"}(Ll||(Ll={})),function(e){e.Readonly="readonly"}(Hl||(Hl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(_l||(_l={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Vl||(Vl={}));const ad="v1";function sd(){return new Promise((e=>{if(_r(or),!dd())throw fn;e(cc(Qn(ad,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function cd(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(_r(or),!dd())throw fn;t(cc(Qn(ad,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function ud(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(_r(or),!dd())throw fn;vs(Qn(ad,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{_r(or),e(t)}))}function ld(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(_r(or),!dd())throw fn;vs(Qn(ad,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{_r(or),e(t)}))}function dd(){return!(!_r(or)||!or.supports.meetingRoom)}function fd(){return!(!_r(or)||!or.supports.messageChannels)}const pd="1.0.1",gd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void bd("Invalid message format, ignoring. Message: %o",e);if(!Cd(e.source,e.origin))return void bd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Ed("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void bd("Invalid response format, ignoring. Message: %o",e);t(r)}};let md=null,hd=!1;function vd(e,t,n=!1){if(hd=n,!e)throw new Error("Cannot polyfill nestedAppAuthBridge as the current window does not exist");if(!t)throw new Error("Top origin is required to initialize the Nested App Auth Bridge");try{const e=new URL(t);if("https:"!==e.protocol)throw new Error(`Invalid top origin: ${t}. Only HTTPS origins are allowed.`);md=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void bd("Nested App Auth Bridge is already present");const o=wd(r);o&&(r.nestedAppAuthBridge=o)}function wd(e){const t=new WeakMap,{onMessage:n}=gd,r=e=>t=>n(t,e);return{addEventListener:(n,o)=>{if("message"===n){const i=r(o);t.set(o,i),e.addEventListener(n,i)}else bd(`Event ${n} is not supported by nestedAppAuthBridge`)},postMessage:t=>{if(!e.top)throw new Error("window.top is not available for posting messages");try{const n=JSON.parse(t);if("object"==typeof n&&"NestedAppAuthRequest"===n.messageType){const n=yd(t);if(e===e.top||!md)return void Ed("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,md)}}catch(e){return void Ed("Failed to parse message:",e,"Original message:",t)}},removeEventListener:(n,r)=>{const o=t.get(r);o&&(e.removeEventListener(n,o),t.delete(r))}}}function Cd(e,t){if(t===md)try{return"https:"===new URL(t).protocol}catch(e){return Ed("Invalid message origin URL:",e),!1}return!1}function yd(e){const t=Date.now();return{id:Sd(),uuid:en(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Sd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function bd(...e){hd&&console.log(...e)}function Ed(...e){hd&&console.error(...e)}const Ad="v1";function Id(e){if(_r(or,an.content),!Td())throw fn;hc(Qn(Ad,"notifications.showNotification"),"notifications.showNotification",[e])}function Td(){return!(!_r(or)||!or.supports.notifications)}const Pd="v2";function Od(e){if(!kd())throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());if(Yr(e))throw new Error(Ne.INVALID_ARGUMENTS.toString());vs(Qn(Pd,"otherApp.install"),"otherApp.install",e)}function Rd(){if(!kd())throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());hc(Qn(Pd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),ws("otherApp.install")}function Fd(e){if(!kd())throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());return fc("otherApp.notifyInstallCompleted",[e.toString()],Qn(Pd,"otherApp.notifyInstallCompleted"))}function kd(){return!(!_r(or)||!or.supports.otherAppStateChange)}const Md="v1";var Nd,xd,Dd;function Ud(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(_r(or,an.sidePanel),!zd())throw fn;hc(Qn(Md,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Ld(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(_r(or,an.sidePanel),!zd())throw fn;hc(Qn(Md,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Hd(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(_r(or,an.sidePanel),!zd())throw fn;hc(Qn(Md,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function _d(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(_r(or,an.sidePanel),!zd())throw fn;hc(Qn(Md,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Vd(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(_r(or,an.sidePanel),!zd())throw fn;vs(Qn(Md,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Bd(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(_r(or,an.sidePanel),!zd())throw fn;vs(Qn(Md,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Wd(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(_r(or,an.sidePanel),!zd())throw fn;vs(Qn(Md,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function jd(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(_r(or,an.sidePanel),!zd())throw fn;vs(Qn(Md,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function zd(){return!(!_r(or)||!or.supports.remoteCamera)}!function(e){e.Reset="Reset",e.ZoomIn="ZoomIn",e.ZoomOut="ZoomOut",e.PanLeft="PanLeft",e.PanRight="PanRight",e.TiltUp="TiltUp",e.TiltDown="TiltDown"}(Nd||(Nd={})),function(e){e[e.CommandResetError=0]="CommandResetError",e[e.CommandZoomInError=1]="CommandZoomInError",e[e.CommandZoomOutError=2]="CommandZoomOutError",e[e.CommandPanLeftError=3]="CommandPanLeftError",e[e.CommandPanRightError=4]="CommandPanRightError",e[e.CommandTiltUpError=5]="CommandTiltUpError",e[e.CommandTiltDownError=6]="CommandTiltDownError",e[e.SendDataError=7]="SendDataError"}(xd||(xd={})),function(e){e[e.None=0]="None",e[e.ControlDenied=1]="ControlDenied",e[e.ControlNoResponse=2]="ControlNoResponse",e[e.ControlBusy=3]="ControlBusy",e[e.AckTimeout=4]="AckTimeout",e[e.ControlTerminated=5]="ControlTerminated",e[e.ControllerTerminated=6]="ControllerTerminated",e[e.DataChannelError=7]="DataChannelError",e[e.ControllerCancelled=8]="ControllerCancelled",e[e.ControlDisabled=9]="ControlDisabled",e[e.ControlTerminatedToAllowOtherController=10]="ControlTerminatedToAllowOtherController"}(Dd||(Dd={}));const $d="v1";function qd(e,t,n,r){if(_r(or,an.content),!Gd())throw fn;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");hc(Qn($d,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Gd(){return!(!_r(or)||!or.supports.appEntity)}const Jd="v1";function Kd(e){return new Promise((t=>{if(_r(or),!Qd())throw fn;if((zn.hostClientType===rn.android||zn.hostClientType===rn.teamsRoomsAndroid||zn.hostClientType===rn.teamsPhones||zn.hostClientType===rn.teamsDisplays)&&!Vr(Ge)){const e={errorCode:Ne.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(ic(Qn(Jd,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Qd(){return!(!_r(or)||!or.supports.teams)&&(!!or.supports.teams.fullTrust&&!!or.supports.teams.fullTrust.joinedTeams)}const Zd="v1";function Xd(e){return new Promise((t=>{if(_r(or),!Yd())throw fn;t(ic(Qn(Zd,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Yd(){return!(!_r(or)||!or.supports.teams)&&!!or.supports.teams.fullTrust}const ef="v1";var tf;function nf(e,t){if(_r(or,an.content),!of())throw fn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");hc(Qn(ef,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function rf(e,t){if(_r(or),!of())throw fn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");hc(Qn(ef,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function of(){return!(!_r(or)||!or.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(tf||(tf={}));class af{static setTimeout(e,t){const n=performance.now(),r=Cn();return af.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete af.setTimeoutCallbacks[e]}static setInterval(e,t){af.setTimeout((function n(){e(),af.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in af.setTimeoutCallbacks){const r=af.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){af.setTimeoutCallbacks[e].callback(),delete af.setTimeoutCallbacks[e]}}}af.setTimeoutCallbacks={};class sf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){af.tick(),this.suitableForThisSession(e,t,n,r)||this.reportAndResetSession(this.getStatistics(),e,r,t,n),this.start()}processEnds(){const e=performance.now()-this.frameProcessingStartedAt,t=Math.floor(Math.max(0,Math.min(this.distributionBins.length-1,e)));this.distributionBins[t]+=1,this.sampleCount+=1}getStatistics(){return this.currentSession?{effectId:this.currentSession.effectId,effectParam:this.currentSession.effectParam,frameHeight:this.currentSession.frameHeight,frameWidth:this.currentSession.frameWidth,duration:performance.now()-this.currentSession.startedAtInMs,sampleCount:this.sampleCount,distributionBins:this.distributionBins.slice()}:null}start(){this.frameProcessingStartedAt=performance.now()}suitableForThisSession(e,t,n,r){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===r&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n}reportAndResetSession(e,t,n,r,o){e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,r,o),this.timeoutId&&af.clearTimeout(this.timeoutId),this.timeoutId=af.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,r,o)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(e,t,n,r,o){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:r,frameHeight:o},this.sampleCount=0,this.distributionBins.fill(0)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(sf.maxSessionTimeoutInMs,2*t.timeoutInMs):sf.initialSessionTimeoutInMs}}sf.initialSessionTimeoutInMs=1e3,sf.maxSessionTimeoutInMs=3e4;const cf="v2";class uf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new sf(uf.distributionBinSize,(e=>this.reportPerformanceEvent(Qn(cf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){af.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Qn(cf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),uf.calculateFPSInterval)}setFrameProcessTimeLimit(e){this.frameProcessTimeLimit=e}reportApplyingVideoEffect(e,t){var n,r;(null===(n=this.applyingEffect)||void 0===n?void 0:n.effectId)===e&&(null===(r=this.applyingEffect)||void 0===r?void 0:r.effectParam)===t||(this.applyingEffect={effectId:e,effectParam:t},this.appliedEffect=void 0)}reportVideoEffectChanged(e,t){void 0===this.applyingEffect||this.applyingEffect.effectId!==e&&this.applyingEffect.effectParam!==t||(this.appliedEffect={effectId:e,effectParam:t},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(e,t){af.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(Qn(cf,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(Qn(cf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}uf.distributionBinSize=1e3,uf.calculateFPSInterval=1e3;var lf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},df=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const ff="v2",pf=kn()?void 0:new uf(hc);var gf,mf,hf;function vf(e){if(_r(or,an.sidePanel),!bf())throw fn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(vs(Qn(ff,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==pf?void 0:pf.setFrameProcessTimeLimit(e.timeLimit)),!1),Pf())Ef(e.videoFrameHandler,e.config);else{if(!Rf())throw fn;If(e.videoBufferHandler,e.config)}null==pf||pf.startMonitorSlowFrameProcessing()}function wf(e,t){if(_r(or,an.sidePanel),!bf())throw fn;hc(Qn(ff,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function Cf(e){if(_r(or,an.sidePanel),!bf())throw fn;vs(Qn(ff,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Bf(e,pf),!1),hc(Qn(ff,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function yf(e){hc(Qn(ff,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Sf(e){hc(Qn(ff,"videoEffects.notifyError"),"video.notifyError",[e])}function bf(){return _r(or)&&!!or.supports.video&&(!!or.supports.video.mediaStream||!!or.supports.video.sharedFrame)}function Ef(e,t){if(_r(or,an.sidePanel),!bf()||!Pf())throw fn;vs(Qn(ff,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>lf(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Af(e,pf);yield Mf(n,r,Sf,pf)}))),!1),hc(Qn(ff,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Af(e,t){return n=>lf(this,void 0,void 0,(function*(){const r=n.videoFrame;null==t||t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yield e(n);return null==t||t.reportFrameProcessed(),o}))}function If(e,t){if(_r(or,an.sidePanel),!bf()||!Rf())throw fn;vs(Qn(ff,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==pf||pf.reportStartFrameProcessing(t.width,t.height),e(Tf(t),(()=>{null==pf||pf.reportFrameProcessed(),yf(n)}),Sf)}}),!1),hc(Qn(ff,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Tf(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=df(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Pf(){var e;return _r(or,an.sidePanel)&&Of()&&!!(null===(e=or.supports.video)||void 0===e?void 0:e.mediaStream)}function Of(){var e,t,n,r;return!(!(null===(t=null===(e=Fn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Fn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Rf(){var e;return _r(or,an.sidePanel)&&!!(null===(e=or.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(gf||(gf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(mf||(mf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(hf||(hf={}));var Ff=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const kf="v2";function Mf(e,t,n,r){var o,i;return Ff(this,void 0,void 0,(function*(){const a=Df();!kn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Uf(yield xf(e,n,r),new Lf(n,t),a.writable)}))}function Nf(e,t,n,r){var o,i;return Ff(this,void 0,void 0,(function*(){const a=Df();!kn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Uf(yield xf(e,n,r),new Vf(n,t),a.writable)}))}function xf(e,t,n){return Ff(this,void 0,void 0,(function*(){if(kn())throw fn;const r=Fn().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function Df(){if(kn())throw fn;const e=window.MediaStreamTrackGenerator;if(!e)throw fn;return new e({kind:"video"})}function Uf(e,t,n){new(0,Fn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Lf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Ff(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const r=yield this.videoFrameHandler({videoFrame:e}),o=new VideoFrame(r,{timestamp:n});t.enqueue(o),e.close(),r.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")}))}}class Hf{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class _f{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const n=new Uint32Array(e);for(let r=0,o=0;r<t;r++){const t=n[o++],r=n[o++],i=n[o++],a=new Uint8Array(e,r,i);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,n=new TextDecoder("utf-8");let r=0;const o=e[r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24);for(let i=0;i<o&&r<e.length-1;i++){const o=e[++r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24),i=e.findIndex(((e,t,n)=>0==e&&t>r)),a=n.decode(e.slice(++r,i)),s=this.metadataMap.get(o);void 0!==s&&t.set(a,s);r=i+(4-(i-r)%4-1)}return t}}class Vf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Ff(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o,attributes:i}={}}=yield this.extractVideoFrameAndMetadata(e),a=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o,attributes:i}),s=new VideoFrame(a,{timestamp:n});t.enqueue(s),r.close(),e.close(),a.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>Ff(this,void 0,void 0,(function*(){if(kn())throw fn;if("NV12"!==e.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const r=new Hf(n,this.notifyError),o={x:0,y:r.multiStreamHeaderRowOffset,width:e.codedWidth,height:e.codedHeight-r.multiStreamHeaderRowOffset},i=new ArrayBuffer(o.width*o.height*3/2);yield e.copyTo(i,{rect:o});const a=new _f(i,r.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult,attributes:a.attributes}}})),vs(Qn(kf,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Bf(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),hc(Qn(kf,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in hf?e:hf.InitializationFailure;hc(Qn(kf,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Wf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const jf="v2",zf=2e3,$f=kn()?void 0:new uf(hc);var qf;function Gf(e){var t,n;if(!ep())throw fn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(_r(or,an.sidePanel)){if(vs(Qn(jf,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==$f?void 0:$f.setFrameProcessTimeLimit(e)),!1),null===(t=or.supports.video)||void 0===t?void 0:t.mediaStream)vs(Qn(jf,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Wf(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=$f?Kf(e.videoFrameHandler,$f):e.videoFrameHandler;r?yield Nf(n,o,np,$f):yield Mf(n,o,np,$f)}))),!1),hc(Qn(jf,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=or.supports.video)||void 0===n?void 0:n.sharedFrame))throw fn;vs(Qn(jf,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==$f||$f.reportStartFrameProcessing(t.width,t.height);const n=Jf(),r=t.timestamp;e.videoBufferHandler(Qf(t),(()=>{n(),null==$f||$f.reportFrameProcessed(),tp(r)}),np)}}),!1),hc(Qn(jf,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==$f||$f.startMonitorSlowFrameProcessing()}}function Jf(){const e=setTimeout((()=>{np(`Frame not processed in ${zf}ms`,qf.Warn)}),zf);return function(){clearTimeout(e)}}function Kf(e,t){return n=>Wf(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Jf(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function Qf(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Zf(e,t,n){if(_r(or,an.sidePanel),!ep())throw fn;hc(Qn(jf,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Xf(e){if(_r(or,an.sidePanel),!ep())throw fn;vs(Qn(jf,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Bf(e,$f),!1),hc(Qn(jf,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Yf(e){if(_r(or,an.sidePanel),!bf())throw fn;hc(Qn(jf,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function ep(){return _r(or),bf()}function tp(e){hc(Qn(jf,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function np(e,t=qf.Warn){hc(Qn(jf,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function rp(e){if(_r(or),!bf())throw fn;np(e,qf.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(qf||(qf={}));const op="v2";class ip extends Bi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class ap{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class sp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class cp extends Bi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class up{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class lp extends Bi{validate(e){const t=new cp;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function dp(e,t){if(_r(or),!hp())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(vp(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Ne.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return dc("hostEntity.tab.addAndConfigure",[new sp(e),t],new cp,Qn(op,"hostEntity.tab.addAndConfigure"))}function fp(e){if(_r(or),!hp())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return vp(e.threadId),dc("hostEntity.tab.getAll",[new sp(e)],new lp,Qn(op,"hostEntity.tab.getAll"))}function pp(e,t){if(_r(or),!hp())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return wp(e),vp(t.threadId),dc("hostEntity.tab.reconfigure",[new ap(e),new sp(t)],new ip,Qn(op,"hostEntity.tab.reconfigure"))}function gp(e,t){if(_r(or),!hp())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return wp(e),vp(t.threadId),dc("hostEntity.tab.rename",[new ap(e),new sp(t)],new ip,Qn(op,"hostEntity.tab.rename"))}function mp(e,t){if(_r(or),!hp())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return vp(t.threadId),wp(e),dc("hostEntity.tab.remove",[new up(e),new sp(t)],new Wi,Qn(op,"hostEntity.tab.remove"))}function hp(){var e;return!!(_r(or)&&yp()&&(null===(e=or.supports.hostEntity)||void 0===e?void 0:e.tab))}function vp(e){if(!e||0==e.length)throw new Error(`Error code: ${Ne.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function wp(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Ne.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Cp;function yp(){return!(!_r(or)||!or.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(Cp||(Cp={}));var Sp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const bp="v2",Ep="Invalid store dialog size",Ap="No App Id present, but AppId needed to open AppDetail store",Ip="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Tp(e){return Sp(this,void 0,void 0,(function*(){kp();const{size:t}=null!=e?e:{};return fc("store.openFullStore",[Mp(t)],Qn(bp,"store.openFullStore"))}))}function Pp(e){return Sp(this,void 0,void 0,(function*(){kp();const{size:t,appId:n}=e;if(!(n instanceof Xr))throw new Error(Ap);return fc("store.openAppDetail",[Mp(t),n],Qn(bp,"store.openAppDetail"))}))}function Op(e){return Sp(this,void 0,void 0,(function*(){kp();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return fc("store.openInContextStore",[Mp(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Qn(bp,"store.openInContextStore"))}))}function Rp(e){return Sp(this,void 0,void 0,(function*(){kp();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Ip);return fc("store.openSpecificStore",[Mp(t),n],Qn(bp,"store.openSpecificStore"))}))}function Fp(){return _r(or)&&!!or.supports.store}function kp(){if(_r(or,an.content,an.sidePanel,an.meetingStage),!Fp())throw fn}function Mp(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(Ep);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(Ep);return JSON.stringify(e)}var Np=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const xp="v1",Dp="v2";let Up;function Lp(e){Up=e}function Hp(e){const t=void 0!==e,n=t?e:Up;if(!n)throw new Error("No parameters are provided for authentication");_r(or,an.content,an.sidePanel,an.settings,an.remove,an.task,an.stage,an.meetingStage);return _p(n.successCallback||n.failureCallback?Qn(xp,"authentication.authenticate"):Qn(Dp,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Up=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Up=void 0)}}))}function _p(e,t){return Np(this,void 0,void 0,(function*(){const n=xn(t.url);return Nn(n),uc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function Vp(e){Hr();return Bp(e&&(e.successCallback||e.failureCallback)?Qn(xp,"authentication.getAuthToken"):Qn(Dp,"authentication.getAuthToken"),e).then((t=>e&&e.successCallback?(e.successCallback(t),""):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))}function Bp(e,t){return new Promise((n=>{n(uc(e,"authentication.getAuthToken",[null==t?void 0:t.resources,null==t?void 0:t.claims,null==t?void 0:t.silent,null==t?void 0:t.tenantId]))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function Wp(e){Hr();return jp(e&&(e.successCallback||e.failureCallback)?Qn(xp,"authentication.getUser"):Qn(Dp,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)}))}function jp(e){return new Promise((t=>{t(uc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function zp(e,t){_r(or,an.authentication);hc(Qn(t?xp:Dp,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Vc(tc.parentWindow,(()=>setTimeout((()=>tc.currentWindow.close()),200)))}function $p(e,t){_r(or,an.authentication);hc(Qn(t?xp:Dp,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Vc(tc.parentWindow,(()=>setTimeout((()=>tc.currentWindow.close()),200)))}var qp;function Gp(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(qp||(qp={}));class Jp{constructor(e){this.val=e,Gp(e)}toString(){return this.val}}const Kp="/l/app/",Qp="/l/meeting/new",Zp="attendees",Xp="startTime",Yp="endTime",eg="subject",tg="content",ng="/l/call/0/0",rg="source",og="withVideo",ig="/l/chat/0/0",ag="users",sg="topicName",cg="message";function ug(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${ag}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${sg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${cg}=${encodeURIComponent(n)}`;return`${rt}://${ot}${ig}?${r}${o}${i}`}function lg(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${ag}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${og}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${rg}=${encodeURIComponent(n)}`;return`${rt}://${ot}${ng}?${r}${o}${i}`}function dg(e,t,n,r,o){const i=void 0===e?"":`${Zp}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Xp}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Yp}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${eg}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${tg}=${encodeURIComponent(o)}`;return`${rt}://${ot}${Qp}?${i}${a}${s}${c}${u}`}function fg(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${rt}://${ot}${Kp}${encodeURIComponent(e)}`}const pg="v1";function gg(e){return new Promise((t=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!mg())throw new Error("Not supported");const n=Qn(pg,"appInstallDialog.openAppInstallDialog");or.isLegacyTeams?t(ac(n,"executeDeepLink",fg(e.appId))):(hc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function mg(){return!(!_r(or)||!or.supports.appInstallDialog)}const hg="v1",vg=Kn("media");var wg,Cg,yg,Sg,bg,Eg,Ag;!function(e){e.Base64="base64",e.ID="id"}(wg||(wg={}));class Ig{}function Tg(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(_r(or,an.content,an.task),zn.isFramelessWindow)if(Vr(Qe))hc(Qn(hg,"media.captureImage"),"captureImage",e);else{e({errorCode:Ne.OLD_PLATFORM},[])}else{e({errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM},[])}}function Pg(){if(_r(or,an.content,an.task),!Rg())throw fn;const e=xe.Media;return new Promise((t=>{t(cc(Qn(hg,"media.hasPermission"),"permissions.has",e))}))}function Og(){if(_r(or,an.content,an.task),!Rg())throw fn;const e=xe.Media;return new Promise((t=>{t(cc(Qn(hg,"media.requestPermission"),"permissions.request",e))}))}function Rg(){return!(!_r(or)||!or.supports.permissions)}class Fg extends Ig{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(_r(or,an.content,an.task),Vr(Ze))if(zg(this.mimeType,this.format,this.content))Vr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:Ne.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:Ne.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];hc(Qn(hg,"media.getMedia"),"getMedia",n,(function(n){if(e)if(n&&n.error)e(n.error,new Blob);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){const r=Ug(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Lg(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):vg(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Ne.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Cn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Yr(e)&&hc(Qn(hg,"media.getMedia"),"getMedia",r),vs(Qn(hg,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),ws("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Ug(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),ws("getMedia"+t)}else{const e=Lg(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Ne.INTERNAL_ERROR,message:"data received is null"},new Blob),ws("getMedia"+t)}}))}}class kg{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){_r(or,an.content,an.task);try{Wr($e)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};hc(Qn(hg,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(Cg.StopRecording,e)}}class Mg extends kg{getMediaType(){return bg.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Cg.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Ng(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Ze)){const e={errorCode:Ne.OLD_PLATFORM};return void t(e,[])}try{Hg(e)}catch(e){return void t(e,[])}if(!Vg(e)){const e={errorCode:Ne.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];hc(Qn(hg,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(_g(e)&&(null===(a=null===(i=null==e?void 0:e.videoProps)||void 0===i?void 0:i.videoController)||void 0===a||a.notifyEventToApp(o)));if(!r)return void t(n,[]);const s=[];for(const e of r)s.push(new Fg(e));t(n,s)}))}function xg(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Ze)){return void t({errorCode:Ne.OLD_PLATFORM})}if(!$g(e)){return void t({errorCode:Ne.INVALID_ARGUMENTS})}const n=[e];hc(Qn(hg,"media.viewImages"),"viewImages",n,t)}function Dg(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(_r(or,an.content,an.task),zn.hostClientType!==rn.desktop&&zn.hostClientType!==rn.web&&zn.hostClientType!==rn.rigel&&zn.hostClientType!==rn.teamsRoomsWindows&&zn.hostClientType!==rn.teamsRoomsAndroid&&zn.hostClientType!==rn.teamsPhones&&zn.hostClientType!==rn.teamsDisplays)if(Vr(Xe))if(qg(t))hc(Qn(hg,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:Ne.INVALID_ARGUMENTS},"")}else{e({errorCode:Ne.OLD_PLATFORM},"")}else{e({errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM},"")}}function Ug(e,t){if(null==e||null==t||e.length<=0)return null;let n=null,r=1;return e.sort(((e,t)=>e.sequence>t.sequence?1:-1)),e.forEach((e=>{e.sequence==r&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),r++)})),n}function Lg(e,t){if(null==e||null==t)return null;const n=atob(e.chunk),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const o=new Uint8Array(r),i=new Blob([o],{type:t});return{sequence:e.chunkSequence,file:i}}function Hg(e){Wg(e)?Wr(ze):jg(e)?Wr($e):Bg(e)&&Wr(qe)}function _g(e){return!(e.mediaType!=bg.Video||!e.videoProps||!e.videoProps.videoController)}function Vg(e){return!(null==e||e.maxMediaCount>10)}function Bg(e){var t;return!((null==e?void 0:e.mediaType)!=bg.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Wg(e){return!(!e||e.mediaType!=bg.VideoAndImage&&!e.videoAndImageProps)}function jg(e){return!(!e||e.mediaType!=bg.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function zg(e,t,n){return null!=e&&null!=t&&t==wg.ID&&null!=n}function $g(e){return!(null==e||e.length<=0||e.length>10)}function qg(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Gg(e){if(e){if(e.title&&"string"!=typeof e.title)return!1;if(e.setSelected&&"object"!=typeof e.setSelected)return!1;if(e.openOrgWideSearchInChatOrChannel&&"boolean"!=typeof e.openOrgWideSearchInChatOrChannel)return!1;if(e.singleSelect&&"boolean"!=typeof e.singleSelect)return!1}return!0}!function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(Cg||(Cg={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(yg||(yg={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Sg||(Sg={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(bg||(bg={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Eg||(Eg={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Ag||(Ag={}));const Jg="v2";function Kg(e){return new Promise((t=>{if(_r(or,an.content,an.task),!Xg())throw fn;if(!qg(e))throw{errorCode:Ne.INVALID_ARGUMENTS};t(cc(Qn(Jg,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Qg(){if(_r(or,an.content,an.task),!Xg())throw fn;const e=xe.Media;return new Promise((t=>{t(cc(Qn(Jg,"barCode.hasPermission"),"permissions.has",e))}))}function Zg(){if(_r(or,an.content,an.task),!Xg())throw fn;const e=xe.Media;return new Promise((t=>{t(cc(Qn(Jg,"barCode.requestPermission"),"permissions.request",e))}))}function Xg(){return!!(_r(or)&&or.supports.barCode&&or.supports.permissions)}const Yg="v2";function em(e){return tm(Qn(Yg,"chat.openChat"),e)}function tm(e,t){return new Promise((n=>{if(_r(or,an.content,an.task),!rm())throw fn;if(or.isLegacyTeams)n(ac(e,"executeDeepLink",ug([t.user],void 0,t.message)));else{n(ac(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function nm(e){const t=Qn(Yg,"chat.openGroupChat");return new Promise((n=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const r={user:e.users[0],message:e.message};n(tm(t,r))}else{if(_r(or,an.content,an.task),!rm())throw fn;if(or.isLegacyTeams)n(ac(t,"executeDeepLink",ug(e.users,e.topic,e.message)));else{n(ac(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function rm(){return!(!_r(or)||!or.supports.chat)}var om=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const im="v2";function am(e){return om(this,void 0,void 0,(function*(){if(_r(or,an.content,an.meetingStage,an.task,an.settings,an.stage,an.sidePanel),!cm())throw fn;if(!e.type||!Object.values(_e).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(_e)}`);const t=yield Rn(e),n={mimeType:e.type,content:t};return cc(Qn(im,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function sm(){return om(this,void 0,void 0,(function*(){_r(or,an.content,an.meetingStage,an.task,an.settings,an.stage,an.sidePanel);const e=Qn(im,"clipboard.read");if(!cm())throw fn;const t=yield cc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return On(e.mimeType,e.content)}return t}))}function cm(){return zn.isFramelessWindow?!(!_r(or)||!or.supports.clipboard):!!(_r(or)&&navigator&&navigator.clipboard&&or.supports.clipboard)}var um=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const lm="v2",dm={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var fm;function pm(){var e;return null!==(e=_r(or)&&(or.isNAAChannelRecommended||wm()))&&void 0!==e&&e}function gm(){return _r(or),tc.parentOrigin}function mm(){var e;return null!==(e=_r(or)&&or.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function hm(){var e;return null!==(e=_r(or)&&(or.isDeeplyNestedAuthSupported||vm()))&&void 0!==e&&e}function vm(){return!!(_r(or)&&Cm()&&or.isLegacyTeams&&Vr(dr))}function wm(){return!!(_r(or)&&Cm()&&or.isLegacyTeams&&or.supports.nestedAppAuth)}function Cm(){return zn.hostClientType===rn.android||zn.hostClientType===rn.ios||zn.hostClientType===rn.ipados||zn.hostClientType===rn.visionOS}function ym(e){return um(this,void 0,void 0,(function*(){if(!mm())throw fn;const t=e.map(Em);return bm(fm.ADD,t)}))}function Sm(e){return um(this,void 0,void 0,(function*(){if(!mm())throw fn;const t=e.map(Em);return bm(fm.DELETE,t)}))}function bm(e,t){return um(this,void 0,void 0,(function*(){if(window.parent!==window.top)throw new Error("This API is only available in the top-level parent.");if(!Array.isArray(t)||0===t.length)throw new Error(`The '${t}' parameter is required and must be a non-empty array.`);return dc("nestedAppAuth.manageNAATrustedOrigins",[new Am(e,t)],dm,Qn(lm,"nestedAppAuth.manageNAATrustedOrigins"))}))}function Em(e){try{return new URL(e).origin.toLowerCase()}catch(t){throw new Error(`Invalid origin provided: ${e}`)}}!function(e){e.ADD="ADD",e.DELETE="DELETE"}(fm||(fm={}));class Am{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Im="v2";function Tm(){if(_r(or,an.content,an.task),!Om())throw fn;return cc(Qn(Im,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Pm(e){if(_r(or,an.content,an.task),!Om())throw fn;if(!e)throw{errorCode:Ne.INVALID_ARGUMENTS};return cc(Qn(Im,"geoLocation.showLocation"),"location.showLocation",e)}function Om(){return!!(_r(or)&&or.supports.geoLocation&&or.supports.geoLocation.map&&or.supports.permissions)}const Rm="v2";function Fm(){if(_r(or,an.content,an.task),!Nm())throw fn;return cc(Qn(Rm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function km(){if(_r(or,an.content,an.task),!Nm())throw fn;const e=xe.GeoLocation;return new Promise((t=>{t(cc(Qn(Rm,"geoLocation.hasPermission"),"permissions.has",e))}))}function Mm(){if(_r(or,an.content,an.task),!Nm())throw fn;const e=xe.GeoLocation;return new Promise((t=>{t(cc(Qn(Rm,"geoLocation.requestPermission"),"permissions.request",e))}))}function Nm(){return!!(_r(or)&&or.supports.geoLocation&&or.supports.permissions)}function xm(){return or.hostVersionsInfo?or.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Dm="v1";class Um{postMessage(e,t){_r(or),hc(Qn(Dm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||vn())}addEventListener(e,t){_r(or),"message"===e&&vs(Qn(Dm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Lm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){_r(or,an.task),hc(Qn(Dm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||vn())}addEventListener(e,t){_r(or,an.task),"message"===e&&vs(Qn(Dm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const Hm="v2";function _m(e){if(_r(or,an.content),!Vm())throw fn;if(!e||!Pn(e))throw{errorCode:Ne.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return cc(Qn(Hm,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Vm(){return!(!_r(or)||!or.supports.secondaryBrowser)}const Bm="v1";function Wm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Je))throw{errorCode:Ne.OLD_PLATFORM};if(!e)throw{errorCode:Ne.INVALID_ARGUMENTS};if(!zm())throw fn;hc(Qn(Bm,"location.getLocation"),"location.getLocation",[e],t)}function jm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Je))throw{errorCode:Ne.OLD_PLATFORM};if(!e)throw{errorCode:Ne.INVALID_ARGUMENTS};if(!zm())throw fn;hc(Qn(Bm,"location.showLocation"),"location.showLocation",[e],t)}function zm(){return!(!_r(or)||!or.supports.location)}const $m="v1";function qm(e){_r(or,an.sidePanel),e.contentUrl&&new URL(e.contentUrl),hc(Qn($m,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Gm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Jm="v1";var Km,Qm,Zm,Xm,Ym,eh;function th(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(Jm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function nh(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(Jm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function rh(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage,an.settings,an.content),hc(Qn(Jm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function oh(){var e,t,n;return Gm(this,void 0,void 0,(function*(){let r;_r(or,an.sidePanel,an.meetingStage,an.settings,an.content);try{const e=!0;r=yield cc(Qn("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",e)}catch(t){throw new Error(null===(e=null==t?void 0:t.errorCode)||void 0===e?void 0:e.toString())}if(((null===(t=r.details)||void 0===t?void 0:t.type)==Xm.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Xm.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function ih(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage,an.task),hc(Qn(Jm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function ah(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");_r(or,an.sidePanel),hc(Qn(Jm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function sh(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");_r(or,an.sidePanel),hc(Qn(Jm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function ch(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");_r(or,an.sidePanel),hc(Qn(Jm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function uh(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");_r(or,an.sidePanel),vs(Qn(Jm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function lh(e,t,n={sharingProtocol:Ym.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(Jm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function dh(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(Jm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function fh(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(Jm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function ph(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(Jm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function gh(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");_r(or,an.sidePanel,an.meetingStage),vs(Qn(Jm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function mh(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");_r(or,an.sidePanel,an.meetingStage),vs(Qn(Jm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function hh(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");_r(or,an.sidePanel,an.meetingStage),vs(Qn(Jm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function vh(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));_r(or);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||eh.Other};return cc(Qn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function wh(e,t){if(!t)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!e.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");_r(or,an.sidePanel,an.meetingStage),e.isAppHandlingAudio?Ch(e,t):yh(e,t)}function Ch(e,t){hc(Qn(Jm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((n,r)=>{if(n&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");vs(Qn(Jm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>Gm(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);bh(n,n.isMicMuted===t.isMicMuted?Km.HostInitiated:Km.AppDeclinedToChange)}catch(e){bh(t,Km.AppFailedToChange)}}))));vs(Qn(Jm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function yh(e,t){hc(Qn(Jm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Cs("meeting.micStateChanged")&&ws("meeting.micStateChanged"),Cs("meeting.audioDeviceSelectionChanged")&&ws("meeting.audioDeviceSelectionChanged"),t(n)}))}function Sh(e){bh(e,Km.AppInitiated)}function bh(e,t){_r(or,an.sidePanel,an.meetingStage),hc(Qn(Jm,"meeting.setMicStateWithReason"),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(Km||(Km={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Qm||(Qm={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Zm||(Zm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Xm||(Xm={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Ym||(Ym={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(eh||(eh={}));const Eh="v1",Ah="v2";function Ih(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Qn(Eh,"monetization.openPurchaseExperience")):(r=e,o=Qn(Ah,"monetization.openPurchaseExperience"));return _r(or,an.content),En((()=>new Promise((e=>{if(!Th())throw fn;e(cc(o,"monetization.openPurchaseExperience",r))}))),n)}function Th(){return!(!_r(or)||!or.supports.monetization)}const Ph="v2";function Oh(e){return new Promise((t=>{if(_r(or,an.content),!Fh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(ac(Qn(Ph,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function Rh(e){return new Promise((t=>{if(_r(or,an.content),!Fh())throw new Error("Not supported");const n=Qn(Ph,"calendar.composeMeeting");or.isLegacyTeams?t(ac(n,"executeDeepLink",dg(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(ac(n,"calendar.composeMeeting",e))}))}function Fh(){return!(!_r(or)||!or.supports.calendar)}const kh="v2";function Mh(e){e&&0!==e.length&&e.forEach((e=>{Gp(e)}))}function Nh(e){if(!e.handoffId||0==e.handoffId.trim().length||""===e.handoffId.trim())throw new Error("handoffId should not be null or empty string.");const t=e.composeMailParams;t.type===Bh.New&&(Mh(t.toRecipients),Mh(t.ccRecipients),Mh(t.bccRecipients))}function xh(e){if(_r(or,an.content),!Dh())throw new Error("Not supported");return Nh(e),fc("mail.handoff.composeMail",[new Uh(e)],Qn(kh,"mail.handoff.composeMail"))}function Dh(){return!!(_r(or)&&or.supports.mail&&or.supports.mail.handoff)}class Uh{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Lh="v2";function Hh(e){return new Promise((t=>{if(_r(or,an.content),!Vh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(ac(Qn(Lh,"mail.openMailItem"),"mail.openMailItem",e))}))}function _h(e){return new Promise((t=>{if(_r(or,an.content),!Vh())throw new Error("Not supported");t(ac(Qn(Lh,"mail.composeMail"),"mail.composeMail",e))}))}function Vh(){return!(!_r(or)||!or.supports.mail)}var Bh;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Bh||(Bh={}));const Wh="v2";function jh(){if(!zn.printCapabilityEnabled){if(_r(or),!Kh())throw fn;zn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(zh(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function zh(){Fn().print()}function $h(e){qh(Qn(Wh,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Yr(e)&&!Kh())throw fn}))}function qh(e,t,n){!Yr(t)&&_r(or),!Yr(t)&&n&&n(),Is(e,t)}function Gh(e){Jh(Qn(Wh,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Yr(e)&&!Kh())throw fn}))}function Jh(e,t,n){!Yr(t)&&_r(or),!Yr(t)&&n&&n(),Os(e,t)}function Kh(){return!(!_r(or)||!or.supports.teamsCore)}const Qh="v1",Zh="v2";function Xh(e,t){let n,r;_r(or,an.content,an.task,an.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Qn(Qh,"people.selectPeople")):(r=e,o=Qn(Zh,"people.selectPeople")),Sn(Yh,n,o,r)}function Yh(e,t){return new Promise((n=>{if(!Vr(Ke))throw{errorCode:Ne.OLD_PLATFORM};if(!Gg(t))throw{errorCode:Ne.INVALID_ARGUMENTS};if(!ev())throw fn;n(cc(e,"people.selectPeople",t))}))}function ev(){return!(!_r(or)||!or.supports.people)}function tv(e){return e?e.modality&&"string"!=typeof e.modality?[!1,"modality must be a string"]:e.targetElementBoundingRect&&"object"==typeof e.targetElementBoundingRect?e.triggerType&&"string"==typeof e.triggerType?nv(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function nv(e){return e?e.displayName&&"string"!=typeof e.displayName?[!1,"displayName must be a string"]:e.identifiers&&"object"==typeof e.identifiers?e.identifiers.AadObjectId||e.identifiers.Smtp||e.identifiers.Upn?e.identifiers.AadObjectId&&"string"!=typeof e.identifiers.AadObjectId?[!1,"AadObjectId identifier must be a string"]:e.identifiers.Smtp&&"string"!=typeof e.identifiers.Smtp?[!1,"Smtp identifier must be a string"]:e.identifiers.Upn&&"string"!=typeof e.identifiers.Upn?[!1,"Upn identifier must be a string"]:[!0,void 0]:[!1,"at least one valid identifier must be provided"]:[!1,"persona identifiers object must be provided"]:[!1,"persona object must be provided"]}const rv="v2";function ov(e){return _r(or,an.content),new Promise((t=>{const[n,r]=tv(e);if(!n)throw{errorCode:Ne.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(cc(Qn(rv,"profile.showProfile"),"profile.showProfile",o))}))}function iv(){return!(!_r(or)||!or.supports.profile)}const av="v2",sv="search.queryChange",cv="search.queryClose",uv="search.queryExecute";function lv(e,t,n){if(_r(or,an.content),!fv())throw fn;vs(Qn(av,"search.registerOnClosedHandler"),cv,e),vs(Qn(av,"search.registerOnExecutedHandler"),uv,t),n&&vs(Qn(av,"search.registerOnChangeHandler"),sv,n)}function dv(){if(_r(or,an.content),!fv())throw fn;hc(Qn(av,"search.unregisterHandlers"),"search.unregister"),ws(sv),ws(cv),ws(uv)}function fv(){return!(!_r(or)||!or.supports.search)}function pv(){return new Promise((e=>{if(_r(or,an.content),!fv())throw new Error("Not supported");e(ac(Qn(av,"search.closeSearch"),"search.closeSearch"))}))}var gv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const mv="v2";function hv(){return gv(this,void 0,void 0,(function*(){if(_r(or,an.sidePanel,an.meetingStage),!vv())throw fn;return yield cc(Qn(mv,"sharing.history.getContent"),"sharing.history.getContent")}))}function vv(){var e;return _r(or)&&void 0!==(null===(e=or.supports.sharing)||void 0===e?void 0:e.history)}const wv="v1",Cv="v2",yv={shareWebContent:"sharing.shareWebContent"};function Sv(e,t){try{Ev(e),Av(e),Iv(e)}catch(e){return bn((()=>Promise.reject(e)),t)}_r(or,an.content,an.sidePanel,an.task,an.stage,an.meetingStage);return bn(bv,t,Qn(t?wv:Cv,"sharing.shareWebContent"),e)}function bv(e,t){return new Promise((n=>{if(!Tv())throw fn;n(cc(e,yv.shareWebContent,t))}))}function Ev(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Ne.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Av(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Iv(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Tv(){return!(!_r(or)||!or.supports.sharing)}const Pv="v2";function Ov(){return new Promise((e=>{if(_r(or,an.content),!Rv())throw fn;e(cc(Qn(Pv,"stageView.self.close"),"stageView.self.close"))}))}function Rv(){var e;return _r(or)&&void 0!==(null===(e=or.supports.stageView)||void 0===e?void 0:e.self)}const Fv="v2";var kv;function Mv(e){return new Promise((t=>{if(_r(or,an.content),!Nv())throw fn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(cc(Qn(Fv,"stageView.open"),"stageView.open",e))}))}function Nv(){return!(!_r(or)||!or.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(kv||(kv={}));const xv=10;var Dv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Uv="v2";function Lv(e){return Dv(this,void 0,void 0,(function*(){_r(or,an.content,an.task),Vv(),Bv(e);const t=yield cc(Qn(Uv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Wv(e.maxVisualMediaCount,t),t}))}function Hv(e){return Dv(this,void 0,void 0,(function*(){_r(or,an.content,an.task),Vv(),Bv(e);const t=yield cc(Qn(Uv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Wv(e.maxVisualMediaCount,t),t}))}function _v(){return!!(_r(or)&&or.supports.visualMedia&&or.supports.visualMedia.image&&or.supports.permissions)}function Vv(){if(!_v())throw fn}function Bv(e){if(!e||e.maxVisualMediaCount>xv||e.maxVisualMediaCount<1)throw mn}function Wv(e,t){if(t.length>e)throw hn}const jv="v2";var zv,$v;function qv(){if(_r(or,an.content,an.task),!_v())throw fn;const e=xe.Media;return cc(Qn(jv,"visualMedia.hasPermission"),"permissions.has",e)}function Gv(){if(_r(or,an.content,an.task),!_v())throw fn;const e=xe.Media;return cc(Qn(jv,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(zv||(zv={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}($v||($v={}));var Jv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Kv=null;function Qv(){return Jv(this,void 0,void 0,(function*(){return null===Kv&&(Kv=(yield Po()).app.host.name),Kv}))}var Zv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};function Xv(){return Zv(this,void 0,void 0,(function*(){if(_r(or),!ew())throw fn;return!(!or.isLegacyTeams||zn.hostClientType!==rn.android&&zn.hostClientType!==rn.ios&&zn.hostClientType!==rn.ipados&&zn.hostClientType!==rn.visionOS||(yield Yv())!==on.teams)||(yield ic(Qn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Yv(){return Zv(this,void 0,void 0,(function*(){return Qv()}))}function ew(){return _r(or)&&void 0!==or.supports.webStorage}const tw="v2";var nw;function rw(e){const t=Qn(tw,"call.startCall");return new Promise((n=>{var r;if(_r(or,an.content,an.task),!ow())throw fn;if(!or.isLegacyTeams)return hc(t,"call.startCall",[e],n);n(ic(t,"executeDeepLink",lg(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(nw.Video),e.source)).then((e=>{if(!e)throw new Error(ct);return e})))}))}function ow(){return!(!_r(or)||!or.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(nw||(nw={}));const iw="v1";function aw(){Gi(Qn(iw,"appInitialization.notifyAppLoaded"))}function sw(){hc(Qn(iw,"appInitialization.notifySuccess"),Co.Success,[Cr])}function cw(e){Ki(Qn(iw,"appInitialization.notifyFailure"),e)}function uw(e){Ji(Qn(iw,"appInitialization.notifyExpectedFailure"),e)}const lw=Kn("thirdPartyCloudStorage"),dw="v2";class fw{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let pw=[],gw=null,mw=!0,hw=null;function vw(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(_r(or,an.content,an.task),!Cw())throw fn;if(hw)throw hw=null,new Error("getDragAndDropFiles cannot be called twice");hw=t,mw=!0,hc(Qn(dw,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],ww)}else{t([],{errorCode:Ne.INVALID_ARGUMENTS})}}function ww(e){if(hw)if(e&&e.error)hw([],e.error),hw=null;else if(e&&e.fileChunk)try{mw||0!==e.fileChunk.chunkSequence||(lw("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),mw=!0,hw([],{errorCode:Ne.INTERNAL_ERROR,message:"error occurred while receiving data"}),pw=[],hw=null);const t=Lg(e.fileChunk,e.fileType);if(t?(gw||(gw=new fw(e.fileType,[])),gw.assembleAttachment.push(t)):(lw(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),hw?hw([],{errorCode:Ne.INTERNAL_ERROR,message:"error occurred while receiving data"}):hw=null,pw=[],hw=null,mw=!0),mw=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&gw){const t=Ug(gw.assembleAttachment,gw.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});pw.push(n)}e.isLastFile&&hw&&(hw(pw,e.error),pw=[],hw=null,mw=!0),gw=null}}catch(e){hw&&(hw([],{errorCode:Ne.INTERNAL_ERROR,message:e}),pw=[],hw=null,mw=!0)}else hw([],{errorCode:Ne.INTERNAL_ERROR,message:"data received is null"}),pw=[],hw=null,mw=!0}function Cw(){return!(!_r(or)||!or.supports.thirdPartyCloudStorage)}const yw="v1";function Sw(e,t){qi(Qn(yw,"initialize"),t).then((()=>{e&&e()}))}function bw(){jh()}function Ew(){zh()}function Aw(e){Hr(),hc(Qn(yw,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=zn.frameContext),e(t)}))}function Iw(e){ta(Qn(yw,"registerOnThemeChangeHandlerHelper"),e)}function Tw(e){ys(Qn(yw,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Pw(e){ys(Qn(yw,"registerAppButtonClickHandler"),"appButtonClick",e,[an.content])}function Ow(e){ys(Qn(yw,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[an.content])}function Rw(e){ys(Qn(yw,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[an.content])}function Fw(e){Sa(Qn(yw,"registerBackButtonHandler"),e)}function kw(e){qh(Qn(yw,"registerOnLoadHandler"),e)}function Mw(e){Jh(Qn(yw,"registerBeforeUnloadHandler"),e)}function Nw(e){ys(Qn(yw,"registerFocusEnterHandler"),"focusEnter",e,[])}function xw(e){ys(Qn(yw,"registerChangeSettingsHandler"),"changeSettings",e,[an.content])}function Dw(e,t){_r(or),Qa(Qn(yw,"getTabInstances"),t).then((t=>{e(t)}))}function Uw(e,t){_r(or),Za(Qn(yw,"getMruTabInstances"),t).then((t=>{e(t)}))}function Lw(e){Xa(Qn(yw,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Hw(e,t){_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage);const n=null!=t?t:vn();na(Qn(yw,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function _w(e){Ya(Qn(yw,"setFrameContext"),e)}function Vw(e,t,n){qi(Qn(yw,"initializeWithFrameContext"),n).then((()=>t&&t())),Ya(Qn(yw,"setFrameContext"),e)}const Bw="v1";function Ww(e){Ka(Qn(Bw,"navigation.returnFocus"),e)}function jw(e,t){_r(or);const n=null!=t?t:vn();Ja(Qn(Bw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function zw(e,t){_r(or,an.content,an.sidePanel,an.settings,an.remove,an.task,an.stage,an.meetingStage);const n=null!=t?t:vn();qa(Qn(Bw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function $w(e){_r(or);const t=null!=e?e:vn();Ga(Qn(Bw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const qw="v1";function Gw(e){es(Qn(qw,"settings.setValidityState"),e)}function Jw(e){_r(or,an.content,an.settings,an.remove,an.sidePanel),ts(Qn(qw,"settings.getSettings")).then((t=>{e(t)}))}function Kw(e,t){_r(or,an.content,an.settings,an.sidePanel);const n=null!=t?t:vn();ns(Qn(qw,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Qw(e){Mi(Qn(qw,"settings.registerOnSaveHandler"),e)}function Zw(e){xi(Qn(qw,"settings.registerOnRemoveHandler"),e)}var Xw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Yw="v1";function eC(e,t){const n=Qn(Yw,"tasks.startTask"),r=t?e=>{var n,r;return t(null!==(n=e.err)&&void 0!==n?n:"",null!==(r=e.result)&&void 0!==r?r:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(_r(or,an.content,an.sidePanel,an.meetingStage),hc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Yo(n,oC(e),r):Xo(n,rC(e),r),new Um}function tC(e){e=iC(e);const{width:t,height:n}=e,r=Xw(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Zo(Qn(Yw,"tasks.updateTask"),e)}function nC(e,t){ei(Qn(Yw,"tasks.submitTask"),e,t)}function rC(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:ln.Small,width:e.width?e.width:ln.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function oC(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:ln.Small,width:e.width?e.width:ln.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function iC(e){return e.height=e.height?e.height:ln.Small,e.width=e.width?e.width:ln.Small,e}const aC="v2";var sC,cC;function uC(){return!(!_r(or,an.meetingStage,an.sidePanel,an.content)||!or.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(sC||(sC={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(cC||(cC={}));class lC{getFluidTenantInfo(){return dC(),new Promise((e=>{e(cc(Qn(aC,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return dC(),new Promise((t=>{t(cc(Qn(aC,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return dC(),new Promise((e=>{e(cc(Qn(aC,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return dC(),new Promise((t=>{t(cc(Qn(aC,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return dC(),new Promise((e=>{e(cc(Qn(aC,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return dC(),new Promise((t=>{t(cc(Qn(aC,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return dC(),new Promise((t=>{t(cc(Qn(aC,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return dC(),new Promise((t=>{t(cc(Qn(aC,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return dC(),new lC}}function dC(){if(!uC())throw new Error("LiveShareHost Not supported")}var fC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function pC(e){try{return e.cartItems=gC(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function gC(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=gC(e.accessories)),e}))}const mC=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=fC(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=mC(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function hC(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)wC(t),vC(t.accessories)}function vC(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(const t of e){if(t.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");wC(t)}}}function wC(e){if(!e.id)throw new Error("cartItem.id must not be empty");if(!e.name)throw new Error("cartItem.name must not be empty");yC(e.price),SC(e.quantity)}function CC(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===nn(e))throw new Error("id must be a valid UUID")}}function yC(e){if("number"!=typeof e||e<0)throw new Error(`price ${e} must be a number not less than 0`);if(parseFloat(e.toFixed(3))!==e)throw new Error(`price ${e} must have at most 3 decimal places`)}function SC(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function bC(e){if(!Object.values(TC).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const EC="v2",AC={majorVersion:1,minorVersion:1};var IC,TC;function PC(){if(_r(or,an.content,an.task),!kC())throw fn;return cc(Qn(EC,"marketplace.getCart"),"marketplace.getCart",AC).then(pC)}function OC(e){if(_r(or,an.content,an.task),!kC())throw fn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return CC(null==e?void 0:e.cartId),hC(null==e?void 0:e.cartItems),cc(Qn(EC,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:mC(e.cartItems),cartVersion:AC})).then(pC)}function RC(e){if(_r(or,an.content,an.task),!kC())throw fn;if(!e)throw new Error("removeCartItemsParams must be provided");if(CC(null==e?void 0:e.cartId),!Array.isArray(null==e?void 0:e.cartItemIds)||0===(null==e?void 0:e.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return cc(Qn(EC,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:AC})).then(pC)}function FC(e){if(_r(or,an.content,an.task),!kC())throw fn;if(!e)throw new Error("updateCartStatusParams must be provided");return CC(null==e?void 0:e.cartId),bC(null==e?void 0:e.cartStatus),cc(Qn(EC,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:AC})).then(pC)}function kC(){return!(!_r(or)||!or.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(IC||(IC={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(TC||(TC={}))})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],u=i[1],l=new o(c(e,a,u)),d=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(l(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?u(e,i,o,"day"):i>=r?u(e,i,r,"hour"):i>=n?u(e,i,n,"minute"):i>=t?u(e,i,t,"second"):e+" ms"}function u(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>Me,AppId:()=>eo,ChannelType:()=>fn,ChildAppWindow:()=>Wm,DialogDimension:()=>dn,EduType:()=>_e,EmailAddress:()=>tg,ErrorCode:()=>xe,FileOpenPreference:()=>ke,FrameContexts:()=>sn,HostClientType:()=>on,HostName:()=>an,LiveShareHost:()=>vC,NotificationTypes:()=>Jc,ParentAppWindow:()=>zm,RenderingSurfaces:()=>cn,SecondaryM365ContentIdName:()=>Ne,TaskModuleDimension:()=>dn,TeamType:()=>un,UUID:()=>zn,UserSettingTypes:()=>Qc,UserTeamRole:()=>ln,ValidatedSafeString:()=>Yr,ViewerActionTypes:()=>Kc,activateChildProxyingCommunication:()=>Er,app:()=>i,appEntity:()=>j,appInitialization:()=>Pe,appInstallDialog:()=>X,authentication:()=>Z,barCode:()=>ee,calendar:()=>de,call:()=>Ie,chat:()=>te,clipboard:()=>ne,conversations:()=>S,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>Rw,executeDeepLink:()=>$w,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>N,externalAppCommands:()=>x,files:()=>D,geoLocation:()=>ie,getAdaptiveCardSchemaVersion:()=>Bm,getContext:()=>kw,getCurrentFeatureFlagsState:()=>Pr,getMruTabInstances:()=>Ww,getTabInstances:()=>jw,hostEntity:()=>K,initialize:()=>Ow,initializeWithFrameContext:()=>Gw,liveShare:()=>Fe,location:()=>se,logs:()=>b,mail:()=>pe,marketplace:()=>Be,media:()=>Y,meeting:()=>ue,meetingRoom:()=>U,menus:()=>p,messageChannels:()=>L,monetization:()=>le,navigateBack:()=>Xw,navigateCrossDomain:()=>Zw,navigateToTab:()=>Qw,nestedAppAuth:()=>re,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>ru,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>Or,pages:()=>y,people:()=>me,print:()=>Fw,profile:()=>he,registerAppButtonClickHandler:()=>xw,registerAppButtonHoverEnterHandler:()=>Dw,registerAppButtonHoverLeaveHandler:()=>Uw,registerBackButtonHandler:()=>Lw,registerBeforeUnloadHandler:()=>_w,registerChangeSettingsHandler:()=>Bw,registerCustomHandler:()=>tu,registerFocusEnterHandler:()=>Vw,registerFullScreenHandler:()=>Nw,registerOnLoadHandler:()=>Hw,registerOnThemeChangeHandler:()=>Mw,registerUserSettingsChangeHandler:()=>nu,remoteCamera:()=>B,returnFocus:()=>Kw,search:()=>ve,secondaryBrowser:()=>ae,sendCustomEvent:()=>eu,sendCustomMessage:()=>Yc,setFeatureFlagsState:()=>Tr,setFrameContext:()=>qw,settings:()=>Oe,shareDeepLink:()=>zw,sharing:()=>Ce,sidePanelInterfaces:()=>I,stageView:()=>be,store:()=>Q,tasks:()=>Re,teams:()=>$,teamsCore:()=>ge,thirdPartyCloudStorage:()=>Te,uploadCustomApp:()=>Xc,version:()=>br,videoEffects:()=>q,videoEffectsEx:()=>G,visualMedia:()=>Ee,webStorage:()=>Ae});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>co,getTelemetryPort:()=>ao,isSupported:()=>so});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>ho,getDataLayerPort:()=>go,isSupported:()=>mo});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>vo,registerOnResumeHandler:()=>wo});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Eo,FailedReason:()=>So,Messages:()=>bo,_initialize:()=>To,_uninitialize:()=>Oo,getContext:()=>Ro,getFrameContext:()=>Io,initialize:()=>Po,isInitialized:()=>Ao,lifecycle:()=>o,notifyAppLoaded:()=>Fo,notifyExpectedFailure:()=>No,notifyFailure:()=>Mo,notifySuccess:()=>ko,openLink:()=>Uo,registerHostToAppPerformanceMetricsHandler:()=>Do,registerOnThemeChangeHandler:()=>xo});var a={};n.r(a),n.d(a,{isSupported:()=>_o,resize:()=>Ho});var s={};n.r(s),n.d(s,{isSupported:()=>Bo,open:()=>Vo});var c={};n.r(c),n.d(c,{isSupported:()=>$o,registerOnMessageFromParent:()=>zo,sendMessageToDialog:()=>Wo,sendMessageToParentFromDialog:()=>jo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Qo,getDialogInfoFromUrlDialogInfo:()=>Ko,isSupported:()=>Jo,open:()=>qo,parentCommunication:()=>c,submit:()=>Go});var l={};n.r(l),n.d(l,{isSupported:()=>ci,open:()=>si});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>li,open:()=>ui});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>di,isSupported:()=>fi,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>gi,MenuItem:()=>hi,MenuListType:()=>mi,initialize:()=>Si,isSupported:()=>Ri,setNavBarMenu:()=>Ii,setUpViews:()=>Ei,showActionMenu:()=>Ti});var g={};n.r(g),n.d(g,{initialize:()=>Fi,isSupported:()=>ji,registerChangeConfigHandler:()=>Hi,registerOnRemoveHandler:()=>Di,registerOnRemoveHandlerHelper:()=>Ui,registerOnSaveHandler:()=>Ni,registerOnSaveHandlerHelper:()=>xi,setConfig:()=>Mi,setValidityState:()=>ki});var m={};n.r(m),n.d(m,{isSupported:()=>Ca,onClick:()=>ha,onHoverEnter:()=>va,onHoverLeave:()=>wa});var h={};n.r(h),n.d(h,{_initialize:()=>ya,isSupported:()=>Aa,navigateBack:()=>ba,registerBackButtonHandler:()=>Sa,registerBackButtonHandlerHelper:()=>Ea});var v={};n.r(v),n.d(v,{isSupported:()=>Ta,navigateTo:()=>Ia,navigateToDefaultPage:()=>Pa});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Oa,exitFullscreen:()=>Ra,isSupported:()=>Fa});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Na,getTabInstances:()=>Ma,isSupported:()=>xa,navigateToTab:()=>ka});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Da,ReturnFocusType:()=>Ua,appButton:()=>m,backStack:()=>h,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Ba,initializeWithFrameContext:()=>Va,isSupported:()=>qa,navigateCrossDomain:()=>ja,navigateToApp:()=>Wa,registerFocusEnterHandler:()=>Ha,registerFullScreenHandler:()=>$a,returnFocus:()=>La,setCurrentFrame:()=>_a,shareDeepLink:()=>za,tabs:()=>C});var b={};n.r(b),n.d(b,{isSupported:()=>Gc,registerGetLogHandler:()=>qc});var S={};n.r(S),n.d(S,{closeConversation:()=>au,getChatMembers:()=>su,isSupported:()=>cu,openConversation:()=>iu});var E={};n.r(E),n.d(E,{isSupported:()=>fu,sendCustomTelemetryData:()=>pu});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>wu,isSupported:()=>vu});var I={};n.r(I),n.d(I,{ContentItemType:()=>yu,CopilotMode:()=>Au,MediaSelectionType:()=>bu,SidePanelErrorCode:()=>Ou,SidePanelErrorImpl:()=>Ru,TeamsContextType:()=>Pu,TeamsDimensionName:()=>Eu,TeamsSessionType:()=>Su,TranscriptState:()=>Iu,UserConsent:()=>Tu});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Lu,getContent:()=>xu,isResponseAReportableError:()=>Nu,isSupported:()=>Mu,preCheckUserConsent:()=>Du,registerUserActionContentSelect:()=>Uu});var T={};n.r(T),n.d(T,{closeSidePanel:()=>zu,isSupported:()=>Wu});var O={};n.r(O),n.d(O,{customTelemetry:()=>E,eligibility:()=>A,sidePanel:()=>P,view:()=>T});var R={};n.r(R),n.d(R,{ActionExecuteInvokeRequestType:()=>Ku,ActionExecuteResponseHandler:()=>Yu,InvokeErrorCode:()=>Xu,InvokeResponseType:()=>Zu,OriginalRequestType:()=>Qu,SerializableActionExecuteInvokeRequest:()=>Gu,authenticateAndResendRequest:()=>ol,authenticateWithOauth2:()=>sl,authenticateWithPowerPlatformConnectorPlugins:()=>cl,authenticateWithSSO:()=>il,authenticateWithSSOAndResendRequest:()=>al,isActionExecuteResponse:()=>Ju,isInvokeError:()=>el,isSupported:()=>ul,validateActionExecuteInvokeRequest:()=>nl});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>gl,authenticateWithOauth:()=>pl,authenticateWithSSO:()=>fl,authenticateWithSSOAndResendRequest:()=>ml,isSupported:()=>hl,validateInput:()=>vl});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>yl,ActionOpenUrlType:()=>Cl,isSupported:()=>El,processActionOpenUrl:()=>Sl,processActionSubmit:()=>bl});var M={};n.r(M),n.d(M,{isSupported:()=>Ol,processActionOpenUrl:()=>Pl,processActionSubmit:()=>Tl});var N={};n.r(N),n.d(N,{SerializableActionOpenUrlDialogInfo:()=>Ul,isSupported:()=>xl,processActionOpenUrlDialog:()=>Nl});var x={};n.r(x),n.d(x,{isSupported:()=>Vl,processActionCommand:()=>_l});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>jl,CloudStorageProviderFileAction:()=>Gl,CloudStorageProviderType:()=>Wl,DocumentLibraryAccessType:()=>$l,FileDownloadStatus:()=>ql,SpecialDocumentLibraryType:()=>zl,addCloudStorageFolder:()=>Kl,addCloudStorageProvider:()=>rd,addCloudStorageProviderFile:()=>id,copyMoveFiles:()=>ed,deleteCloudStorageFolder:()=>Ql,deleteCloudStorageProviderFile:()=>sd,downloadCloudStorageProviderFile:()=>cd,getCloudStorageFolderContents:()=>Zl,getCloudStorageFolders:()=>Jl,getExternalProviders:()=>Yl,getFileDownloads:()=>td,openCloudStorageFile:()=>Xl,openDownloadFolder:()=>nd,registerCloudStorageProviderContentChangeHandler:()=>dd,registerCloudStorageProviderListChangeHandler:()=>ld,removeCloudStorageProvider:()=>od,renameCloudStorageProviderFile:()=>ad,uploadCloudStorageProviderFile:()=>ud});var U={};n.r(U),n.d(U,{getPairedMeetingRoomInfo:()=>gd,isSupported:()=>wd,registerMeetingRoomCapabilitiesUpdateHandler:()=>hd,registerMeetingRoomStatesUpdateHandler:()=>vd,sendCommandToPairedMeetingRoom:()=>md});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>Cd,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>Ad,version:()=>yd});var _={};n.r(_),n.d(_,{isSupported:()=>Nd,showNotification:()=>Md});var V={};n.r(V),n.d(V,{isSupported:()=>Hd,notifyInstallCompleted:()=>Ld,registerAppInstallationHandler:()=>Dd,unregisterAppInstallationHandler:()=>Ud});var B={};n.r(B),n.d(B,{ControlCommand:()=>Vd,ErrorReason:()=>Bd,SessionTerminatedReason:()=>jd,getCapableParticipants:()=>Wd,isSupported:()=>Zd,registerOnCapableParticipantsChangeHandler:()=>Gd,registerOnDeviceStateChangeHandler:()=>Kd,registerOnErrorHandler:()=>Jd,registerOnSessionStatusChangeHandler:()=>Qd,requestControl:()=>zd,sendControlCommand:()=>$d,terminateSession:()=>qd});var j={};n.r(j),n.d(j,{isSupported:()=>ef,selectAppEntity:()=>Yd});var W={};n.r(W),n.d(W,{getUserJoinedTeams:()=>nf,isSupported:()=>rf});var z={};n.r(z),n.d(z,{getConfigSetting:()=>af,isSupported:()=>sf,joinedTeams:()=>W});var $={};n.r($),n.d($,{ChannelType:()=>uf,fullTrust:()=>z,getTeamChannels:()=>lf,isSupported:()=>ff,refreshSiteUrl:()=>df});var q={};n.r(q),n.d(q,{EffectChangeType:()=>Sf,EffectFailureReason:()=>Ef,VideoFrameFormat:()=>bf,isSupported:()=>Rf,notifySelectedVideoEffectChanged:()=>If,registerForVideoEffect:()=>Pf,registerForVideoFrame:()=>Af});var G={};n.r(G),n.d(G,{ErrorLevel:()=>Yf,frameProcessingTimeoutInMs:()=>Zf,isSupported:()=>sp,notifyFatalError:()=>lp,notifySelectedVideoEffectChanged:()=>op,registerForVideoEffect:()=>ip,registerForVideoFrame:()=>ep,updatePersonalizedEffects:()=>ap});var J={};n.r(J),n.d(J,{addAndConfigure:()=>wp,getAll:()=>Cp,isSupported:()=>Ep,reconfigure:()=>yp,remove:()=>Sp,rename:()=>bp});var K={};n.r(K),n.d(K,{AppTypes:()=>Pp,isSupported:()=>Tp,tab:()=>J});var Q={};n.r(Q),n.d(Q,{isSupported:()=>Lp,openAppDetail:()=>xp,openFullStore:()=>Np,openInContextStore:()=>Dp,openSpecificStore:()=>Up});var Z={};n.r(Z),n.d(Z,{DataResidency:()=>Yp,authenticate:()=>$p,getAuthToken:()=>Gp,getUser:()=>Kp,notifyFailure:()=>Xp,notifySuccess:()=>Zp,registerAuthenticationHandlers:()=>zp});var X={};n.r(X),n.d(X,{isSupported:()=>Sg,openAppInstallDialog:()=>bg});var Y={};n.r(Y),n.d(Y,{CameraStartMode:()=>Tg,File:()=>Mg,FileFormat:()=>Ig,ImageOutputFormats:()=>kg,ImageUriType:()=>Fg,Media:()=>Lg,MediaControllerEvent:()=>Pg,MediaType:()=>Rg,Source:()=>Og,VideoController:()=>_g,captureImage:()=>Ng,hasPermission:()=>xg,requestPermission:()=>Dg,scanBarCode:()=>jg,selectMedia:()=>Vg,viewImages:()=>Bg});var ee={};n.r(ee),n.d(ee,{hasPermission:()=>rm,isSupported:()=>im,requestPermission:()=>om,scanBarCode:()=>nm});var te={};n.r(te),n.d(te,{isSupported:()=>lm,openChat:()=>sm,openGroupChat:()=>um});var ne={};n.r(ne),n.d(ne,{isSupported:()=>mm,read:()=>gm,write:()=>pm});var re={};n.r(re),n.d(re,{addNAATrustedOrigins:()=>Tm,canParentManageNAATrustedOrigins:()=>Sm,deleteNAATrustedOrigins:()=>Om,getParentOrigin:()=>bm,isDeeplyNestedAuthSupported:()=>Em,isNAAChannelRecommended:()=>ym});var oe={};n.r(oe),n.d(oe,{chooseLocation:()=>Nm,isSupported:()=>Dm,showLocation:()=>xm});var ie={};n.r(ie),n.d(ie,{getCurrentLocation:()=>Lm,hasPermission:()=>Hm,isSupported:()=>Vm,map:()=>oe,requestPermission:()=>_m});var ae={};n.r(ae),n.d(ae,{isSupported:()=>Gm,open:()=>qm});var se={};n.r(se),n.d(se,{getLocation:()=>Km,isSupported:()=>Zm,showLocation:()=>Qm});var ce={};n.r(ce),n.d(ce,{setOptions:()=>Ym});var ue={};n.r(ue),n.d(ue,{CallType:()=>ih,EventActionSource:()=>sh,MeetingReactionType:()=>rh,MeetingType:()=>oh,SharingProtocol:()=>ah,appShareButton:()=>ce,getAppContentStageSharingCapabilities:()=>wh,getAppContentStageSharingState:()=>yh,getAuthenticationTokenForAnonymousUser:()=>fh,getIncomingClientAudioState:()=>ch,getLiveStreamState:()=>ph,getMeetingDetails:()=>lh,getMeetingDetailsVerbose:()=>dh,joinMeeting:()=>Ah,registerLiveStreamChangedHandler:()=>hh,registerMeetingReactionReceivedHandler:()=>Eh,registerRaiseHandStateChangedHandler:()=>Sh,registerSpeakingStateChangeHandler:()=>bh,requestAppAudioHandling:()=>Ih,requestStartLiveStreaming:()=>gh,requestStopLiveStreaming:()=>mh,shareAppContentToStage:()=>vh,stopSharingAppContentToStage:()=>Ch,toggleIncomingClientAudio:()=>uh,updateMicState:()=>Oh});var le={};n.r(le),n.d(le,{isSupported:()=>Nh,openPurchaseExperience:()=>Mh});var de={};n.r(de),n.d(de,{composeMeeting:()=>Uh,isSupported:()=>Lh,openCalendarItem:()=>Dh});var fe={};n.r(fe),n.d(fe,{composeMailWithHandoff:()=>Bh,isSupported:()=>jh});var pe={};n.r(pe),n.d(pe,{ComposeMailType:()=>Jh,composeMail:()=>qh,handoff:()=>fe,isSupported:()=>Gh,openMailItem:()=>$h});var ge={};n.r(ge),n.d(ge,{enablePrintCapability:()=>Qh,isSupported:()=>nv,print:()=>Zh,registerBeforeUnloadHandler:()=>ev,registerBeforeUnloadHandlerHelper:()=>tv,registerOnLoadHandler:()=>Xh,registerOnLoadHandlerHelper:()=>Yh});var me={};n.r(me),n.d(me,{isSupported:()=>sv,selectPeople:()=>iv});var he={};n.r(he),n.d(he,{isSupported:()=>fv,showProfile:()=>dv});var ve={};n.r(ve),n.d(ve,{closeSearch:()=>yv,isSupported:()=>Cv,registerHandlers:()=>vv,unregisterHandlers:()=>wv});var we={};n.r(we),n.d(we,{getContent:()=>Ev,isSupported:()=>Av});var Ce={};n.r(Ce),n.d(Ce,{SharingAPIMessages:()=>Tv,history:()=>we,isSupported:()=>Nv,shareWebContent:()=>Ov});var ye={};n.r(ye),n.d(ye,{close:()=>Dv,isSupported:()=>Uv});var be={};n.r(be),n.d(be,{StageViewOpenMode:()=>Hv,isSupported:()=>Vv,open:()=>_v,self:()=>ye});var Se={};n.r(Se),n.d(Se,{captureImages:()=>zv,isSupported:()=>qv,retrieveImages:()=>$v});var Ee={};n.r(Ee),n.d(Ee,{CameraRestriction:()=>Zv,Source:()=>Xv,hasPermission:()=>Yv,image:()=>Se,requestPermission:()=>ew});var Ae={};n.r(Ae),n.d(Ae,{isSupported:()=>sw,isWebStorageClearedOnUserLogOut:()=>iw});var Ie={};n.r(Ie),n.d(Ie,{CallModalities:()=>uw,isSupported:()=>dw,startCall:()=>lw});var Pe={};n.r(Pe),n.d(Pe,{ExpectedFailureReason:()=>Eo,FailedReason:()=>So,Messages:()=>bo,notifyAppLoaded:()=>pw,notifyExpectedFailure:()=>hw,notifyFailure:()=>mw,notifySuccess:()=>gw});var Te={};n.r(Te),n.d(Te,{getDragAndDropFiles:()=>Aw,isSupported:()=>Pw});var Oe={};n.r(Oe),n.d(Oe,{getSettings:()=>tC,registerOnRemoveHandler:()=>oC,registerOnSaveHandler:()=>rC,setSettings:()=>nC,setValidityState:()=>eC});var Re={};n.r(Re),n.d(Re,{getDefaultSizeIfNotProvided:()=>fC,startTask:()=>sC,submitTask:()=>uC,updateTask:()=>cC});var Fe={};n.r(Fe),n.d(Fe,{ContainerState:()=>mC,LiveShareHost:()=>vC,UserMeetingRole:()=>gC,isSupported:()=>hC});var ke,Me,Ne,xe,De,Ue,Le,He,_e,Ve,Be={};function je(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(Be),n.d(Be,{CartStatus:()=>NC,Intent:()=>MC,addOrUpdateCartItems:()=>DC,cartVersion:()=>kC,getCart:()=>xC,isSupported:()=>HC,removeCartItems:()=>UC,updateCartStatus:()=>LC}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(ke||(ke={})),function(e){e.M365Content="m365content"}(Me||(Me={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Ne||(Ne={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(xe||(xe={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(De||(De={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ue||(Ue={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Le||(Le={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(He||(He={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(_e||(_e={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Ve||(Ve={}));const We=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.office365.us","outlook-dod.office365.us","webmail.apps.mil","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","*.outlook.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com"]}');const ze="2.0.1",$e="2.0.2",qe="2.0.3",Ge="2.0.4",Je="2.0.1",Ke="1.9.0",Qe="2.0.0",Ze="1.7.0",Xe="1.8.0",Ye="1.9.0",et=n.t(We,2).validOrigins,tt=1500,nt=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),rt=/^https:\/\//,ot="https",it="teams.microsoft.com",at="The library has not yet been initialized",st="The runtime has not yet been initialized",ct="The runtime version is not supported",ut="The call was not properly started";var lt=n(933);const dt=pt,ft=2147483647;function pt(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return mt(e)}return gt(e,t,n)}function gt(e,t,n){if("string"==typeof e)return Ct(e,t);if(ArrayBuffer.isView(e))return Pt(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(bt(e,ArrayBuffer)||e&&bt(e.buffer,ArrayBuffer))return Tt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(bt(e,SharedArrayBuffer)||e&&bt(e.buffer,SharedArrayBuffer)))return Tt(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return pt.from(r,t,n);const o=Jt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return pt.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function mt(e){return ht(e),vt(e<0?0:0|wt(e))}function ht(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function vt(e){if(e>ft)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,pt.prototype),t}function wt(e){if(e>=ft)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ft.toString(16)+" bytes");return 0|e}function Ct(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!pt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|yt(e,t);let r=vt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function yt(e,t){if(pt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||bt(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return St(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Et(e).length;default:if(o)return r?-1:St(e).length;t=(""+t).toLowerCase(),o=!0}}function bt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function St(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Et(e){return lt.toByteArray(It(e))}pt.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),pt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),pt.from=function(e,t,n){return gt(e,t,n)},Object.setPrototypeOf(pt.prototype,Uint8Array.prototype),Object.setPrototypeOf(pt,Uint8Array),pt.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},pt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==pt.prototype};const At=/[^+/0-9A-Za-z-_]/g;function It(e){if((e=(e=e.split("=")[0]).trim().replace(At,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Pt(e){if(bt(e,Uint8Array)){const t=new Uint8Array(e);return Tt(t.buffer,t.byteOffset,t.byteLength)}return Ot(e)}function Tt(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,pt.prototype),r}function Ot(e){const t=e.length<0?0:0|wt(e.length),n=vt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Rt(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return Mt(r)}function Ft(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Nt(this,t,n);case"utf8":case"utf-8":return Rt(this,t,n);case"ascii":return xt(this,t,n);case"latin1":case"binary":return Dt(this,t,n);case"base64":return Ut(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}pt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Rt(this,0,e):Ft.apply(this,arguments)};const kt=4096;function Mt(e){const t=e.length;if(t<=kt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=kt));return n}function Nt(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=Gt[e[r]];return o}function xt(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function Dt(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function Ut(e,t,n){return 0===t&&n===e.length?lt.fromByteArray(e):lt.fromByteArray(e.slice(t,n))}function Lt(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function Ht(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(qt(r))return a;e[n+a]=r}return a}function _t(e,t,n,r){return $t(St(t,e.length-n),e,n,r)}function Vt(e,t,n,r){return $t(Wt(t),e,n,r)}function Bt(e,t,n,r){return $t(Et(t),e,n,r)}function jt(e,t,n,r){return $t(zt(t,e.length-n),e,n,r)}function Wt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function zt(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function $t(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function qt(e){return e!=e}pt.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return Ht(this,e,t,n);case"utf8":case"utf-8":return _t(this,e,t,n);case"ascii":case"latin1":case"binary":return Vt(this,e,t,n);case"base64":return Bt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return jt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Gt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Jt(e){if(pt.isBuffer(e)){const t=0|wt(e.length),n=vt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||qt(e.length)?vt(0):Ot(e):"Buffer"===e.type&&Array.isArray(e.data)?Ot(e.data):void 0}const Kt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Qt;const Zt=new Uint8Array(16);function Xt(){if(!Qt&&(Qt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qt(Zt)}const Yt=[];for(let e=0;e<256;++e)Yt.push((e+256).toString(16).slice(1));function en(e,t=0){return Yt[e[t+0]]+Yt[e[t+1]]+Yt[e[t+2]]+Yt[e[t+3]]+"-"+Yt[e[t+4]]+Yt[e[t+5]]+"-"+Yt[e[t+6]]+Yt[e[t+7]]+"-"+Yt[e[t+8]]+Yt[e[t+9]]+"-"+Yt[e[t+10]]+Yt[e[t+11]]+Yt[e[t+12]]+Yt[e[t+13]]+Yt[e[t+14]]+Yt[e[t+15]]}const tn=function(e,t,n){if(Kt.randomUUID&&!t&&!e)return Kt.randomUUID();const r=(e=e||{}).random||(e.rng||Xt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return en(r)},nn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const rn=function(e){return"string"==typeof e&&nn.test(e)};var on,an,sn,cn,un,ln,dn,fn;!function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(on||(on={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(an||(an={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(sn||(sn={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(cn||(cn={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(un||(un={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(ln||(ln={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(dn||(dn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(fn||(fn={}));const pn={errorCode:xe.NOT_SUPPORTED_ON_PLATFORM},gn={majorVersion:1,minorVersion:5},mn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},hn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),vn=new Error("Invalid response: Received more images than the specified max limit in the response.");function wn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Cn(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),r=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(let e=0;e<n.length;++e)if(Number(n[e])!=Number(r[e]))return Number(n[e])>Number(r[e])?1:-1;return 0}function yn(){return tn()}function bn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&bn(e[t])})),Object.freeze(e)}function Sn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function En(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function An(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function In(e,t,n){return new Promise(((r,o)=>{const i=setTimeout(o,t,n);e().then((e=>{clearTimeout(i),r(e)})).catch((e=>{clearTimeout(i),o(e)}))}))}function Pn(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId.toString())+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl.toString()),(e.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function Tn(e){return!(Cn(`${e.majorVersion}.${e.minorVersion}`,`${gn.majorVersion}.${gn.minorVersion}`)>=0)}function On(e){return"https:"===e.protocol}function Rn(e,t){return new Promise(((n,r)=>{if(e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty."),e.startsWith("image/")){const r=atob(t),o=new Uint8Array(r.length);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);n(new Blob([o],{type:e}))}const o=dt.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Fn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function kn(){if(Mn())throw new Error("window object undefined at SSR check");return window}function Mn(){return"undefined"==typeof window}function Nn(e,t){if(Un(e)||!Ln(e)||!Hn(e))throw t||new Error("id is not valid.")}function xn(e,t){const n=e.toString().toLocaleLowerCase();if(Un(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!On(e))throw t||new Error("Url should be a valid https url")}function Dn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Un(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Ln(e){return e.length<256&&e.length>4}function Hn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function _n(e){if(!e)throw new Error("id must not be empty");if(!1===rn(e))throw new Error("id must be a valid UUID")}const Vn=!!performance&&"now"in performance;function Bn(){return Vn?performance.now()+performance.timeOrigin:void 0}function jn(e,t=0){if(t>1e3)return!1;if(void 0===e||"boolean"==typeof e||"number"==typeof e||"bigint"==typeof e||"string"==typeof e||null===e)return!0;if(Array.isArray(e))return e.every((e=>jn(e,t+1)));return!("object"!=typeof e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype&&null!==Object.getPrototypeOf(e))&&Object.keys(e).every((n=>jn(e[n],t+1)))}function Wn(e){var t,n;if(!(null===(n=null===(t=e.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)||void 0===n?void 0:n.ageGroup))return e;const r=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return"nonadult"!==(null==r?void 0:r.toLowerCase())?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:He.NotAdult})})})}class zn{constructor(e=yn()){this.uuid=e,_n(e)}toString(){return this.uuid}serialize(){return this.toString()}}function $n(e){if(!(e instanceof zn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class qn{}qn.initializeCalled=!1,qn.initializeCompleted=!1,qn.additionalValidOrigins=[],qn.initializePromise=void 0,qn.isFramelessWindow=!1,qn.frameContext=void 0,qn.hostClientType=void 0,qn.printCapabilityEnabled=!1,qn.teamsJsInstanceId=(new zn).toString();var Gn=n(815);const Jn=new zn,Kn=Gn.debug.formatArgs;Gn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Jn.toString()}]`,Kn.call(this,e)};const Qn=(0,Gn.debug)("teamsJs");function Zn(e){return Qn.extend(e)}function Xn(e,t){return`${e}_${t}`}function Yn(e){return/^v\d+_[\w.]+$/.test(e)}var er=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const tr=Zn("runtime"),nr=4;function rr(e){return e.apiVersion===nr}const or={apiVersion:-1,supports:{}};function ir(e){if(rr(e))return!0;throw-1===e.apiVersion?new Error(st):new Error(ct)}let ar=or;const sr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:mn,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},cr=[on.desktop,on.web,on.rigel,on.surfaceHub,on.teamsRoomsWindows,on.teamsRoomsAndroid,on.teamsPhones,on.teamsDisplays],ur=[on.android,on.ios,on.ipados,on.visionOS],lr=[...cr,...ur];function dr(e){let t=e;if(t.apiVersion<nr&&fr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),rr(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const fr=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=er(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],pr="2.1.2",gr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:cr}],"1.9.0":[{capability:{location:{}},hostClientTypes:lr}],"2.0.0":[{capability:{people:{}},hostClientTypes:lr},{capability:{sharing:{}},hostClientTypes:[on.desktop,on.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[on.android,on.desktop,on.ios,on.teamsRoomsAndroid,on.teamsPhones,on.teamsDisplays,on.web]},{capability:{webStorage:{}},hostClientTypes:[on.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[on.android,on.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[on.android,on.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[on.android,on.ios,on.ipados,on.visionOS]}],"2.1.2":[]},mr=tr.extend("generateBackCompatRuntimeConfig");function hr(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"!=typeof t[r]||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=hr(e[r]||{},t[r]));return n}function vr(e,t,n){mr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);mr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{Cn(e,t)>=0&&n[t].forEach((e=>{void 0!==qn.hostClientType&&e.hostClientTypes.includes(qn.hostClientType)&&(r=hr(r,e.capability))}))}));const o={apiVersion:nr,hostVersionsInfo:mn,isLegacyTeams:!0,supports:r};return mr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const wr=tr.extend("applyRuntimeConfig");function Cr(e){"string"==typeof e.apiVersion&&(wr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),wr("Fast-forwarding runtime %o",e);const t=dr(e);wr("Applying runtime %o",t),ar=bn(t)}function yr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const br="2.42.0",Sr={childProxyingCommunication:!1};function Er(){Sr.childProxyingCommunication=!0}function Ar(){return Sr.childProxyingCommunication}let Ir={disableEnforceOriginMatchForChildResponses:!1};function Pr(){return Ir}function Tr(e){Ir=e}function Or(e){return Tr(Object.assign(Object.assign({},Ir),e)),Pr()}var Rr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Fr=e=>{const{uuid:t}=e,n=Rr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},kr=e=>{const{uuidAsString:t}=e,n=Rr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new zn(t):void 0})},Mr=e=>{const{uuidAsString:t}=e,n=Rr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new zn(t):void 0})},Nr=e=>{const{uuid:t}=e,n=Rr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function xr(e){return void 0!==e.uuidAsString?`${e.uuidAsString} (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Dr=Zn("flushMessageQueue");function Ur(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Fr(o);Dr("Flushing message %s from %s message queue via postMessage.",xr(n),r),e.postMessage(n,t)}}}const Lr=Zn("internal"),Hr=Lr.extend("ensureInitializeCalled"),_r=Lr.extend("ensureInitialized");function Vr(){if(!qn.initializeCalled)throw Hr(at),new Error(at)}function Br(e,...t){if(!qn.initializeCompleted)throw _r("%s. initializeCalled: %s",at,qn.initializeCalled.toString()),new Error(at);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===qn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${qn.frameContext}".`)}return ir(e)}function jr(e=ze){const t=Cn(qn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Wr(){return qn.hostClientType==on.android||qn.hostClientType==on.ios||qn.hostClientType==on.ipados||qn.hostClientType==on.visionOS}function zr(e=ze){if(!Wr()){throw{errorCode:xe.NOT_SUPPORTED_ON_PLATFORM}}if(!jr(e)){throw{errorCode:xe.OLD_PLATFORM}}}function $r(e){let t=qn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&rt.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),qn.additionalValidOrigins=t}function qr(e){if(!Qr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Jr}-${Kr}).`)}function Gr(e){if(Un(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(Zr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Jr=4,Kr=256;function Qr(e){return e.length<Kr&&e.length>Jr}function Zr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Xr(e){if(!(e instanceof eo))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Yr{constructor(e){this.idAsString=e,Gr(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class eo extends Yr{constructor(e){super(e),qr(e)}toJSON(){return{appIdAsString:this.toString()}}}function to(e){return null==e}var no=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let ro;const oo="v1",io=Zn("messageChannels.telemetry");function ao(){return no(this,void 0,void 0,(function*(){if(ro)return io("Returning telemetry port from cache"),ro;if(!so())throw pn;return ro=yield mc(Xn(oo,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),ro}))}function so(){var e;return!(!Br(ar)||!(null===(e=ar.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function co(){ro=void 0}var uo=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let lo;const fo="v1",po=Zn("messageChannels.dataLayer");function go(){return uo(this,void 0,void 0,(function*(){if(lo)return po("Returning dataLayer port from cache"),lo;if(!mo())throw pn;return lo=yield mc(Xn(fo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),lo}))}function mo(){var e;return!(!Br(ar)||!(null===(e=ar.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function ho(){lo=void 0}function vo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Br(ar),Ms(e)}function wo(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Br(ar),Ns(e)}const Co="v2",yo=Zn("app"),bo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var So,Eo;function Ao(){return qn.initializeCompleted}function Io(){return qn.frameContext}function Po(e){return Ji(Xn(Co,"app.initialize"),e)}function To(e){rc.currentWindow=e}function Oo(){qn.initializeCalled&&(hs(),qn.initializeCalled=!1,qn.initializeCompleted=!1,qn.initializePromise=void 0,qn.additionalValidOrigins=[],qn.frameContext=void 0,qn.hostClientType=void 0,qn.isFramelessWindow=!1,co(),ho(),ac())}function Ro(){return new Promise((e=>{Vr(),e(sc(Xn(Co,"app.getContext"),"getContext"))})).then((e=>Lo(e)))}function Fo(){Vr(),Ki(Xn(Co,"app.notifyAppLoaded"))}function ko(){return Xi(Xn(Co,"app.notifySuccess"))}function Mo(e){Vr(),Zi(Xn(Co,"app.notifyFailure"),e)}function No(e){Vr(),Qi(Xn(Co,"app.notifyExpectedFailure"),e)}function xo(e){ra(Xn(Co,"app.registerOnThemeChangeHandler"),e)}function Do(e){Is(e)}function Uo(e){return oa(Xn(Co,"app.openLink"),e)}function Lo(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,messageId:e.messageId,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:an.teams,clientType:e.hostClientType?e.hostClientType:on.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new eo(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:qn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}function Ho(e){Yo(Xn(Zo,"dialog.update.resize"),e)}function _o(){return!(!Br(ar)||!ar.supports.dialog)&&!!ar.supports.dialog.update}function Vo(e,t,n){ti(Xn(Zo,"dialog.url.bot.open"),e,t,n)}function Bo(){return Br(ar)&&void 0!==(ar.supports.dialog&&ar.supports.dialog.url&&ar.supports.dialog.url.bot)}function jo(e){if(Br(ar,sn.task),!$o())throw pn;wc(Xn(Zo,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Wo(e){if(Br(ar,sn.content,sn.sidePanel,sn.meetingStage),!$o())throw pn;wc(Xn(Zo,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function zo(e){if(Br(ar,sn.task),!$o())throw pn;for(ys("messageForChild"),Cs(Xn(Zo,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ii.reverse();ii.length>0;){e(ii.pop())}}function $o(){var e,t;return Br(ar)&&!!(null===(t=null===(e=ar.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function qo(e,t,n){ei(Xn(Zo,"dialog.url.open"),e,t,n)}function Go(e,t){ni(Xn(Zo,"dialog.url.submit"),e,t)}function Jo(){return Br(ar)&&void 0!==(ar.supports.dialog&&ar.supports.dialog.url)}function Ko(e){return{url:e.url,height:e.size?e.size.height:dn.Small,width:e.size?e.size.width:dn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Qo(e){const t=Ko(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(So||(So={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Eo||(Eo={})),yo("teamsjs instance is version %s, starting at %s UTC (%s local)",br,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Mn())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,n="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?yo("teamsjs is being used from %s. %s",t,n):yo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const Zo="v2",Xo="dialog.submit should not be called from FrameContext.content.\nIf dialog.submit was called from inside the dialog, please disregard this message.\nThis issue occurs due to a bug in Teams mobile where the dialog is incorrectly identified as being in the content FrameContext.\nWe are working to resolve this.";function Yo(e,t){if(Br(ar,sn.content,sn.sidePanel,sn.task,sn.meetingStage),!_o())throw pn;wc(e,"tasks.updateTask",[t])}function ei(e,t,n,r){if(Br(ar,sn.content,sn.sidePanel,sn.meetingStage),!Jo())throw pn;r&&Cs(Xn(Zo,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);wc(e,"tasks.startTask",[Ko(t)],((e,t)=>{null==n||n({err:e,result:t}),ys("messageForParent")}))}function ti(e,t,n,r){if(Br(ar,sn.content,sn.sidePanel,sn.meetingStage),!Bo())throw pn;r&&Cs(Xn(Zo,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);wc(e,"tasks.startTask",[Qo(t)],((e,t)=>{null==n||n({err:e,result:t}),ys("messageForParent")}))}function ni(e,t,n){if(Br(ar,sn.content,sn.task),!Jo())throw pn;qn.frameContext===sn.content&&console.warn(Xo),wc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function ri(e){return{card:e.card,height:e.size?e.size.height:dn.Small,width:e.size?e.size.width:dn.Small,title:e.title}}function oi(e){const t=ri(e);return t.completionBotId=e.completionBotId,t}const ii=[];function ai(e){qn.frameContext&&(qn.frameContext===sn.task?ii.push(e):ys("messageForChild"))}function si(e,t){if(Br(ar,sn.content,sn.sidePanel,sn.meetingStage),!ci())throw pn;const n=oi(e);wc(Xn(Zo,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ci(){const e=ar.hostVersionsInfo&&ar.hostVersionsInfo.adaptiveCardSchemaVersion&&!Tn(ar.hostVersionsInfo.adaptiveCardSchemaVersion);return Br(ar)&&void 0!==(e&&ar.supports.dialog&&ar.supports.dialog.card&&ar.supports.dialog.card.bot)}function ui(e,t){if(Br(ar,sn.content,sn.sidePanel,sn.meetingStage),!li())throw pn;const n=ri(e);wc(Xn(Zo,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function li(){const e=ar.hostVersionsInfo&&ar.hostVersionsInfo.adaptiveCardSchemaVersion&&!Tn(ar.hostVersionsInfo.adaptiveCardSchemaVersion);return Br(ar)&&void 0!==(e&&ar.supports.dialog&&ar.supports.dialog.card)}function di(){Cs(Xn(Zo,"dialog.registerMessageForChildHandler"),"messageForChild",ai,!1)}function fi(){return!(!Br(ar)||!ar.supports.dialog)}const pi="v2";var gi,mi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(gi||(gi={}));class hi{constructor(){this.enabled=!0,this.selected=!1}}let vi,wi,Ci,yi,bi;function Si(){Cs(Xn(pi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Pi,!1),Cs(Xn(pi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Oi,!1),Cs(Xn(pi,"menus.registerSetModuleViewHandler"),"setModuleView",Ai,!1)}function Ei(e,t){if(Br(ar),!Ri())throw pn;Ci=t,wc(Xn(pi,"menus.setUpViews"),"setUpViews",[e])}function Ai(e){Ci&&Ci(e)||(Br(ar),wc(Xn(pi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ii(e,t){if(Br(ar),!Ri())throw pn;vi=t,wc(Xn(pi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Pi(e){vi&&vi(e)||(Br(ar),wc(Xn(pi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Ti(e,t){if(Br(ar),!Ri())throw pn;wi=t,wc(Xn(pi,"menus.showActionMenu"),"showActionMenu",[e])}function Oi(e){wi&&wi(e)||(Br(ar),wc(Xn(pi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Ri(){return!(!Br(ar)||!ar.supports.menus)}function Fi(){Cs(Xn(Ga,"pages.config.registerSettingsSaveHandler"),"settings.save",Li,!1),Cs(Xn(Ga,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Vi,!1)}function ki(e){return ns(Xn(Ga,"pages.config.setValidityState"),e)}function Mi(e){return os(Xn(Ga,"pages.config.setConfig"),e)}function Ni(e){xi(Xn(Ga,"pages.config.registerOnSaveHandler"),e,(()=>{if(!to(e)&&!ji())throw pn}))}function xi(e,t,n){!to(t)&&Br(ar,sn.settings),n&&n(),yi=t,!to(t)&&wc(e,"registerHandler",["save"])}function Di(e){Ui(Xn(Ga,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!to(e)&&!ji())throw pn}))}function Ui(e,t,n){!to(t)&&Br(ar,sn.remove,sn.settings),n&&n(),bi=t,!to(t)&&wc(e,"registerHandler",["remove"])}function Li(e){const t=new _i(e);yi?yi(t):Hs()?$s("settings.save",[e]):t.notifySuccess()}function Hi(e){Ss(Xn(Ga,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[sn.content],(()=>{if(!ji())throw pn}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(mi||(mi={}));class _i{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),wc(Xn(Ga,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),wc(Xn(Ga,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function Vi(){const e=new Bi;bi?bi(e):Hs()?$s("settings.remove",[]):e.notifySuccess()}class Bi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),wc(Xn(Ga,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),wc(Xn(Ga,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function ji(){return!(!Br(ar)||!ar.supports.pages)&&!!ar.supports.pages.config}class Wi{}class zi extends Wi{validate(e){return!0}deserialize(e){return e}}var $i=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const qi=6e4,Gi=Zn("app");function Ji(e,t){if(Mn()){return Gi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return In((()=>na(e,t)),qi,new Error("SDK initialization timed out."))}function Ki(e){wc(e,bo.AppLoaded,[br])}function Qi(e,t){wc(e,bo.ExpectedFailure,[t.reason,t.message])}function Zi(e,t){wc(e,bo.Failure,[t.reason,t.message])}function Xi(e){return $i(this,void 0,void 0,(function*(){if(qn.initializeCompleted)return ea(e);if(!qn.initializePromise)throw new Error(at);return qn.initializePromise.then((()=>ea(e)))}))}function Yi(){var e;return Br(ar)&&!!(null===(e=ar.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ea(e){return $i(this,void 0,void 0,(function*(){return Yi()?pc(bo.Success,[br],new zi,e).then((()=>({hasFinishedSuccessfully:!0}))):(wc(e,bo.Success,[br]),{hasFinishedSuccessfully:"unknown"})}))}const ta=Gi.extend("initializeHelper");function na(e,t){return new Promise((n=>{qn.initializeCalled||(qn.initializeCalled=!0,ms(),qn.initializePromise=ic(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=ze})=>{qn.frameContext=e,qn.hostClientType=t,qn.clientSupportedSDKVersion=r;try{ta("Parsing %s",n);let e=JSON.parse(n);if(ta("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=Wn(e),n&&Cr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ta("Attempting to parse %s as an SDK version",n),isNaN(Cn(n,ze))||(qn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(ta("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");e=Wn(e),Cr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Cr(vr(qn.clientSupportedSDKVersion,sr,gr))}}qn.initializeCompleted=!0})),Si(),Fi(),di()),Array.isArray(t)&&$r(t),void 0!==qn.initializePromise?n(qn.initializePromise):ta("GlobalVars.initializePromise is unexpectedly undefined")}))}function ra(e,t){!to(t)&&Vr(),Es(e,t)}function oa(e,t){return new Promise((n=>{Br(ar,sn.content,sn.sidePanel,sn.settings,sn.task,sn.stage,sn.meetingStage),n(cc(e,"executeDeepLink",t))}))}var ia=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let aa=[];const sa=Zn("validateOrigin");let ca;function ua(){return ia(this,void 0,void 0,(function*(){ca||(yield da())}))}function la(){return 0===aa.length}function da(e=!1){return ia(this,void 0,void 0,(function*(){if(!la()&&!e)return aa;if(ca)return ca;if(Mn())return aa=et,et;{sa("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),tt);return ca=fetch(nt,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return sa("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(fa(JSON.stringify(e)))return aa=e.validOrigins,aa;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?sa(`validOrigins fetch call to CDN failed due to Timeout of ${tt} ms. Defaulting to fallback list`):sa("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),aa=et,aa))),ca}}))}function fa(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return sa("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function pa(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function ga(e,t){const n=t||la()?et:aa;return ma(e,n)?Promise.resolve(!0):(sa("Origin %s is not in the local valid origins list, fetching from CDN",e),da(t).then((t=>ma(e,t))))}function ma(e,t){if(!On(e))return sa("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>pa(e,n))))return!0;for(const e of qn.additionalValidOrigins){if(pa("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return sa("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,qn.additionalValidOrigins),!1}function ha(e){Ss(Xn(Ga,"pages.appButton.onClick"),"appButtonClick",e,[sn.content],(()=>{if(!Ca())throw pn}))}function va(e){Ss(Xn(Ga,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[sn.content],(()=>{if(!Ca())throw pn}))}function wa(e){Ss(Xn(Ga,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[sn.content],(()=>{if(!Ca())throw pn}))}function Ca(){return!(!Br(ar)||!ar.supports.pages)&&!!ar.supports.pages.appButton}function ya(){ls()}function ba(){return Ka(Xn(Ga,"pages.backStack.navigateBack"))}function Sa(e){Ea(Xn(Ga,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!to(e)&&!Aa())throw pn}))}function Ea(e,t,n){!to(t)&&Br(ar),n&&n(),us(t),!to(t)&&wc(e,"registerHandler",["backButton"])}function Aa(){return!(!Br(ar)||!ar.supports.pages)&&!!ar.supports.pages.backStack}function Ia(e){return new Promise((t=>{if(Br(ar,sn.content,sn.sidePanel,sn.settings,sn.task,sn.stage,sn.meetingStage),!Ta())throw pn;t(lc(Xn(Ga,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Pa(){return new Promise((e=>{if(Br(ar,sn.content,sn.sidePanel,sn.settings,sn.task,sn.stage,sn.meetingStage),!Ta())throw pn;e(lc(Xn(Ga,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Ta(){return!(!Br(ar)||!ar.supports.pages)&&!!ar.supports.pages.currentApp}function Oa(){if(Br(ar,sn.content),!Fa())throw pn;wc(Xn(Ga,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Ra(){if(Br(ar,sn.content),!Fa())throw pn;wc(Xn(Ga,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Fa(){return!(!Br(ar)||!ar.supports.pages)&&!!ar.supports.pages.fullTrust}function ka(e){return Qa(Xn(Ga,"pages.tabs.navigateToTab"),e)}function Ma(e){return Xa(Xn(Ga,"pages.tabs.getTabInstances"),e)}function Na(e){return Ya(Xn(Ga,"pages.tabs.getMruTabInstances"),e)}function xa(){return!(!Br(ar)||!ar.supports.pages)&&!!ar.supports.pages.tabs}var Da,Ua;function La(e){const t=Xn(Ga,"pages.returnFocus");if(Br(ar),!qa())throw pn;if(void 0===e&&wc(t,"returnFocus",[!1]),"boolean"==typeof e)wc(t,"returnFocus",[e]);else switch(e){case Ua.PreviousLandmark:case Ua.GoToActivityFeed:wc(t,"returnFocus",[!1,e]);break;case Ua.NextLandmark:wc(t,"returnFocus",[!0,e])}}function Ha(e){Ss(Xn(Ga,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!qa())throw pn}))}function _a(e){ts(Xn(Ga,"pages.setCurrentFrame"),e)}function Va(e,t,n){ua(),Ji(Xn(Ga,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),_a(e)}function Ba(){return rs(Xn(Ga,"pages.getConfig."))}function ja(e){return Ja(Xn(Ga,"pages.navigateCrossDomain"),e)}function Wa(e){return new Promise((t=>{if(Br(ar,sn.content,sn.sidePanel,sn.settings,sn.task,sn.stage,sn.meetingStage),!qa())throw pn;const n=Xn(Ga,"pages.navigateToApp");if(ar.isLegacyTeams){t(cc(n,"executeDeepLink",Pn(is(e)?e:as(e))))}else{t(cc(n,"pages.navigateToApp",is(e)?ss(e):e))}}))}function za(e){return es(Xn(Ga,"pages.shareDeepLink"),e)}function $a(e){Ss(Xn(Ga,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!to(e)&&!qa())throw pn}))}function qa(){return!(!Br(ar)||!ar.supports.pages)}ua(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Da||(Da={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Ua||(Ua={}));const Ga="v2";function Ja(e,t){return new Promise((n=>{if(Br(ar,sn.content,sn.sidePanel,sn.settings,sn.remove,sn.task,sn.stage,sn.meetingStage),!qa())throw pn;n(uc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Ka(e){return new Promise((t=>{if(Br(ar),!Aa())throw pn;t(uc(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Qa(e,t){return new Promise((n=>{if(Br(ar),!xa())throw pn;n(uc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Za(e,t){if(Br(ar),!qa())throw pn;wc(e,"returnFocus",[t])}function Xa(e,t){return new Promise((n=>{if(Br(ar),!xa())throw pn;n(sc(e,"getTabInstances",t))}))}function Ya(e,t){return new Promise((n=>{if(Br(ar),!xa())throw pn;n(sc(e,"getMruTabInstances",t))}))}function es(e,t){if(Br(ar,sn.content,sn.sidePanel,sn.meetingStage),!qa())throw pn;wc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ts(e,t){if(Br(ar,sn.content),!qa())throw pn;wc(e,"setFrameContext",[t])}function ns(e,t){if(Br(ar,sn.settings,sn.remove),!ji())throw pn;wc(e,"settings.setValidityState",[t])}function rs(e){return new Promise((t=>{if(Br(ar,sn.content,sn.settings,sn.remove,sn.sidePanel),!qa())throw pn;t(sc(e,"settings.getSettings"))}))}function os(e,t){return new Promise((n=>{if(Br(ar,sn.content,sn.settings,sn.sidePanel),!ji())throw pn;n(cc(e,"settings.setSettings",t))}))}function is(e){return e.appId instanceof eo}function as(e){return Object.assign(Object.assign({},e),{appId:new eo(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function ss(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let cs;function us(e){cs=e}function ls(){Cs(Xn(Ga,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",ds,!1)}function ds(){cs&&cs()||(Hs()?$s("backButtonPress",[]):ba())}var fs=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ps=Zn("handlers");class gs{static initializeHandlers(){gs.handlers.themeChange=As,gs.handlers.load=Os,gs.handlers.beforeUnload=ks,ls()}static uninitializeHandlers(){gs.handlers={},gs.themeChangeHandler=null,gs.loadHandler=null,gs.beforeUnloadHandler=null,gs.beforeSuspendOrTerminateHandler=null,gs.resumeHandler=null}}function ms(){gs.initializeHandlers()}function hs(){gs.uninitializeHandlers()}gs.handlers={},gs.themeChangeHandler=null,gs.loadHandler=null,gs.beforeUnloadHandler=null,gs.beforeSuspendOrTerminateHandler=null,gs.resumeHandler=null,gs.hostToAppPerformanceMetricsHandler=null;const vs=ps.extend("callHandler");function ws(e,t){const n=gs.handlers[e];if(n){vs("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Hs()?($s(e,t),[!1,void 0]):(vs("Handler for action message %s not found.",e),[!1,void 0])}function Cs(e,t,n,r=!0,o=[]){n?(gs.handlers[t]=n,r&&wc(e,"registerHandler",[t,...o])):delete gs.handlers[t]}function ys(e){delete gs.handlers[e]}function bs(e){return null!=gs.handlers[e]}function Ss(e,t,n,r,o){n&&Br(ar,...r),o&&o(),Cs(e,t,n)}function Es(e,t){gs.themeChangeHandler=t,!to(t)&&wc(e,"registerHandler",["themeChange"])}function As(e){gs.themeChangeHandler&&gs.themeChangeHandler(e),Hs()&&$s("themeChange",[e])}function Is(e){gs.hostToAppPerformanceMetricsHandler=e}function Ps(e){gs.hostToAppPerformanceMetricsHandler&&gs.hostToAppPerformanceMetricsHandler(e)}function Ts(e,t){gs.loadHandler=t,!to(t)&&wc(e,"registerHandler",["load"])}function Os(e){const t=Rs(e);gs.resumeHandler?(gs.resumeHandler(t),Hs()&&$s("load",[t])):gs.loadHandler&&(gs.loadHandler(e),Hs()&&$s("load",[e]))}function Rs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Fs(e,t){gs.beforeUnloadHandler=t,!to(t)&&wc(e,"registerHandler",["beforeUnload"])}function ks(){return fs(this,void 0,void 0,(function*(){const e=()=>{wc(Xn("v2","handleBeforeUnload"),"readyToUnload",[])};gs.beforeSuspendOrTerminateHandler?(yield gs.beforeSuspendOrTerminateHandler(),Hs()?$s("beforeUnload"):e()):gs.beforeUnloadHandler&&gs.beforeUnloadHandler(e)||(Hs()?$s("beforeUnload"):e())}))}function Ms(e){gs.beforeSuspendOrTerminateHandler=e,!to(e)&&wc(Xn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Ns(e){gs.resumeHandler=e,!to(e)&&wc(Xn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var xs=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ds=Zn("childProxyingCommunication");class Us{}function Ls(){Us.window=null,Us.origin=null,Us.messageQueue=[]}function Hs(){return!!Ar()&&!!Us.window}function _s(e,t){return!!Ar()&&(Us.window&&!Us.window.closed&&e!==Us.window||(Us.window=e,Us.origin=t),Us.window&&Us.window.closed?(Us.window=null,Us.origin=null,!1):Us.window===e)}function Vs(e,t,n,r){return xs(this,void 0,void 0,(function*(){Us.window===t&&(Ur(Us.window,Us.origin,Us.messageQueue,"child"),js(e,n,r))}))}Us.messageQueue=[];const Bs=Ds.extend("handleIncomingMessageFromChild");function js(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=kr(e.data),[o,i]=ws(r.func,r.args);if(o&&void 0!==i)return Bs("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",xr(r),r.func),void zs(r.id,r.uuid,Array.isArray(i)?i:[i]);Bs("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",xr(r),r.func),Ws(r,t,n)}function Ws(e,t,n){const r=t(Xn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Us.origin;n(r.uuid,((...t)=>{if(!Us.window)return;if(!Pr().disableEnforceOriginMatchForChildResponses&&o!==Us.origin)return void Bs("Origin of child window has changed, not sending response back to child window");const n=t.pop();Bs("Message from parent being relayed to child, id: %s",xr(e)),zs(e.id,e.uuid,t,n)}))}function zs(e,t,n,r){const o=Us.window,i=qs(e,t,n,r),a=Nr(i),s=Us.origin;o&&s&&(Bs("Sending message %s to %s via postMessage, args = %o",xr(a),"child",a.args),o.postMessage(a,s))}function $s(e,t){const n=Us.window,r=Gs(e,t),o=Us.origin;n&&o?n.postMessage(r,o):Us.messageQueue.push(r)}function qs(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Gs(e,t){return{func:e,args:t||[]}}class Js{static storeCallbackInformation(e,t){Js.callbackInformation.set(e,t)}static clearMessages(){Js.callbackInformation.clear()}static deleteMessageInformation(e){Js.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Ps({actionName:e.func,messageDelay:n-r,requestStartedAt:r}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(e,t,n,r){const o=Js.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Ps({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Js.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Js.callbackInformation=new Map;const Ks=Zn("nestedAppAuthUtils"),Qs=Ks.extend("tryPolyfillWithNestedAppAuthBridge"),Zs="v2";function Xs(e,t,n){var r;const o=Qs;if(qn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=ec(a,n);s&&(a.nestedAppAuthBridge=s)}const Ys=Ks.extend("createNestedAppAuthBridge");function ec(e,t){const n=Ys;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=Xn(Zs,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var tc=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const nc=Zn("communication");class rc{}class oc{}function ic(e,t){if(oc.messageListener=e=>Pc(e),rc.currentWindow=rc.currentWindow||kn(),rc.parentWindow=rc.currentWindow.parent!==rc.currentWindow.self?rc.currentWindow.parent:rc.currentWindow.opener,rc.topWindow=rc.currentWindow.top,(rc.parentWindow||e)&&rc.currentWindow.addEventListener("message",oc.messageListener,!1),!rc.parentWindow){const e=rc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));qn.isFramelessWindow=!0,e.onNativeMessage=Uc}try{return rc.parentOrigin="*",dc(t,"initialize",[br,nr,e]).then((([e,t,n,r])=>(Xs(r,rc.currentWindow,{onMessage:Oc,sendPostMessage:yc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{rc.parentOrigin=null}}function ac(){rc.currentWindow&&rc.currentWindow.removeEventListener("message",oc.messageListener,!1),rc.currentWindow=null,rc.parentWindow=null,rc.parentOrigin=null,oc.parentMessageQueue=[],oc.nextMessageId=0,oc.callbacks.clear(),oc.promiseCallbacks.clear(),oc.portCallbacks.clear(),oc.legacyMessageIdsToUuidMap={},Js.clearMessages(),Ls()}function sc(e,t,...n){return dc(e,t,n).then((([e])=>e))}function cc(e,t,...n){return dc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function uc(e,t,n,...r){return dc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function lc(e,t,...n){return dc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function dc(e,t,n=void 0){if(!Yn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((r=>{r(vc(Ac(e,t,n).uuid))}))}function fc(e){return e.map((e=>yr(e)?e.serialize():e))}function pc(e,t,n,r,o){var i;return tc(this,void 0,void 0,(function*(){const a=fc(t),[s]=yield dc(r,e,a);if(o&&o(s)||!o&&je(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${xe.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function gc(e,t,n,r){var o;return tc(this,void 0,void 0,(function*(){const i=fc(t),[a]=yield dc(n,e,i);if(r&&r(a)||!r&&je(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${xe.INTERNAL_ERROR}, message: Invalid response from host`)}))}function mc(e,t,n=void 0){if(!Yn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return hc(Ac(e,t,n).uuid)}function hc(e){return new Promise(((t,n)=>{oc.portCallbacks.set(e,((e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}))}))}function vc(e){return new Promise((t=>{oc.promiseCallbacks.set(e,t)}))}function wc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Yn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=Ac(e,t,o);r&&oc.callbacks.set(i.uuid,r)}oc.parentMessageQueue=[],oc.topMessageQueue=[],oc.nextMessageId=0,oc.callbacks=new Map,oc.promiseCallbacks=new Map,oc.portCallbacks=new Map,oc.legacyMessageIdsToUuidMap={};const Cc=nc.extend("sendNestedAuthRequestToTopWindow");function yc(e,t){const n=Cc,r=rc.topWindow,o=zc(e,t);return n("Message %s information: %o",xr(o),{actionName:o.func}),Sc(r,o)}const bc=nc.extend("sendRequestToTargetWindowHelper");function Sc(e,t){const n=bc,r=Bc(e),o=Fr(t);if(qn.isFramelessWindow)rc.currentWindow&&rc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",xr(o),r),rc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Vc(e);e&&i?(n("Sending message %s to %s via postMessage",xr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",xr(o),r),_c(e).push(t))}return t}const Ec=nc.extend("sendMessageToParentHelper");function Ac(e,t,n,r,o){const i=Ec,a=rc.parentWindow,s=Wc(e,t,n,r,o);return Js.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",xr(s),{actionName:t,args:n}),Sc(a,s)}const Ic=nc.extend("processIncomingMessage");function Pc(e){return tc(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Ic("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return Fc(t,n).then((r=>{r?(kc(t,n),t!==rc.parentWindow?_s(t,n)&&Vs(e,t,Ac,((e,t)=>oc.callbacks.set(e,t))):Uc(e)):Ic("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const Tc=nc.extend("processAuthBridgeMessage");function Oc(e,t){var n,r;const o=Tc;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),u=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Fc(c,u)?(rc.topWindow&&!rc.topWindow.closed&&c!==rc.topWindow||(rc.topWindow=c,rc.topOrigin=u),rc.topWindow&&rc.topWindow.closed&&(rc.topWindow=null,rc.topOrigin=null),Ur(rc.topWindow,rc.topOrigin,oc.topMessageQueue,"top"),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const Rc=nc.extend("shouldProcessIncomingMessage");function Fc(e,t){return tc(this,void 0,void 0,(function*(){if(rc.currentWindow&&e===rc.currentWindow)return Rc("Should not process message because it is coming from the current window"),!1;if(rc.currentWindow&&rc.currentWindow.location&&t&&t===rc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Rc("Message has an invalid origin of %s",t),!1}const n=yield ga(e);return n||Rc("Message has an invalid origin of %s",t),n}}))}function kc(e,t){qn.isFramelessWindow||rc.parentWindow&&!rc.parentWindow.closed&&e!==rc.parentWindow||(rc.parentWindow=e,rc.parentOrigin=t),rc.parentWindow&&rc.parentWindow.closed&&(rc.parentWindow=null,rc.parentOrigin=null),Ur(rc.parentWindow,rc.parentOrigin,oc.parentMessageQueue,"parent")}const Mc=nc.extend("handleIncomingMessageFromParent");function Nc(e){const t=Mc;if(!e.uuid)return oc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=xc(oc.callbacks,t);if(n)return n;const r=xc(oc.promiseCallbacks,t);if(r)return r;const o=xc(oc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",xr(e))}function xc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Dc(e,t){const n=xc(t,e.uuid);n&&t.delete(n),e.uuid?oc.legacyMessageIdsToUuidMap={}:delete oc.legacyMessageIdsToUuidMap[e.id]}function Uc(e){const t=Mc,n=Bn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Mr(r),i=Nc(o);if(i){const r=oc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Js.handlePerformanceMetrics(i,o,t,n),r&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),r.apply(null,[...o.args,o.isPartialResponse]),Lc(e)||(t("Removing registered callback for message %s",i.toString()),Dc(o,oc.callbacks)));const a=oc.promiseCallbacks.get(i);a&&(t("Invoking the registered promise callback for message %s with arguments %o",i.toString(),o.args),a(o.args),t("Removing registered promise callback for message %s",i.toString()),Dc(o,oc.promiseCallbacks));const s=oc.portCallbacks.get(i);if(s){let n;t("Invoking the registered port callback for message %s with arguments %o",i.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),s(n,o.args),t("Removing registered port callback for message %s",i.toString()),Dc(o,oc.portCallbacks)}o.uuid&&(oc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Js.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',xr(r),r.func),ws(r.func,r.args)}else t("Received an unknown message: %O",e)}function Lc(e){return!0===e.data.isPartialResponse}function Hc(){return rc.topWindow!==rc.parentWindow}function _c(e){return e===rc.topWindow&&Hc()?oc.topMessageQueue:e===rc.parentWindow?oc.parentMessageQueue:[]}function Vc(e){return e===rc.topWindow&&Hc()?rc.topOrigin:e===rc.parentWindow?rc.parentOrigin:null}function Bc(e){return e===rc.topWindow&&Hc()?"top":e===rc.parentWindow?"parent":null}function jc(e,t){let n;n=rc.currentWindow.setInterval((()=>{0===_c(e).length&&(clearInterval(n),t())}),100)}function Wc(e,t,n,r,o){const i=oc.nextMessageId++,a=new zn;oc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:qn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Bn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function zc(e,t){const n=oc.nextMessageId++,r=new zn;return oc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Bn(),apiVersionTag:t,args:[],data:e}}const $c="v1";function qc(e){if(!to(e)&&Br(ar),!to(e)&&!Gc())throw pn;e?Cs(Xn($c,"log.request"),"log.request",(()=>{const t=e();wc(Xn($c,"log.receive"),"log.receive",[t])})):ys("log.request")}function Gc(){return!(!Br(ar)||!ar.supports.logs)}var Jc,Kc,Qc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Jc||(Jc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Kc||(Kc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Qc||(Qc={}));const Zc="v1";function Xc(e,t){Br(ar),wc(Xn(Zc,"uploadCustomApp"),"uploadCustomApp",[e],t||wn())}function Yc(e,t,n){Br(ar),wc(Xn(Zc,"sendCustomMessage"),e,t,n)}function eu(e,t){if(Br(ar),!Hs())throw new Error("The child window has not yet been initialized or is not present");$s(e,t)}function tu(e,t){Br(ar),Cs(Xn(Zc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function nu(e,t){Br(ar),Cs(Xn(Zc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function ru(e){Br(ar,sn.content,sn.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];wc(Xn(Zc,"openFilePreview"),"openFilePreview",t)}const ou="v1";function iu(e){return new Promise((t=>{if(Br(ar,sn.content),!cu())throw pn;const n=cc(Xn(ou,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Cs(Xn(ou,"conversations.registerStartConversationHandler"),"startConversation",((t,n,r,o)=>{var i;return null===(i=e.onStartConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&Cs(Xn(ou,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),t(n)}))}function au(){if(Br(ar,sn.content),!cu())throw pn;wc(Xn(ou,"conversations.closeConversation"),"conversations.closeConversation"),ys("startConversation"),ys("closeConversation")}function su(){return new Promise((e=>{if(Br(ar),!cu())throw pn;e(sc(Xn(ou,"conversations.getChatMember"),"getChatMembers"))}))}function cu(){return!(!Br(ar)||!ar.supports.conversations)}var uu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const lu="v2",du=Zn("copilot");function fu(){var e;return Br(ar)&&!!(null===(e=ar.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function pu(e,t){var n;return void 0===t&&(t=null!==(n=Bn())&&void 0!==n?n:Date.now()),uu(this,void 0,void 0,(function*(){return Br(ar),du("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),gc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Xn(lu,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var gu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const mu="v2",hu=Zn("copilot");function vu(){var e,t;return Br(ar)&&(!!(null===(e=ar.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=ar.supports.copilot)||void 0===t?void 0:t.eligibility))}function wu(e){var t,n,r;return gu(this,void 0,void 0,(function*(){if(Br(ar),!vu())throw new Error(`Error code: ${pn.errorCode}, message: Not supported on platform`);if((null===(t=ar.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return hu("Eligibility information is already available on runtime."),ar.hostVersionsInfo.appEligibilityInformation;hu("Eligibility information is not available on runtime. Requesting from host.");const o=yield sc(Xn(mu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(je(o))throw new Error(`Error code: ${o.errorCode}, message: ${null!==(n=o.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!Cu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=He.NotAdult),o}))}function Cu(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}var yu,bu,Su,Eu,Au,Iu,Pu,Tu,Ou;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed",e.TEAMS="teams",e.FILE="file"}(yu||(yu={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(bu||(bu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(Su||(Su={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Eu||(Eu={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Au||(Au={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Iu||(Iu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Pu||(Pu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Tu||(Tu={})),function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"}(Ou||(Ou={}));class Ru extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Fu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ku="v2";function Mu(){var e;return Br(ar)&&!!(null===(e=ar.supports.copilot)||void 0===e?void 0:e.sidePanel)}function Nu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Ou).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||je(e)}function xu(e){return Fu(this,void 0,void 0,(function*(){Br(ar);return pc("copilot.sidePanel.getContent",e?[new Vu(e)]:[],new Hu,Xn(ku,"copilot.sidePanel.getContent"),Nu)}))}function Du(){return Fu(this,void 0,void 0,(function*(){return Br(ar),pc("copilot.sidePanel.preCheckUserConsent",[],new _u,Xn(ku,"copilot.sidePanel.preCheckUserConsent"),Nu)}))}function Uu(e){Ss(Xn(ku,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[sn.content],(()=>{if(!Mu())throw Lu}))}const Lu=new Ru(Ou.NotSupportedOnPlatform,"This API is not supported on the current platform.");class Hu extends Wi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class _u extends Wi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Vu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}var Bu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ju="v2";function Wu(){var e;return Br(ar)&&!!(null===(e=ar.supports.copilot)||void 0===e?void 0:e.view)}function zu(){return Bu(this,void 0,void 0,(function*(){Br(ar),yield pc("copilot.view.closeSidePanel",[],new $u,Xn(ju,"copilot.view.closeSidePanel"))}))}class $u extends Wi{validate(e){return!0}deserialize(e){return e}}const qu="v2";class Gu{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function Ju(e){const t=e;return t.responseType===Zu.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Ku="Action.Execute";var Qu,Zu,Xu;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Qu||(Qu={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(Zu||(Zu={}));class Yu extends Wi{validate(e){return Ju(e)}deserialize(e){return e}}function el(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Xu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function tl(e){e.requestType===Qu.ActionExecuteInvokeRequest?nl(e):e.requestType===Qu.QueryMessageExtensionRequest&&rl(e)}function nl(e){if(e.type!==Ku){throw{errorCode:Xu.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Ku}"`}}if(!jn(e.data)){throw{errorCode:Xu.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function rl(e){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}function ol(e,t,n){if(Br(ar,sn.content),!ul())throw pn;const r=new eo(e);return tl(n),dc(Xn(qu,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[r.toString(),n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function il(e,t){if(Br(ar,sn.content),!ul())throw pn;const n=new eo(e);return dc(Xn(qu,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function al(e,t,n){if(Br(ar,sn.content),!ul())throw pn;const r=new eo(e);return tl(n),dc(Xn(qu,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function sl(e,t,n){if(Br(ar,sn.content),!ul())throw pn;return Nn(e,new Error("titleId is Invalid.")),Nn(t,new Error("oauthConfigId is Invalid.")),dc(Xn(qu,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function cl(e,t,n){if(Br(ar,sn.content),!ul())throw pn;return Nn(e,new Error("titleId is Invalid.")),t&&xn(t),dc(Xn(qu,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,null==t?void 0:t.toString(),null==n?void 0:n.width,null==n?void 0:n.height,null==n?void 0:n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function ul(){return!(!Br(ar)||!ar.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Xu||(Xu={}));var ll=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const dl="v2";function fl(e,t,n){return ll(this,void 0,void 0,(function*(){if(Br(ar,sn.content),!hl())throw pn;return vl(e,t),gc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Xn(dl,"externalAppAuthenticationForCEA.authenticateWithSSO"),el)}))}function pl(e,t,n){return ll(this,void 0,void 0,(function*(){if(Br(ar,sn.content),!hl())throw pn;return vl(e,t),gc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Xn(dl,"externalAppAuthenticationForCEA.authenticateWithOauth"),el)}))}function gl(e,t,n,r){return ll(this,void 0,void 0,(function*(){if(Br(ar,sn.content),!hl())throw pn;return vl(e,t),nl(r),pc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new Gu(r),n.url.href,n.width,n.height,n.isExternal],new Yu,Xn(dl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),el)}))}function ml(e,t,n,r){return ll(this,void 0,void 0,(function*(){if(Br(ar,sn.content),!hl())throw pn;return vl(e,t),nl(r),pc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new Gu(r),n.authId,n.connectionName,n.claims,n.silent],new Yu,Xn(dl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),el)}))}function hl(){return!(!Br(ar)||!ar.supports.externalAppAuthenticationForCEA)}function vl(e,t){Nn(t,new Error("conversation id is not valid.")),Xr(e)}const wl="v2";var Cl,yl;function bl(e,t){if(Br(ar,sn.content),!El())throw pn;const n=new eo(e);return dc(Xn(wl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Sl(e,t,n){if(Br(ar,sn.content),!El())throw pn;const r=new eo(e);return dc(Xn(wl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function El(){return!(!Br(ar)||!ar.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Cl||(Cl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(yl||(yl={}));var Al=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Il="v2";function Pl(e,t,n){return Al(this,void 0,void 0,(function*(){if(Br(ar,sn.content),!Ol())throw pn;vl(e,t);const[r,o]=yield dc(Xn(Il,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Tl(e,t,n){return Al(this,void 0,void 0,(function*(){if(Br(ar,sn.content),!Ol())throw pn;vl(e,t);const r=yield sc(Xn(Il,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Ol(){return!(!Br(ar)||!ar.supports.externalAppCardActionsForCEA)}var Rl;function Fl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Rl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Rl||(Rl={}));var kl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ml="v2";function Nl(e,t,n){return kl(this,void 0,void 0,(function*(){if(Br(ar,sn.content),!xl())throw pn;return Dl(e,n),gc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new Ul(t),n],Xn(Ml,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Fl)}))}function xl(){return!(!Br(ar)||!ar.supports.externalAppCardActionsForDA)}function Dl(e,t){Xr(e),$n(t)}class Ul{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var Ll=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Hl="v2";function _l(e,t,n){return Ll(this,void 0,void 0,(function*(){if(Br(ar,sn.content),!Vl())throw pn;const r=new eo(e),[o,i]=yield dc(Xn(Hl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Vl(){return!(!Br(ar)||!ar.supports.externalAppCommands)}const Bl="v1";var jl,Wl,zl,$l,ql,Gl;function Jl(e,t){if(Br(ar,sn.content),!e||0===e.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");wc(Xn(Bl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Kl(e,t){if(Br(ar,sn.content),!e||0===e.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");wc(Xn(Bl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Ql(e,t,n){if(Br(ar,sn.content),!e)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");wc(Xn(Bl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Zl(e,t,n){if(Br(ar,sn.content),!e||!t)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in e&&!e.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");wc(Xn(Bl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Xl(e,t,n){if(Br(ar,sn.content),!e||!t)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(e.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");wc(Xn(Bl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Yl(e=!1,t){if(Br(ar,sn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");wc(Xn(Bl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function ed(e,t,n,r,o=!1,i){if(Br(ar,sn.content),!e||0===e.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!t)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!r)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] callback cannot be null");wc(Xn(Bl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function td(e){if(Br(ar,sn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");wc(Xn(Bl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function nd(e=void 0,t){if(Br(ar,sn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");wc(Xn(Bl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function rd(e){if(Br(ar,sn.content),!e)throw fd(xe.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");wc(Xn(Bl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function od(e,t){if(Br(ar,sn.content),!t)throw fd(xe.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw fd(xe.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");wc(Xn(Bl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function id(e,t){if(Br(ar,sn.content),!t)throw fd(xe.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw fd(xe.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");wc(Xn(Bl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function ad(e,t){if(Br(ar,sn.content),!t)throw fd(xe.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw fd(xe.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");wc(Xn(Bl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function sd(e,t){if(Br(ar,sn.content),!t)throw fd(xe.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw fd(xe.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");wc(Xn(Bl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function cd(e,t){if(Br(ar,sn.content),!t)throw fd(xe.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw fd(xe.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");wc(Xn(Bl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function ud(e,t){if(Br(ar,sn.content),!t)throw fd(xe.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw fd(xe.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw fd(xe.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");wc(Xn(Bl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function ld(e){if(Br(ar),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Cs(Xn(Bl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function dd(e){if(Br(ar),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Cs(Xn(Bl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function fd(e,t){return{errorCode:e,message:t}}!function(e){e.Dropbox="DROPBOX",e.Box="BOX",e.Sharefile="SHAREFILE",e.GoogleDrive="GOOGLEDRIVE",e.Egnyte="EGNYTE",e.SharePoint="SharePoint"}(jl||(jl={})),function(e){e[e.Sharepoint=0]="Sharepoint",e[e.WopiIntegration=1]="WopiIntegration",e[e.Google=2]="Google",e[e.OneDrive=3]="OneDrive",e[e.Recent=4]="Recent",e[e.Aggregate=5]="Aggregate",e[e.FileSystem=6]="FileSystem",e[e.Search=7]="Search",e[e.AllFiles=8]="AllFiles",e[e.SharedWithMe=9]="SharedWithMe"}(Wl||(Wl={})),function(e){e.ClassMaterials="classMaterials"}(zl||(zl={})),function(e){e.Readonly="readonly"}($l||($l={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(ql||(ql={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Gl||(Gl={}));const pd="v1";function gd(){return new Promise((e=>{if(Br(ar),!wd())throw pn;e(lc(Xn(pd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function md(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Br(ar),!wd())throw pn;t(lc(Xn(pd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function hd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Br(ar),!wd())throw pn;Cs(Xn(pd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Br(ar),e(t)}))}function vd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Br(ar),!wd())throw pn;Cs(Xn(pd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Br(ar),e(t)}))}function wd(){return!(!Br(ar)||!ar.supports.meetingRoom)}function Cd(){return!(!Br(ar)||!ar.supports.messageChannels)}const yd="1.0.1",bd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Rd("Invalid message format, ignoring. Message: %o",e);if(!Pd(e.source,e.origin))return void Rd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Fd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Rd("Invalid response format, ignoring. Message: %o",e);t(r)}};let Sd=null,Ed=!1;function Ad(e,t,n=!1){if(Ed=n,!e)throw new Error("Cannot polyfill nestedAppAuthBridge as the current window does not exist");if(!t)throw new Error("Top origin is required to initialize the Nested App Auth Bridge");try{const e=new URL(t);if("https:"!==e.protocol)throw new Error(`Invalid top origin: ${t}. Only HTTPS origins are allowed.`);Sd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Rd("Nested App Auth Bridge is already present");const o=Id(r);o&&(r.nestedAppAuthBridge=o)}function Id(e){const t=new WeakMap,{onMessage:n}=bd,r=e=>t=>n(t,e);return{addEventListener:(n,o)=>{if("message"===n){const i=r(o);t.set(o,i),e.addEventListener(n,i)}else Rd(`Event ${n} is not supported by nestedAppAuthBridge`)},postMessage:t=>{if(!e.top)throw new Error("window.top is not available for posting messages");try{const n=JSON.parse(t);if("object"==typeof n&&"NestedAppAuthRequest"===n.messageType){const n=Td(t);if(e===e.top||!Sd)return void Fd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Sd)}}catch(e){return void Fd("Failed to parse message:",e,"Original message:",t)}},removeEventListener:(n,r)=>{const o=t.get(r);o&&(e.removeEventListener(n,o),t.delete(r))}}}function Pd(e,t){if(t===Sd)try{return"https:"===new URL(t).protocol}catch(e){return Fd("Invalid message origin URL:",e),!1}return!1}function Td(e){const t=Date.now();return{id:Od(),uuid:tn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Od(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Rd(...e){Ed&&console.log(...e)}function Fd(...e){Ed&&console.error(...e)}const kd="v1";function Md(e){if(Br(ar,sn.content),!Nd())throw pn;wc(Xn(kd,"notifications.showNotification"),"notifications.showNotification",[e])}function Nd(){return!(!Br(ar)||!ar.supports.notifications)}const xd="v2";function Dd(e){if(!Hd())throw new Error(xe.NOT_SUPPORTED_ON_PLATFORM.toString());if(to(e))throw new Error(xe.INVALID_ARGUMENTS.toString());Cs(Xn(xd,"otherApp.install"),"otherApp.install",e)}function Ud(){if(!Hd())throw new Error(xe.NOT_SUPPORTED_ON_PLATFORM.toString());wc(Xn(xd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),ys("otherApp.install")}function Ld(e){if(!Hd())throw new Error(xe.NOT_SUPPORTED_ON_PLATFORM.toString());return gc("otherApp.notifyInstallCompleted",[e.toString()],Xn(xd,"otherApp.notifyInstallCompleted"))}function Hd(){return!(!Br(ar)||!ar.supports.otherAppStateChange)}const _d="v1";var Vd,Bd,jd;function Wd(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Br(ar,sn.sidePanel),!Zd())throw pn;wc(Xn(_d,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function zd(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(Br(ar,sn.sidePanel),!Zd())throw pn;wc(Xn(_d,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function $d(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(Br(ar,sn.sidePanel),!Zd())throw pn;wc(Xn(_d,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function qd(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Br(ar,sn.sidePanel),!Zd())throw pn;wc(Xn(_d,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Gd(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Br(ar,sn.sidePanel),!Zd())throw pn;Cs(Xn(_d,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Jd(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Br(ar,sn.sidePanel),!Zd())throw pn;Cs(Xn(_d,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Kd(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Br(ar,sn.sidePanel),!Zd())throw pn;Cs(Xn(_d,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Qd(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Br(ar,sn.sidePanel),!Zd())throw pn;Cs(Xn(_d,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Zd(){return!(!Br(ar)||!ar.supports.remoteCamera)}!function(e){e.Reset="Reset",e.ZoomIn="ZoomIn",e.ZoomOut="ZoomOut",e.PanLeft="PanLeft",e.PanRight="PanRight",e.TiltUp="TiltUp",e.TiltDown="TiltDown"}(Vd||(Vd={})),function(e){e[e.CommandResetError=0]="CommandResetError",e[e.CommandZoomInError=1]="CommandZoomInError",e[e.CommandZoomOutError=2]="CommandZoomOutError",e[e.CommandPanLeftError=3]="CommandPanLeftError",e[e.CommandPanRightError=4]="CommandPanRightError",e[e.CommandTiltUpError=5]="CommandTiltUpError",e[e.CommandTiltDownError=6]="CommandTiltDownError",e[e.SendDataError=7]="SendDataError"}(Bd||(Bd={})),function(e){e[e.None=0]="None",e[e.ControlDenied=1]="ControlDenied",e[e.ControlNoResponse=2]="ControlNoResponse",e[e.ControlBusy=3]="ControlBusy",e[e.AckTimeout=4]="AckTimeout",e[e.ControlTerminated=5]="ControlTerminated",e[e.ControllerTerminated=6]="ControllerTerminated",e[e.DataChannelError=7]="DataChannelError",e[e.ControllerCancelled=8]="ControllerCancelled",e[e.ControlDisabled=9]="ControlDisabled",e[e.ControlTerminatedToAllowOtherController=10]="ControlTerminatedToAllowOtherController"}(jd||(jd={}));const Xd="v1";function Yd(e,t,n,r){if(Br(ar,sn.content),!ef())throw pn;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");wc(Xn(Xd,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function ef(){return!(!Br(ar)||!ar.supports.appEntity)}const tf="v1";function nf(e){return new Promise((t=>{if(Br(ar),!rf())throw pn;if((qn.hostClientType===on.android||qn.hostClientType===on.teamsRoomsAndroid||qn.hostClientType===on.teamsPhones||qn.hostClientType===on.teamsDisplays)&&!jr(Je)){const e={errorCode:xe.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(sc(Xn(tf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function rf(){return!(!Br(ar)||!ar.supports.teams)&&(!!ar.supports.teams.fullTrust&&!!ar.supports.teams.fullTrust.joinedTeams)}const of="v1";function af(e){return new Promise((t=>{if(Br(ar),!sf())throw pn;t(sc(Xn(of,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function sf(){return!(!Br(ar)||!ar.supports.teams)&&!!ar.supports.teams.fullTrust}const cf="v1";var uf;function lf(e,t){if(Br(ar,sn.content),!ff())throw pn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");wc(Xn(cf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function df(e,t){if(Br(ar),!ff())throw pn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");wc(Xn(cf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function ff(){return!(!Br(ar)||!ar.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(uf||(uf={}));class pf{static setTimeout(e,t){const n=performance.now(),r=yn();return pf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete pf.setTimeoutCallbacks[e]}static setInterval(e,t){pf.setTimeout((function n(){e(),pf.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in pf.setTimeoutCallbacks){const r=pf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){pf.setTimeoutCallbacks[e].callback(),delete pf.setTimeoutCallbacks[e]}}}pf.setTimeoutCallbacks={};class gf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){pf.tick(),this.suitableForThisSession(e,t,n,r)||this.reportAndResetSession(this.getStatistics(),e,r,t,n),this.start()}processEnds(){const e=performance.now()-this.frameProcessingStartedAt,t=Math.floor(Math.max(0,Math.min(this.distributionBins.length-1,e)));this.distributionBins[t]+=1,this.sampleCount+=1}getStatistics(){return this.currentSession?{effectId:this.currentSession.effectId,effectParam:this.currentSession.effectParam,frameHeight:this.currentSession.frameHeight,frameWidth:this.currentSession.frameWidth,duration:performance.now()-this.currentSession.startedAtInMs,sampleCount:this.sampleCount,distributionBins:this.distributionBins.slice()}:null}start(){this.frameProcessingStartedAt=performance.now()}suitableForThisSession(e,t,n,r){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===r&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n}reportAndResetSession(e,t,n,r,o){e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,r,o),this.timeoutId&&pf.clearTimeout(this.timeoutId),this.timeoutId=pf.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,r,o)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(e,t,n,r,o){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:r,frameHeight:o},this.sampleCount=0,this.distributionBins.fill(0)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(gf.maxSessionTimeoutInMs,2*t.timeoutInMs):gf.initialSessionTimeoutInMs}}gf.initialSessionTimeoutInMs=1e3,gf.maxSessionTimeoutInMs=3e4;const mf="v2";class hf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new gf(hf.distributionBinSize,(e=>this.reportPerformanceEvent(Xn(mf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){pf.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Xn(mf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),hf.calculateFPSInterval)}setFrameProcessTimeLimit(e){this.frameProcessTimeLimit=e}reportApplyingVideoEffect(e,t){var n,r;(null===(n=this.applyingEffect)||void 0===n?void 0:n.effectId)===e&&(null===(r=this.applyingEffect)||void 0===r?void 0:r.effectParam)===t||(this.applyingEffect={effectId:e,effectParam:t},this.appliedEffect=void 0)}reportVideoEffectChanged(e,t){void 0===this.applyingEffect||this.applyingEffect.effectId!==e&&this.applyingEffect.effectParam!==t||(this.appliedEffect={effectId:e,effectParam:t},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(e,t){pf.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(Xn(mf,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(Xn(mf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}hf.distributionBinSize=1e3,hf.calculateFPSInterval=1e3;var vf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},wf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Cf="v2",yf=Mn()?void 0:new hf(wc);var bf,Sf,Ef;function Af(e){if(Br(ar,sn.sidePanel),!Rf())throw pn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Cs(Xn(Cf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==yf?void 0:yf.setFrameProcessTimeLimit(e.timeLimit)),!1),xf())Ff(e.videoFrameHandler,e.config);else{if(!Uf())throw pn;Mf(e.videoBufferHandler,e.config)}null==yf||yf.startMonitorSlowFrameProcessing()}function If(e,t){if(Br(ar,sn.sidePanel),!Rf())throw pn;wc(Xn(Cf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function Pf(e){if(Br(ar,sn.sidePanel),!Rf())throw pn;Cs(Xn(Cf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Jf(e,yf),!1),wc(Xn(Cf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Tf(e){wc(Xn(Cf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Of(e){wc(Xn(Cf,"videoEffects.notifyError"),"video.notifyError",[e])}function Rf(){return Br(ar)&&!!ar.supports.video&&(!!ar.supports.video.mediaStream||!!ar.supports.video.sharedFrame)}function Ff(e,t){if(Br(ar,sn.sidePanel),!Rf()||!xf())throw pn;Cs(Xn(Cf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>vf(this,void 0,void 0,(function*(){const{streamId:n}=t,r=kf(e,yf);yield _f(n,r,Of,yf)}))),!1),wc(Xn(Cf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function kf(e,t){return n=>vf(this,void 0,void 0,(function*(){const r=n.videoFrame;null==t||t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yield e(n);return null==t||t.reportFrameProcessed(),o}))}function Mf(e,t){if(Br(ar,sn.sidePanel),!Rf()||!Uf())throw pn;Cs(Xn(Cf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==yf||yf.reportStartFrameProcessing(t.width,t.height),e(Nf(t),(()=>{null==yf||yf.reportFrameProcessed(),Tf(n)}),Of)}}),!1),wc(Xn(Cf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Nf(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=wf(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function xf(){var e;return Br(ar,sn.sidePanel)&&Df()&&!!(null===(e=ar.supports.video)||void 0===e?void 0:e.mediaStream)}function Df(){var e,t,n,r;return!(!(null===(t=null===(e=kn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=kn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Uf(){var e;return Br(ar,sn.sidePanel)&&!!(null===(e=ar.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(bf||(bf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Sf||(Sf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Ef||(Ef={}));var Lf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Hf="v2";function _f(e,t,n,r){var o,i;return Lf(this,void 0,void 0,(function*(){const a=jf();!Mn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Wf(yield Bf(e,n,r),new zf(n,t),a.writable)}))}function Vf(e,t,n,r){var o,i;return Lf(this,void 0,void 0,(function*(){const a=jf();!Mn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Wf(yield Bf(e,n,r),new Gf(n,t),a.writable)}))}function Bf(e,t,n){return Lf(this,void 0,void 0,(function*(){if(Mn())throw pn;const r=kn().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function jf(){if(Mn())throw pn;const e=window.MediaStreamTrackGenerator;if(!e)throw pn;return new e({kind:"video"})}function Wf(e,t,n){new(0,kn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class zf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Lf(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const r=yield this.videoFrameHandler({videoFrame:e}),o=new VideoFrame(r,{timestamp:n});t.enqueue(o),e.close(),r.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")}))}}class $f{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class qf{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const n=new Uint32Array(e);for(let r=0,o=0;r<t;r++){const t=n[o++],r=n[o++],i=n[o++],a=new Uint8Array(e,r,i);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,n=new TextDecoder("utf-8");let r=0;const o=e[r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24);for(let i=0;i<o&&r<e.length-1;i++){const o=e[++r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24),i=e.findIndex(((e,t,n)=>0==e&&t>r)),a=n.decode(e.slice(++r,i)),s=this.metadataMap.get(o);void 0!==s&&t.set(a,s);r=i+(4-(i-r)%4-1)}return t}}class Gf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Lf(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o,attributes:i}={}}=yield this.extractVideoFrameAndMetadata(e),a=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o,attributes:i}),s=new VideoFrame(a,{timestamp:n});t.enqueue(s),r.close(),e.close(),a.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>Lf(this,void 0,void 0,(function*(){if(Mn())throw pn;if("NV12"!==e.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const r=new $f(n,this.notifyError),o={x:0,y:r.multiStreamHeaderRowOffset,width:e.codedWidth,height:e.codedHeight-r.multiStreamHeaderRowOffset},i=new ArrayBuffer(o.width*o.height*3/2);yield e.copyTo(i,{rect:o});const a=new qf(i,r.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult,attributes:a.attributes}}})),Cs(Xn(Hf,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Jf(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),wc(Xn(Hf,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Ef?e:Ef.InitializationFailure;wc(Xn(Hf,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Kf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Qf="v2",Zf=2e3,Xf=Mn()?void 0:new hf(wc);var Yf;function ep(e){var t,n;if(!sp())throw pn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Br(ar,sn.sidePanel)){if(Cs(Xn(Qf,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Xf?void 0:Xf.setFrameProcessTimeLimit(e)),!1),null===(t=ar.supports.video)||void 0===t?void 0:t.mediaStream)Cs(Xn(Qf,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Kf(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Xf?np(e.videoFrameHandler,Xf):e.videoFrameHandler;r?yield Vf(n,o,up,Xf):yield _f(n,o,up,Xf)}))),!1),wc(Xn(Qf,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=ar.supports.video)||void 0===n?void 0:n.sharedFrame))throw pn;Cs(Xn(Qf,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Xf||Xf.reportStartFrameProcessing(t.width,t.height);const n=tp(),r=t.timestamp;e.videoBufferHandler(rp(t),(()=>{n(),null==Xf||Xf.reportFrameProcessed(),cp(r)}),up)}}),!1),wc(Xn(Qf,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Xf||Xf.startMonitorSlowFrameProcessing()}}function tp(){const e=setTimeout((()=>{up(`Frame not processed in ${Zf}ms`,Yf.Warn)}),Zf);return function(){clearTimeout(e)}}function np(e,t){return n=>Kf(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=tp(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function rp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function op(e,t,n){if(Br(ar,sn.sidePanel),!sp())throw pn;wc(Xn(Qf,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function ip(e){if(Br(ar,sn.sidePanel),!sp())throw pn;Cs(Xn(Qf,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Jf(e,Xf),!1),wc(Xn(Qf,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function ap(e){if(Br(ar,sn.sidePanel),!Rf())throw pn;wc(Xn(Qf,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function sp(){return Br(ar),Rf()}function cp(e){wc(Xn(Qf,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function up(e,t=Yf.Warn){wc(Xn(Qf,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function lp(e){if(Br(ar),!Rf())throw pn;up(e,Yf.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Yf||(Yf={}));const dp="v2";class fp extends Wi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class pp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class gp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class mp extends Wi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class hp{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class vp extends Wi{validate(e){const t=new mp;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function wp(e,t){if(Br(ar),!Ep())throw new Error(`Error code: ${xe.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Ap(e.threadId),t&&0===t.length)throw new Error(`Error code: ${xe.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return pc("hostEntity.tab.addAndConfigure",[new gp(e),t],new mp,Xn(dp,"hostEntity.tab.addAndConfigure"))}function Cp(e){if(Br(ar),!Ep())throw new Error(`Error code: ${xe.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Ap(e.threadId),pc("hostEntity.tab.getAll",[new gp(e)],new vp,Xn(dp,"hostEntity.tab.getAll"))}function yp(e,t){if(Br(ar),!Ep())throw new Error(`Error code: ${xe.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Ip(e),Ap(t.threadId),pc("hostEntity.tab.reconfigure",[new pp(e),new gp(t)],new fp,Xn(dp,"hostEntity.tab.reconfigure"))}function bp(e,t){if(Br(ar),!Ep())throw new Error(`Error code: ${xe.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Ip(e),Ap(t.threadId),pc("hostEntity.tab.rename",[new pp(e),new gp(t)],new fp,Xn(dp,"hostEntity.tab.rename"))}function Sp(e,t){if(Br(ar),!Ep())throw new Error(`Error code: ${xe.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Ap(t.threadId),Ip(e),pc("hostEntity.tab.remove",[new hp(e),new gp(t)],new zi,Xn(dp,"hostEntity.tab.remove"))}function Ep(){var e;return!!(Br(ar)&&Tp()&&(null===(e=ar.supports.hostEntity)||void 0===e?void 0:e.tab))}function Ap(e){if(!e||0==e.length)throw new Error(`Error code: ${xe.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function Ip(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${xe.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Pp;function Tp(){return!(!Br(ar)||!ar.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(Pp||(Pp={}));var Op=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Rp="v2",Fp="Invalid store dialog size",kp="No App Id present, but AppId needed to open AppDetail store",Mp="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Np(e){return Op(this,void 0,void 0,(function*(){Hp();const{size:t}=null!=e?e:{};return gc("store.openFullStore",[_p(t)],Xn(Rp,"store.openFullStore"))}))}function xp(e){return Op(this,void 0,void 0,(function*(){Hp();const{size:t,appId:n}=e;if(!(n instanceof eo))throw new Error(kp);return gc("store.openAppDetail",[_p(t),n],Xn(Rp,"store.openAppDetail"))}))}function Dp(e){return Op(this,void 0,void 0,(function*(){Hp();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return gc("store.openInContextStore",[_p(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Xn(Rp,"store.openInContextStore"))}))}function Up(e){return Op(this,void 0,void 0,(function*(){Hp();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Mp);return gc("store.openSpecificStore",[_p(t),n],Xn(Rp,"store.openSpecificStore"))}))}function Lp(){return Br(ar)&&!!ar.supports.store}function Hp(){if(Br(ar,sn.content,sn.sidePanel,sn.meetingStage),!Lp())throw pn}function _p(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(Fp);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(Fp);return JSON.stringify(e)}var Vp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Bp="v1",jp="v2";let Wp;function zp(e){Wp=e}function $p(e){const t=void 0!==e,n=t?e:Wp;if(!n)throw new Error("No parameters are provided for authentication");Br(ar,sn.content,sn.sidePanel,sn.settings,sn.remove,sn.task,sn.stage,sn.meetingStage);return qp(n.successCallback||n.failureCallback?Xn(Bp,"authentication.authenticate"):Xn(jp,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Wp=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Wp=void 0)}}))}function qp(e,t){return Vp(this,void 0,void 0,(function*(){const n=Dn(t.url);return xn(n),dc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function Gp(e){Vr();return Jp(e&&(e.successCallback||e.failureCallback)?Xn(Bp,"authentication.getAuthToken"):Xn(jp,"authentication.getAuthToken"),e).then((t=>e&&e.successCallback?(e.successCallback(t),""):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))}function Jp(e,t){return new Promise((n=>{n(dc(e,"authentication.getAuthToken",[null==t?void 0:t.resources,null==t?void 0:t.claims,null==t?void 0:t.silent,null==t?void 0:t.tenantId]))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function Kp(e){Vr();return Qp(e&&(e.successCallback||e.failureCallback)?Xn(Bp,"authentication.getUser"):Xn(jp,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)}))}function Qp(e){return new Promise((t=>{t(dc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function Zp(e,t){Br(ar,sn.authentication);wc(Xn(t?Bp:jp,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),jc(rc.parentWindow,(()=>setTimeout((()=>rc.currentWindow.close()),200)))}function Xp(e,t){Br(ar,sn.authentication);wc(Xn(t?Bp:jp,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),jc(rc.parentWindow,(()=>setTimeout((()=>rc.currentWindow.close()),200)))}var Yp;function eg(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(Yp||(Yp={}));class tg{constructor(e){this.val=e,eg(e)}toString(){return this.val}}const ng="/l/app/",rg="/l/meeting/new",og="attendees",ig="startTime",ag="endTime",sg="subject",cg="content",ug="/l/call/0/0",lg="source",dg="withVideo",fg="/l/chat/0/0",pg="users",gg="topicName",mg="message";function hg(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${pg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${gg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${mg}=${encodeURIComponent(n)}`;return`${ot}://${it}${fg}?${r}${o}${i}`}function vg(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${pg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${dg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${lg}=${encodeURIComponent(n)}`;return`${ot}://${it}${ug}?${r}${o}${i}`}function wg(e,t,n,r,o){const i=void 0===e?"":`${og}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${ig}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${ag}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${sg}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${cg}=${encodeURIComponent(o)}`;return`${ot}://${it}${rg}?${i}${a}${s}${c}${u}`}function Cg(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${ot}://${it}${ng}${encodeURIComponent(e)}`}const yg="v1";function bg(e){return new Promise((t=>{if(Br(ar,sn.content,sn.sidePanel,sn.settings,sn.task,sn.stage,sn.meetingStage),!Sg())throw new Error("Not supported");const n=Xn(yg,"appInstallDialog.openAppInstallDialog");ar.isLegacyTeams?t(cc(n,"executeDeepLink",Cg(e.appId))):(wc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function Sg(){return!(!Br(ar)||!ar.supports.appInstallDialog)}const Eg="v1",Ag=Zn("media");var Ig,Pg,Tg,Og,Rg,Fg,kg;!function(e){e.Base64="base64",e.ID="id"}(Ig||(Ig={}));class Mg{}function Ng(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Br(ar,sn.content,sn.task),qn.isFramelessWindow)if(jr(Ze))wc(Xn(Eg,"media.captureImage"),"captureImage",e);else{e({errorCode:xe.OLD_PLATFORM},[])}else{e({errorCode:xe.NOT_SUPPORTED_ON_PLATFORM},[])}}function xg(){if(Br(ar,sn.content,sn.task),!Ug())throw pn;const e=De.Media;return new Promise((t=>{t(lc(Xn(Eg,"media.hasPermission"),"permissions.has",e))}))}function Dg(){if(Br(ar,sn.content,sn.task),!Ug())throw pn;const e=De.Media;return new Promise((t=>{t(lc(Xn(Eg,"media.requestPermission"),"permissions.request",e))}))}function Ug(){return!(!Br(ar)||!ar.supports.permissions)}class Lg extends Mg{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(Br(ar,sn.content,sn.task),jr(Xe))if(Zg(this.mimeType,this.format,this.content))jr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:xe.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:xe.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];wc(Xn(Eg,"media.getMedia"),"getMedia",n,(function(n){if(e)if(n&&n.error)e(n.error,new Blob);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){const r=Wg(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=zg(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Ag(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:xe.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=yn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!to(e)&&wc(Xn(Eg,"media.getMedia"),"getMedia",r),Cs(Xn(Eg,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),ys("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Wg(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),ys("getMedia"+t)}else{const e=zg(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:xe.INTERNAL_ERROR,message:"data received is null"},new Blob),ys("getMedia"+t)}}))}}class Hg{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Br(ar,sn.content,sn.task);try{zr(qe)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};wc(Xn(Eg,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(Pg.StopRecording,e)}}class _g extends Hg{getMediaType(){return Rg.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Pg.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Vg(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Br(ar,sn.content,sn.task),!jr(Xe)){const e={errorCode:xe.OLD_PLATFORM};return void t(e,[])}try{$g(e)}catch(e){return void t(e,[])}if(!Gg(e)){const e={errorCode:xe.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];wc(Xn(Eg,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(qg(e)&&(null===(a=null===(i=null==e?void 0:e.videoProps)||void 0===i?void 0:i.videoController)||void 0===a||a.notifyEventToApp(o)));if(!r)return void t(n,[]);const s=[];for(const e of r)s.push(new Lg(e));t(n,s)}))}function Bg(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Br(ar,sn.content,sn.task),!jr(Xe)){return void t({errorCode:xe.OLD_PLATFORM})}if(!Xg(e)){return void t({errorCode:xe.INVALID_ARGUMENTS})}const n=[e];wc(Xn(Eg,"media.viewImages"),"viewImages",n,t)}function jg(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Br(ar,sn.content,sn.task),qn.hostClientType!==on.desktop&&qn.hostClientType!==on.web&&qn.hostClientType!==on.rigel&&qn.hostClientType!==on.teamsRoomsWindows&&qn.hostClientType!==on.teamsRoomsAndroid&&qn.hostClientType!==on.teamsPhones&&qn.hostClientType!==on.teamsDisplays)if(jr(Ye))if(Yg(t))wc(Xn(Eg,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:xe.INVALID_ARGUMENTS},"")}else{e({errorCode:xe.OLD_PLATFORM},"")}else{e({errorCode:xe.NOT_SUPPORTED_ON_PLATFORM},"")}}function Wg(e,t){if(null==e||null==t||e.length<=0)return null;let n=null,r=1;return e.sort(((e,t)=>e.sequence>t.sequence?1:-1)),e.forEach((e=>{e.sequence==r&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),r++)})),n}function zg(e,t){if(null==e||null==t)return null;const n=atob(e.chunk),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const o=new Uint8Array(r),i=new Blob([o],{type:t});return{sequence:e.chunkSequence,file:i}}function $g(e){Kg(e)?zr($e):Qg(e)?zr(qe):Jg(e)&&zr(Ge)}function qg(e){return!(e.mediaType!=Rg.Video||!e.videoProps||!e.videoProps.videoController)}function Gg(e){return!(null==e||e.maxMediaCount>10)}function Jg(e){var t;return!((null==e?void 0:e.mediaType)!=Rg.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Kg(e){return!(!e||e.mediaType!=Rg.VideoAndImage&&!e.videoAndImageProps)}function Qg(e){return!(!e||e.mediaType!=Rg.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Zg(e,t,n){return null!=e&&null!=t&&t==Ig.ID&&null!=n}function Xg(e){return!(null==e||e.length<=0||e.length>10)}function Yg(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function em(e){if(e){if(e.title&&"string"!=typeof e.title)return!1;if(e.setSelected&&"object"!=typeof e.setSelected)return!1;if(e.openOrgWideSearchInChatOrChannel&&"boolean"!=typeof e.openOrgWideSearchInChatOrChannel)return!1;if(e.singleSelect&&"boolean"!=typeof e.singleSelect)return!1}return!0}!function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(Pg||(Pg={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Tg||(Tg={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Og||(Og={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Rg||(Rg={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Fg||(Fg={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(kg||(kg={}));const tm="v2";function nm(e){return new Promise((t=>{if(Br(ar,sn.content,sn.task),!im())throw pn;if(!Yg(e))throw{errorCode:xe.INVALID_ARGUMENTS};t(lc(Xn(tm,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function rm(){if(Br(ar,sn.content,sn.task),!im())throw pn;const e=De.Media;return new Promise((t=>{t(lc(Xn(tm,"barCode.hasPermission"),"permissions.has",e))}))}function om(){if(Br(ar,sn.content,sn.task),!im())throw pn;const e=De.Media;return new Promise((t=>{t(lc(Xn(tm,"barCode.requestPermission"),"permissions.request",e))}))}function im(){return!!(Br(ar)&&ar.supports.barCode&&ar.supports.permissions)}const am="v2";function sm(e){return cm(Xn(am,"chat.openChat"),e)}function cm(e,t){return new Promise((n=>{if(Br(ar,sn.content,sn.task),!lm())throw pn;if(ar.isLegacyTeams)n(cc(e,"executeDeepLink",hg([t.user],void 0,t.message)));else{n(cc(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function um(e){const t=Xn(am,"chat.openGroupChat");return new Promise((n=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const r={user:e.users[0],message:e.message};n(cm(t,r))}else{if(Br(ar,sn.content,sn.task),!lm())throw pn;if(ar.isLegacyTeams)n(cc(t,"executeDeepLink",hg(e.users,e.topic,e.message)));else{n(cc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function lm(){return!(!Br(ar)||!ar.supports.chat)}var dm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const fm="v2";function pm(e){return dm(this,void 0,void 0,(function*(){if(Br(ar,sn.content,sn.meetingStage,sn.task,sn.settings,sn.stage,sn.sidePanel),!mm())throw pn;if(!e.type||!Object.values(Ve).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Ve)}`);const t=yield Fn(e),n={mimeType:e.type,content:t};return lc(Xn(fm,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function gm(){return dm(this,void 0,void 0,(function*(){Br(ar,sn.content,sn.meetingStage,sn.task,sn.settings,sn.stage,sn.sidePanel);const e=Xn(fm,"clipboard.read");if(!mm())throw pn;const t=yield lc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Rn(e.mimeType,e.content)}return t}))}function mm(){return qn.isFramelessWindow?!(!Br(ar)||!ar.supports.clipboard):!!(Br(ar)&&navigator&&navigator.clipboard&&ar.supports.clipboard)}var hm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const vm="v2",wm={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var Cm;function ym(){var e;return null!==(e=Br(ar)&&(ar.isNAAChannelRecommended||Im()))&&void 0!==e&&e}function bm(){return Br(ar),rc.parentOrigin}function Sm(){var e;return null!==(e=Br(ar)&&ar.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Em(){var e;return null!==(e=Br(ar)&&(ar.isDeeplyNestedAuthSupported||Am()))&&void 0!==e&&e}function Am(){return!!(Br(ar)&&Pm()&&ar.isLegacyTeams&&jr(pr))}function Im(){return!!(Br(ar)&&Pm()&&ar.isLegacyTeams&&ar.supports.nestedAppAuth)}function Pm(){return qn.hostClientType===on.android||qn.hostClientType===on.ios||qn.hostClientType===on.ipados||qn.hostClientType===on.visionOS}function Tm(e){return hm(this,void 0,void 0,(function*(){if(!Sm())throw pn;const t=e.map(Fm);return Rm(Cm.ADD,t)}))}function Om(e){return hm(this,void 0,void 0,(function*(){if(!Sm())throw pn;const t=e.map(Fm);return Rm(Cm.DELETE,t)}))}function Rm(e,t){return hm(this,void 0,void 0,(function*(){if(window.parent!==window.top)throw new Error("This API is only available in the top-level parent.");if(!Array.isArray(t)||0===t.length)throw new Error(`The '${t}' parameter is required and must be a non-empty array.`);return pc("nestedAppAuth.manageNAATrustedOrigins",[new km(e,t)],wm,Xn(vm,"nestedAppAuth.manageNAATrustedOrigins"))}))}function Fm(e){try{return new URL(e).origin.toLowerCase()}catch(t){throw new Error(`Invalid origin provided: ${e}`)}}!function(e){e.ADD="ADD",e.DELETE="DELETE"}(Cm||(Cm={}));class km{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Mm="v2";function Nm(){if(Br(ar,sn.content,sn.task),!Dm())throw pn;return lc(Xn(Mm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function xm(e){if(Br(ar,sn.content,sn.task),!Dm())throw pn;if(!e)throw{errorCode:xe.INVALID_ARGUMENTS};return lc(Xn(Mm,"geoLocation.showLocation"),"location.showLocation",e)}function Dm(){return!!(Br(ar)&&ar.supports.geoLocation&&ar.supports.geoLocation.map&&ar.supports.permissions)}const Um="v2";function Lm(){if(Br(ar,sn.content,sn.task),!Vm())throw pn;return lc(Xn(Um,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Hm(){if(Br(ar,sn.content,sn.task),!Vm())throw pn;const e=De.GeoLocation;return new Promise((t=>{t(lc(Xn(Um,"geoLocation.hasPermission"),"permissions.has",e))}))}function _m(){if(Br(ar,sn.content,sn.task),!Vm())throw pn;const e=De.GeoLocation;return new Promise((t=>{t(lc(Xn(Um,"geoLocation.requestPermission"),"permissions.request",e))}))}function Vm(){return!!(Br(ar)&&ar.supports.geoLocation&&ar.supports.permissions)}function Bm(){return ar.hostVersionsInfo?ar.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const jm="v1";class Wm{postMessage(e,t){Br(ar),wc(Xn(jm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||wn())}addEventListener(e,t){Br(ar),"message"===e&&Cs(Xn(jm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class zm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Br(ar,sn.task),wc(Xn(jm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||wn())}addEventListener(e,t){Br(ar,sn.task),"message"===e&&Cs(Xn(jm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const $m="v2";function qm(e){if(Br(ar,sn.content),!Gm())throw pn;if(!e||!On(e))throw{errorCode:xe.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return lc(Xn($m,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Gm(){return!(!Br(ar)||!ar.supports.secondaryBrowser)}const Jm="v1";function Km(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Br(ar,sn.content,sn.task),!jr(Ke))throw{errorCode:xe.OLD_PLATFORM};if(!e)throw{errorCode:xe.INVALID_ARGUMENTS};if(!Zm())throw pn;wc(Xn(Jm,"location.getLocation"),"location.getLocation",[e],t)}function Qm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Br(ar,sn.content,sn.task),!jr(Ke))throw{errorCode:xe.OLD_PLATFORM};if(!e)throw{errorCode:xe.INVALID_ARGUMENTS};if(!Zm())throw pn;wc(Xn(Jm,"location.showLocation"),"location.showLocation",[e],t)}function Zm(){return!(!Br(ar)||!ar.supports.location)}const Xm="v1";function Ym(e){Br(ar,sn.sidePanel),e.contentUrl&&new URL(e.contentUrl),wc(Xn(Xm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var eh=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const th="v1";var nh,rh,oh,ih,ah,sh;function ch(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Br(ar,sn.sidePanel,sn.meetingStage),wc(Xn(th,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function uh(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Br(ar,sn.sidePanel,sn.meetingStage),wc(Xn(th,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function lh(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Br(ar,sn.sidePanel,sn.meetingStage,sn.settings,sn.content),wc(Xn(th,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function dh(){var e,t,n;return eh(this,void 0,void 0,(function*(){let r;Br(ar,sn.sidePanel,sn.meetingStage,sn.settings,sn.content);try{const e=!0;r=yield lc(Xn("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",e)}catch(t){throw new Error(null===(e=null==t?void 0:t.errorCode)||void 0===e?void 0:e.toString())}if(((null===(t=r.details)||void 0===t?void 0:t.type)==ih.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==ih.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(xe.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function fh(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Br(ar,sn.sidePanel,sn.meetingStage,sn.task),wc(Xn(th,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function ph(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Br(ar,sn.sidePanel),wc(Xn(th,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function gh(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Br(ar,sn.sidePanel),wc(Xn(th,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function mh(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Br(ar,sn.sidePanel),wc(Xn(th,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function hh(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Br(ar,sn.sidePanel),Cs(Xn(th,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function vh(e,t,n={sharingProtocol:ah.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Br(ar,sn.sidePanel,sn.meetingStage),wc(Xn(th,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function wh(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Br(ar,sn.sidePanel,sn.meetingStage),wc(Xn(th,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Ch(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Br(ar,sn.sidePanel,sn.meetingStage),wc(Xn(th,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function yh(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Br(ar,sn.sidePanel,sn.meetingStage),wc(Xn(th,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function bh(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Br(ar,sn.sidePanel,sn.meetingStage),Cs(Xn(th,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Sh(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Br(ar,sn.sidePanel,sn.meetingStage),Cs(Xn(th,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Eh(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Br(ar,sn.sidePanel,sn.meetingStage),Cs(Xn(th,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Ah(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Br(ar);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||sh.Other};return lc(Xn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Ih(e,t){if(!t)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!e.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");Br(ar,sn.sidePanel,sn.meetingStage),e.isAppHandlingAudio?Ph(e,t):Th(e,t)}function Ph(e,t){wc(Xn(th,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((n,r)=>{if(n&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Cs(Xn(th,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>eh(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);Rh(n,n.isMicMuted===t.isMicMuted?nh.HostInitiated:nh.AppDeclinedToChange)}catch(e){Rh(t,nh.AppFailedToChange)}}))));Cs(Xn(th,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function Th(e,t){wc(Xn(th,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");bs("meeting.micStateChanged")&&ys("meeting.micStateChanged"),bs("meeting.audioDeviceSelectionChanged")&&ys("meeting.audioDeviceSelectionChanged"),t(n)}))}function Oh(e){Rh(e,nh.AppInitiated)}function Rh(e,t){Br(ar,sn.sidePanel,sn.meetingStage),wc(Xn(th,"meeting.setMicStateWithReason"),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(nh||(nh={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(rh||(rh={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(oh||(oh={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(ih||(ih={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(ah||(ah={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(sh||(sh={}));const Fh="v1",kh="v2";function Mh(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Xn(Fh,"monetization.openPurchaseExperience")):(r=e,o=Xn(kh,"monetization.openPurchaseExperience"));return Br(ar,sn.content),An((()=>new Promise((e=>{if(!Nh())throw pn;e(lc(o,"monetization.openPurchaseExperience",r))}))),n)}function Nh(){return!(!Br(ar)||!ar.supports.monetization)}const xh="v2";function Dh(e){return new Promise((t=>{if(Br(ar,sn.content),!Lh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(cc(Xn(xh,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function Uh(e){return new Promise((t=>{if(Br(ar,sn.content),!Lh())throw new Error("Not supported");const n=Xn(xh,"calendar.composeMeeting");ar.isLegacyTeams?t(cc(n,"executeDeepLink",wg(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(cc(n,"calendar.composeMeeting",e))}))}function Lh(){return!(!Br(ar)||!ar.supports.calendar)}const Hh="v2";function _h(e){e&&0!==e.length&&e.forEach((e=>{eg(e)}))}function Vh(e){if(!e.handoffId||0==e.handoffId.trim().length||""===e.handoffId.trim())throw new Error("handoffId should not be null or empty string.");const t=e.composeMailParams;t.type===Jh.New&&(_h(t.toRecipients),_h(t.ccRecipients),_h(t.bccRecipients))}function Bh(e){if(Br(ar,sn.content),!jh())throw new Error("Not supported");return Vh(e),gc("mail.handoff.composeMail",[new Wh(e)],Xn(Hh,"mail.handoff.composeMail"))}function jh(){return!!(Br(ar)&&ar.supports.mail&&ar.supports.mail.handoff)}class Wh{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const zh="v2";function $h(e){return new Promise((t=>{if(Br(ar,sn.content),!Gh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(cc(Xn(zh,"mail.openMailItem"),"mail.openMailItem",e))}))}function qh(e){return new Promise((t=>{if(Br(ar,sn.content),!Gh())throw new Error("Not supported");t(cc(Xn(zh,"mail.composeMail"),"mail.composeMail",e))}))}function Gh(){return!(!Br(ar)||!ar.supports.mail)}var Jh;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Jh||(Jh={}));const Kh="v2";function Qh(){if(!qn.printCapabilityEnabled){if(Br(ar),!nv())throw pn;qn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Zh(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function Zh(){kn().print()}function Xh(e){Yh(Xn(Kh,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!to(e)&&!nv())throw pn}))}function Yh(e,t,n){!to(t)&&Br(ar),!to(t)&&n&&n(),Ts(e,t)}function ev(e){tv(Xn(Kh,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!to(e)&&!nv())throw pn}))}function tv(e,t,n){!to(t)&&Br(ar),!to(t)&&n&&n(),Fs(e,t)}function nv(){return!(!Br(ar)||!ar.supports.teamsCore)}const rv="v1",ov="v2";function iv(e,t){let n,r;Br(ar,sn.content,sn.task,sn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Xn(rv,"people.selectPeople")):(r=e,o=Xn(ov,"people.selectPeople")),Sn(av,n,o,r)}function av(e,t){return new Promise((n=>{if(!jr(Qe))throw{errorCode:xe.OLD_PLATFORM};if(!em(t))throw{errorCode:xe.INVALID_ARGUMENTS};if(!sv())throw pn;n(lc(e,"people.selectPeople",t))}))}function sv(){return!(!Br(ar)||!ar.supports.people)}function cv(e){return e?e.modality&&"string"!=typeof e.modality?[!1,"modality must be a string"]:e.targetElementBoundingRect&&"object"==typeof e.targetElementBoundingRect?e.triggerType&&"string"==typeof e.triggerType?uv(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function uv(e){return e?e.displayName&&"string"!=typeof e.displayName?[!1,"displayName must be a string"]:e.identifiers&&"object"==typeof e.identifiers?e.identifiers.AadObjectId||e.identifiers.Smtp||e.identifiers.Upn?e.identifiers.AadObjectId&&"string"!=typeof e.identifiers.AadObjectId?[!1,"AadObjectId identifier must be a string"]:e.identifiers.Smtp&&"string"!=typeof e.identifiers.Smtp?[!1,"Smtp identifier must be a string"]:e.identifiers.Upn&&"string"!=typeof e.identifiers.Upn?[!1,"Upn identifier must be a string"]:[!0,void 0]:[!1,"at least one valid identifier must be provided"]:[!1,"persona identifiers object must be provided"]:[!1,"persona object must be provided"]}const lv="v2";function dv(e){return Br(ar,sn.content),new Promise((t=>{const[n,r]=cv(e);if(!n)throw{errorCode:xe.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(lc(Xn(lv,"profile.showProfile"),"profile.showProfile",o))}))}function fv(){return!(!Br(ar)||!ar.supports.profile)}const pv="v2",gv="search.queryChange",mv="search.queryClose",hv="search.queryExecute";function vv(e,t,n){if(Br(ar,sn.content),!Cv())throw pn;Cs(Xn(pv,"search.registerOnClosedHandler"),mv,e),Cs(Xn(pv,"search.registerOnExecutedHandler"),hv,t),n&&Cs(Xn(pv,"search.registerOnChangeHandler"),gv,n)}function wv(){if(Br(ar,sn.content),!Cv())throw pn;wc(Xn(pv,"search.unregisterHandlers"),"search.unregister"),ys(gv),ys(mv),ys(hv)}function Cv(){return!(!Br(ar)||!ar.supports.search)}function yv(){return new Promise((e=>{if(Br(ar,sn.content),!Cv())throw new Error("Not supported");e(cc(Xn(pv,"search.closeSearch"),"search.closeSearch"))}))}var bv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Sv="v2";function Ev(){return bv(this,void 0,void 0,(function*(){if(Br(ar,sn.sidePanel,sn.meetingStage),!Av())throw pn;return yield lc(Xn(Sv,"sharing.history.getContent"),"sharing.history.getContent")}))}function Av(){var e;return Br(ar)&&void 0!==(null===(e=ar.supports.sharing)||void 0===e?void 0:e.history)}const Iv="v1",Pv="v2",Tv={shareWebContent:"sharing.shareWebContent"};function Ov(e,t){try{Fv(e),kv(e),Mv(e)}catch(e){return En((()=>Promise.reject(e)),t)}Br(ar,sn.content,sn.sidePanel,sn.task,sn.stage,sn.meetingStage);return En(Rv,t,Xn(t?Iv:Pv,"sharing.shareWebContent"),e)}function Rv(e,t){return new Promise((n=>{if(!Nv())throw pn;n(lc(e,Tv.shareWebContent,t))}))}function Fv(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:xe.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function kv(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:xe.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:xe.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Mv(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:xe.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:xe.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Nv(){return!(!Br(ar)||!ar.supports.sharing)}const xv="v2";function Dv(){return new Promise((e=>{if(Br(ar,sn.content),!Uv())throw pn;e(lc(Xn(xv,"stageView.self.close"),"stageView.self.close"))}))}function Uv(){var e;return Br(ar)&&void 0!==(null===(e=ar.supports.stageView)||void 0===e?void 0:e.self)}const Lv="v2";var Hv;function _v(e){return new Promise((t=>{if(Br(ar,sn.content),!Vv())throw pn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(lc(Xn(Lv,"stageView.open"),"stageView.open",e))}))}function Vv(){return!(!Br(ar)||!ar.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Hv||(Hv={}));const Bv=10;var jv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Wv="v2";function zv(e){return jv(this,void 0,void 0,(function*(){Br(ar,sn.content,sn.task),Gv(),Jv(e);const t=yield lc(Xn(Wv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Kv(e.maxVisualMediaCount,t),t}))}function $v(e){return jv(this,void 0,void 0,(function*(){Br(ar,sn.content,sn.task),Gv(),Jv(e);const t=yield lc(Xn(Wv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Kv(e.maxVisualMediaCount,t),t}))}function qv(){return!!(Br(ar)&&ar.supports.visualMedia&&ar.supports.visualMedia.image&&ar.supports.permissions)}function Gv(){if(!qv())throw pn}function Jv(e){if(!e||e.maxVisualMediaCount>Bv||e.maxVisualMediaCount<1)throw hn}function Kv(e,t){if(t.length>e)throw vn}const Qv="v2";var Zv,Xv;function Yv(){if(Br(ar,sn.content,sn.task),!qv())throw pn;const e=De.Media;return lc(Xn(Qv,"visualMedia.hasPermission"),"permissions.has",e)}function ew(){if(Br(ar,sn.content,sn.task),!qv())throw pn;const e=De.Media;return lc(Xn(Qv,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Zv||(Zv={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Xv||(Xv={}));var tw=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let nw=null;function rw(){return tw(this,void 0,void 0,(function*(){return null===nw&&(nw=(yield Ro()).app.host.name),nw}))}var ow=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};function iw(){return ow(this,void 0,void 0,(function*(){if(Br(ar),!sw())throw pn;return!(!ar.isLegacyTeams||qn.hostClientType!==on.android&&qn.hostClientType!==on.ios&&qn.hostClientType!==on.ipados&&qn.hostClientType!==on.visionOS||(yield aw())!==an.teams)||(yield sc(Xn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function aw(){return ow(this,void 0,void 0,(function*(){return rw()}))}function sw(){return Br(ar)&&void 0!==ar.supports.webStorage}const cw="v2";var uw;function lw(e){const t=Xn(cw,"call.startCall");return new Promise((n=>{var r;if(Br(ar,sn.content,sn.task),!dw())throw pn;if(!ar.isLegacyTeams)return wc(t,"call.startCall",[e],n);n(sc(t,"executeDeepLink",vg(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(uw.Video),e.source)).then((e=>{if(!e)throw new Error(ut);return e})))}))}function dw(){return!(!Br(ar)||!ar.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(uw||(uw={}));const fw="v1";function pw(){Ki(Xn(fw,"appInitialization.notifyAppLoaded"))}function gw(){wc(Xn(fw,"appInitialization.notifySuccess"),bo.Success,[br])}function mw(e){Zi(Xn(fw,"appInitialization.notifyFailure"),e)}function hw(e){Qi(Xn(fw,"appInitialization.notifyExpectedFailure"),e)}const vw=Zn("thirdPartyCloudStorage"),ww="v2";class Cw{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let yw=[],bw=null,Sw=!0,Ew=null;function Aw(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Br(ar,sn.content,sn.task),!Pw())throw pn;if(Ew)throw Ew=null,new Error("getDragAndDropFiles cannot be called twice");Ew=t,Sw=!0,wc(Xn(ww,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],Iw)}else{t([],{errorCode:xe.INVALID_ARGUMENTS})}}function Iw(e){if(Ew)if(e&&e.error)Ew([],e.error),Ew=null;else if(e&&e.fileChunk)try{Sw||0!==e.fileChunk.chunkSequence||(vw("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Sw=!0,Ew([],{errorCode:xe.INTERNAL_ERROR,message:"error occurred while receiving data"}),yw=[],Ew=null);const t=zg(e.fileChunk,e.fileType);if(t?(bw||(bw=new Cw(e.fileType,[])),bw.assembleAttachment.push(t)):(vw(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Ew?Ew([],{errorCode:xe.INTERNAL_ERROR,message:"error occurred while receiving data"}):Ew=null,yw=[],Ew=null,Sw=!0),Sw=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&bw){const t=Wg(bw.assembleAttachment,bw.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});yw.push(n)}e.isLastFile&&Ew&&(Ew(yw,e.error),yw=[],Ew=null,Sw=!0),bw=null}}catch(e){Ew&&(Ew([],{errorCode:xe.INTERNAL_ERROR,message:e}),yw=[],Ew=null,Sw=!0)}else Ew([],{errorCode:xe.INTERNAL_ERROR,message:"data received is null"}),yw=[],Ew=null,Sw=!0}function Pw(){return!(!Br(ar)||!ar.supports.thirdPartyCloudStorage)}const Tw="v1";function Ow(e,t){Ji(Xn(Tw,"initialize"),t).then((()=>{e&&e()}))}function Rw(){Qh()}function Fw(){Zh()}function kw(e){Vr(),wc(Xn(Tw,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=qn.frameContext),e(t)}))}function Mw(e){ra(Xn(Tw,"registerOnThemeChangeHandlerHelper"),e)}function Nw(e){Ss(Xn(Tw,"registerFullScreenHandler"),"fullScreenChange",e,[])}function xw(e){Ss(Xn(Tw,"registerAppButtonClickHandler"),"appButtonClick",e,[sn.content])}function Dw(e){Ss(Xn(Tw,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[sn.content])}function Uw(e){Ss(Xn(Tw,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[sn.content])}function Lw(e){Ea(Xn(Tw,"registerBackButtonHandler"),e)}function Hw(e){Yh(Xn(Tw,"registerOnLoadHandler"),e)}function _w(e){tv(Xn(Tw,"registerBeforeUnloadHandler"),e)}function Vw(e){Ss(Xn(Tw,"registerFocusEnterHandler"),"focusEnter",e,[])}function Bw(e){Ss(Xn(Tw,"registerChangeSettingsHandler"),"changeSettings",e,[sn.content])}function jw(e,t){Br(ar),Xa(Xn(Tw,"getTabInstances"),t).then((t=>{e(t)}))}function Ww(e,t){Br(ar),Ya(Xn(Tw,"getMruTabInstances"),t).then((t=>{e(t)}))}function zw(e){es(Xn(Tw,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function $w(e,t){Br(ar,sn.content,sn.sidePanel,sn.settings,sn.task,sn.stage,sn.meetingStage);const n=null!=t?t:wn();oa(Xn(Tw,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function qw(e){ts(Xn(Tw,"setFrameContext"),e)}function Gw(e,t,n){Ji(Xn(Tw,"initializeWithFrameContext"),n).then((()=>t&&t())),ts(Xn(Tw,"setFrameContext"),e)}const Jw="v1";function Kw(e){Za(Xn(Jw,"navigation.returnFocus"),e)}function Qw(e,t){Br(ar);const n=null!=t?t:wn();Qa(Xn(Jw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Zw(e,t){Br(ar,sn.content,sn.sidePanel,sn.settings,sn.remove,sn.task,sn.stage,sn.meetingStage);const n=null!=t?t:wn();Ja(Xn(Jw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Xw(e){Br(ar);const t=null!=e?e:wn();Ka(Xn(Jw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const Yw="v1";function eC(e){ns(Xn(Yw,"settings.setValidityState"),e)}function tC(e){Br(ar,sn.content,sn.settings,sn.remove,sn.sidePanel),rs(Xn(Yw,"settings.getSettings")).then((t=>{e(t)}))}function nC(e,t){Br(ar,sn.content,sn.settings,sn.sidePanel);const n=null!=t?t:wn();os(Xn(Yw,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function rC(e){xi(Xn(Yw,"settings.registerOnSaveHandler"),e)}function oC(e){Ui(Xn(Yw,"settings.registerOnRemoveHandler"),e)}var iC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const aC="v1";function sC(e,t){const n=Xn(aC,"tasks.startTask"),r=t?e=>{var n,r;return t(null!==(n=e.err)&&void 0!==n?n:"",null!==(r=e.result)&&void 0!==r?r:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(Br(ar,sn.content,sn.sidePanel,sn.meetingStage),wc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?ti(n,dC(e),r):ei(n,lC(e),r),new Wm}function cC(e){e=fC(e);const{width:t,height:n}=e,r=iC(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Yo(Xn(aC,"tasks.updateTask"),e)}function uC(e,t){ni(Xn(aC,"tasks.submitTask"),e,t)}function lC(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:dn.Small,width:e.width?e.width:dn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function dC(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:dn.Small,width:e.width?e.width:dn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function fC(e){return e.height=e.height?e.height:dn.Small,e.width=e.width?e.width:dn.Small,e}const pC="v2";var gC,mC;function hC(){return!(!Br(ar,sn.meetingStage,sn.sidePanel,sn.content)||!ar.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(gC||(gC={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(mC||(mC={}));class vC{getFluidTenantInfo(){return wC(),new Promise((e=>{e(lc(Xn(pC,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return wC(),new Promise((t=>{t(lc(Xn(pC,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return wC(),new Promise((e=>{e(lc(Xn(pC,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return wC(),new Promise((t=>{t(lc(Xn(pC,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return wC(),new Promise((e=>{e(lc(Xn(pC,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return wC(),new Promise((t=>{t(lc(Xn(pC,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return wC(),new Promise((t=>{t(lc(Xn(pC,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return wC(),new Promise((t=>{t(lc(Xn(pC,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return wC(),new vC}}function wC(){if(!hC())throw new Error("LiveShareHost Not supported")}var CC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function yC(e){try{return e.cartItems=bC(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function bC(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=bC(e.accessories)),e}))}const SC=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=CC(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=SC(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function EC(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)IC(t),AC(t.accessories)}function AC(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(const t of e){if(t.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");IC(t)}}}function IC(e){if(!e.id)throw new Error("cartItem.id must not be empty");if(!e.name)throw new Error("cartItem.name must not be empty");TC(e.price),OC(e.quantity)}function PC(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===rn(e))throw new Error("id must be a valid UUID")}}function TC(e){if("number"!=typeof e||e<0)throw new Error(`price ${e} must be a number not less than 0`);if(parseFloat(e.toFixed(3))!==e)throw new Error(`price ${e} must have at most 3 decimal places`)}function OC(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function RC(e){if(!Object.values(NC).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const FC="v2",kC={majorVersion:1,minorVersion:1};var MC,NC;function xC(){if(Br(ar,sn.content,sn.task),!HC())throw pn;return lc(Xn(FC,"marketplace.getCart"),"marketplace.getCart",kC).then(yC)}function DC(e){if(Br(ar,sn.content,sn.task),!HC())throw pn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return PC(null==e?void 0:e.cartId),EC(null==e?void 0:e.cartItems),lc(Xn(FC,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:SC(e.cartItems),cartVersion:kC})).then(yC)}function UC(e){if(Br(ar,sn.content,sn.task),!HC())throw pn;if(!e)throw new Error("removeCartItemsParams must be provided");if(PC(null==e?void 0:e.cartId),!Array.isArray(null==e?void 0:e.cartItemIds)||0===(null==e?void 0:e.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return lc(Xn(FC,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:kC})).then(yC)}function LC(e){if(Br(ar,sn.content,sn.task),!HC())throw pn;if(!e)throw new Error("updateCartStatusParams must be provided");return PC(null==e?void 0:e.cartId),RC(null==e?void 0:e.cartStatus),lc(Xn(FC,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:kC})).then(yC)}function HC(){return!(!Br(ar)||!ar.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(MC||(MC={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(NC||(NC={}))})(),r})()));
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map