@microsoft/teams-js 2.59.0 → 2.60.0-beta.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.
- package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +16 -0
- package/dist/esm/packages/teams-js/src/public/dialog/url/url.js +1 -1
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/umd/MicrosoftTeams.js +4 -8
- package/dist/umd/MicrosoftTeams.js.map +1 -1
- package/dist/umd/MicrosoftTeams.min.js +1 -1
- package/dist/umd/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -53
|
@@ -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()}(Object("undefined"!=typeof self?self:this),()=>(()=>{var e={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}},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}}},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))}},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}},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||"function"==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:()=>_e,AppId:()=>po,ChannelType:()=>wn,ChildAppWindow:()=>nv,DialogDimension:()=>vn,EduType:()=>$e,EmailAddress:()=>dh,ErrorCode:()=>Be,FileOpenPreference:()=>He,FrameContexts:()=>pn,HostClientType:()=>dn,HostName:()=>fn,LiveShareHost:()=>Dy,NotificationTypes:()=>du,ParentAppWindow:()=>rv,RenderingSurfaces:()=>gn,SecondaryM365ContentIdName:()=>Ve,TaskModuleDimension:()=>vn,TeamType:()=>hn,UUID:()=>Qn,UserAuthenticationState:()=>Al,UserSettingTypes:()=>pu,UserTeamRole:()=>mn,ValidatedSafeString:()=>fo,ViewerActionTypes:()=>fu,activateChildProxyingCommunication:()=>Rr,app:()=>i,appEntity:()=>z,appInitialization:()=>ke,appInstallDialog:()=>ne,appPerformanceMetrics:()=>te,authentication:()=>ee,barCode:()=>oe,calendar:()=>me,call:()=>Fe,chat:()=>ie,clipboard:()=>ae,contextualSearch:()=>b,conversations:()=>A,copilot:()=>R,dialog:()=>f,enablePrintCapability:()=>JC,executeDeepLink:()=>ly,externalAppAuthentication:()=>F,externalAppAuthenticationForCEA:()=>k,externalAppCardActions:()=>M,externalAppCardActionsForCEA:()=>x,externalAppCardActionsForDA:()=>N,externalAppCommands:()=>U,files:()=>D,geoLocation:()=>ue,getAdaptiveCardSchemaVersion:()=>ev,getContext:()=>QC,getCurrentFeatureFlagsState:()=>xr,getMruTabInstances:()=>cy,getTabInstances:()=>sy,hostEntity:()=>Z,initialize:()=>GC,initializeWithFrameContext:()=>fy,liveShare:()=>Ue,localNetworkAccess:()=>fe,location:()=>de,logs:()=>S,mail:()=>we,marketplace:()=>De,media:()=>re,meeting:()=>ge,meetingRoom:()=>L,menus:()=>p,messageChannels:()=>H,monetization:()=>he,mouseRelay:()=>Le,navigateBack:()=>vy,navigateCrossDomain:()=>my,navigateToTab:()=>hy,nestedAppAuth:()=>se,nestedAppAuthBridge:()=>_,notifications:()=>V,openFilePreview:()=>yu,otherAppStateChange:()=>B,overwriteFeatureFlagsState:()=>Ur,pages:()=>y,people:()=>ye,plugins:()=>j,print:()=>KC,profile:()=>Se,registerAppButtonClickHandler:()=>YC,registerAppButtonHoverEnterHandler:()=>ey,registerAppButtonHoverLeaveHandler:()=>ty,registerBackButtonHandler:()=>ny,registerBeforeUnloadHandler:()=>oy,registerChangeSettingsHandler:()=>ay,registerCustomHandler:()=>wu,registerFocusEnterHandler:()=>iy,registerFullScreenHandler:()=>XC,registerOnLoadHandler:()=>ry,registerOnThemeChangeHandler:()=>ZC,registerUserSettingsChangeHandler:()=>Cu,remoteCamera:()=>W,returnFocus:()=>gy,search:()=>be,secondaryBrowser:()=>le,sendCustomEvent:()=>vu,sendCustomMessage:()=>mu,setFeatureFlagsState:()=>Nr,setFrameContext:()=>dy,settings:()=>xe,shareDeepLink:()=>uy,sharing:()=>Ee,shortcutRelay:()=>Je,sidePanelInterfaces:()=>P,stageView:()=>Pe,store:()=>X,tasks:()=>Ne,teams:()=>G,teamsCore:()=>Ce,thirdPartyCloudStorage:()=>Me,uploadCustomApp:()=>hu,version:()=>Tr,videoEffects:()=>J,videoEffectsEx:()=>K,visualMedia:()=>Oe,webStorage:()=>Re,widgetHosting:()=>Y});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>So,getTelemetryPort:()=>Co,isSupported:()=>yo});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Oo,getDataLayerPort:()=>Po,isSupported:()=>To});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Ro,registerOnResumeHandler:()=>Fo});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Uo,FailedReason:()=>No,Messages:()=>xo,_initialize:()=>Vo,_uninitialize:()=>Bo,getContext:()=>jo,getFrameContext:()=>Lo,getImmediateParentOrigin:()=>_o,initialize:()=>Ho,isInitialized:()=>Do,lifecycle:()=>o,notifyAppLoaded:()=>Wo,notifyExpectedFailure:()=>$o,notifyFailure:()=>qo,notifySuccess:()=>zo,openLink:()=>Qo,registerHostToAppPerformanceMetricsHandler:()=>Ko,registerOnContextChangeHandler:()=>Jo,registerOnThemeChangeHandler:()=>Go});var a={};n.r(a),n.d(a,{isSupported:()=>Yo,resize:()=>Xo});var s={};n.r(s),n.d(s,{isSupported:()=>ti,open:()=>ei});var c={};n.r(c),n.d(c,{isSupported:()=>ii,registerOnMessageFromParent:()=>oi,sendMessageToDialog:()=>ri,sendMessageToParentFromDialog:()=>ni});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>li,getDialogInfoFromUrlDialogInfo:()=>ui,isSupported:()=>ci,open:()=>ai,parentCommunication:()=>c,submit:()=>si});var l={};n.r(l),n.d(l,{isSupported:()=>bi,open:()=>Si});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>Ei,open:()=>Ai});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>Ii,isSupported:()=>Pi,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>Oi,MenuItem:()=>Fi,MenuListType:()=>Ri,initialize:()=>Di,isSupported:()=>Wi,setNavBarMenu:()=>_i,setUpViews:()=>Li,showActionMenu:()=>Bi});var g={};n.r(g),n.d(g,{initialize:()=>zi,isSupported:()=>na,registerChangeConfigHandler:()=>Xi,registerOnRemoveHandler:()=>Ki,registerOnRemoveHandlerHelper:()=>Qi,registerOnSaveHandler:()=>Gi,registerOnSaveHandlerHelper:()=>Ji,setConfig:()=>$i,setValidityState:()=>qi});var h={};n.r(h),n.d(h,{isSupported:()=>Na,onClick:()=>ka,onHoverEnter:()=>Ma,onHoverLeave:()=>xa});var m={};n.r(m),n.d(m,{_initialize:()=>Ua,isSupported:()=>_a,navigateBack:()=>Da,registerBackButtonHandler:()=>La,registerBackButtonHandlerHelper:()=>Ha});var v={};n.r(v),n.d(v,{isSupported:()=>ja,navigateTo:()=>Va,navigateToDefaultPage:()=>Ba});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Wa,exitFullscreen:()=>za,isSupported:()=>qa});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Ja,getTabInstances:()=>Ga,isSupported:()=>Ka,navigateToTab:()=>$a});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Qa,ReturnFocusType:()=>Za,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>ns,initializeWithFrameContext:()=>ts,isSupported:()=>ss,navigateCrossDomain:()=>rs,navigateToApp:()=>os,registerFocusEnterHandler:()=>Ya,registerFullScreenHandler:()=>as,returnFocus:()=>Xa,setCurrentFrame:()=>es,shareDeepLink:()=>is,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>lu,registerGetLogHandler:()=>uu});var b={};n.r(b),n.d(b,{closeContextualSearch:()=>Au,isSupported:()=>Pu,openContextualSearch:()=>bu,registerOnContextualSearchClosedHandler:()=>Iu,registerOnContextualSearchOpenedHandler:()=>Eu});var A={};n.r(A),n.d(A,{closeConversation:()=>Ru,getChatMembers:()=>Fu,isSupported:()=>ku,openConversation:()=>Ou});var E={};n.r(E),n.d(E,{isSupported:()=>Uu,sendCustomTelemetryData:()=>Du});var I={};n.r(I),n.d(I,{getEligibilityInfo:()=>Bu,isSupported:()=>Vu});var P={};n.r(P),n.d(P,{ContentItemType:()=>Wu,CopilotMode:()=>Gu,MediaSelectionType:()=>zu,SidePanelErrorCode:()=>Zu,SidePanelErrorImpl:()=>Xu,TeamsContextType:()=>Ku,TeamsDimensionName:()=>$u,TeamsSessionType:()=>qu,TranscriptState:()=>Ju,UserConsent:()=>Qu});var T={};n.r(T),n.d(T,{copilotSidePanelNotSupportedOnPlatformError:()=>al,getContent:()=>rl,isResponseAReportableError:()=>nl,isSupported:()=>tl,preCheckUserConsent:()=>ol,registerUserActionContentSelect:()=>il});var O={};n.r(O),n.d(O,{closeSidePanel:()=>gl,isSupported:()=>pl});var R={};n.r(R),n.d(R,{customTelemetry:()=>E,eligibility:()=>I,sidePanel:()=>T,view:()=>O});var F={};n.r(F),n.d(F,{ActionExecuteInvokeRequestType:()=>Cl,ActionExecuteResponseHandler:()=>El,InvokeErrorCode:()=>bl,InvokeResponseType:()=>Sl,OriginalRequestType:()=>yl,SerializableActionExecuteInvokeRequest:()=>vl,SerializableConnectorParameters:()=>Nl,UserAuthenticationState:()=>Al,authenticateAndResendRequest:()=>Rl,authenticateWithConnector:()=>Ul,authenticateWithOauth2:()=>Ml,authenticateWithPowerPlatformConnectorPlugins:()=>xl,authenticateWithSSO:()=>Fl,authenticateWithSSOAndResendRequest:()=>kl,disconnectConnector:()=>Hl,getUserAuthenticationStateForConnector:()=>Ll,isActionExecuteResponse:()=>wl,isInvokeError:()=>Il,isSupported:()=>_l,validateActionExecuteInvokeRequest:()=>Tl});var k={};n.r(k),n.d(k,{authenticateAndResendRequest:()=>zl,authenticateWithOauth:()=>Wl,authenticateWithSSO:()=>jl,authenticateWithSSOAndResendRequest:()=>ql,isSupported:()=>$l,validateInput:()=>Gl});var M={};n.r(M),n.d(M,{ActionOpenUrlErrorCode:()=>Ql,ActionOpenUrlType:()=>Kl,isSupported:()=>Yl,processActionOpenUrl:()=>Xl,processActionSubmit:()=>Zl});var x={};n.r(x),n.d(x,{isSupported:()=>od,processActionOpenUrl:()=>nd,processActionSubmit:()=>rd});var N={};n.r(N),n.d(N,{SerializableActionOpenUrlDialogInfo:()=>fd,isSupported:()=>ld,processActionOpenUrlDialog:()=>ud});var U={};n.r(U),n.d(U,{isSupported:()=>md,processActionCommand:()=>hd});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>wd,CloudStorageProviderFileAction:()=>Ad,CloudStorageProviderType:()=>Cd,DocumentLibraryAccessType:()=>Sd,FileDownloadStatus:()=>bd,SpecialDocumentLibraryType:()=>yd,addCloudStorageFolder:()=>Id,addCloudStorageProvider:()=>xd,addCloudStorageProviderFile:()=>Ud,copyMoveFiles:()=>Fd,deleteCloudStorageFolder:()=>Pd,deleteCloudStorageProviderFile:()=>Ld,downloadCloudStorageProviderFile:()=>Hd,getCloudStorageFolderContents:()=>Td,getCloudStorageFolders:()=>Ed,getExternalProviders:()=>Rd,getFileDownloads:()=>kd,openCloudStorageFile:()=>Od,openDownloadFolder:()=>Md,registerCloudStorageProviderContentChangeHandler:()=>Bd,registerCloudStorageProviderListChangeHandler:()=>Vd,removeCloudStorageProvider:()=>Nd,renameCloudStorageProviderFile:()=>Dd,uploadCloudStorageProviderFile:()=>_d});var L={};n.r(L),n.d(L,{getPairedMeetingRoomInfo:()=>zd,isSupported:()=>Jd,registerMeetingRoomCapabilitiesUpdateHandler:()=>$d,registerMeetingRoomStatesUpdateHandler:()=>Gd,sendCommandToPairedMeetingRoom:()=>qd});var H={};n.r(H),n.d(H,{dataLayer:()=>t,isSupported:()=>Kd,telemetry:()=>e});var _={};n.r(_),n.d(_,{initialize:()=>ef,version:()=>Qd});var V={};n.r(V),n.d(V,{isSupported:()=>lf,showNotification:()=>uf});var B={};n.r(B),n.d(B,{isSupported:()=>hf,notifyInstallCompleted:()=>gf,registerAppInstallationHandler:()=>ff,unregisterAppInstallationHandler:()=>pf});var j={};n.r(j),n.d(j,{isSupported:()=>wf,registerPluginMessage:()=>yf,sendPluginMessage:()=>Cf});var W={};n.r(W),n.d(W,{ControlCommand:()=>If,ErrorReason:()=>Pf,SessionTerminatedReason:()=>Tf,getCapableParticipants:()=>Of,isSupported:()=>Df,registerOnCapableParticipantsChangeHandler:()=>Mf,registerOnDeviceStateChangeHandler:()=>Nf,registerOnErrorHandler:()=>xf,registerOnSessionStatusChangeHandler:()=>Uf,requestControl:()=>Rf,sendControlCommand:()=>Ff,terminateSession:()=>kf});var z={};n.r(z),n.d(z,{isSupported:()=>_f,selectAppEntity:()=>Hf});var q={};n.r(q),n.d(q,{getUserJoinedTeams:()=>Bf,isSupported:()=>jf});var $={};n.r($),n.d($,{getConfigSetting:()=>qf,isSupported:()=>$f,joinedTeams:()=>q});var G={};n.r(G),n.d(G,{ChannelType:()=>Jf,fullTrust:()=>$,getTeamChannels:()=>Kf,isSupported:()=>Zf,refreshSiteUrl:()=>Qf});var J={};n.r(J),n.d(J,{EffectChangeType:()=>sp,EffectFailureReason:()=>cp,VideoFrameFormat:()=>ap,isSupported:()=>gp,notifySelectedVideoEffectChanged:()=>lp,registerForVideoEffect:()=>dp,registerForVideoFrame:()=>up});var K={};n.r(K),n.d(K,{ErrorLevel:()=>Hp,frameProcessingTimeoutInMs:()=>Dp,isSupported:()=>$p,notifyFatalError:()=>Kp,notifySelectedVideoEffectChanged:()=>Wp,registerForVideoEffect:()=>zp,registerForVideoFrame:()=>_p,updatePersonalizedEffects:()=>qp});var Q={};n.r(Q),n.d(Q,{addAndConfigure:()=>rg,getAll:()=>og,isSupported:()=>cg,reconfigure:()=>ig,remove:()=>sg,rename:()=>ag});var Z={};n.r(Z),n.d(Z,{AppTypes:()=>dg,isSupported:()=>fg,tab:()=>Q});var X={};n.r(X),n.d(X,{isSupported:()=>bg,openAppDetail:()=>Cg,openFullStore:()=>wg,openInContextStore:()=>yg,openSpecificStore:()=>Sg});var Y={};n.r(Y),n.d(Y,{callTool:()=>Rg,contentSizeChanged:()=>Ng,isSupported:()=>Og,notifyIntrinsicHeight:()=>xg,openExternal:()=>Dg,registerModalCloseHandler:()=>Lg,requestDisplayMode:()=>kg,requestModal:()=>Mg,sendFollowUpMessage:()=>Fg,setWidgetState:()=>Ug});var ee={};n.r(ee),n.d(ee,{DataResidency:()=>sh,authenticate:()=>Yg,getAuthToken:()=>th,getUser:()=>rh,notifyFailure:()=>ah,notifySuccess:()=>ih,registerAuthenticationHandlers:()=>Xg});var te={};n.r(te),n.d(te,{isSupported:()=>ch,registerHostMemoryMetricsHandler:()=>uh});var ne={};n.r(ne),n.d(ne,{isSupported:()=>Mh,openAppInstallDialog:()=>kh});var re={};n.r(re),n.d(re,{CameraStartMode:()=>Lh,File:()=>jh,FileFormat:()=>Uh,ImageOutputFormats:()=>Bh,ImageUriType:()=>Vh,Media:()=>Gh,MediaControllerEvent:()=>Dh,MediaType:()=>_h,Source:()=>Hh,VideoController:()=>Kh,captureImage:()=>Wh,hasPermission:()=>zh,requestPermission:()=>qh,scanBarCode:()=>Xh,selectMedia:()=>Qh,viewImages:()=>Zh});var oe={};n.r(oe),n.d(oe,{hasPermission:()=>pm,isSupported:()=>hm,requestPermission:()=>gm,scanBarCode:()=>fm});var ie={};n.r(ie),n.d(ie,{isSupported:()=>ym,openChat:()=>vm,openGroupChat:()=>Cm});var ae={};n.r(ae),n.d(ae,{hasPermission:()=>Im,isSupported:()=>Tm,read:()=>Em,requestPermission:()=>Pm,write:()=>Am});var se={};n.r(se),n.d(se,{addNAATrustedOrigins:()=>Vm,canParentManageNAATrustedOrigins:()=>Um,deleteNAATrustedOrigins:()=>Bm,getParentOrigin:()=>Nm,isDeeplyNestedAuthSupported:()=>Dm,isNAAChannelRecommended:()=>xm});var ce={};n.r(ce),n.d(ce,{chooseLocation:()=>$m,isSupported:()=>Jm,showLocation:()=>Gm});var ue={};n.r(ue),n.d(ue,{getCurrentLocation:()=>Qm,hasPermission:()=>Zm,isSupported:()=>Ym,map:()=>ce,requestPermission:()=>Xm});var le={};n.r(le),n.d(le,{isSupported:()=>av,open:()=>iv});var de={};n.r(de),n.d(de,{getLocation:()=>cv,isSupported:()=>lv,showLocation:()=>uv});var fe={};n.r(fe),n.d(fe,{hasPermission:()=>fv,isSupported:()=>gv,requestPermission:()=>pv});var pe={};n.r(pe),n.d(pe,{setOptions:()=>mv});var ge={};n.r(ge),n.d(ge,{CallType:()=>bv,EventActionSource:()=>Ev,MeetingReactionType:()=>yv,MeetingType:()=>Sv,SharingProtocol:()=>Av,appShareButton:()=>pe,getAppContentStageSharingCapabilities:()=>Uv,getAppContentStageSharingState:()=>Lv,getAuthenticationTokenForAnonymousUser:()=>Rv,getIncomingClientAudioState:()=>Iv,getLiveStreamState:()=>Fv,getMeetingDetails:()=>Tv,getMeetingDetailsVerbose:()=>Ov,joinMeeting:()=>Bv,registerLiveStreamChangedHandler:()=>xv,registerMeetingReactionReceivedHandler:()=>Vv,registerRaiseHandStateChangedHandler:()=>_v,registerSpeakingStateChangeHandler:()=>Hv,requestAppAudioHandling:()=>jv,requestStartLiveStreaming:()=>kv,requestStopLiveStreaming:()=>Mv,shareAppContentToStage:()=>Nv,stopSharingAppContentToStage:()=>Dv,toggleIncomingClientAudio:()=>Pv,updateMicState:()=>qv});var he={};n.r(he),n.d(he,{isSupported:()=>Qv,openPurchaseExperience:()=>Kv});var me={};n.r(me),n.d(me,{composeMeeting:()=>Yv,isSupported:()=>ew,openCalendarItem:()=>Xv});var ve={};n.r(ve),n.d(ve,{composeMailWithHandoff:()=>ow,isSupported:()=>iw});var we={};n.r(we),n.d(we,{ComposeMailType:()=>dw,composeMail:()=>uw,handoff:()=>ve,isSupported:()=>lw,openMailItem:()=>cw});var Ce={};n.r(Ce),n.d(Ce,{enablePrintCapability:()=>pw,isSupported:()=>Cw,print:()=>gw,registerBeforeUnloadHandler:()=>vw,registerBeforeUnloadHandlerHelper:()=>ww,registerOnLoadHandler:()=>hw,registerOnLoadHandlerHelper:()=>mw});var ye={};n.r(ye),n.d(ye,{isSupported:()=>Ew,selectPeople:()=>bw});var Se={};n.r(Se),n.d(Se,{isSupported:()=>Rw,showProfile:()=>Ow});var be={};n.r(be),n.d(be,{closeSearch:()=>Lw,isSupported:()=>Dw,registerHandlers:()=>Nw,unregisterHandlers:()=>Uw});var Ae={};n.r(Ae),n.d(Ae,{getContent:()=>Vw,isSupported:()=>Bw});var Ee={};n.r(Ee),n.d(Ee,{SharingAPIMessages:()=>zw,history:()=>Ae,isSupported:()=>Zw,shareWebContent:()=>qw});var Ie={};n.r(Ie),n.d(Ie,{close:()=>Yw,isCloseResultSupported:()=>tC,isSupported:()=>eC});var Pe={};n.r(Pe),n.d(Pe,{StageViewOpenMode:()=>rC,isSupported:()=>iC,open:()=>oC,self:()=>Ie});var Te={};n.r(Te),n.d(Te,{captureImages:()=>uC,isSupported:()=>dC,retrieveImages:()=>lC});var Oe={};n.r(Oe),n.d(Oe,{CameraRestriction:()=>mC,Source:()=>vC,hasPermission:()=>wC,image:()=>Te,requestPermission:()=>CC});var Re={};n.r(Re),n.d(Re,{isSupported:()=>PC,isWebStorageClearedOnUserLogOut:()=>EC});var Fe={};n.r(Fe),n.d(Fe,{CallModalities:()=>OC,isSupported:()=>FC,startCall:()=>RC});var ke={};n.r(ke),n.d(ke,{ExpectedFailureReason:()=>Uo,FailedReason:()=>No,Messages:()=>xo,notifyAppLoaded:()=>MC,notifyExpectedFailure:()=>UC,notifyFailure:()=>NC,notifySuccess:()=>xC});var Me={};n.r(Me),n.d(Me,{getDragAndDropFiles:()=>WC,isSupported:()=>qC});var xe={};n.r(xe),n.d(xe,{getSettings:()=>yy,registerOnRemoveHandler:()=>Ay,registerOnSaveHandler:()=>by,setSettings:()=>Sy,setValidityState:()=>Cy});var Ne={};n.r(Ne),n.d(Ne,{getDefaultSizeIfNotProvided:()=>ky,startTask:()=>Py,submitTask:()=>Oy,updateTask:()=>Ty});var Ue={};n.r(Ue),n.d(Ue,{ContainerState:()=>Ny,LiveShareHost:()=>Dy,UserMeetingRole:()=>xy,isSupported:()=>Uy});var De={};n.r(De),n.d(De,{CartStatus:()=>Xy,Intent:()=>Zy,addOrUpdateCartItems:()=>eS,cartVersion:()=>Qy,getCart:()=>Yy,isSupported:()=>rS,removeCartItems:()=>tS,updateCartStatus:()=>nS});var Le={};n.r(Le),n.d(Le,{disableMouseRelayCapability:()=>pS,enableMouseRelayCapability:()=>fS,isSupported:()=>gS});var He,_e,Ve,Be,je,We,ze,qe,$e,Ge,Je={};function Ke(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(Je),n.d(Je,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>xS,enableShortcutRelayCapability:()=>kS,isSupported:()=>MS,resetIsShortcutRelayCapabilityEnabled:()=>FS,setOverridableShortcutHandler:()=>RS}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(He||(He={})),function(e){e.M365Content="m365content"}(_e||(_e={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Ve||(Ve={})),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"}(Be||(Be={})),function(e){e.ClipboardRead="clipboardRead",e.GeoLocation="geolocation",e.LocalNetworkAccess="localNetworkAccess",e.Media="media"}(je||(je={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(We||(We={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(ze||(ze={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(qe||(qe={})),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"}(Ge||(Ge={}));const Qe=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","fa000000136.mro1cdnstorage.public.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate.office.com","copilot-connectors.core.microsoft","copilotstudio.microsoft.com","copilotstudio.preview.microsoft.com","copilotstudio.preprod.microsoft.com","copilotstudio.test.microsoft.com","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","cr.m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.usgovcloud.microsoft","cr.m365copilotapp.svc.usgovcloud.microsoft","dod.m365copilotapp.svc.usgovcloud.microsoft","cr.dod.m365copilotapp.svc.usgovcloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001","portal.officeppe.com","ignite.m365.admin.cloud.microsoft","ignite.admin.cloud.microsoft","sdf.m365.admin.cloud.microsoft","admin-sdf.microsoft.com","canary.m365.admin.cloud.microsoft","ring0.m365.admin.cloud.microsoft","admin.microsoft.com","m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"]}');const Ze="2.0.1",Xe="2.0.2",Ye="2.0.3",et="2.0.4",tt="2.0.1",nt="1.9.0",rt="2.0.0",ot="1.7.0",it="1.8.0",at="1.9.0",st=n.t(Qe,2).validOrigins,ct=1500,ut=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),lt="https",dt="teams.microsoft.com",ft="The library has not yet been initialized",pt="The runtime has not yet been initialized",gt="The runtime version is not supported",ht="The call was not properly started";var mt=n(933);const vt=Ct,wt=2147483647;function Ct(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 St(e)}return yt(e,t,n)}function yt(e,t,n){if("string"==typeof e)return It(e,t);if(ArrayBuffer.isView(e))return Mt(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(Tt(e,ArrayBuffer)||e&&Tt(e.buffer,ArrayBuffer))return xt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Tt(e,SharedArrayBuffer)||e&&Tt(e.buffer,SharedArrayBuffer)))return xt(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 Ct.from(r,t,n);const o=en(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Ct.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 St(e){return bt(e),At(e<0?0:0|Et(e))}function bt(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 At(e){if(e>wt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,Ct.prototype),t}function Et(e){if(e>=wt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+wt.toString(16)+" bytes");return 0|e}function It(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Ct.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|Pt(e,t);let r=At(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function Pt(e,t){if(Ct.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Tt(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 Ot(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Rt(e).length;default:if(o)return r?-1:Ot(e).length;t=(""+t).toLowerCase(),o=!0}}function Tt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Ot(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 Rt(e){return mt.toByteArray(kt(e))}Ct.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}}(),Ct.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),Ct.from=function(e,t,n){return yt(e,t,n)},Object.setPrototypeOf(Ct.prototype,Uint8Array.prototype),Object.setPrototypeOf(Ct,Uint8Array),Ct.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}},Ct.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Ct.prototype};const Ft=/[^+/0-9A-Za-z-_]/g;function kt(e){if((e=(e=e.split("=")[0]).trim().replace(Ft,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Mt(e){if(Tt(e,Uint8Array)){const t=new Uint8Array(e);return xt(t.buffer,t.byteOffset,t.byteLength)}return Nt(e)}function xt(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,Ct.prototype),r}function Nt(e){const t=e.length<0?0:0|Et(e.length),n=At(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Ut(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 Ht(r)}function Dt(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 _t(this,t,n);case"utf8":case"utf-8":return Ut(this,t,n);case"ascii":return Vt(this,t,n);case"latin1":case"binary":return Bt(this,t,n);case"base64":return jt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}Ct.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Ut(this,0,e):Dt.apply(this,arguments)};const Lt=4096;function Ht(e){const t=e.length;if(t<=Lt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Lt));return n}function _t(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+=Yt[e[r]];return o}function Vt(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 Bt(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 jt(e,t,n){return 0===t&&n===e.length?mt.fromByteArray(e):mt.fromByteArray(e.slice(t,n))}function Wt(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 zt(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(Xt(r))return a;e[n+a]=r}return a}function qt(e,t,n,r){return Zt(Ot(t,e.length-n),e,n,r)}function $t(e,t,n,r){return Zt(Kt(t),e,n,r)}function Gt(e,t,n,r){return Zt(Rt(t),e,n,r)}function Jt(e,t,n,r){return Zt(Qt(t,e.length-n),e,n,r)}function Kt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Qt(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 Xt(e){return e!=e}Ct.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 zt(this,e,t,n);case"utf8":case"utf-8":return qt(this,e,t,n);case"ascii":case"latin1":case"binary":return $t(this,e,t,n);case"base64":return Gt(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 Yt=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 en(e){if(Ct.isBuffer(e)){const t=0|Et(e.length),n=At(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Xt(e.length)?At(0):Nt(e):"Buffer"===e.type&&Array.isArray(e.data)?Nt(e.data):void 0}const tn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let nn;const rn=new Uint8Array(16);function on(){if(!nn){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");nn=crypto.getRandomValues.bind(crypto)}return nn(rn)}const an=[];for(let e=0;e<256;++e)an.push((e+256).toString(16).slice(1));function sn(e,t=0){return(an[e[t+0]]+an[e[t+1]]+an[e[t+2]]+an[e[t+3]]+"-"+an[e[t+4]]+an[e[t+5]]+"-"+an[e[t+6]]+an[e[t+7]]+"-"+an[e[t+8]]+an[e[t+9]]+"-"+an[e[t+10]]+an[e[t+11]]+an[e[t+12]]+an[e[t+13]]+an[e[t+14]]+an[e[t+15]]).toLowerCase()}const cn=function(e,t,n){if(tn.randomUUID&&!t&&!e)return tn.randomUUID();const r=(e=e||{}).random??e.rng?.()??on();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return sn(r)},un=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;const ln=function(e){return"string"==typeof e&&un.test(e)};var dn,fn,pn,gn,hn,mn,vn,wn;!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"}(dn||(dn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(fn||(fn={})),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"}(pn||(pn={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(gn||(gn={})),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"}(hn||(hn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(mn||(mn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(vn||(vn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(wn||(wn={}));const Cn={errorCode:Be.NOT_SUPPORTED_ON_PLATFORM},yn={majorVersion:1,minorVersion:5},Sn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},bn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),An=new Error("Invalid response: Received more images than the specified max limit in the response.");function En(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function In(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 Pn(){return cn()}function Tn(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&Tn(e[t])}),Object.freeze(e)}function On(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(void 0,e)}).catch(e=>{t&&t(e)}),r}function Rn(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}).catch(e=>{t&&t(e)}),r}function Fn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(null,e)}).catch(e=>{t&&t(e,null)}),r}function kn(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 Mn(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 xn(e){return!(In(`${e.majorVersion}.${e.minorVersion}`,`${yn.majorVersion}.${yn.minorVersion}`)>=0)}function Nn(e){return"https:"===e.protocol}function Un(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=vt.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function Dn(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 Ln(){if(Hn())throw new Error("window object undefined at SSR check");return window}function Hn(){return"undefined"==typeof window}function _n(e,t){if(jn(e)||!Wn(e)||!zn(e))throw t||new Error("id is not valid.")}function Vn(e,t){const n=e.toString().toLocaleLowerCase();if(jn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Nn(e))throw t||new Error("Url should be a valid https url")}function Bn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function jn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Wn(e){return e.length<256&&e.length>4}function zn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function qn(e){if(!e)throw new Error("id must not be empty");if(!1===ln(e))throw new Error("id must be a valid UUID")}const $n=!!performance&&"now"in performance;function Gn(){return $n?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 Kn(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:qe.NotAdult})})})}class Qn{constructor(e=Pn()){this.uuid=e,qn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Zn(e){if(!(e instanceof Qn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Xn{}Xn.initializeCalled=!1,Xn.initializeCompleted=!1,Xn.additionalValidOrigins=[],Xn.initializePromise=void 0,Xn.isFramelessWindow=!1,Xn.frameContext=void 0,Xn.hostClientType=void 0,Xn.printCapabilityEnabled=!1,Xn.teamsJsInstanceId=(new Qn).toString();var Yn=n(815);const er=new Qn,tr=Yn.debug.formatArgs;Yn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${er.toString()}]`,tr.call(this,e)};const nr=(0,Yn.debug)("teamsJs");function rr(e){return nr.extend(e)}function or(e,t){return`${e}_${t}`}function ir(e){return/^v\d+_[\w.]+$/.test(e)}var ar=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 sr=rr("runtime"),cr=4;function ur(e){return e.apiVersion===cr}const lr={apiVersion:-1,supports:{}};function dr(e){if(ur(e))return!0;throw-1===e.apiVersion?new Error(pt):new Error(gt)}let fr=lr;const pr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:Sn,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:{}}}},gr=[dn.desktop,dn.web,dn.rigel,dn.surfaceHub,dn.teamsRoomsWindows,dn.teamsRoomsAndroid,dn.teamsPhones,dn.teamsDisplays],hr=[dn.android,dn.ios,dn.ipados,dn.visionOS],mr=[...gr,...hr];function vr(e){let t=e;if(t.apiVersion<cr&&wr.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),ur(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const wr=[{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=ar(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})}}}],Cr="2.1.2",yr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:gr}],"1.9.0":[{capability:{location:{}},hostClientTypes:mr}],"2.0.0":[{capability:{people:{}},hostClientTypes:mr},{capability:{sharing:{}},hostClientTypes:[dn.desktop,dn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[dn.android,dn.desktop,dn.ios,dn.teamsRoomsAndroid,dn.teamsPhones,dn.teamsDisplays,dn.web]},{capability:{webStorage:{}},hostClientTypes:[dn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[dn.android,dn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[dn.android,dn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[dn.android,dn.ios,dn.ipados,dn.visionOS]}],"2.1.2":[]},Sr=sr.extend("generateBackCompatRuntimeConfig");function br(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]=br(e[r]||{},t[r]));return n}function Ar(e,t,n){Sr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);Sr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(t=>{In(e,t)>=0&&n[t].forEach(e=>{void 0!==Xn.hostClientType&&e.hostClientTypes.includes(Xn.hostClientType)&&(r=br(r,e.capability))})});const o={apiVersion:cr,hostVersionsInfo:Sn,isLegacyTeams:!0,supports:r};return Sr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Er=sr.extend("applyRuntimeConfig");function Ir(e){"string"==typeof e.apiVersion&&(Er("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Er("Fast-forwarding runtime %o",e);const t=vr(e);Er("Applying runtime %o",t),fr=Tn(t)}function Pr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Tr="2.59.0",Or={childProxyingCommunication:!1};function Rr(){Or.childProxyingCommunication=!0}function Fr(){return Or.childProxyingCommunication}const kr={disableEnforceOriginMatchForChildResponses:!1};let Mr=Object.assign({},kr);function xr(){return Mr}function Nr(e){Mr=e}function Ur(e){return Nr(Object.assign(Object.assign({},Mr),e)),xr()}var Dr=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 Lr=e=>{const{uuid:t}=e,n=Dr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Hr=e=>{const{uuidAsString:t}=e,n=Dr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Qn(t):void 0})},_r=e=>{const{uuidAsString:t}=e,n=Dr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Qn(t):void 0})},Vr=e=>{const{uuid:t}=e,n=Dr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Br(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 jr=rr("flushMessageQueue");function Wr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Lr(o);jr("Flushing message %s from %s message queue via postMessage.",Br(n),r),e.postMessage(n,t)}}}const zr=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function qr(e,t){const n=e.split("."),r=t.split(".");if(r.length!==n.length)return!1;let o=!1;for(let e=0;e<n.length;e++)if(n[e]!==r[e]){if("*"!==n[e])return!1;if(e===n.length-1||o)return!1;o=!0}return!0}class $r{constructor(e,t,n){this.protocol=e,this.host=t,this.logger=n}static canUse(e){return zr.test(e)}static create(e,t){const n=e.split("://");return new $r(n[0],n[1],t.extend("InternalURLPattern"))}test(e){return this.logger("Testing URL %s against pattern protocol: %s, host: %s",e,this.protocol,this.host),e.protocol===`${this.protocol}:`&&(!e.host||qr(this.host,e.host))}}function Gr(e){return $r.canUse(e)}function Jr(e,t){if($r.canUse(e))return $r.create(e,t);t("No URL verifier available for pattern: %s",e)}const Kr=rr("internal"),Qr=Kr.extend("ensureInitializeCalled"),Zr=Kr.extend("ensureInitialized");function Xr(){if(!Xn.initializeCalled)throw Qr(ft),new Error(ft)}function Yr(e,...t){if(!Xn.initializeCompleted)throw Zr("%s. initializeCalled: %s",ft,Xn.initializeCalled.toString()),new Error(ft);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Xn.frameContext){e=!0;break}if(!e){const e=`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Xn.frameContext}".`;throw Zr(e),new Error(e)}}return dr(e)}function eo(e=Ze){const t=In(Xn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function to(){return Xn.hostClientType==dn.android||Xn.hostClientType==dn.ios||Xn.hostClientType==dn.ipados||Xn.hostClientType==dn.visionOS}function no(e=Ze){if(!to()){throw{errorCode:Be.NOT_SUPPORTED_ON_PLATFORM}}if(!eo(e)){throw{errorCode:Be.OLD_PLATFORM}}}function ro(e){let t=Xn.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&Gr(e)));const n={};t=t.filter(e=>!n[e]&&(n[e]=!0,!0)),Xn.additionalValidOrigins=t}function oo(e){if(!co(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${ao}-${so}).`)}function io(e){if(jn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(uo(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const ao=4,so=256;function co(e){return e.length<so&&e.length>ao}function uo(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}function lo(e){if(!(e instanceof po))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class fo{constructor(e){this.idAsString=e,io(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class po extends fo{constructor(e){super(e),oo(e)}toJSON(){return{appIdAsString:this.toString()}}}function go(e){return null==e}var ho=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 mo;const vo="v1",wo=rr("messageChannels.telemetry");function Co(){return ho(this,void 0,void 0,function*(){if(mo)return wo("Returning telemetry port from cache"),mo;if(!yo())throw Cn;return mo=yield Mc(or(vo,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),mo})}function yo(){var e;return!(!Yr(fr)||!(null===(e=fr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function So(){mo=void 0}var bo=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 Ao;const Eo="v1",Io=rr("messageChannels.dataLayer");function Po(){return bo(this,void 0,void 0,function*(){if(Ao)return Io("Returning dataLayer port from cache"),Ao;if(!To())throw Cn;return Ao=yield Mc(or(Eo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),Ao})}function To(){var e;return!(!Yr(fr)||!(null===(e=fr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Oo(){Ao=void 0}function Ro(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Yr(fr),Ks(e)}function Fo(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Yr(fr),Qs(e)}const ko="v2",Mo=rr("app"),xo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var No,Uo;function Do(){return Xn.initializeCompleted}function Lo(){return Xn.frameContext}function Ho(e){return ca(or(ko,"app.initialize"),e)}function _o(){var e,t;if(Hn())return null;const n=null!==(e=yc.currentWindow)&&void 0!==e?e:window;if(n.parent===n)return null;const r=n.location.ancestorOrigins,o=null==r?void 0:r.item(0);if(o)return o;const i=null===(t=n.document)||void 0===t?void 0:t.referrer;if(!i)return null;try{const e=new URL(i).origin;return e===n.location.origin?null:e}catch(e){return null}}function Vo(e){yc.currentWindow=e}function Bo(){Xn.initializeCalled&&(ks(),Xn.initializeCalled=!1,Xn.initializeCompleted=!1,Xn.initializePromise=void 0,Xn.additionalValidOrigins=[],Xn.frameContext=void 0,Xn.hostClientType=void 0,Xn.isFramelessWindow=!1,So(),Oo(),Ac())}function jo(){return new Promise(e=>{Xr(),e(Ec(or(ko,"app.getContext"),"getContext"))}).then(e=>Zo(e))}function Wo(){Xr(),ua(or(ko,"app.notifyAppLoaded"))}function zo(){return fa(or(ko,"app.notifySuccess"))}function qo(e){Xr(),da(or(ko,"app.notifyFailure"),e)}function $o(e){Xr(),la(or(ko,"app.notifyExpectedFailure"),e)}function Go(e){va(or(ko,"app.registerOnThemeChangeHandler"),e)}function Jo(e){wa(or(ko,"app.registerOnContextChangeHandler"),e)}function Ko(e){js(e)}function Qo(e){return Ca(or(ko,"app.openLink"),e)}function Zo(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",brandColorPalettes:e.brandColorPalettes,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:fn.teams,clientType:e.hostClientType?e.hostClientType:dn.web,features:e.hostFeatures,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new po(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Xn.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 Xo(e){pi(or(di,"dialog.update.resize"),e)}function Yo(){return!(!Yr(fr)||!fr.supports.dialog)&&!!fr.supports.dialog.update}function ei(e,t,n){hi(or(di,"dialog.url.bot.open"),e,t,n)}function ti(){return Yr(fr)&&void 0!==(fr.supports.dialog&&fr.supports.dialog.url&&fr.supports.dialog.url.bot)}function ni(e){if(Yr(fr,pn.task),!ii())throw Cn;Uc(or(di,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function ri(e){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!ii())throw Cn;Uc(or(di,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function oi(e){if(Yr(fr,pn.task),!ii())throw Cn;for(Us("messageForChild"),Ns(or(di,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),Ci.reverse();Ci.length>0;){e(Ci.pop())}}function ii(){var e,t;return Yr(fr)&&!!(null===(t=null===(e=fr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function ai(e,t,n){gi(or(di,"dialog.url.open"),e,t,n)}function si(e,t){mi(or(di,"dialog.url.submit"),e,t)}function ci(){return Yr(fr)&&void 0!==(fr.supports.dialog&&fr.supports.dialog.url)}function ui(e){return{url:e.url,height:e.size?e.size.height:vn.Small,width:e.size?e.size.width:vn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function li(e){const t=ui(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(No||(No={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Uo||(Uo={})),Mo("teamsjs instance is version %s, starting at %s UTC (%s local)",Tr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Hn())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?Mo("teamsjs is being used from %s. %s",t,n):Mo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const di="v2",fi="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 pi(e,t){if(Yr(fr,pn.content,pn.sidePanel,pn.task,pn.meetingStage),!Yo())throw Cn;Uc(e,"tasks.updateTask",[t])}function gi(e,t,n,r){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!ci())throw Cn;r&&Ns(or(di,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Uc(e,"tasks.startTask",[ui(t)],(e,t)=>{null==n||n({err:e,result:t}),Us("messageForParent")})}function hi(e,t,n,r){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!ti())throw Cn;r&&Ns(or(di,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Uc(e,"tasks.startTask",[li(t)],(e,t)=>{null==n||n({err:e,result:t}),Us("messageForParent")})}function mi(e,t,n){if(Yr(fr,pn.content,pn.task),!ci())throw Cn;Xn.frameContext===pn.content&&console.warn(fi),Uc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function vi(e){return{card:e.card,height:e.size?e.size.height:vn.Small,width:e.size?e.size.width:vn.Small,title:e.title}}function wi(e){const t=vi(e);return t.completionBotId=e.completionBotId,t}const Ci=[];function yi(e){Xn.frameContext&&(Xn.frameContext===pn.task?Ci.push(e):Us("messageForChild"))}function Si(e,t){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!bi())throw Cn;const n=wi(e);Uc(or(di,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function bi(){const e=fr.hostVersionsInfo&&fr.hostVersionsInfo.adaptiveCardSchemaVersion&&!xn(fr.hostVersionsInfo.adaptiveCardSchemaVersion);return Yr(fr)&&void 0!==(e&&fr.supports.dialog&&fr.supports.dialog.card&&fr.supports.dialog.card.bot)}function Ai(e,t){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!Ei())throw Cn;const n=vi(e);Uc(or(di,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function Ei(){const e=fr.hostVersionsInfo&&fr.hostVersionsInfo.adaptiveCardSchemaVersion&&!xn(fr.hostVersionsInfo.adaptiveCardSchemaVersion);return Yr(fr)&&void 0!==(e&&fr.supports.dialog&&fr.supports.dialog.card)}function Ii(){Ns(or(di,"dialog.registerMessageForChildHandler"),"messageForChild",yi,!1)}function Pi(){return!(!Yr(fr)||!fr.supports.dialog)}const Ti="v2";var Oi,Ri;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Oi||(Oi={}));class Fi{constructor(){this.enabled=!0,this.selected=!1}}let ki,Mi,xi,Ni,Ui;function Di(){Ns(or(Ti,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Vi,!1),Ns(or(Ti,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",ji,!1),Ns(or(Ti,"menus.registerSetModuleViewHandler"),"setModuleView",Hi,!1)}function Li(e,t){if(Yr(fr),!Wi())throw Cn;xi=t,Uc(or(Ti,"menus.setUpViews"),"setUpViews",[e])}function Hi(e){xi&&xi(e)||(Yr(fr),Uc(or(Ti,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function _i(e,t){if(Yr(fr),!Wi())throw Cn;ki=t,Uc(or(Ti,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Vi(e){ki&&ki(e)||(Yr(fr),Uc(or(Ti,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Bi(e,t){if(Yr(fr),!Wi())throw Cn;Mi=t,Uc(or(Ti,"menus.showActionMenu"),"showActionMenu",[e])}function ji(e){Mi&&Mi(e)||(Yr(fr),Uc(or(Ti,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Wi(){return!(!Yr(fr)||!fr.supports.menus)}function zi(){Ns(or(cs,"pages.config.registerSettingsSaveHandler"),"settings.save",Zi,!1),Ns(or(cs,"pages.config.registerSettingsRemoveHandler"),"settings.remove",ea,!1)}function qi(e){return vs(or(cs,"pages.config.setValidityState"),e)}function $i(e){return Cs(or(cs,"pages.config.setConfig"),e)}function Gi(e){Ji(or(cs,"pages.config.registerOnSaveHandler"),e,()=>{if(!go(e)&&!na())throw Cn})}function Ji(e,t,n){!go(t)&&Yr(fr,pn.settings),n&&n(),Ni=t,!go(t)&&Uc(e,"registerHandler",["save"])}function Ki(e){Qi(or(cs,"pages.config.registerOnRemoveHandler"),e,()=>{if(!go(e)&&!na())throw Cn})}function Qi(e,t,n){!go(t)&&Yr(fr,pn.remove,pn.settings),n&&n(),Ui=t,!go(t)&&Uc(e,"registerHandler",["remove"])}function Zi(e){const t=new Yi(e);Ni?Ni(t):tc()?cc("settings.save",[e]):t.notifySuccess()}function Xi(e){Ls(or(cs,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[pn.content],()=>{if(!na())throw Cn})}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Ri||(Ri={}));class Yi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Uc(or(cs,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Uc(or(cs,"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 ea(){const e=new ta;Ui?Ui(e):tc()?cc("settings.remove",[]):e.notifySuccess()}class ta{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Uc(or(cs,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Uc(or(cs,"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 na(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.config}class ra{}class oa extends ra{validate(e){return!0}deserialize(e){return e}}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())})};const aa=6e4,sa=rr("app");function ca(e,t){if(Hn()){return sa.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return kn(()=>ma(e,t),aa,new Error("SDK initialization timed out."))}function ua(e){Uc(e,xo.AppLoaded,[Tr])}function la(e,t){Uc(e,xo.ExpectedFailure,[t.reason,t.message])}function da(e,t){Uc(e,xo.Failure,[t.reason,t.message,t.authHeader])}function fa(e){return ia(this,void 0,void 0,function*(){if(Xn.initializeCompleted)return ga(e);if(!Xn.initializePromise)throw new Error(ft);return Xn.initializePromise.then(()=>ga(e))})}function pa(){var e;return Yr(fr)&&!!(null===(e=fr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ga(e){return ia(this,void 0,void 0,function*(){return pa()?Fc(xo.Success,[Tr],new oa,e).then(()=>({hasFinishedSuccessfully:!0})):(Uc(e,xo.Success,[Tr]),{hasFinishedSuccessfully:"unknown"})})}const ha=sa.extend("initializeHelper");function ma(e,t){return new Promise(n=>{Xn.initializeCalled||(Xn.initializeCalled=!0,Fs(),Xn.initializePromise=bc(t,e).then(({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Ze})=>{Xn.frameContext=e,Xn.hostClientType=t,Xn.clientSupportedSDKVersion=r;try{ha("Parsing %s",n);let e=JSON.parse(n);if(ha("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=Kn(e),n&&Ir(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ha("Attempting to parse %s as an SDK version",n),isNaN(In(n,Ze))||(Xn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(ha("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=Kn(e),Ir(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Ir(Ar(Xn.clientSupportedSDKVersion,pr,yr))}}Xn.initializeCompleted=!0}),Di(),zi(),Ii()),Array.isArray(t)&&ro(t),void 0!==Xn.initializePromise?n(Xn.initializePromise):ha("GlobalVars.initializePromise is unexpectedly undefined")})}function va(e,t){!go(t)&&Xr(),Hs(e,t)}function wa(e,t){!go(t)&&Xr(),_s(e,t)}function Ca(e,t){return new Promise(n=>{Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage),n(Ic(e,"executeDeepLink",t))})}var ya=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 Sa=[];const ba=rr("validateOrigin");let Aa;function Ea(){return ya(this,void 0,void 0,function*(){Aa||(yield Pa())})}function Ia(){return 0===Sa.length}function Pa(e=!1){return ya(this,void 0,void 0,function*(){if(!Ia()&&!e)return Sa;if(Aa)return Aa;if(Hn())return Sa=st,st;{ba("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),ct);return Aa=fetch(ut,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ba("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(Ta(JSON.stringify(e)))return Sa=e.validOrigins,Sa;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?ba(`validOrigins fetch call to CDN failed due to Timeout of ${ct} ms. Defaulting to fallback list`):ba("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Sa=st,Sa)),Aa}})}function Ta(e){let t;try{t=JSON.parse(e)}catch(e){return!1}if(!t||!Array.isArray(t.validOrigins))return!1;for(const e of t.validOrigins){if("string"!=typeof e)return!1;try{new URL("https://"+e)}catch(t){return ba("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}}return!0}function Oa(e,t){let n;try{const t=Jr(e,ba);if(!t)return!1;n=t}catch(e){return!1}return n.test(t)}function Ra(e,t){const n=t||Ia()?st:Sa;return Fa(e,n)?Promise.resolve(!0):(ba("Origin %s is not in the local valid origins list, fetching from CDN",e),Pa(t).then(t=>Fa(e,t)))}function Fa(e,t){for(const t of Xn.additionalValidOrigins)if(Oa(t,e))return!0;const n=e.host;return Nn(e)?!!t.some(e=>qr(e,n))||(ba("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,Xn.additionalValidOrigins),!1):(ba("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}function ka(e){Ls(or(cs,"pages.appButton.onClick"),"appButtonClick",e,[pn.content],()=>{if(!Na())throw Cn})}function Ma(e){Ls(or(cs,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[pn.content],()=>{if(!Na())throw Cn})}function xa(e){Ls(or(cs,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[pn.content],()=>{if(!Na())throw Cn})}function Na(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.appButton}function Ua(){Is()}function Da(){return ls(or(cs,"pages.backStack.navigateBack"))}function La(e){Ha(or(cs,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!go(e)&&!_a())throw Cn})}function Ha(e,t,n){!go(t)&&Yr(fr),n&&n(),Es(t),!go(t)&&Uc(e,"registerHandler",["backButton"])}function _a(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.backStack}function Va(e){return new Promise(t=>{if(Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage),!ja())throw Cn;t(Tc(or(cs,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function Ba(){return new Promise(e=>{if(Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage),!ja())throw Cn;e(Tc(or(cs,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function ja(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.currentApp}function Wa(){if(Yr(fr,pn.content),!qa())throw Cn;Uc(or(cs,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function za(){if(Yr(fr,pn.content),!qa())throw Cn;Uc(or(cs,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function qa(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.fullTrust}function $a(e){return ds(or(cs,"pages.tabs.navigateToTab"),e)}function Ga(e){return ps(or(cs,"pages.tabs.getTabInstances"),e)}function Ja(e){return gs(or(cs,"pages.tabs.getMruTabInstances"),e)}function Ka(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.tabs}var Qa,Za;function Xa(e){const t=or(cs,"pages.returnFocus");if(Yr(fr),!ss())throw Cn;if(void 0===e&&Uc(t,"returnFocus",[!1]),"boolean"==typeof e)Uc(t,"returnFocus",[e]);else switch(e){case Za.PreviousLandmark:case Za.GoToActivityFeed:Uc(t,"returnFocus",[!1,e]);break;case Za.NextLandmark:Uc(t,"returnFocus",[!0,e])}}function Ya(e){Ls(or(cs,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!ss())throw Cn})}function es(e){ms(or(cs,"pages.setCurrentFrame"),e)}function ts(e,t,n){Ea(),ca(or(cs,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),es(e)}function ns(){return ws(or(cs,"pages.getConfig."))}function rs(e){return us(or(cs,"pages.navigateCrossDomain"),e)}function os(e){return new Promise(t=>{if(Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage),!ss())throw Cn;const n=or(cs,"pages.navigateToApp");if(fr.isLegacyTeams){t(Ic(n,"executeDeepLink",Mn(ys(e)?e:Ss(e))))}else{t(Ic(n,"pages.navigateToApp",ys(e)?bs(e):e))}})}function is(e){return hs(or(cs,"pages.shareDeepLink"),e)}function as(e){Ls(or(cs,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!go(e)&&!ss())throw Cn})}function ss(){return!(!Yr(fr)||!fr.supports.pages)}Ea(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Qa||(Qa={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Za||(Za={}));const cs="v2";function us(e,t){return new Promise(n=>{if(Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.remove,pn.task,pn.stage,pn.meetingStage),!ss())throw Cn;n(Pc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function ls(e){return new Promise(t=>{if(Yr(fr),!_a())throw Cn;t(Pc(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function ds(e,t){return new Promise(n=>{if(Yr(fr),!Ka())throw Cn;n(Pc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function fs(e,t){if(Yr(fr),!ss())throw Cn;Uc(e,"returnFocus",[t])}function ps(e,t){return new Promise(n=>{if(Yr(fr),!Ka())throw Cn;n(Ec(e,"getTabInstances",t))})}function gs(e,t){return new Promise(n=>{if(Yr(fr),!Ka())throw Cn;n(Ec(e,"getMruTabInstances",t))})}function hs(e,t){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!ss())throw Cn;Uc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ms(e,t){if(Yr(fr,pn.content),!ss())throw Cn;Uc(e,"setFrameContext",[t])}function vs(e,t){if(Yr(fr,pn.settings,pn.remove),!na())throw Cn;Uc(e,"settings.setValidityState",[t])}function ws(e){return new Promise(t=>{if(Yr(fr,pn.content,pn.settings,pn.remove,pn.sidePanel),!ss())throw Cn;t(Ec(e,"settings.getSettings"))})}function Cs(e,t){return new Promise(n=>{if(Yr(fr,pn.content,pn.settings,pn.sidePanel),!na())throw Cn;n(Ic(e,"settings.setSettings",t))})}function ys(e){return e.appId instanceof po}function Ss(e){return Object.assign(Object.assign({},e),{appId:new po(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function bs(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let As;function Es(e){As=e}function Is(){Ns(or(cs,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Ps,!1)}function Ps(){As&&As()||(tc()?cc("backButtonPress",[]):Da())}var Ts=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 Os=rr("handlers");class Rs{static initializeHandlers(){Rs.handlers.themeChange=Vs,Rs.handlers.contextChange=Bs,Rs.handlers.load=qs,Rs.handlers.beforeUnload=Js,Is()}static uninitializeHandlers(){Rs.handlers={},Rs.themeChangeHandler=null,Rs.beforeUnloadHandler=null,Rs.beforeSuspendOrTerminateHandler=null,Rs.resumeHandler=null,Rs.contextChangeHandler=null}}function Fs(){Rs.initializeHandlers()}function ks(){Rs.uninitializeHandlers()}Rs.handlers={},Rs.themeChangeHandler=null,Rs.loadHandler=null,Rs.beforeUnloadHandler=null,Rs.beforeSuspendOrTerminateHandler=null,Rs.resumeHandler=null,Rs.hostToAppPerformanceMetricsHandler=null,Rs.contextChangeHandler=null;const Ms=Os.extend("callHandler");function xs(e,t){const n=Rs.handlers[e];if(n){Ms("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return tc()?(cc(e,t),[!1,void 0]):(Ms("Handler for action message %s not found.",e),[!1,void 0])}function Ns(e,t,n,r=!0,o=[]){n?(Rs.handlers[t]=n,r&&Uc(e,"registerHandler",[t,...o])):delete Rs.handlers[t]}function Us(e){delete Rs.handlers[e]}function Ds(e){return null!=Rs.handlers[e]}function Ls(e,t,n,r,o){n&&Yr(fr,...r),o&&o(),Ns(e,t,n)}function Hs(e,t){Rs.themeChangeHandler=t,!go(t)&&Uc(e,"registerHandler",["themeChange"])}function _s(e,t){Rs.contextChangeHandler=t,!go(t)&&Uc(e,"registerHandler",["contextChange"])}function Vs(e,t){const n=!go(t);Rs.themeChangeHandler&&Rs.themeChangeHandler(e,n?t:void 0),tc()&&cc("themeChange",n?[e,t]:[e])}function Bs(e){Rs.contextChangeHandler&&Rs.contextChangeHandler(e),tc()&&cc("contextChange",[e])}function js(e){Rs.hostToAppPerformanceMetricsHandler=e}function Ws(e){Rs.hostToAppPerformanceMetricsHandler&&Rs.hostToAppPerformanceMetricsHandler(e)}function zs(e,t){Rs.loadHandler=t,!go(t)&&Uc(e,"registerHandler",["load"])}function qs(e){const t=$s(e);Rs.resumeHandler?(Rs.resumeHandler(t),tc()&&cc("load",[t])):Rs.loadHandler&&(Rs.loadHandler(e),tc()&&cc("load",[e]))}function $s(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Gs(e,t){Rs.beforeUnloadHandler=t,!go(t)&&Uc(e,"registerHandler",["beforeUnload"])}function Js(){return Ts(this,void 0,void 0,function*(){const e=()=>{Uc(or("v2","handleBeforeUnload"),"readyToUnload",[])};Rs.beforeSuspendOrTerminateHandler?(yield Rs.beforeSuspendOrTerminateHandler(),tc()?cc("beforeUnload"):e()):Rs.beforeUnloadHandler&&Rs.beforeUnloadHandler(e)||(tc()?cc("beforeUnload"):e())})}function Ks(e){Rs.beforeSuspendOrTerminateHandler=e,!go(e)&&Uc(or("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Qs(e){Rs.resumeHandler=e,!go(e)&&Uc(or("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Zs=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 Xs=rr("childProxyingCommunication");class Ys{}function ec(){Ys.window=null,Ys.origin=null,Ys.messageQueue=[]}function tc(){return!!Fr()&&!!Ys.window}function nc(e,t){return!!Fr()&&(Ys.window&&!Ys.window.closed&&e!==Ys.window||(Ys.window=e,Ys.origin=t),Ys.window&&Ys.window.closed?(Ys.window=null,Ys.origin=null,!1):Ys.window===e)}function rc(e,t,n,r){return Zs(this,void 0,void 0,function*(){Ys.window===t&&(Wr(Ys.window,Ys.origin,Ys.messageQueue,"child"),ic(e,n,r))})}Ys.messageQueue=[];const oc=Xs.extend("handleIncomingMessageFromChild");function ic(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Hr(e.data),[o,i]=xs(r.func,r.args);if(o&&void 0!==i)return oc("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Br(r),r.func),void sc(r.id,r.uuid,Array.isArray(i)?i:[i]);oc("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Br(r),r.func),ac(r,t,n)}function ac(e,t,n){const r=t(or("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Ys.origin;n(r.uuid,(...t)=>{if(!Ys.window)return;if(!xr().disableEnforceOriginMatchForChildResponses&&o!==Ys.origin)return void oc("Origin of child window has changed, not sending response back to child window");const n=t.pop();oc("Message from parent being relayed to child, id: %s",Br(e)),sc(e.id,e.uuid,t,n)})}function sc(e,t,n,r){const o=Ys.window,i=uc(e,t,n,r),a=Vr(i),s=Ys.origin;o&&s&&(oc("Sending message %s to %s via postMessage, args = %o",Br(a),"child",a.args),o.postMessage(a,s))}function cc(e,t){const n=Ys.window,r=lc(e,t),o=Ys.origin;n&&o?n.postMessage(r,o):Ys.messageQueue.push(r)}function uc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function lc(e,t){return{func:e,args:t||[]}}class dc{static storeCallbackInformation(e,t){dc.callbackInformation.set(e,t)}static clearMessages(){dc.callbackInformation.clear()}static deleteMessageInformation(e){dc.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Ws({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=dc.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Ws({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),dc.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}dc.callbackInformation=new Map;const fc=rr("nestedAppAuthUtils"),pc=fc.extend("tryPolyfillWithNestedAppAuthBridge"),gc="v2";function hc(e,t,n){var r;const o=pc;if(Xn.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=vc(a,n);s&&(a.nestedAppAuthBridge=s)}const mc=fc.extend("createNestedAppAuthBridge");function vc(e,t){const n=mc;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=or(gc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var wc=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 Cc=rr("communication");class yc{}class Sc{}function bc(e,t){if(Sc.messageListener=e=>Wc(e),yc.currentWindow=yc.currentWindow||Ln(),yc.parentWindow=yc.currentWindow.parent!==yc.currentWindow.self?yc.currentWindow.parent:yc.currentWindow.opener,yc.topWindow=yc.currentWindow.top,(yc.parentWindow||e)&&yc.currentWindow.addEventListener("message",Sc.messageListener,!1),!yc.parentWindow){const e=yc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Xn.isFramelessWindow=!0,e.onNativeMessage=Yc}try{return yc.parentOrigin="*",Oc(t,"initialize",[Tr,cr,e]).then(([e,t,n,r])=>(hc(r,yc.currentWindow,{onMessage:qc,sendPostMessage:Lc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r}))}finally{yc.parentOrigin=null}}function Ac(){yc.currentWindow&&yc.currentWindow.removeEventListener("message",Sc.messageListener,!1),yc.currentWindow=null,yc.parentWindow=null,yc.parentOrigin=null,Sc.parentMessageQueue=[],Sc.nextMessageId=0,Sc.callbacks.clear(),Sc.promiseCallbacks.clear(),Sc.portCallbacks.clear(),Sc.legacyMessageIdsToUuidMap={},dc.clearMessages(),ec()}function Ec(e,t,...n){return Oc(e,t,n).then(([e])=>e)}function Ic(e,t,...n){return Oc(e,t,n).then(([e,t])=>{if(!e)throw new Error(t)})}function Pc(e,t,n,...r){return Oc(e,t,r).then(([e,t])=>{if(!e)throw new Error(t||n)})}function Tc(e,t,...n){return Oc(e,t,n).then(([e,t])=>{if(e)throw e;return t})}function Oc(e,t,n=void 0){if(!ir(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(Nc(Bc(e,t,n).uuid))})}function Rc(e){return e.map(e=>Pr(e)?e.serialize():e)}function Fc(e,t,n,r,o){var i;return wc(this,void 0,void 0,function*(){const a=Rc(t),[s]=yield Oc(r,e,a);if(o&&o(s)||!o&&Ke(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(`${Be.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}function kc(e,t,n,r){var o;return wc(this,void 0,void 0,function*(){const i=Rc(t),[a]=yield Oc(n,e,i);if(r&&r(a)||!r&&Ke(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Be.INTERNAL_ERROR}, message: Invalid response from host`)})}function Mc(e,t,n=void 0){if(!ir(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 xc(Bc(e,t,n).uuid)}function xc(e){return new Promise((t,n)=>{Sc.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 Nc(e){return new Promise(t=>{Sc.promiseCallbacks.set(e,t)})}function Uc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!ir(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&&Sc.callbacks.set(i.uuid,r)}Sc.parentMessageQueue=[],Sc.topMessageQueue=[],Sc.nextMessageId=0,Sc.callbacks=new Map,Sc.promiseCallbacks=new Map,Sc.portCallbacks=new Map,Sc.legacyMessageIdsToUuidMap={};const Dc=Cc.extend("sendNestedAuthRequestToTopWindow");function Lc(e,t){const n=Dc,r=yc.topWindow,o=su(e,t);return n("Message %s information: %o",Br(o),{actionName:o.func}),_c(r,o)}const Hc=Cc.extend("sendRequestToTargetWindowHelper");function _c(e,t){const n=Hc,r=ou(e),o=Lr(t);if(Xn.isFramelessWindow)yc.currentWindow&&yc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Br(o),r),yc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=ru(e);e&&i?(n("Sending message %s to %s via postMessage",Br(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Br(o),r),nu(e).push(t))}return t}const Vc=Cc.extend("sendMessageToParentHelper");function Bc(e,t,n,r,o){const i=Vc,a=yc.parentWindow,s=au(e,t,n,r,o);return dc.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Br(s),{actionName:t,args:n}),_c(a,s)}const jc=Cc.extend("processIncomingMessage");function Wc(e){return wc(this,void 0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void jc("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 Gc(t,n).then(r=>{r?(Jc(t,n),t!==yc.parentWindow?nc(t,n)&&rc(e,t,Bc,(e,t)=>Sc.callbacks.set(e,t)):Yc(e)):jc("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 zc=Cc.extend("processAuthBridgeMessage");function qc(e,t){var n,r;const o=zc;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?Gc(c,u).then(e=>{e?(yc.topWindow&&!yc.topWindow.closed&&c!==yc.topWindow||(yc.topWindow=c,yc.topOrigin=u),yc.topWindow&&yc.topWindow.closed&&(yc.topWindow=null,yc.topOrigin=null),Wr(yc.topWindow,yc.topOrigin,Sc.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")}).catch(e=>{o("Unexpected error verifying message origin: %o",e)}):o("Message being ignored by app because it is coming for a target that is null")}const $c=Cc.extend("verifyIncomingMessageOrigin");function Gc(e,t){return wc(this,void 0,void 0,function*(){if(yc.currentWindow&&e===yc.currentWindow)return $c("Should not process message because it is coming from the current window"),!1;if(yc.currentWindow&&yc.currentWindow.location&&t&&t===yc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return $c("Message has an invalid origin of %s",t),!1}const n=yield Ra(e);return n||$c("Message has an invalid origin of %s",t),n}})}function Jc(e,t){Xn.isFramelessWindow||yc.parentWindow&&!yc.parentWindow.closed&&e!==yc.parentWindow||(yc.parentWindow=e,yc.parentOrigin=t),yc.parentWindow&&yc.parentWindow.closed&&(yc.parentWindow=null,yc.parentOrigin=null),Wr(yc.parentWindow,yc.parentOrigin,Sc.parentMessageQueue,"parent")}const Kc=Cc.extend("handleIncomingMessageFromParent");function Qc(e){const t=Kc;if(!e.uuid)return Sc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Zc(Sc.callbacks,t);if(n)return n;const r=Zc(Sc.promiseCallbacks,t);if(r)return r;const o=Zc(Sc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Br(e))}function Zc(e,t){if(t){const n=[...e].find(([e,n])=>e.toString()===t.toString());if(n)return n[0]}}function Xc(e,t){const n=Zc(t,e.uuid);n&&t.delete(n),e.uuid?Sc.legacyMessageIdsToUuidMap={}:delete Sc.legacyMessageIdsToUuidMap[e.id]}function Yc(e){const t=Kc,n=Gn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=_r(r),i=Qc(o);if(i){const r=Sc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),dc.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]),eu(e)||(t("Removing registered callback for message %s",i.toString()),Xc(o,Sc.callbacks)));const a=Sc.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()),Xc(o,Sc.promiseCallbacks));const s=Sc.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()),Xc(o,Sc.portCallbacks)}o.uuid&&(Sc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;dc.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Br(r),r.func),xs(r.func,r.args)}else t("Received an unknown message: %O",e)}function eu(e){return!0===e.data.isPartialResponse}function tu(){return yc.topWindow!==yc.parentWindow}function nu(e){return e===yc.topWindow&&tu()?Sc.topMessageQueue:e===yc.parentWindow?Sc.parentMessageQueue:[]}function ru(e){return e===yc.topWindow&&tu()?yc.topOrigin:e===yc.parentWindow?yc.parentOrigin:null}function ou(e){return e===yc.topWindow&&tu()?"top":e===yc.parentWindow?"parent":null}function iu(e,t){let n;n=yc.currentWindow.setInterval(()=>{0===nu(e).length&&(clearInterval(n),t())},100)}function au(e,t,n,r,o){const i=Sc.nextMessageId++,a=new Qn;Sc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Xn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Gn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function su(e,t){const n=Sc.nextMessageId++,r=new Qn;return Sc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Gn(),apiVersionTag:t,args:[],data:e}}const cu="v1";function uu(e){if(!go(e)&&Yr(fr),!go(e)&&!lu())throw Cn;e?Ns(or(cu,"log.request"),"log.request",()=>{const t=e();Uc(or(cu,"log.receive"),"log.receive",[t])}):Us("log.request")}function lu(){return!(!Yr(fr)||!fr.supports.logs)}var du,fu,pu;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(du||(du={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(fu||(fu={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(pu||(pu={}));const gu="v1";function hu(e,t){Yr(fr),Uc(or(gu,"uploadCustomApp"),"uploadCustomApp",[e],t||En())}function mu(e,t,n){Yr(fr),Uc(or(gu,"sendCustomMessage"),e,t,n)}function vu(e,t){if(Yr(fr),!tc())throw new Error("The child window has not yet been initialized or is not present");cc(e,t)}function wu(e,t){Yr(fr),Ns(or(gu,"registerCustomHandler"),e,(...e)=>t.apply(this,e))}function Cu(e,t){Yr(fr),Ns(or(gu,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function yu(e){Yr(fr,pn.content,pn.sidePanel,pn.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,e.messageId,e.callerInfo,e.atpData,e.shareUrl,e.replyChainId];Uc(or(gu,"openFilePreview"),"openFilePreview",t)}const Su="v1";function bu(e){if(Yr(fr,pn.content),!Pu())throw Cn;return kc("contextualSearch.openContextualSearch",[null==e?void 0:e.triggerSource],or(Su,"contextualSearch.openContextualSearch"))}function Au(){if(Yr(fr,pn.content),!Pu())throw Cn;return kc("contextualSearch.closeContextualSearch",[],or(Su,"contextualSearch.closeContextualSearch"))}function Eu(e){Ls(or(Su,"contextualSearch.registerOpenContextualSearchHandler"),"contextualSearchOpened",e,[pn.content],()=>{if(!Pu())throw Cn})}function Iu(e){Ls(or(Su,"contextualSearch.registerCloseContextualSearchHandler"),"contextualSearchClosed",e,[pn.content],()=>{if(!Pu())throw Cn})}function Pu(){return Yr(fr)&&!!fr.supports.contextualSearch}const Tu="v1";function Ou(e){return new Promise(t=>{if(Yr(fr,pn.content),!ku())throw Cn;const n=Ic(or(Tu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Ns(or(Tu,"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&&Ns(or(Tu,"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 Ru(){if(Yr(fr,pn.content),!ku())throw Cn;Uc(or(Tu,"conversations.closeConversation"),"conversations.closeConversation"),Us("startConversation"),Us("closeConversation")}function Fu(){return new Promise(e=>{if(Yr(fr),!ku())throw Cn;e(Ec(or(Tu,"conversations.getChatMember"),"getChatMembers"))})}function ku(){return!(!Yr(fr)||!fr.supports.conversations)}var Mu=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 xu="v2",Nu=rr("copilot");function Uu(){var e;return Yr(fr)&&!!(null===(e=fr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Du(e,t){var n;return void 0===t&&(t=null!==(n=Gn())&&void 0!==n?n:Date.now()),Mu(this,void 0,void 0,function*(){return Yr(fr),Nu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),kc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],or(xu,"copilot.customTelemetry.sendCustomTelemetryData"))})}var Lu=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 Hu="v2",_u=rr("copilot");function Vu(){var e,t;return Yr(fr)&&(!!(null===(e=fr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=fr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Bu(e){var t,n,r;return Lu(this,void 0,void 0,function*(){if(Yr(fr),!Vu())throw new Error(`Error code: ${Cn.errorCode}, message: Not supported on platform`);if((null===(t=fr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return _u("Eligibility information is already available on runtime."),fr.hostVersionsInfo.appEligibilityInformation;_u("Eligibility information is not available on runtime. Requesting from host.");const o=yield Ec(or(Hu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Ke(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(!ju(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=qe.NotAdult),o})}function ju(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,zu,qu,$u,Gu,Ju,Ku,Qu,Zu;!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"}(zu||(zu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(qu||(qu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}($u||($u={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Gu||(Gu={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Ju||(Ju={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Ku||(Ku={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Qu||(Qu={})),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"}(Zu||(Zu={}));class Xu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Yu=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 el="v2";function tl(){var e;return Yr(fr)&&!!(null===(e=fr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function nl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Zu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||Ke(e)}function rl(e){return Yu(this,void 0,void 0,function*(){Yr(fr);return Fc("copilot.sidePanel.getContent",e?[new ul(e)]:[],new sl,or(el,"copilot.sidePanel.getContent"),nl)})}function ol(e){return Yu(this,void 0,void 0,function*(){Yr(fr);return Fc("copilot.sidePanel.preCheckUserConsent",e?[new ll(e)]:[],new cl,or(el,"copilot.sidePanel.preCheckUserConsent"),nl)})}function il(e){Ls(or(el,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[pn.content],()=>{if(!tl())throw al})}const al=new Xu(Zu.NotSupportedOnPlatform,"This API is not supported on the current platform.");class sl extends ra{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class cl extends ra{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class ul{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class ll{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var dl=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 fl="v2";function pl(){var e;return Yr(fr)&&!!(null===(e=fr.supports.copilot)||void 0===e?void 0:e.view)}function gl(){return dl(this,void 0,void 0,function*(){Yr(fr),yield Fc("copilot.view.closeSidePanel",[],new hl,or(fl,"copilot.view.closeSidePanel"))})}class hl extends ra{validate(e){return!0}deserialize(e){return e}}const ml="v2";class vl{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function wl(e){if("object"!=typeof e||null===e)return!1;const t=e;return t.responseType===Sl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Cl="Action.Execute";var yl,Sl,bl,Al;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(yl||(yl={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(Sl||(Sl={}));class El extends ra{validate(e){return wl(e)}deserialize(e){return e}}function Il(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 Pl(e){e.requestType===yl.ActionExecuteInvokeRequest?Tl(e):e.requestType===yl.QueryMessageExtensionRequest&&Ol(e)}function Tl(e){if(e.type!==Cl){throw{errorCode:bl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Cl}"`}}if(!Jn(e.data)){throw{errorCode:bl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Ol(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 Rl(e,t,n){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;const r=new po(e);return Pl(n),Oc(or(ml,"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 Fl(e,t){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;const n=new po(e);return Oc(or(ml,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([e,t])=>{if(!e)throw t})}function kl(e,t,n){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;const r=new po(e);return Pl(n),Oc(or(ml,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then(([e,t])=>{if(e&&null!=t.responseType)return t;throw t})}function Ml(e,t,n){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;return _n(e,new Error("titleId is Invalid.")),_n(t,new Error("oauthConfigId is Invalid.")),Oc(or(ml,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([e,t])=>{if(!e)throw t})}function xl(e,t,n){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;return _n(e,new Error("titleId is Invalid.")),t&&Vn(t),Oc(or(ml,"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(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(bl||(bl={}));class Nl{constructor(e){this.param=e}serialize(){var e,t,n;return{connectorId:this.param.connectorId,oAuthConfigId:this.param.oAuthConfigId,traceId:null!==(n=null===(t=null===(e=this.param.traceId)||void 0===e?void 0:e.toString)||void 0===t?void 0:t.call(e))&&void 0!==n?n:this.param.traceId,windowParameters:this.param.windowParameters?Object.assign({},this.param.windowParameters):void 0}}}function Ul(e){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;return _n(e.connectorId,new Error("connectorId is Invalid.")),_n(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),kc("externalAppAuthentication.authenticateWithConnector",[new Nl(e)],or(ml,"externalAppAuthentication.authenticateWithConnector"),Il)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(Al||(Al={}));class Dl extends ra{validate(e){return"string"==typeof e&&e in Al}deserialize(e){return e}}function Ll(e){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;return _n(e.connectorId,new Error("connectorId is Invalid.")),_n(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),Fc("externalAppAuthentication.getUserAuthenticationStateForConnector",[new Nl(e)],new Dl,or(ml,"externalAppAuthentication.getUserAuthenticationStateForConnector"),Il)}function Hl(e){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;return _n(e.connectorId,new Error("connectorId is Invalid.")),_n(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),kc("externalAppAuthentication.disconnectConnector",[new Nl(e)],or(ml,"externalAppAuthentication.disconnectConnector"),Il)}function _l(){return!(!Yr(fr)||!fr.supports.externalAppAuthentication)}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 Bl="v2";function jl(e,t,n){return Vl(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!$l())throw Cn;return Gl(e,t),kc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],or(Bl,"externalAppAuthenticationForCEA.authenticateWithSSO"),Il)})}function Wl(e,t,n){return Vl(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!$l())throw Cn;return Gl(e,t),kc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],or(Bl,"externalAppAuthenticationForCEA.authenticateWithOauth"),Il)})}function zl(e,t,n,r){return Vl(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!$l())throw Cn;return Gl(e,t),Tl(r),Fc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new vl(r),n.url.href,n.width,n.height,n.isExternal],new El,or(Bl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Il)})}function ql(e,t,n,r){return Vl(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!$l())throw Cn;return Gl(e,t),Tl(r),Fc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new vl(r),n.authId,n.connectionName,n.claims,n.silent],new El,or(Bl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Il)})}function $l(){return!(!Yr(fr)||!fr.supports.externalAppAuthenticationForCEA)}function Gl(e,t){_n(t,new Error("conversation id is not valid.")),lo(e)}const Jl="v2";var Kl,Ql;function Zl(e,t){if(Yr(fr,pn.content,pn.sidePanel),!Yl())throw Cn;const n=new po(e);return Oc(or(Jl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([e,t])=>{if(!e)throw t})}function Xl(e,t,n){if(Yr(fr,pn.content,pn.sidePanel),!Yl())throw Cn;const r=new po(e);return Oc(or(Jl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([e,t])=>{if(e)throw e;return t})}function Yl(){return!(!Yr(fr)||!fr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Kl||(Kl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Ql||(Ql={}));var ed=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 td="v2";function nd(e,t,n){return ed(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!od())throw Cn;Gl(e,t);const[r,o]=yield Oc(or(td,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function rd(e,t,n){return ed(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!od())throw Cn;Gl(e,t);const r=yield Ec(or(td,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function od(){return!(!Yr(fr)||!fr.supports.externalAppCardActionsForCEA)}var id;function ad(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(id).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(id||(id={}));var sd=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 cd="v2";function ud(e,t,n){return sd(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!ld())throw Cn;return dd(e,n),kc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new fd(t),n],or(cd,"externalAppCardActionsForDA.processActionOpenUrlDialog"),ad)})}function ld(){return!(!Yr(fr)||!fr.supports.externalAppCardActionsForDA)}function dd(e,t){lo(e),Zn(t)}class fd{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var pd=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 gd="v2";function hd(e,t,n){return pd(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!md())throw Cn;const r=new po(e),[o,i]=yield Oc(or(gd,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function md(){return!(!Yr(fr)||!fr.supports.externalAppCommands)}const vd="v1";var wd,Cd,yd,Sd,bd,Ad;function Ed(e,t){if(Yr(fr,pn.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");Uc(or(vd,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Id(e,t){if(Yr(fr,pn.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");Uc(or(vd,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Pd(e,t,n){if(Yr(fr,pn.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");Uc(or(vd,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Td(e,t,n){if(Yr(fr,pn.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");Uc(or(vd,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Od(e,t,n){if(Yr(fr,pn.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");Uc(or(vd,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Rd(e=!1,t){if(Yr(fr,pn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Uc(or(vd,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Fd(e,t,n,r,o=!1,i){if(Yr(fr,pn.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");Uc(or(vd,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function kd(e){if(Yr(fr,pn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Uc(or(vd,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Md(e=void 0,t){if(Yr(fr,pn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Uc(or(vd,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function xd(e){if(Yr(fr,pn.content),!e)throw jd(Be.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Uc(or(vd,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Nd(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw jd(Be.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Uc(or(vd,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Ud(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw jd(Be.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Uc(or(vd,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Dd(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw jd(Be.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Uc(or(vd,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Ld(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw jd(Be.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Uc(or(vd,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Hd(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw jd(Be.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Uc(or(vd,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function _d(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw jd(Be.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw jd(Be.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Uc(or(vd,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Vd(e){if(Yr(fr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Ns(or(vd,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Bd(e){if(Yr(fr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Ns(or(vd,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function jd(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"}(wd||(wd={})),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"}(Cd||(Cd={})),function(e){e.ClassMaterials="classMaterials"}(yd||(yd={})),function(e){e.Readonly="readonly"}(Sd||(Sd={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(bd||(bd={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Ad||(Ad={}));const Wd="v1";function zd(){return new Promise(e=>{if(Yr(fr),!Jd())throw Cn;e(Tc(or(Wd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function qd(e){return new Promise(t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Yr(fr),!Jd())throw Cn;t(Tc(or(Wd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function $d(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Yr(fr),!Jd())throw Cn;Ns(or(Wd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{Yr(fr),e(t)})}function Gd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Yr(fr),!Jd())throw Cn;Ns(or(Wd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{Yr(fr),e(t)})}function Jd(){return!(!Yr(fr)||!fr.supports.meetingRoom)}function Kd(){return!(!Yr(fr)||!fr.supports.messageChannels)}const Qd="1.0.1",Zd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void af("Invalid message format, ignoring. Message: %o",e);if(!nf(e.source,e.origin))return void af("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return sf("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void af("Invalid response format, ignoring. Message: %o",e);t(r)}};let Xd=null,Yd=!1;function ef(e,t,n=!1){if(Yd=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.`);Xd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void af("Nested App Auth Bridge is already present");const o=tf(r);o&&(r.nestedAppAuthBridge=o)}function tf(e){const t=new WeakMap,{onMessage:n}=Zd,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 af(`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=rf(t);if(e===e.top||!Xd)return void sf("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Xd)}}catch(e){return void sf("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 nf(e,t){if(t===Xd)try{return"https:"===new URL(t).protocol}catch(e){return sf("Invalid message origin URL:",e),!1}return!1}function rf(e){const t=Date.now();return{id:of(),uuid:cn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function of(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function af(...e){Yd&&console.log(...e)}function sf(...e){Yd&&console.error(...e)}const cf="v1";function uf(e){if(Yr(fr,pn.content),!lf())throw Cn;Uc(or(cf,"notifications.showNotification"),"notifications.showNotification",[e])}function lf(){return!(!Yr(fr)||!fr.supports.notifications)}const df="v2";function ff(e){if(!hf())throw new Error(Be.NOT_SUPPORTED_ON_PLATFORM.toString());if(go(e))throw new Error(Be.INVALID_ARGUMENTS.toString());Ns(or(df,"otherApp.install"),"otherApp.install",e)}function pf(){if(!hf())throw new Error(Be.NOT_SUPPORTED_ON_PLATFORM.toString());Uc(or(df,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Us("otherApp.install")}function gf(e){if(!hf())throw new Error(Be.NOT_SUPPORTED_ON_PLATFORM.toString());return kc("otherApp.notifyInstallCompleted",[e.toString()],or(df,"otherApp.notifyInstallCompleted"))}function hf(){return!(!Yr(fr)||!fr.supports.otherAppStateChange)}var mf=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 vf="v2";function wf(){return Yr(fr)&&!!fr.supports.plugins}function Cf(e){return mf(this,void 0,void 0,function*(){if(Yr(fr),!e.func)throw new Error("func is required in PluginMessage.");return kc("plugins.sendMessage",[new Sf(e)],or(vf,"plugins.sendMessage"))})}function yf(e){Ls(or(vf,"plugins.receiveMessage"),"plugins.receiveMessage",(...t)=>{e(bf(t))},Object.values(pn),()=>{if(!wf())throw new Error("Receiving plugin messages is not supported in the current host.")})}class Sf{constructor(e){this.message=e}serialize(){return this.message}}function bf(e){if(1===e.length&&Af(e[0]))return e[0];const[t,n,r]=e;return{func:"string"==typeof t?t:String(null!=t?t:""),args:n,correlationId:"string"==typeof r?r:void 0}}function Af(e){if(!e||"object"!=typeof e)return!1;return"string"==typeof e.func}const Ef="v1";var If,Pf,Tf;function Of(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Yr(fr,pn.sidePanel),!Df())throw Cn;Uc(or(Ef,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Rf(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(Yr(fr,pn.sidePanel),!Df())throw Cn;Uc(or(Ef,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Ff(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(Yr(fr,pn.sidePanel),!Df())throw Cn;Uc(or(Ef,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function kf(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Yr(fr,pn.sidePanel),!Df())throw Cn;Uc(or(Ef,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Mf(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Yr(fr,pn.sidePanel),!Df())throw Cn;Ns(or(Ef,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function xf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Yr(fr,pn.sidePanel),!Df())throw Cn;Ns(or(Ef,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Nf(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Yr(fr,pn.sidePanel),!Df())throw Cn;Ns(or(Ef,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Uf(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Yr(fr,pn.sidePanel),!Df())throw Cn;Ns(or(Ef,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Df(){return!(!Yr(fr)||!fr.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"}(If||(If={})),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"}(Pf||(Pf={})),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"}(Tf||(Tf={}));const Lf="v1";function Hf(e,t,n,r){if(Yr(fr,pn.content),!_f())throw Cn;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");Uc(or(Lf,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function _f(){return!(!Yr(fr)||!fr.supports.appEntity)}const Vf="v1";function Bf(e){return new Promise(t=>{if(Yr(fr),!jf())throw Cn;if((Xn.hostClientType===dn.android||Xn.hostClientType===dn.teamsRoomsAndroid||Xn.hostClientType===dn.teamsPhones||Xn.hostClientType===dn.teamsDisplays)&&!eo(tt)){const e={errorCode:Be.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Ec(or(Vf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function jf(){return!(!Yr(fr)||!fr.supports.teams)&&(!!fr.supports.teams.fullTrust&&!!fr.supports.teams.fullTrust.joinedTeams)}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 zf="v1";function qf(e){return Wf(this,void 0,void 0,function*(){if(Yr(fr),!$f())throw Cn;return Fc("getConfigSetting",[e],new oa,or(zf,"teams.fullTrust.getConfigSetting"))})}function $f(){return!(!Yr(fr)||!fr.supports.teams)&&!!fr.supports.teams.fullTrust}const Gf="v1";var Jf;function Kf(e,t){if(Yr(fr,pn.content),!Zf())throw Cn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Uc(or(Gf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Qf(e,t){if(Yr(fr),!Zf())throw Cn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Uc(or(Gf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Zf(){return!(!Yr(fr)||!fr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Jf||(Jf={}));class Xf{static setTimeout(e,t){const n=performance.now(),r=Pn();return Xf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Xf.setTimeoutCallbacks[e]}static setInterval(e,t){Xf.setTimeout(function n(){e(),Xf.setTimeout(n,t)},t)}static tick(){const e=performance.now(),t=[];for(const n in Xf.setTimeoutCallbacks){const r=Xf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Xf.setTimeoutCallbacks[e].callback(),delete Xf.setTimeoutCallbacks[e]}}}Xf.setTimeoutCallbacks={};class Yf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Xf.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&&Xf.clearTimeout(this.timeoutId),this.timeoutId=Xf.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(Yf.maxSessionTimeoutInMs,2*t.timeoutInMs):Yf.initialSessionTimeoutInMs}}Yf.initialSessionTimeoutInMs=1e3,Yf.maxSessionTimeoutInMs=3e4;const ep="v2";class tp{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Yf(tp.distributionBinSize,e=>this.reportPerformanceEvent(or(ep,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e]))}startMonitorSlowFrameProcessing(){Xf.setInterval(()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(or(ep,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},tp.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){Xf.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(or(ep,"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(or(ep,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}tp.distributionBinSize=1e3,tp.calculateFPSInterval=1e3;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())})},rp=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 op="v2",ip=Hn()?void 0:new tp(Uc);var ap,sp,cp;function up(e){if(Yr(fr,pn.sidePanel),!gp())throw Cn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Ns(or(op,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==ip?void 0:ip.setFrameProcessTimeLimit(e.timeLimit),!1),Cp())hp(e.videoFrameHandler,e.config);else{if(!Sp())throw Cn;vp(e.videoBufferHandler,e.config)}null==ip||ip.startMonitorSlowFrameProcessing()}function lp(e,t){if(Yr(fr,pn.sidePanel),!gp())throw Cn;Uc(or(op,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function dp(e){if(Yr(fr,pn.sidePanel),!gp())throw Cn;Ns(or(op,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",xp(e,ip),!1),Uc(or(op,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function fp(e){Uc(or(op,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function pp(e){Uc(or(op,"videoEffects.notifyError"),"video.notifyError",[e])}function gp(){return Yr(fr)&&!!fr.supports.video&&(!!fr.supports.video.mediaStream||!!fr.supports.video.sharedFrame)}function hp(e,t){if(Yr(fr,pn.sidePanel),!gp()||!Cp())throw Cn;Ns(or(op,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>np(this,void 0,void 0,function*(){const{streamId:n}=t,r=mp(e,ip);yield Ep(n,r,pp,ip)}),!1),Uc(or(op,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function mp(e,t){return n=>np(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 vp(e,t){if(Yr(fr,pn.sidePanel),!gp()||!Sp())throw Cn;Ns(or(op,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",t=>{if(t){const n=t.timestamp;null==ip||ip.reportStartFrameProcessing(t.width,t.height),e(wp(t),()=>{null==ip||ip.reportFrameProcessed(),fp(n)},pp)}},!1),Uc(or(op,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function wp(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=rp(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Cp(){var e;return Yr(fr,pn.sidePanel)&&yp()&&!!(null===(e=fr.supports.video)||void 0===e?void 0:e.mediaStream)}function yp(){var e,t,n,r;return!(!(null===(t=null===(e=Ln().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Ln().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Sp(){var e;return Yr(fr,pn.sidePanel)&&!!(null===(e=fr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(ap||(ap={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(sp||(sp={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(cp||(cp={}));var bp=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 Ap="v2";function Ep(e,t,n,r){var o,i;return bp(this,void 0,void 0,function*(){const a=Tp();!Hn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Op(yield Pp(e,n,r),new Rp(n,t),a.writable)})}function Ip(e,t,n,r){var o,i;return bp(this,void 0,void 0,function*(){const a=Tp();!Hn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Op(yield Pp(e,n,r),new Mp(n,t),a.writable)})}function Pp(e,t,n){return bp(this,void 0,void 0,function*(){if(Hn())throw Cn;const r=Ln().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 Tp(){if(Hn())throw Cn;const e=window.MediaStreamTrackGenerator;if(!e)throw Cn;return new e({kind:"video"})}function Op(e,t,n){new(0,Ln().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Rp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>bp(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 Fp{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 kp{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 Mp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>bp(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=>bp(this,void 0,void 0,function*(){if(Hn())throw Cn;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 Fp(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 kp(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}}}),Ns(or(Ap,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e})}}function xp(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{null==t||t.reportVideoEffectChanged(n||"",r),Uc(or(Ap,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(e=>{const t=e in cp?e:cp.InitializationFailure;Uc(or(Ap,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])})}}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 Up="v2",Dp=2e3,Lp=Hn()?void 0:new tp(Uc);var Hp;function _p(e){var t,n;if(!$p())throw Cn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Yr(fr,pn.sidePanel)){if(Ns(or(Up,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Lp?void 0:Lp.setFrameProcessTimeLimit(e),!1),null===(t=fr.supports.video)||void 0===t?void 0:t.mediaStream)Ns(or(Up,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>Np(this,void 0,void 0,function*(){const{streamId:n,metadataInTexture:r}=t,o=Lp?Bp(e.videoFrameHandler,Lp):e.videoFrameHandler;r?yield Ip(n,o,Jp,Lp):yield Ep(n,o,Jp,Lp)}),!1),Uc(or(Up,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=fr.supports.video)||void 0===n?void 0:n.sharedFrame))throw Cn;Ns(or(Up,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",t=>{if(t){null==Lp||Lp.reportStartFrameProcessing(t.width,t.height);const n=Vp(),r=t.timestamp;e.videoBufferHandler(jp(t),()=>{n(),null==Lp||Lp.reportFrameProcessed(),Gp(r)},Jp)}},!1),Uc(or(Up,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Lp||Lp.startMonitorSlowFrameProcessing()}}function Vp(){const e=setTimeout(()=>{Jp(`Frame not processed in ${Dp}ms`,Hp.Warn)},Dp);return function(){clearTimeout(e)}}function Bp(e,t){return n=>Np(this,void 0,void 0,function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Vp(),i=yield e(n);return o(),t.reportFrameProcessed(),i})}function jp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Wp(e,t,n){if(Yr(fr,pn.sidePanel),!$p())throw Cn;Uc(or(Up,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function zp(e){if(Yr(fr,pn.sidePanel),!$p())throw Cn;Ns(or(Up,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",xp(e,Lp),!1),Uc(or(Up,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function qp(e){if(Yr(fr,pn.sidePanel),!gp())throw Cn;Uc(or(Up,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function $p(){return Yr(fr),gp()}function Gp(e){Uc(or(Up,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Jp(e,t=Hp.Warn){Uc(or(Up,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Kp(e){if(Yr(fr),!gp())throw Cn;Jp(e,Hp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Hp||(Hp={}));const Qp="v2";class Zp extends ra{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Xp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Yp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class eg extends ra{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class tg{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class ng extends ra{validate(e){const t=new eg;let n=!0;return e.allTabs&&e.allTabs.forEach(e=>{n||(n=t.validate(e))}),n}deserialize(e){return e}}function rg(e,t){if(Yr(fr),!cg())throw new Error(`Error code: ${Be.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(ug(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Be.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Fc("hostEntity.tab.addAndConfigure",[new Yp(e),t],new eg,or(Qp,"hostEntity.tab.addAndConfigure"))}function og(e){if(Yr(fr),!cg())throw new Error(`Error code: ${Be.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return ug(e.threadId),Fc("hostEntity.tab.getAll",[new Yp(e)],new ng,or(Qp,"hostEntity.tab.getAll"))}function ig(e,t){if(Yr(fr),!cg())throw new Error(`Error code: ${Be.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return lg(e),ug(t.threadId),Fc("hostEntity.tab.reconfigure",[new Xp(e),new Yp(t)],new Zp,or(Qp,"hostEntity.tab.reconfigure"))}function ag(e,t){if(Yr(fr),!cg())throw new Error(`Error code: ${Be.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return lg(e),ug(t.threadId),Fc("hostEntity.tab.rename",[new Xp(e),new Yp(t)],new Zp,or(Qp,"hostEntity.tab.rename"))}function sg(e,t){if(Yr(fr),!cg())throw new Error(`Error code: ${Be.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return ug(t.threadId),lg(e),Fc("hostEntity.tab.remove",[new tg(e),new Yp(t)],new oa,or(Qp,"hostEntity.tab.remove"))}function cg(){var e;return!!(Yr(fr)&&fg()&&(null===(e=fr.supports.hostEntity)||void 0===e?void 0:e.tab))}function ug(e){if(!e||0==e.length)throw new Error(`Error code: ${Be.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function lg(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Be.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var dg;function fg(){return!(!Yr(fr)||!fr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(dg||(dg={}));var pg=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 gg="v2",hg="Invalid store dialog size",mg="No App Id present, but AppId needed to open AppDetail store",vg="No Collection Id present, but CollectionId needed to open a store specific to a collection";function wg(e){return pg(this,void 0,void 0,function*(){Ag();const{size:t}=null!=e?e:{};return kc("store.openFullStore",[Eg(t)],or(gg,"store.openFullStore"))})}function Cg(e){return pg(this,void 0,void 0,function*(){Ag();const{size:t,appId:n}=e;if(!(n instanceof po))throw new Error(mg);return kc("store.openAppDetail",[Eg(t),n],or(gg,"store.openAppDetail"))})}function yg(e){return pg(this,void 0,void 0,function*(){Ag();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return kc("store.openInContextStore",[Eg(t),n,r,o,null==i?void 0:i.map(e=>e.toString())],or(gg,"store.openInContextStore"))})}function Sg(e){return pg(this,void 0,void 0,function*(){Ag();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(vg);return kc("store.openSpecificStore",[Eg(t),n],or(gg,"store.openSpecificStore"))})}function bg(){return Yr(fr)&&!!fr.supports.store}function Ag(){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!bg())throw Cn}function Eg(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(hg);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(hg);return JSON.stringify(e)}var Ig=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 Pg="v1",Tg=rr("widgetHosting");function Og(){return Yr(fr)&&!!fr.supports.widgetHosting}function Rg(e,t){return Ig(this,void 0,void 0,function*(){return Xr(),Tg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),Fc("widgetHosting.callTool",[new Vg(e,t)],new Hg,or(Pg,"widgetHosting.callTool"),Ke)})}function Fg(e,t){return Ig(this,void 0,void 0,function*(){return Xr(),Tg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),kc("widgetHosting.sendFollowUpMessage",[new Bg(e,t)],or(Pg,"widgetHosting.sendFollowUpMessage"))})}function kg(e,t){return Ig(this,void 0,void 0,function*(){return Xr(),Tg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),kc("widgetHosting.requestDisplayMode",[new jg(e,t)],or(Pg,"widgetHosting.requestDisplayMode"))})}function Mg(e,t){return Ig(this,void 0,void 0,function*(){return Xr(),Tg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),Fc("widgetHosting.requestModal",[new $g(e,t)],new _g,or(Pg,"widgetHosting.requestModal"),Ke)})}function xg(e,t){Xr(),Tg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),kc("widgetHosting.notifyIntrinsicHeight",[new qg(e,t)],or(Pg,"widgetHosting.notifyIntrinsicHeight"))}function Ng(e,t,n){Xr(),Tg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),kc("widgetHosting.contentSizeChanged",[new Gg(e,t,n)],or(Pg,"widgetHosting.contentSizeChanged"))}function Ug(e,t){return Ig(this,void 0,void 0,function*(){return Xr(),Tg("Setting widget state with widgetId: ",{widgetId:e,state:t}),kc("widgetHosting.setWidgetState",[new zg(e,t)],or(Pg,"widgetHosting.setWidgetState"))})}function Dg(e,t){Xr(),Tg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),kc("widgetHosting.openExternal",[new Wg(e,t)],or(Pg,"widgetHosting.openExternal"))}function Lg(e){Ls(or(Pg,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!Og())throw new Error("Widget Hosting is not supported on this platform")})}class Hg extends ra{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class _g extends ra{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Vg{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class Bg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class jg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class Wg{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class zg{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class qg{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class $g{constructor(e,t){this.widgetId=e,this.options=t}serialize(){return{widgetId:this.widgetId,id:this.options.id,title:this.options.title,content:this.options.content,width:this.options.width,height:this.options.height}}}class Gg{constructor(e,t,n){this.widgetId=e,this.width=t,this.height=n}serialize(){return{widgetId:this.widgetId,width:this.width,height:this.height}}}var Jg=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 Kg="v1",Qg="v2";let Zg;function Xg(e){Zg=e}function Yg(e){const t=void 0!==e,n=t?e:Zg;if(!n)throw new Error("No parameters are provided for authentication");Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.remove,pn.task,pn.stage,pn.meetingStage);return eh(n.successCallback||n.failureCallback?or(Kg,"authentication.authenticate"):or(Qg,"authentication.authenticate"),n).then(e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Zg=void 0)}}).catch(e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Zg=void 0)}})}function eh(e,t){return Jg(this,void 0,void 0,function*(){const n=Bn(t.url);return Vn(n),Oc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then(([e,t])=>{if(e)return t;throw new Error(t)})})}function th(e){Xr();return nh(e&&(e.successCallback||e.failureCallback)?or(Kg,"authentication.getAuthToken"):or(Qg,"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 nh(e,t){return new Promise(n=>{n(Oc(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 rh(e){Xr();return oh(e&&(e.successCallback||e.failureCallback)?or(Kg,"authentication.getUser"):or(Qg,"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 oh(e){return new Promise(t=>{t(Oc(e,"authentication.getUser"))}).then(([e,t])=>{if(e)return t;throw t})}function ih(e,t){Yr(fr,pn.authentication);Uc(or(t?Kg:Qg,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),iu(yc.parentWindow,()=>setTimeout(()=>yc.currentWindow.close(),200))}function ah(e,t){Yr(fr,pn.authentication);Uc(or(t?Kg:Qg,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),iu(yc.parentWindow,()=>setTimeout(()=>yc.currentWindow.close(),200))}var sh;function ch(){return Yr(fr)&&!!fr.supports.appPerformanceMetrics}function uh(e){Yr(fr),Ns(or("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}function lh(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"}(sh||(sh={}));class dh{constructor(e){this.val=e,lh(e)}toString(){return this.val}}const fh="/l/app/",ph="/l/meeting/new",gh="attendees",hh="startTime",mh="endTime",vh="subject",wh="content",Ch="/l/call/0/0",yh="source",Sh="withVideo",bh="/l/chat/0/0",Ah="users",Eh="topicName",Ih="message";function Ph(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Ah}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${Eh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Ih}=${encodeURIComponent(n)}`;return`${lt}://${dt}${bh}?${r}${o}${i}`}function Th(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Ah}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${Sh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${yh}=${encodeURIComponent(n)}`;return`${lt}://${dt}${Ch}?${r}${o}${i}`}function Oh(e,t,n,r,o){const i=void 0===e?"":`${gh}=`+e.map(e=>encodeURIComponent(e)).join(","),a=void 0===t?"":`&${hh}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${mh}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${vh}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${wh}=${encodeURIComponent(o)}`;return`${lt}://${dt}${ph}?${i}${a}${s}${c}${u}`}function Rh(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${lt}://${dt}${fh}${encodeURIComponent(e)}`}const Fh="v1";function kh(e){return new Promise(t=>{if(Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage),!Mh())throw new Error("Not supported");const n=or(Fh,"appInstallDialog.openAppInstallDialog");fr.isLegacyTeams?t(Ic(n,"executeDeepLink",Rh(e.appId))):(Uc(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function Mh(){return!(!Yr(fr)||!fr.supports.appInstallDialog)}const xh="v1",Nh=rr("media");var Uh,Dh,Lh,Hh,_h,Vh,Bh;!function(e){e.Base64="base64",e.ID="id"}(Uh||(Uh={}));class jh{}function Wh(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Yr(fr,pn.content,pn.task),!Xn.isFramelessWindow){return void e({errorCode:Be.NOT_SUPPORTED_ON_PLATFORM},[])}if(!eo(ot)){return void e({errorCode:Be.OLD_PLATFORM},[])}Uc(or(xh,"media.captureImage"),"captureImage",e)}function zh(){if(Yr(fr,pn.content,pn.task),!$h())throw Cn;const e=je.Media;return new Promise(t=>{t(Tc(or(xh,"media.hasPermission"),"permissions.has",e))})}function qh(){if(Yr(fr,pn.content,pn.task),!$h())throw Cn;const e=je.Media;return new Promise(t=>{t(Tc(or(xh,"media.requestPermission"),"permissions.request",e))})}function $h(){return!(!Yr(fr)||!fr.supports.permissions)}class Gh extends jh{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(Yr(fr,pn.content,pn.task),!eo(it)){return void e({errorCode:Be.OLD_PLATFORM},new Blob)}if(!sm(this.mimeType,this.format,this.content)){return void e({errorCode:Be.INVALID_ARGUMENTS},new Blob)}eo("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e)}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Uc(or(xh,"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=Yh(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=em(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Nh(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Be.INTERNAL_ERROR,message:"data received is null"},new Blob)})}getMediaViaHandler(e){const t=Pn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!go(e)&&Uc(or(xh,"media.getMedia"),"getMedia",r),Ns(or(xh,"media.registerGetMediaRequestHandler"),"getMedia"+t,function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Us("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Yh(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Us("getMedia"+t)}else{const e=em(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Be.INTERNAL_ERROR,message:"data received is null"},new Blob),Us("getMedia"+t)}})}}class Jh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Yr(fr,pn.content,pn.task);try{no(Ye)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Uc(or(xh,"media.controller"),"media.controller",[n],e=>{t&&t(e)})}stop(e){this.notifyEventToHost(Dh.StopRecording,e)}}class Kh extends Jh{getMediaType(){return _h.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Dh.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Qh(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Yr(fr,pn.content,pn.task),!eo(it)){const e={errorCode:Be.OLD_PLATFORM};return void t(e,[])}try{tm(e)}catch(e){return void t(e,[])}if(!rm(e)){const e={errorCode:Be.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Uc(or(xh,"media.selectMedia"),"selectMedia",n,(n,r,o)=>{var i,a;if(o)return void(nm(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 Gh(e));t(n,s)})}function Zh(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Yr(fr,pn.content,pn.task),!eo(it)){return void t({errorCode:Be.OLD_PLATFORM})}if(!cm(e)){return void t({errorCode:Be.INVALID_ARGUMENTS})}const n=[e];Uc(or(xh,"media.viewImages"),"viewImages",n,t)}function Xh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Yr(fr,pn.content,pn.task),Xn.hostClientType===dn.desktop||Xn.hostClientType===dn.web||Xn.hostClientType===dn.rigel||Xn.hostClientType===dn.teamsRoomsWindows||Xn.hostClientType===dn.teamsRoomsAndroid||Xn.hostClientType===dn.teamsPhones||Xn.hostClientType===dn.teamsDisplays){return void e({errorCode:Be.NOT_SUPPORTED_ON_PLATFORM},"")}if(!eo(at)){return void e({errorCode:Be.OLD_PLATFORM},"")}if(!um(t)){return void e({errorCode:Be.INVALID_ARGUMENTS},"")}Uc(or(xh,"media.scanBarCode"),"media.scanBarCode",[t],e)}function Yh(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 em(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 tm(e){im(e)?no(Xe):am(e)?no(Ye):om(e)&&no(et)}function nm(e){return!(e.mediaType!=_h.Video||!e.videoProps||!e.videoProps.videoController)}function rm(e){return!(null==e||e.maxMediaCount>10)}function om(e){var t;return!((null==e?void 0:e.mediaType)!=_h.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function im(e){return!(!e||e.mediaType!=_h.VideoAndImage&&!e.videoAndImageProps)}function am(e){return!(!e||e.mediaType!=_h.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function sm(e,t,n){return null!=e&&null!=t&&t==Uh.ID&&null!=n}function cm(e){return!(null==e||e.length<=0||e.length>10)}function um(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function lm(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"}(Dh||(Dh={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Lh||(Lh={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Hh||(Hh={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(_h||(_h={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Vh||(Vh={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Bh||(Bh={}));const dm="v2";function fm(e){return new Promise(t=>{if(Yr(fr,pn.content,pn.task),!hm())throw Cn;if(!um(e))throw{errorCode:Be.INVALID_ARGUMENTS};t(Tc(or(dm,"barCode.scanBarCode"),"media.scanBarCode",e))})}function pm(){if(Yr(fr,pn.content,pn.task),!hm())throw Cn;const e=je.Media;return new Promise(t=>{t(Tc(or(dm,"barCode.hasPermission"),"permissions.has",e))})}function gm(){if(Yr(fr,pn.content,pn.task),!hm())throw Cn;const e=je.Media;return new Promise(t=>{t(Tc(or(dm,"barCode.requestPermission"),"permissions.request",e))})}function hm(){return!!(Yr(fr)&&fr.supports.barCode&&fr.supports.permissions)}const mm="v2";function vm(e){return wm(or(mm,"chat.openChat"),e)}function wm(e,t){return new Promise(n=>{if(Yr(fr,pn.content,pn.task),!ym())throw Cn;if(fr.isLegacyTeams)n(Ic(e,"executeDeepLink",Ph([t.user],void 0,t.message)));else{n(Ic(e,"chat.openChat",{members:[t.user],message:t.message}))}})}function Cm(e){const t=or(mm,"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(wm(t,r))}else{if(Yr(fr,pn.content,pn.task),!ym())throw Cn;if(fr.isLegacyTeams)n(Ic(t,"executeDeepLink",Ph(e.users,e.topic,e.message)));else{n(Ic(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}})}function ym(){return!(!Yr(fr)||!fr.supports.chat)}var Sm=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 bm="v2";function Am(e){return Sm(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.meetingStage,pn.task,pn.settings,pn.stage,pn.sidePanel),!Tm())throw Cn;if(!e.type||!Object.values(Ge).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Ge)}`);const t=yield Dn(e),n={mimeType:e.type,content:t};return Tc(or(bm,"clipboard.write"),"clipboard.writeToClipboard",n)})}function Em(){return Sm(this,void 0,void 0,function*(){Yr(fr,pn.content,pn.meetingStage,pn.task,pn.settings,pn.stage,pn.sidePanel);const e=or(bm,"clipboard.read");if(!Tm())throw Cn;const t=yield Tc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Un(e.mimeType,e.content)}return t})}function Im(){if(Yr(fr,pn.content,pn.task),!Om())throw Cn;const e=je.ClipboardRead;return Tc(or(bm,"clipboard.hasPermission"),"permissions.has",e)}function Pm(){if(Yr(fr,pn.content,pn.task),!Om())throw Cn;const e=je.ClipboardRead;return Tc(or(bm,"clipboard.requestPermission"),"permissions.request",e)}function Tm(){return Xn.isFramelessWindow?!(!Yr(fr)||!fr.supports.clipboard):!!(Yr(fr)&&navigator&&navigator.clipboard&&fr.supports.clipboard)}function Om(){var e;return Yr(fr)&&!!(null===(e=fr.supports.permissions)||void 0===e?void 0:e.clipboardRead)}var Rm=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",km={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var Mm;function xm(){var e;return null!==(e=Yr(fr)&&(fr.isNAAChannelRecommended||Hm()))&&void 0!==e&&e}function Nm(){return Yr(fr),yc.parentOrigin}function Um(){var e;return null!==(e=Yr(fr)&&fr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Dm(){var e;return null!==(e=Yr(fr)&&(fr.isDeeplyNestedAuthSupported||Lm()))&&void 0!==e&&e}function Lm(){return!!(Yr(fr)&&_m()&&fr.isLegacyTeams&&eo(Cr))}function Hm(){return!!(Yr(fr)&&_m()&&fr.isLegacyTeams&&fr.supports.nestedAppAuth)}function _m(){return Xn.hostClientType===dn.android||Xn.hostClientType===dn.ios||Xn.hostClientType===dn.ipados||Xn.hostClientType===dn.visionOS}function Vm(e){return Rm(this,void 0,void 0,function*(){if(!Um())throw Cn;const t=e.map(Wm);return jm(Mm.ADD,t)})}function Bm(e){return Rm(this,void 0,void 0,function*(){if(!Um())throw Cn;const t=e.map(Wm);return jm(Mm.DELETE,t)})}function jm(e,t){return Rm(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 Fc("nestedAppAuth.manageNAATrustedOrigins",[new zm(e,t)],km,or(Fm,"nestedAppAuth.manageNAATrustedOrigins"))})}function Wm(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"}(Mm||(Mm={}));class zm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const qm="v2";function $m(){if(Yr(fr,pn.content,pn.task),!Jm())throw Cn;return Tc(or(qm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Gm(e){if(Yr(fr,pn.content,pn.task),!Jm())throw Cn;if(!e)throw{errorCode:Be.INVALID_ARGUMENTS};return Tc(or(qm,"geoLocation.showLocation"),"location.showLocation",e)}function Jm(){return!!(Yr(fr)&&fr.supports.geoLocation&&fr.supports.geoLocation.map&&fr.supports.permissions)}const Km="v2";function Qm(){if(Yr(fr,pn.content,pn.task),!Ym())throw Cn;return Tc(or(Km,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Zm(){if(Yr(fr,pn.content,pn.task),!Ym())throw Cn;const e=je.GeoLocation;return new Promise(t=>{t(Tc(or(Km,"geoLocation.hasPermission"),"permissions.has",e))})}function Xm(){if(Yr(fr,pn.content,pn.task),!Ym())throw Cn;const e=je.GeoLocation;return new Promise(t=>{t(Tc(or(Km,"geoLocation.requestPermission"),"permissions.request",e))})}function Ym(){return!!(Yr(fr)&&fr.supports.geoLocation&&fr.supports.permissions)}function ev(){return fr.hostVersionsInfo?fr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const tv="v1";class nv{postMessage(e,t){Yr(fr),Uc(or(tv,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||En())}addEventListener(e,t){Yr(fr),"message"===e&&Ns(or(tv,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class rv{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Yr(fr,pn.task),Uc(or(tv,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||En())}addEventListener(e,t){Yr(fr,pn.task),"message"===e&&Ns(or(tv,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const ov="v2";function iv(e){if(Yr(fr,pn.content),!av())throw Cn;if(!e||!Nn(e))throw{errorCode:Be.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Tc(or(ov,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function av(){return!(!Yr(fr)||!fr.supports.secondaryBrowser)}const sv="v1";function cv(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Yr(fr,pn.content,pn.task),!eo(nt))throw{errorCode:Be.OLD_PLATFORM};if(!e)throw{errorCode:Be.INVALID_ARGUMENTS};if(!lv())throw Cn;Uc(or(sv,"location.getLocation"),"location.getLocation",[e],t)}function uv(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Yr(fr,pn.content,pn.task),!eo(nt))throw{errorCode:Be.OLD_PLATFORM};if(!e)throw{errorCode:Be.INVALID_ARGUMENTS};if(!lv())throw Cn;Uc(or(sv,"location.showLocation"),"location.showLocation",[e],t)}function lv(){return!(!Yr(fr)||!fr.supports.location)}const dv="v2";function fv(){if(Yr(fr,pn.content,pn.task),!gv())throw Cn;return Tc(or(dv,"localNetworkAccess.hasPermission"),"permissions.has",je.LocalNetworkAccess)}function pv(){if(Yr(fr,pn.content,pn.task),!gv())throw Cn;return Tc(or(dv,"localNetworkAccess.requestPermission"),"permissions.request",je.LocalNetworkAccess)}function gv(){var e;return Yr(fr)&&!!(null===(e=fr.supports.permissions)||void 0===e?void 0:e.localNetworkAccess)}const hv="v1";function mv(e){Yr(fr,pn.sidePanel),e.contentUrl&&new URL(e.contentUrl),Uc(or(hv,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var vv=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="v1";var Cv,yv,Sv,bv,Av,Ev;function Iv(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Uc(or(wv,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Pv(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Uc(or(wv,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Tv(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage,pn.settings,pn.content),Uc(or(wv,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Ov(){var e,t,n;return vv(this,void 0,void 0,function*(){let r;Yr(fr,pn.sidePanel,pn.meetingStage,pn.settings,pn.content);try{const e=!0;r=yield Tc(or("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)==bv.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==bv.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Be.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function Rv(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage,pn.task),Uc(or(wv,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Fv(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Yr(fr,pn.sidePanel),Uc(or(wv,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function kv(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Yr(fr,pn.sidePanel),Uc(or(wv,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Mv(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Yr(fr,pn.sidePanel),Uc(or(wv,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function xv(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Yr(fr,pn.sidePanel),Ns(or(wv,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Nv(e,t,n={sharingProtocol:Av.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Uc(or(wv,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Uv(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Uc(or(wv,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Dv(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Uc(or(wv,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Lv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Uc(or(wv,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Hv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Ns(or(wv,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function _v(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Ns(or(wv,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Vv(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Ns(or(wv,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Bv(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Yr(fr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Ev.Other};return Tc(or("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function jv(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");Yr(fr,pn.sidePanel,pn.meetingStage),e.isAppHandlingAudio?Wv(e,t):zv(e,t)}function Wv(e,t){Uc(or(wv,"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");Ns(or(wv,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",t=>vv(this,void 0,void 0,function*(){try{const n=yield e.micMuteStateChangedCallback(t);$v(n,n.isMicMuted===t.isMicMuted?Cv.HostInitiated:Cv.AppDeclinedToChange)}catch(e){$v(t,Cv.AppFailedToChange)}}));Ns(or(wv,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)}),t(r)})}function zv(e,t){Uc(or(wv,"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");Ds("meeting.micStateChanged")&&Us("meeting.micStateChanged"),Ds("meeting.audioDeviceSelectionChanged")&&Us("meeting.audioDeviceSelectionChanged"),t(n)})}function qv(e){$v(e,Cv.AppInitiated)}function $v(e,t){Yr(fr,pn.sidePanel,pn.meetingStage),Uc(or(wv,"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"}(Cv||(Cv={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(yv||(yv={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Sv||(Sv={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(bv||(bv={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Av||(Av={})),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.M365CalendarMeetNow="m365_calendar_meet_now",e.Other="other"}(Ev||(Ev={}));const Gv="v1",Jv="v2";function Kv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=or(Gv,"monetization.openPurchaseExperience")):(r=e,o=or(Jv,"monetization.openPurchaseExperience"));return Yr(fr,pn.content),Fn(()=>new Promise(e=>{if(!Qv())throw Cn;e(Tc(o,"monetization.openPurchaseExperience",r))}),n)}function Qv(){return!(!Yr(fr)||!fr.supports.monetization)}const Zv="v2";function Xv(e){return new Promise(t=>{if(Yr(fr,pn.content),!ew())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(Ic(or(Zv,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function Yv(e){return new Promise(t=>{if(Yr(fr,pn.content),!ew())throw new Error("Not supported");const n=or(Zv,"calendar.composeMeeting");fr.isLegacyTeams?t(Ic(n,"executeDeepLink",Oh(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(Ic(n,"calendar.composeMeeting",e))})}function ew(){return!(!Yr(fr)||!fr.supports.calendar)}const tw="v2";function nw(e){e&&0!==e.length&&e.forEach(e=>{lh(e)})}function rw(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===dw.New&&(nw(t.toRecipients),nw(t.ccRecipients),nw(t.bccRecipients))}function ow(e){if(Yr(fr,pn.content),!iw())throw new Error("Not supported");return rw(e),kc("mail.handoff.composeMail",[new aw(e)],or(tw,"mail.handoff.composeMail"))}function iw(){return!!(Yr(fr)&&fr.supports.mail&&fr.supports.mail.handoff)}class aw{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const sw="v2";function cw(e){return new Promise(t=>{if(Yr(fr,pn.content),!lw())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(Ic(or(sw,"mail.openMailItem"),"mail.openMailItem",e))})}function uw(e){return new Promise(t=>{if(Yr(fr,pn.content),!lw())throw new Error("Not supported");t(Ic(or(sw,"mail.composeMail"),"mail.composeMail",e))})}function lw(){return!(!Yr(fr)||!fr.supports.mail)}var dw;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(dw||(dw={}));const fw="v2";function pw(){if(!Xn.printCapabilityEnabled){if(Yr(fr),!Cw())throw Cn;Xn.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(gw(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function gw(){Ln().print()}function hw(e){mw(or(fw,"teamsAPIs_registerOnLoadHandler"),e,()=>{if(!go(e)&&!Cw())throw Cn})}function mw(e,t,n){!go(t)&&Yr(fr),!go(t)&&n&&n(),zs(e,t)}function vw(e){ww(or(fw,"teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!go(e)&&!Cw())throw Cn})}function ww(e,t,n){!go(t)&&Yr(fr),!go(t)&&n&&n(),Gs(e,t)}function Cw(){return!(!Yr(fr)||!fr.supports.teamsCore)}const yw="v1",Sw="v2";function bw(e,t){let n,r;Yr(fr,pn.content,pn.task,pn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=or(yw,"people.selectPeople")):(r=e,o=or(Sw,"people.selectPeople")),On(Aw,n,o,r)}function Aw(e,t){return new Promise(n=>{if(!eo(rt))throw{errorCode:Be.OLD_PLATFORM};if(!lm(t))throw{errorCode:Be.INVALID_ARGUMENTS};if(!Ew())throw Cn;n(Tc(e,"people.selectPeople",t))})}function Ew(){return!(!Yr(fr)||!fr.supports.people)}function Iw(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?Pw(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Pw(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 Tw="v2";function Ow(e){return Yr(fr,pn.content),new Promise(t=>{const[n,r]=Iw(e);if(!n)throw{errorCode:Be.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(Tc(or(Tw,"profile.showProfile"),"profile.showProfile",o))})}function Rw(){return!(!Yr(fr)||!fr.supports.profile)}const Fw="v2",kw="search.queryChange",Mw="search.queryClose",xw="search.queryExecute";function Nw(e,t,n){if(Yr(fr,pn.content),!Dw())throw Cn;Ns(or(Fw,"search.registerOnClosedHandler"),Mw,e),Ns(or(Fw,"search.registerOnExecutedHandler"),xw,t),n&&Ns(or(Fw,"search.registerOnChangeHandler"),kw,n)}function Uw(){if(Yr(fr,pn.content),!Dw())throw Cn;Uc(or(Fw,"search.unregisterHandlers"),"search.unregister"),Us(kw),Us(Mw),Us(xw)}function Dw(){return!(!Yr(fr)||!fr.supports.search)}function Lw(){return new Promise(e=>{if(Yr(fr,pn.content),!Dw())throw new Error("Not supported");e(Ic(or(Fw,"search.closeSearch"),"search.closeSearch"))})}var Hw=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 _w="v2";function Vw(){return Hw(this,void 0,void 0,function*(){if(Yr(fr,pn.sidePanel,pn.meetingStage),!Bw())throw Cn;return yield Tc(or(_w,"sharing.history.getContent"),"sharing.history.getContent")})}function Bw(){var e;return Yr(fr)&&void 0!==(null===(e=fr.supports.sharing)||void 0===e?void 0:e.history)}const jw="v1",Ww="v2",zw={shareWebContent:"sharing.shareWebContent"};function qw(e,t){try{Gw(e),Jw(e),Qw(e)}catch(e){return Rn(()=>Promise.reject(e),t)}Yr(fr,pn.content,pn.sidePanel,pn.task,pn.stage,pn.meetingStage);return Rn($w,t,or(t?jw:Ww,"sharing.shareWebContent"),e)}function $w(e,t){return new Promise(n=>{if(!Zw())throw Cn;n(Tc(e,zw.shareWebContent,t))})}function Gw(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Be.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Jw(e){let t;if(e.content.some(e=>!e.type))throw t={errorCode:Be.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some(t=>t.type!==e.content[0].type))throw t={errorCode:Be.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Kw(e){if("URL"===e.type){if(!e.url)throw{errorCode:Be.INVALID_ARGUMENTS,message:"URLs are required for URL content types"}}else{if("FILE"!==e.type)throw{errorCode:Be.INVALID_ARGUMENTS,message:"Content type is unsupported"};if(!e.url)throw{errorCode:Be.INVALID_ARGUMENTS,message:"File URLs are required for File content types"}}}function Qw(e){e.content.forEach(Kw)}function Zw(){return!(!Yr(fr)||!fr.supports.sharing)}const Xw="v2";function Yw(e){return new Promise(t=>{if(Yr(fr,pn.content),!eC()||void 0!==e&&!tC())throw Cn;if(void 0!==e&&"string"!=typeof e)throw new Error("[stageView.self.close] Result must be a string");t(Tc(or(Xw,"stageView.self.close"),"stageView.self.close",...void 0===e?[]:[e]))})}function eC(){var e;return Yr(fr)&&void 0!==(null===(e=fr.supports.stageView)||void 0===e?void 0:e.self)}function tC(){var e,t;return Yr(fr)&&!!(null===(t=null===(e=fr.supports.stageView)||void 0===e?void 0:e.self)||void 0===t?void 0:t.closeResult)}const nC="v2";var rC;function oC(e){return new Promise(t=>{if(Yr(fr,pn.content),!iC())throw Cn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Tc(or(nC,"stageView.open"),"stageView.open",e))})}function iC(){return!(!Yr(fr)||!fr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(rC||(rC={}));const aC=10;var sC=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 cC="v2";function uC(e){return sC(this,void 0,void 0,function*(){Yr(fr,pn.content,pn.task),fC(),pC(e);const t=yield Tc(or(cC,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return gC(e.maxVisualMediaCount,t),t})}function lC(e){return sC(this,void 0,void 0,function*(){Yr(fr,pn.content,pn.task),fC(),pC(e);const t=yield Tc(or(cC,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return gC(e.maxVisualMediaCount,t),t})}function dC(){return!!(Yr(fr)&&fr.supports.visualMedia&&fr.supports.visualMedia.image&&fr.supports.permissions)}function fC(){if(!dC())throw Cn}function pC(e){if(!e||e.maxVisualMediaCount>aC||e.maxVisualMediaCount<1)throw bn}function gC(e,t){if(t.length>e)throw An}const hC="v2";var mC,vC;function wC(){if(Yr(fr,pn.content,pn.task),!dC())throw Cn;const e=je.Media;return Tc(or(hC,"visualMedia.hasPermission"),"permissions.has",e)}function CC(){if(Yr(fr,pn.content,pn.task),!dC())throw Cn;const e=je.Media;return Tc(or(hC,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(mC||(mC={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(vC||(vC={}));var yC=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 SC=null;function bC(){return yC(this,void 0,void 0,function*(){return null===SC&&(SC=(yield jo()).app.host.name),SC})}var AC=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 EC(){return AC(this,void 0,void 0,function*(){if(Yr(fr),!PC())throw Cn;return!(!fr.isLegacyTeams||Xn.hostClientType!==dn.android&&Xn.hostClientType!==dn.ios&&Xn.hostClientType!==dn.ipados&&Xn.hostClientType!==dn.visionOS||(yield IC())!==fn.teams)||(yield Ec(or("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function IC(){return AC(this,void 0,void 0,function*(){return bC()})}function PC(){return Yr(fr)&&void 0!==fr.supports.webStorage}const TC="v2";var OC;function RC(e){const t=or(TC,"call.startCall");return new Promise(n=>{var r;if(Yr(fr,pn.content,pn.task),!FC())throw Cn;if(!fr.isLegacyTeams)return Uc(t,"call.startCall",[e],n);n(Ec(t,"executeDeepLink",Th(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(OC.Video),e.source)).then(e=>{if(!e)throw new Error(ht);return e}))})}function FC(){return!(!Yr(fr)||!fr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(OC||(OC={}));const kC="v1";function MC(){ua(or(kC,"appInitialization.notifyAppLoaded"))}function xC(){Uc(or(kC,"appInitialization.notifySuccess"),xo.Success,[Tr])}function NC(e){da(or(kC,"appInitialization.notifyFailure"),e)}function UC(e){la(or(kC,"appInitialization.notifyExpectedFailure"),e)}const DC=rr("thirdPartyCloudStorage"),LC="v2";class HC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let _C=[],VC=null,BC=!0,jC=null;function WC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||""===e){return void t([],{errorCode:Be.INVALID_ARGUMENTS})}if(Yr(fr,pn.content,pn.task),!qC())throw Cn;if(jC)throw jC=null,new Error("getDragAndDropFiles cannot be called twice");jC=t,BC=!0,Uc(or(LC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],zC)}function zC(e){if(jC)if(e&&e.error)jC([],e.error),jC=null;else if(e&&e.fileChunk)try{BC||0!==e.fileChunk.chunkSequence||(DC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),BC=!0,jC([],{errorCode:Be.INTERNAL_ERROR,message:"error occurred while receiving data"}),_C=[],jC=null);const t=em(e.fileChunk,e.fileType);if(t?(VC||(VC=new HC(e.fileType,[])),VC.assembleAttachment.push(t)):(DC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),jC?jC([],{errorCode:Be.INTERNAL_ERROR,message:"error occurred while receiving data"}):jC=null,_C=[],jC=null,BC=!0),BC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&VC){const t=Yh(VC.assembleAttachment,VC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});_C.push(n)}e.isLastFile&&jC&&(jC(_C,e.error),_C=[],jC=null,BC=!0),VC=null}}catch(e){jC&&(jC([],{errorCode:Be.INTERNAL_ERROR,message:e}),_C=[],jC=null,BC=!0)}else jC([],{errorCode:Be.INTERNAL_ERROR,message:"data received is null"}),_C=[],jC=null,BC=!0}function qC(){return!(!Yr(fr)||!fr.supports.thirdPartyCloudStorage)}const $C="v1";function GC(e,t){ca(or($C,"initialize"),t).then(()=>{e&&e()})}function JC(){pw()}function KC(){gw()}function QC(e){Xr(),Uc(or($C,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=Xn.frameContext),e(t)})}function ZC(e){va(or($C,"registerOnThemeChangeHandlerHelper"),e)}function XC(e){Ls(or($C,"registerFullScreenHandler"),"fullScreenChange",e,[])}function YC(e){Ls(or($C,"registerAppButtonClickHandler"),"appButtonClick",e,[pn.content])}function ey(e){Ls(or($C,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[pn.content])}function ty(e){Ls(or($C,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[pn.content])}function ny(e){Ha(or($C,"registerBackButtonHandler"),e)}function ry(e){mw(or($C,"registerOnLoadHandler"),e)}function oy(e){ww(or($C,"registerBeforeUnloadHandler"),e)}function iy(e){Ls(or($C,"registerFocusEnterHandler"),"focusEnter",e,[])}function ay(e){Ls(or($C,"registerChangeSettingsHandler"),"changeSettings",e,[pn.content])}function sy(e,t){Yr(fr),ps(or($C,"getTabInstances"),t).then(t=>{e(t)})}function cy(e,t){Yr(fr),gs(or($C,"getMruTabInstances"),t).then(t=>{e(t)})}function uy(e){hs(or($C,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function ly(e,t){Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage);const n=null!=t?t:En();Ca(or($C,"executeDeepLink"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function dy(e){ms(or($C,"setFrameContext"),e)}function fy(e,t,n){ca(or($C,"initializeWithFrameContext"),n).then(()=>t&&t()),ms(or($C,"setFrameContext"),e)}const py="v1";function gy(e){fs(or(py,"navigation.returnFocus"),e)}function hy(e,t){Yr(fr);const n=null!=t?t:En();ds(or(py,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function my(e,t){Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.remove,pn.task,pn.stage,pn.meetingStage);const n=null!=t?t:En();us(or(py,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function vy(e){Yr(fr);const t=null!=e?e:En();ls(or(py,"navigation.navigateBack")).then(()=>{t(!0)}).catch(e=>{t(!1,e.message)})}const wy="v1";function Cy(e){vs(or(wy,"settings.setValidityState"),e)}function yy(e){Yr(fr,pn.content,pn.settings,pn.remove,pn.sidePanel),ws(or(wy,"settings.getSettings")).then(t=>{e(t)})}function Sy(e,t){Yr(fr,pn.content,pn.settings,pn.sidePanel);const n=null!=t?t:En();Cs(or(wy,"settings.setSettings"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function by(e){Ji(or(wy,"settings.registerOnSaveHandler"),e)}function Ay(e){Qi(or(wy,"settings.registerOnRemoveHandler"),e)}var Ey=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 Iy="v1";function Py(e,t){const n=or(Iy,"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?(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),Uc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?hi(n,Fy(e),r):gi(n,Ry(e),r),new nv}function Ty(e){e=ky(e);const{width:t,height:n}=e,r=Ey(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");pi(or(Iy,"tasks.updateTask"),e)}function Oy(e,t){mi(or(Iy,"tasks.submitTask"),e,t)}function Ry(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:vn.Small,width:e.width?e.width:vn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Fy(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:vn.Small,width:e.width?e.width:vn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function ky(e){return e.height=e.height?e.height:vn.Small,e.width=e.width?e.width:vn.Small,e}const My="v2";var xy,Ny;function Uy(){return!(!Yr(fr,pn.meetingStage,pn.sidePanel,pn.content)||!fr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(xy||(xy={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Ny||(Ny={}));class Dy{getFluidTenantInfo(){return Ly(),new Promise(e=>{e(Tc(or(My,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(e){return Ly(),new Promise(t=>{t(Tc(or(My,"interactive.getFluidToken"),"interactive.getFluidToken",e))})}getFluidContainerId(){return Ly(),new Promise(e=>{e(Tc(or(My,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(e){return Ly(),new Promise(t=>{t(Tc(or(My,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))})}getNtpTime(){return Ly(),new Promise(e=>{e(Tc(or(My,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(e){return Ly(),new Promise(t=>{t(Tc(or(My,"interactive.registerClientId"),"interactive.registerClientId",e))})}getClientRoles(e){return Ly(),new Promise(t=>{t(Tc(or(My,"interactive.getClientRoles"),"interactive.getClientRoles",e))})}getClientInfo(e){return Ly(),new Promise(t=>{t(Tc(or(My,"interactive.getClientInfo"),"interactive.getClientInfo",e))})}static create(){return Ly(),new Dy}}function Ly(){if(!Uy())throw new Error("LiveShareHost Not supported")}var Hy=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 _y(e){try{return e.cartItems=Vy(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Vy(e){return e.map(e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Vy(e.accessories)),e})}const By=e=>{try{return e.map(e=>{const{imageURL:t,accessories:n}=e,r=Hy(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=By(n)),o})}catch(e){throw new Error("Error serializing cart items")}};function jy(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)zy(t),Wy(t.accessories)}function Wy(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");zy(t)}}}function zy(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");$y(e.price),Gy(e.quantity)}function qy(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===ln(e))throw new Error("id must be a valid UUID")}}function $y(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 Gy(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Jy(e){if(!Object.values(Xy).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Ky="v2",Qy={majorVersion:1,minorVersion:1};var Zy,Xy;function Yy(){if(Yr(fr,pn.content,pn.task),!rS())throw Cn;return Tc(or(Ky,"marketplace.getCart"),"marketplace.getCart",Qy).then(_y)}function eS(e){if(Yr(fr,pn.content,pn.task),!rS())throw Cn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return qy(null==e?void 0:e.cartId),jy(null==e?void 0:e.cartItems),Tc(or(Ky,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:By(e.cartItems),cartVersion:Qy})).then(_y)}function tS(e){if(Yr(fr,pn.content,pn.task),!rS())throw Cn;if(!e)throw new Error("removeCartItemsParams must be provided");if(qy(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 Tc(or(Ky,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Qy})).then(_y)}function nS(e){if(Yr(fr,pn.content,pn.task),!rS())throw Cn;if(!e)throw new Error("updateCartStatusParams must be provided");return qy(null==e?void 0:e.cartId),Jy(null==e?void 0:e.cartStatus),Tc(or(Ky,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Qy})).then(_y)}function rS(){return!(!Yr(fr)||!fr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(Zy||(Zy={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Xy||(Xy={}));var oS=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 iS=3,aS=4;class sS{constructor(e){this.direction=e}serialize(){return{direction:this.direction}}}function cS(e){return e===iS?"back":e===aS?"forward":void 0}function uS(e){void 0!==cS(e.button)&&(e.preventDefault(),e.stopImmediatePropagation())}function lS(e){const t=cS(e.button);t&&(e.preventDefault(),e.stopImmediatePropagation(),kc("mouseRelay.navigateHistory",[new sS(t)],or("v2","mouseRelay.navigateHistory")))}let dS=!1;function fS(){return oS(this,void 0,void 0,function*(){if(!gS())throw Cn;dS||(document.addEventListener("mousedown",uS,{capture:!0}),document.addEventListener("mouseup",lS,{capture:!0}),document.addEventListener("auxclick",uS,{capture:!0})),dS=!0})}function pS(){if(!gS())throw Cn;dS=!1,document.removeEventListener("mousedown",uS,{capture:!0}),document.removeEventListener("mouseup",lS,{capture:!0}),document.removeEventListener("auxclick",uS,{capture:!0})}function gS(){return!(!Yr(fr)||!fr.supports.mouseRelay)}var hS=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())})};class mS{constructor(e){this.event=e}serialize(){return{altKey:this.event.altKey,bubbles:this.event.bubbles,cancelBubble:this.event.cancelBubble,charCode:this.event.charCode,code:this.event.code,composed:this.event.composed,ctrlKey:this.event.ctrlKey,defaultPrevented:this.event.defaultPrevented,detail:this.event.detail,eventPhase:this.event.eventPhase,isComposing:this.event.isComposing,isTrusted:this.event.isTrusted,key:this.event.key,keyCode:this.event.keyCode,location:this.event.location,metaKey:this.event.metaKey,repeat:this.event.repeat,returnValue:this.event.returnValue,shiftKey:this.event.shiftKey,timeStamp:this.event.timeStamp,type:this.event.type,which:this.event.which}}}function vS(e){return e.toLowerCase().split("+").sort().join("+")}function wS(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function CS(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()||!!e.key&&/^F\d+$/i.test(e.key)}function yS(e,t){if(CS(t)){const n=wS(t);if(e.has(n))return{matchedShortcut:n,isOverridable:IS.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function SS(e){PS.clear(),e.shortcuts.forEach(e=>{PS.add(vS(e))}),IS.clear(),e.overridableShortcuts.forEach(e=>{IS.add(vS(e))})}class bS extends ra{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function AS(e){Ns(or("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function ES(e){if(e.target.closest(`[${xS}]`))return;const{matchedShortcut:t,isOverridable:n}=yS(PS,e);if(!t)return;if(n&&TS){if(TS(e,{matchedShortcut:t}))return}kc("shortcutRelay.forwardShortcutEvent",[new mS(e)],or("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const IS=new Set,PS=new Set;let TS,OS=!1;function RS(e){if(!MS())throw Cn;const t=TS;return TS=e,t}function FS(){if(!MS())throw Cn;OS=!1,PS.clear(),IS.clear(),TS=void 0,document.removeEventListener("keydown",ES,{capture:!0})}function kS(){return hS(this,void 0,void 0,function*(){if(!MS())throw Cn;SS(yield Fc("shortcutRelay.getHostShortcuts",[],new bS,or("v2","shortcutRelay.getHostShortcuts"))),OS||document.addEventListener("keydown",ES,{capture:!0}),OS=!0,AS(e=>{SS(e)})})}function MS(){return!(!Yr(fr)||!fr.supports.shortcutRelay)}const xS="data-disable-shortcuts-forwarding"})(),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()}(Object("undefined"!=typeof self?self:this),()=>(()=>{var e={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}},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}}},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))}},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}},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||"function"==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:()=>_e,AppId:()=>po,ChannelType:()=>wn,ChildAppWindow:()=>nv,DialogDimension:()=>vn,EduType:()=>$e,EmailAddress:()=>dh,ErrorCode:()=>Be,FileOpenPreference:()=>He,FrameContexts:()=>pn,HostClientType:()=>dn,HostName:()=>fn,LiveShareHost:()=>Uy,NotificationTypes:()=>du,ParentAppWindow:()=>rv,RenderingSurfaces:()=>gn,SecondaryM365ContentIdName:()=>Ve,TaskModuleDimension:()=>vn,TeamType:()=>hn,UUID:()=>Qn,UserAuthenticationState:()=>Al,UserSettingTypes:()=>pu,UserTeamRole:()=>mn,ValidatedSafeString:()=>fo,ViewerActionTypes:()=>fu,activateChildProxyingCommunication:()=>Rr,app:()=>i,appEntity:()=>z,appInitialization:()=>ke,appInstallDialog:()=>ne,appPerformanceMetrics:()=>te,authentication:()=>ee,barCode:()=>oe,calendar:()=>me,call:()=>Fe,chat:()=>ie,clipboard:()=>ae,contextualSearch:()=>b,conversations:()=>A,copilot:()=>R,dialog:()=>f,enablePrintCapability:()=>JC,executeDeepLink:()=>ly,externalAppAuthentication:()=>F,externalAppAuthenticationForCEA:()=>k,externalAppCardActions:()=>M,externalAppCardActionsForCEA:()=>x,externalAppCardActionsForDA:()=>N,externalAppCommands:()=>D,files:()=>U,geoLocation:()=>ue,getAdaptiveCardSchemaVersion:()=>ev,getContext:()=>QC,getCurrentFeatureFlagsState:()=>xr,getMruTabInstances:()=>cy,getTabInstances:()=>sy,hostEntity:()=>Z,initialize:()=>GC,initializeWithFrameContext:()=>fy,liveShare:()=>De,localNetworkAccess:()=>fe,location:()=>de,logs:()=>S,mail:()=>we,marketplace:()=>Ue,media:()=>re,meeting:()=>ge,meetingRoom:()=>L,menus:()=>p,messageChannels:()=>H,monetization:()=>he,mouseRelay:()=>Le,navigateBack:()=>vy,navigateCrossDomain:()=>my,navigateToTab:()=>hy,nestedAppAuth:()=>se,nestedAppAuthBridge:()=>_,notifications:()=>V,openFilePreview:()=>yu,otherAppStateChange:()=>B,overwriteFeatureFlagsState:()=>Dr,pages:()=>y,people:()=>ye,plugins:()=>j,print:()=>KC,profile:()=>Se,registerAppButtonClickHandler:()=>YC,registerAppButtonHoverEnterHandler:()=>ey,registerAppButtonHoverLeaveHandler:()=>ty,registerBackButtonHandler:()=>ny,registerBeforeUnloadHandler:()=>oy,registerChangeSettingsHandler:()=>ay,registerCustomHandler:()=>wu,registerFocusEnterHandler:()=>iy,registerFullScreenHandler:()=>XC,registerOnLoadHandler:()=>ry,registerOnThemeChangeHandler:()=>ZC,registerUserSettingsChangeHandler:()=>Cu,remoteCamera:()=>W,returnFocus:()=>gy,search:()=>be,secondaryBrowser:()=>le,sendCustomEvent:()=>vu,sendCustomMessage:()=>mu,setFeatureFlagsState:()=>Nr,setFrameContext:()=>dy,settings:()=>xe,shareDeepLink:()=>uy,sharing:()=>Ee,shortcutRelay:()=>Je,sidePanelInterfaces:()=>P,stageView:()=>Pe,store:()=>X,tasks:()=>Ne,teams:()=>G,teamsCore:()=>Ce,thirdPartyCloudStorage:()=>Me,uploadCustomApp:()=>hu,version:()=>Tr,videoEffects:()=>J,videoEffectsEx:()=>K,visualMedia:()=>Oe,webStorage:()=>Re,widgetHosting:()=>Y});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>So,getTelemetryPort:()=>Co,isSupported:()=>yo});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Oo,getDataLayerPort:()=>Po,isSupported:()=>To});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Ro,registerOnResumeHandler:()=>Fo});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Do,FailedReason:()=>No,Messages:()=>xo,_initialize:()=>Vo,_uninitialize:()=>Bo,getContext:()=>jo,getFrameContext:()=>Lo,getImmediateParentOrigin:()=>_o,initialize:()=>Ho,isInitialized:()=>Uo,lifecycle:()=>o,notifyAppLoaded:()=>Wo,notifyExpectedFailure:()=>$o,notifyFailure:()=>qo,notifySuccess:()=>zo,openLink:()=>Qo,registerHostToAppPerformanceMetricsHandler:()=>Ko,registerOnContextChangeHandler:()=>Jo,registerOnThemeChangeHandler:()=>Go});var a={};n.r(a),n.d(a,{isSupported:()=>Yo,resize:()=>Xo});var s={};n.r(s),n.d(s,{isSupported:()=>ti,open:()=>ei});var c={};n.r(c),n.d(c,{isSupported:()=>ii,registerOnMessageFromParent:()=>oi,sendMessageToDialog:()=>ri,sendMessageToParentFromDialog:()=>ni});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>li,getDialogInfoFromUrlDialogInfo:()=>ui,isSupported:()=>ci,open:()=>ai,parentCommunication:()=>c,submit:()=>si});var l={};n.r(l),n.d(l,{isSupported:()=>bi,open:()=>Si});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>Ei,open:()=>Ai});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>Ii,isSupported:()=>Pi,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>Oi,MenuItem:()=>Fi,MenuListType:()=>Ri,initialize:()=>Ui,isSupported:()=>Wi,setNavBarMenu:()=>_i,setUpViews:()=>Li,showActionMenu:()=>Bi});var g={};n.r(g),n.d(g,{initialize:()=>zi,isSupported:()=>na,registerChangeConfigHandler:()=>Xi,registerOnRemoveHandler:()=>Ki,registerOnRemoveHandlerHelper:()=>Qi,registerOnSaveHandler:()=>Gi,registerOnSaveHandlerHelper:()=>Ji,setConfig:()=>$i,setValidityState:()=>qi});var h={};n.r(h),n.d(h,{isSupported:()=>Na,onClick:()=>ka,onHoverEnter:()=>Ma,onHoverLeave:()=>xa});var m={};n.r(m),n.d(m,{_initialize:()=>Da,isSupported:()=>_a,navigateBack:()=>Ua,registerBackButtonHandler:()=>La,registerBackButtonHandlerHelper:()=>Ha});var v={};n.r(v),n.d(v,{isSupported:()=>ja,navigateTo:()=>Va,navigateToDefaultPage:()=>Ba});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Wa,exitFullscreen:()=>za,isSupported:()=>qa});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Ja,getTabInstances:()=>Ga,isSupported:()=>Ka,navigateToTab:()=>$a});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Qa,ReturnFocusType:()=>Za,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>ns,initializeWithFrameContext:()=>ts,isSupported:()=>ss,navigateCrossDomain:()=>rs,navigateToApp:()=>os,registerFocusEnterHandler:()=>Ya,registerFullScreenHandler:()=>as,returnFocus:()=>Xa,setCurrentFrame:()=>es,shareDeepLink:()=>is,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>lu,registerGetLogHandler:()=>uu});var b={};n.r(b),n.d(b,{closeContextualSearch:()=>Au,isSupported:()=>Pu,openContextualSearch:()=>bu,registerOnContextualSearchClosedHandler:()=>Iu,registerOnContextualSearchOpenedHandler:()=>Eu});var A={};n.r(A),n.d(A,{closeConversation:()=>Ru,getChatMembers:()=>Fu,isSupported:()=>ku,openConversation:()=>Ou});var E={};n.r(E),n.d(E,{isSupported:()=>Du,sendCustomTelemetryData:()=>Uu});var I={};n.r(I),n.d(I,{getEligibilityInfo:()=>Bu,isSupported:()=>Vu});var P={};n.r(P),n.d(P,{ContentItemType:()=>Wu,CopilotMode:()=>Gu,MediaSelectionType:()=>zu,SidePanelErrorCode:()=>Zu,SidePanelErrorImpl:()=>Xu,TeamsContextType:()=>Ku,TeamsDimensionName:()=>$u,TeamsSessionType:()=>qu,TranscriptState:()=>Ju,UserConsent:()=>Qu});var T={};n.r(T),n.d(T,{copilotSidePanelNotSupportedOnPlatformError:()=>al,getContent:()=>rl,isResponseAReportableError:()=>nl,isSupported:()=>tl,preCheckUserConsent:()=>ol,registerUserActionContentSelect:()=>il});var O={};n.r(O),n.d(O,{closeSidePanel:()=>gl,isSupported:()=>pl});var R={};n.r(R),n.d(R,{customTelemetry:()=>E,eligibility:()=>I,sidePanel:()=>T,view:()=>O});var F={};n.r(F),n.d(F,{ActionExecuteInvokeRequestType:()=>Cl,ActionExecuteResponseHandler:()=>El,InvokeErrorCode:()=>bl,InvokeResponseType:()=>Sl,OriginalRequestType:()=>yl,SerializableActionExecuteInvokeRequest:()=>vl,SerializableConnectorParameters:()=>Nl,UserAuthenticationState:()=>Al,authenticateAndResendRequest:()=>Rl,authenticateWithConnector:()=>Dl,authenticateWithOauth2:()=>Ml,authenticateWithPowerPlatformConnectorPlugins:()=>xl,authenticateWithSSO:()=>Fl,authenticateWithSSOAndResendRequest:()=>kl,disconnectConnector:()=>Hl,getUserAuthenticationStateForConnector:()=>Ll,isActionExecuteResponse:()=>wl,isInvokeError:()=>Il,isSupported:()=>_l,validateActionExecuteInvokeRequest:()=>Tl});var k={};n.r(k),n.d(k,{authenticateAndResendRequest:()=>zl,authenticateWithOauth:()=>Wl,authenticateWithSSO:()=>jl,authenticateWithSSOAndResendRequest:()=>ql,isSupported:()=>$l,validateInput:()=>Gl});var M={};n.r(M),n.d(M,{ActionOpenUrlErrorCode:()=>Ql,ActionOpenUrlType:()=>Kl,isSupported:()=>Yl,processActionOpenUrl:()=>Xl,processActionSubmit:()=>Zl});var x={};n.r(x),n.d(x,{isSupported:()=>od,processActionOpenUrl:()=>nd,processActionSubmit:()=>rd});var N={};n.r(N),n.d(N,{SerializableActionOpenUrlDialogInfo:()=>fd,isSupported:()=>ld,processActionOpenUrlDialog:()=>ud});var D={};n.r(D),n.d(D,{isSupported:()=>md,processActionCommand:()=>hd});var U={};n.r(U),n.d(U,{CloudStorageProvider:()=>wd,CloudStorageProviderFileAction:()=>Ad,CloudStorageProviderType:()=>Cd,DocumentLibraryAccessType:()=>Sd,FileDownloadStatus:()=>bd,SpecialDocumentLibraryType:()=>yd,addCloudStorageFolder:()=>Id,addCloudStorageProvider:()=>xd,addCloudStorageProviderFile:()=>Dd,copyMoveFiles:()=>Fd,deleteCloudStorageFolder:()=>Pd,deleteCloudStorageProviderFile:()=>Ld,downloadCloudStorageProviderFile:()=>Hd,getCloudStorageFolderContents:()=>Td,getCloudStorageFolders:()=>Ed,getExternalProviders:()=>Rd,getFileDownloads:()=>kd,openCloudStorageFile:()=>Od,openDownloadFolder:()=>Md,registerCloudStorageProviderContentChangeHandler:()=>Bd,registerCloudStorageProviderListChangeHandler:()=>Vd,removeCloudStorageProvider:()=>Nd,renameCloudStorageProviderFile:()=>Ud,uploadCloudStorageProviderFile:()=>_d});var L={};n.r(L),n.d(L,{getPairedMeetingRoomInfo:()=>zd,isSupported:()=>Jd,registerMeetingRoomCapabilitiesUpdateHandler:()=>$d,registerMeetingRoomStatesUpdateHandler:()=>Gd,sendCommandToPairedMeetingRoom:()=>qd});var H={};n.r(H),n.d(H,{dataLayer:()=>t,isSupported:()=>Kd,telemetry:()=>e});var _={};n.r(_),n.d(_,{initialize:()=>ef,version:()=>Qd});var V={};n.r(V),n.d(V,{isSupported:()=>lf,showNotification:()=>uf});var B={};n.r(B),n.d(B,{isSupported:()=>hf,notifyInstallCompleted:()=>gf,registerAppInstallationHandler:()=>ff,unregisterAppInstallationHandler:()=>pf});var j={};n.r(j),n.d(j,{isSupported:()=>wf,registerPluginMessage:()=>yf,sendPluginMessage:()=>Cf});var W={};n.r(W),n.d(W,{ControlCommand:()=>If,ErrorReason:()=>Pf,SessionTerminatedReason:()=>Tf,getCapableParticipants:()=>Of,isSupported:()=>Uf,registerOnCapableParticipantsChangeHandler:()=>Mf,registerOnDeviceStateChangeHandler:()=>Nf,registerOnErrorHandler:()=>xf,registerOnSessionStatusChangeHandler:()=>Df,requestControl:()=>Rf,sendControlCommand:()=>Ff,terminateSession:()=>kf});var z={};n.r(z),n.d(z,{isSupported:()=>_f,selectAppEntity:()=>Hf});var q={};n.r(q),n.d(q,{getUserJoinedTeams:()=>Bf,isSupported:()=>jf});var $={};n.r($),n.d($,{getConfigSetting:()=>qf,isSupported:()=>$f,joinedTeams:()=>q});var G={};n.r(G),n.d(G,{ChannelType:()=>Jf,fullTrust:()=>$,getTeamChannels:()=>Kf,isSupported:()=>Zf,refreshSiteUrl:()=>Qf});var J={};n.r(J),n.d(J,{EffectChangeType:()=>sp,EffectFailureReason:()=>cp,VideoFrameFormat:()=>ap,isSupported:()=>gp,notifySelectedVideoEffectChanged:()=>lp,registerForVideoEffect:()=>dp,registerForVideoFrame:()=>up});var K={};n.r(K),n.d(K,{ErrorLevel:()=>Hp,frameProcessingTimeoutInMs:()=>Up,isSupported:()=>$p,notifyFatalError:()=>Kp,notifySelectedVideoEffectChanged:()=>Wp,registerForVideoEffect:()=>zp,registerForVideoFrame:()=>_p,updatePersonalizedEffects:()=>qp});var Q={};n.r(Q),n.d(Q,{addAndConfigure:()=>rg,getAll:()=>og,isSupported:()=>cg,reconfigure:()=>ig,remove:()=>sg,rename:()=>ag});var Z={};n.r(Z),n.d(Z,{AppTypes:()=>dg,isSupported:()=>fg,tab:()=>Q});var X={};n.r(X),n.d(X,{isSupported:()=>bg,openAppDetail:()=>Cg,openFullStore:()=>wg,openInContextStore:()=>yg,openSpecificStore:()=>Sg});var Y={};n.r(Y),n.d(Y,{callTool:()=>Rg,contentSizeChanged:()=>Ng,isSupported:()=>Og,notifyIntrinsicHeight:()=>xg,openExternal:()=>Ug,registerModalCloseHandler:()=>Lg,requestDisplayMode:()=>kg,requestModal:()=>Mg,sendFollowUpMessage:()=>Fg,setWidgetState:()=>Dg});var ee={};n.r(ee),n.d(ee,{DataResidency:()=>sh,authenticate:()=>Yg,getAuthToken:()=>th,getUser:()=>rh,notifyFailure:()=>ah,notifySuccess:()=>ih,registerAuthenticationHandlers:()=>Xg});var te={};n.r(te),n.d(te,{isSupported:()=>ch,registerHostMemoryMetricsHandler:()=>uh});var ne={};n.r(ne),n.d(ne,{isSupported:()=>Mh,openAppInstallDialog:()=>kh});var re={};n.r(re),n.d(re,{CameraStartMode:()=>Lh,File:()=>jh,FileFormat:()=>Dh,ImageOutputFormats:()=>Bh,ImageUriType:()=>Vh,Media:()=>Gh,MediaControllerEvent:()=>Uh,MediaType:()=>_h,Source:()=>Hh,VideoController:()=>Kh,captureImage:()=>Wh,hasPermission:()=>zh,requestPermission:()=>qh,scanBarCode:()=>Xh,selectMedia:()=>Qh,viewImages:()=>Zh});var oe={};n.r(oe),n.d(oe,{hasPermission:()=>pm,isSupported:()=>hm,requestPermission:()=>gm,scanBarCode:()=>fm});var ie={};n.r(ie),n.d(ie,{isSupported:()=>ym,openChat:()=>vm,openGroupChat:()=>Cm});var ae={};n.r(ae),n.d(ae,{hasPermission:()=>Im,isSupported:()=>Tm,read:()=>Em,requestPermission:()=>Pm,write:()=>Am});var se={};n.r(se),n.d(se,{addNAATrustedOrigins:()=>Vm,canParentManageNAATrustedOrigins:()=>Dm,deleteNAATrustedOrigins:()=>Bm,getParentOrigin:()=>Nm,isDeeplyNestedAuthSupported:()=>Um,isNAAChannelRecommended:()=>xm});var ce={};n.r(ce),n.d(ce,{chooseLocation:()=>$m,isSupported:()=>Jm,showLocation:()=>Gm});var ue={};n.r(ue),n.d(ue,{getCurrentLocation:()=>Qm,hasPermission:()=>Zm,isSupported:()=>Ym,map:()=>ce,requestPermission:()=>Xm});var le={};n.r(le),n.d(le,{isSupported:()=>av,open:()=>iv});var de={};n.r(de),n.d(de,{getLocation:()=>cv,isSupported:()=>lv,showLocation:()=>uv});var fe={};n.r(fe),n.d(fe,{hasPermission:()=>fv,isSupported:()=>gv,requestPermission:()=>pv});var pe={};n.r(pe),n.d(pe,{setOptions:()=>mv});var ge={};n.r(ge),n.d(ge,{CallType:()=>bv,EventActionSource:()=>Ev,MeetingReactionType:()=>yv,MeetingType:()=>Sv,SharingProtocol:()=>Av,appShareButton:()=>pe,getAppContentStageSharingCapabilities:()=>Dv,getAppContentStageSharingState:()=>Lv,getAuthenticationTokenForAnonymousUser:()=>Rv,getIncomingClientAudioState:()=>Iv,getLiveStreamState:()=>Fv,getMeetingDetails:()=>Tv,getMeetingDetailsVerbose:()=>Ov,joinMeeting:()=>Bv,registerLiveStreamChangedHandler:()=>xv,registerMeetingReactionReceivedHandler:()=>Vv,registerRaiseHandStateChangedHandler:()=>_v,registerSpeakingStateChangeHandler:()=>Hv,requestAppAudioHandling:()=>jv,requestStartLiveStreaming:()=>kv,requestStopLiveStreaming:()=>Mv,shareAppContentToStage:()=>Nv,stopSharingAppContentToStage:()=>Uv,toggleIncomingClientAudio:()=>Pv,updateMicState:()=>qv});var he={};n.r(he),n.d(he,{isSupported:()=>Qv,openPurchaseExperience:()=>Kv});var me={};n.r(me),n.d(me,{composeMeeting:()=>Yv,isSupported:()=>ew,openCalendarItem:()=>Xv});var ve={};n.r(ve),n.d(ve,{composeMailWithHandoff:()=>ow,isSupported:()=>iw});var we={};n.r(we),n.d(we,{ComposeMailType:()=>dw,composeMail:()=>uw,handoff:()=>ve,isSupported:()=>lw,openMailItem:()=>cw});var Ce={};n.r(Ce),n.d(Ce,{enablePrintCapability:()=>pw,isSupported:()=>Cw,print:()=>gw,registerBeforeUnloadHandler:()=>vw,registerBeforeUnloadHandlerHelper:()=>ww,registerOnLoadHandler:()=>hw,registerOnLoadHandlerHelper:()=>mw});var ye={};n.r(ye),n.d(ye,{isSupported:()=>Ew,selectPeople:()=>bw});var Se={};n.r(Se),n.d(Se,{isSupported:()=>Rw,showProfile:()=>Ow});var be={};n.r(be),n.d(be,{closeSearch:()=>Lw,isSupported:()=>Uw,registerHandlers:()=>Nw,unregisterHandlers:()=>Dw});var Ae={};n.r(Ae),n.d(Ae,{getContent:()=>Vw,isSupported:()=>Bw});var Ee={};n.r(Ee),n.d(Ee,{SharingAPIMessages:()=>zw,history:()=>Ae,isSupported:()=>Zw,shareWebContent:()=>qw});var Ie={};n.r(Ie),n.d(Ie,{close:()=>Yw,isCloseResultSupported:()=>tC,isSupported:()=>eC});var Pe={};n.r(Pe),n.d(Pe,{StageViewOpenMode:()=>rC,isSupported:()=>iC,open:()=>oC,self:()=>Ie});var Te={};n.r(Te),n.d(Te,{captureImages:()=>uC,isSupported:()=>dC,retrieveImages:()=>lC});var Oe={};n.r(Oe),n.d(Oe,{CameraRestriction:()=>mC,Source:()=>vC,hasPermission:()=>wC,image:()=>Te,requestPermission:()=>CC});var Re={};n.r(Re),n.d(Re,{isSupported:()=>PC,isWebStorageClearedOnUserLogOut:()=>EC});var Fe={};n.r(Fe),n.d(Fe,{CallModalities:()=>OC,isSupported:()=>FC,startCall:()=>RC});var ke={};n.r(ke),n.d(ke,{ExpectedFailureReason:()=>Do,FailedReason:()=>No,Messages:()=>xo,notifyAppLoaded:()=>MC,notifyExpectedFailure:()=>DC,notifyFailure:()=>NC,notifySuccess:()=>xC});var Me={};n.r(Me),n.d(Me,{getDragAndDropFiles:()=>WC,isSupported:()=>qC});var xe={};n.r(xe),n.d(xe,{getSettings:()=>yy,registerOnRemoveHandler:()=>Ay,registerOnSaveHandler:()=>by,setSettings:()=>Sy,setValidityState:()=>Cy});var Ne={};n.r(Ne),n.d(Ne,{getDefaultSizeIfNotProvided:()=>ky,startTask:()=>Py,submitTask:()=>Oy,updateTask:()=>Ty});var De={};n.r(De),n.d(De,{ContainerState:()=>Ny,LiveShareHost:()=>Uy,UserMeetingRole:()=>xy,isSupported:()=>Dy});var Ue={};n.r(Ue),n.d(Ue,{CartStatus:()=>Xy,Intent:()=>Zy,addOrUpdateCartItems:()=>eS,cartVersion:()=>Qy,getCart:()=>Yy,isSupported:()=>rS,removeCartItems:()=>tS,updateCartStatus:()=>nS});var Le={};n.r(Le),n.d(Le,{disableMouseRelayCapability:()=>pS,enableMouseRelayCapability:()=>fS,isSupported:()=>gS});var He,_e,Ve,Be,je,We,ze,qe,$e,Ge,Je={};function Ke(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(Je),n.d(Je,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>xS,enableShortcutRelayCapability:()=>kS,isSupported:()=>MS,resetIsShortcutRelayCapabilityEnabled:()=>FS,setOverridableShortcutHandler:()=>RS}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(He||(He={})),function(e){e.M365Content="m365content"}(_e||(_e={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Ve||(Ve={})),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"}(Be||(Be={})),function(e){e.ClipboardRead="clipboardRead",e.GeoLocation="geolocation",e.LocalNetworkAccess="localNetworkAccess",e.Media="media"}(je||(je={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(We||(We={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(ze||(ze={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(qe||(qe={})),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"}(Ge||(Ge={}));const Qe=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","fa000000136.mro1cdnstorage.public.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate.office.com","copilot-connectors.core.microsoft","copilotstudio.microsoft.com","copilotstudio.preview.microsoft.com","copilotstudio.preprod.microsoft.com","copilotstudio.test.microsoft.com","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","cr.m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.usgovcloud.microsoft","cr.m365copilotapp.svc.usgovcloud.microsoft","dod.m365copilotapp.svc.usgovcloud.microsoft","cr.dod.m365copilotapp.svc.usgovcloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001","portal.officeppe.com","ignite.m365.admin.cloud.microsoft","ignite.admin.cloud.microsoft","sdf.m365.admin.cloud.microsoft","admin-sdf.microsoft.com","canary.m365.admin.cloud.microsoft","ring0.m365.admin.cloud.microsoft","admin.microsoft.com","m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"]}');const Ze="2.0.1",Xe="2.0.2",Ye="2.0.3",et="2.0.4",tt="2.0.1",nt="1.9.0",rt="2.0.0",ot="1.7.0",it="1.8.0",at="1.9.0",st=n.t(Qe,2).validOrigins,ct=1500,ut=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),lt="https",dt="teams.microsoft.com",ft="The library has not yet been initialized",pt="The runtime has not yet been initialized",gt="The runtime version is not supported",ht="The call was not properly started";var mt=n(933);const vt=Ct,wt=2147483647;function Ct(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 St(e)}return yt(e,t,n)}function yt(e,t,n){if("string"==typeof e)return It(e,t);if(ArrayBuffer.isView(e))return Mt(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(Tt(e,ArrayBuffer)||e&&Tt(e.buffer,ArrayBuffer))return xt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Tt(e,SharedArrayBuffer)||e&&Tt(e.buffer,SharedArrayBuffer)))return xt(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 Ct.from(r,t,n);const o=en(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Ct.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 St(e){return bt(e),At(e<0?0:0|Et(e))}function bt(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 At(e){if(e>wt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,Ct.prototype),t}function Et(e){if(e>=wt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+wt.toString(16)+" bytes");return 0|e}function It(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Ct.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|Pt(e,t);let r=At(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function Pt(e,t){if(Ct.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Tt(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 Ot(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Rt(e).length;default:if(o)return r?-1:Ot(e).length;t=(""+t).toLowerCase(),o=!0}}function Tt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Ot(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 Rt(e){return mt.toByteArray(kt(e))}Ct.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}}(),Ct.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),Ct.from=function(e,t,n){return yt(e,t,n)},Object.setPrototypeOf(Ct.prototype,Uint8Array.prototype),Object.setPrototypeOf(Ct,Uint8Array),Ct.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}},Ct.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Ct.prototype};const Ft=/[^+/0-9A-Za-z-_]/g;function kt(e){if((e=(e=e.split("=")[0]).trim().replace(Ft,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Mt(e){if(Tt(e,Uint8Array)){const t=new Uint8Array(e);return xt(t.buffer,t.byteOffset,t.byteLength)}return Nt(e)}function xt(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,Ct.prototype),r}function Nt(e){const t=e.length<0?0:0|Et(e.length),n=At(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Dt(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 Ht(r)}function Ut(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 _t(this,t,n);case"utf8":case"utf-8":return Dt(this,t,n);case"ascii":return Vt(this,t,n);case"latin1":case"binary":return Bt(this,t,n);case"base64":return jt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}Ct.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Dt(this,0,e):Ut.apply(this,arguments)};const Lt=4096;function Ht(e){const t=e.length;if(t<=Lt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Lt));return n}function _t(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+=Yt[e[r]];return o}function Vt(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 Bt(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 jt(e,t,n){return 0===t&&n===e.length?mt.fromByteArray(e):mt.fromByteArray(e.slice(t,n))}function Wt(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 zt(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(Xt(r))return a;e[n+a]=r}return a}function qt(e,t,n,r){return Zt(Ot(t,e.length-n),e,n,r)}function $t(e,t,n,r){return Zt(Kt(t),e,n,r)}function Gt(e,t,n,r){return Zt(Rt(t),e,n,r)}function Jt(e,t,n,r){return Zt(Qt(t,e.length-n),e,n,r)}function Kt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Qt(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 Xt(e){return e!=e}Ct.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 zt(this,e,t,n);case"utf8":case"utf-8":return qt(this,e,t,n);case"ascii":case"latin1":case"binary":return $t(this,e,t,n);case"base64":return Gt(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 Yt=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 en(e){if(Ct.isBuffer(e)){const t=0|Et(e.length),n=At(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Xt(e.length)?At(0):Nt(e):"Buffer"===e.type&&Array.isArray(e.data)?Nt(e.data):void 0}const tn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let nn;const rn=new Uint8Array(16);function on(){if(!nn){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");nn=crypto.getRandomValues.bind(crypto)}return nn(rn)}const an=[];for(let e=0;e<256;++e)an.push((e+256).toString(16).slice(1));function sn(e,t=0){return(an[e[t+0]]+an[e[t+1]]+an[e[t+2]]+an[e[t+3]]+"-"+an[e[t+4]]+an[e[t+5]]+"-"+an[e[t+6]]+an[e[t+7]]+"-"+an[e[t+8]]+an[e[t+9]]+"-"+an[e[t+10]]+an[e[t+11]]+an[e[t+12]]+an[e[t+13]]+an[e[t+14]]+an[e[t+15]]).toLowerCase()}const cn=function(e,t,n){if(tn.randomUUID&&!t&&!e)return tn.randomUUID();const r=(e=e||{}).random??e.rng?.()??on();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return sn(r)},un=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;const ln=function(e){return"string"==typeof e&&un.test(e)};var dn,fn,pn,gn,hn,mn,vn,wn;!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"}(dn||(dn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(fn||(fn={})),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"}(pn||(pn={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(gn||(gn={})),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"}(hn||(hn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(mn||(mn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(vn||(vn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(wn||(wn={}));const Cn={errorCode:Be.NOT_SUPPORTED_ON_PLATFORM},yn={majorVersion:1,minorVersion:5},Sn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},bn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),An=new Error("Invalid response: Received more images than the specified max limit in the response.");function En(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function In(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 Pn(){return cn()}function Tn(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&Tn(e[t])}),Object.freeze(e)}function On(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(void 0,e)}).catch(e=>{t&&t(e)}),r}function Rn(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}).catch(e=>{t&&t(e)}),r}function Fn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(null,e)}).catch(e=>{t&&t(e,null)}),r}function kn(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 Mn(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 xn(e){return!(In(`${e.majorVersion}.${e.minorVersion}`,`${yn.majorVersion}.${yn.minorVersion}`)>=0)}function Nn(e){return"https:"===e.protocol}function Dn(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=vt.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function Un(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 Ln(){if(Hn())throw new Error("window object undefined at SSR check");return window}function Hn(){return"undefined"==typeof window}function _n(e,t){if(jn(e)||!Wn(e)||!zn(e))throw t||new Error("id is not valid.")}function Vn(e,t){const n=e.toString().toLocaleLowerCase();if(jn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Nn(e))throw t||new Error("Url should be a valid https url")}function Bn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function jn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Wn(e){return e.length<256&&e.length>4}function zn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function qn(e){if(!e)throw new Error("id must not be empty");if(!1===ln(e))throw new Error("id must be a valid UUID")}const $n=!!performance&&"now"in performance;function Gn(){return $n?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 Kn(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:qe.NotAdult})})})}class Qn{constructor(e=Pn()){this.uuid=e,qn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Zn(e){if(!(e instanceof Qn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Xn{}Xn.initializeCalled=!1,Xn.initializeCompleted=!1,Xn.additionalValidOrigins=[],Xn.initializePromise=void 0,Xn.isFramelessWindow=!1,Xn.frameContext=void 0,Xn.hostClientType=void 0,Xn.printCapabilityEnabled=!1,Xn.teamsJsInstanceId=(new Qn).toString();var Yn=n(815);const er=new Qn,tr=Yn.debug.formatArgs;Yn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${er.toString()}]`,tr.call(this,e)};const nr=(0,Yn.debug)("teamsJs");function rr(e){return nr.extend(e)}function or(e,t){return`${e}_${t}`}function ir(e){return/^v\d+_[\w.]+$/.test(e)}var ar=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 sr=rr("runtime"),cr=4;function ur(e){return e.apiVersion===cr}const lr={apiVersion:-1,supports:{}};function dr(e){if(ur(e))return!0;throw-1===e.apiVersion?new Error(pt):new Error(gt)}let fr=lr;const pr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:Sn,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:{}}}},gr=[dn.desktop,dn.web,dn.rigel,dn.surfaceHub,dn.teamsRoomsWindows,dn.teamsRoomsAndroid,dn.teamsPhones,dn.teamsDisplays],hr=[dn.android,dn.ios,dn.ipados,dn.visionOS],mr=[...gr,...hr];function vr(e){let t=e;if(t.apiVersion<cr&&wr.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),ur(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const wr=[{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=ar(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})}}}],Cr="2.1.2",yr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:gr}],"1.9.0":[{capability:{location:{}},hostClientTypes:mr}],"2.0.0":[{capability:{people:{}},hostClientTypes:mr},{capability:{sharing:{}},hostClientTypes:[dn.desktop,dn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[dn.android,dn.desktop,dn.ios,dn.teamsRoomsAndroid,dn.teamsPhones,dn.teamsDisplays,dn.web]},{capability:{webStorage:{}},hostClientTypes:[dn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[dn.android,dn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[dn.android,dn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[dn.android,dn.ios,dn.ipados,dn.visionOS]}],"2.1.2":[]},Sr=sr.extend("generateBackCompatRuntimeConfig");function br(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]=br(e[r]||{},t[r]));return n}function Ar(e,t,n){Sr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);Sr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(t=>{In(e,t)>=0&&n[t].forEach(e=>{void 0!==Xn.hostClientType&&e.hostClientTypes.includes(Xn.hostClientType)&&(r=br(r,e.capability))})});const o={apiVersion:cr,hostVersionsInfo:Sn,isLegacyTeams:!0,supports:r};return Sr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Er=sr.extend("applyRuntimeConfig");function Ir(e){"string"==typeof e.apiVersion&&(Er("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Er("Fast-forwarding runtime %o",e);const t=vr(e);Er("Applying runtime %o",t),fr=Tn(t)}function Pr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Tr="2.60.0-beta.0",Or={childProxyingCommunication:!1};function Rr(){Or.childProxyingCommunication=!0}function Fr(){return Or.childProxyingCommunication}const kr={disableEnforceOriginMatchForChildResponses:!1};let Mr=Object.assign({},kr);function xr(){return Mr}function Nr(e){Mr=e}function Dr(e){return Nr(Object.assign(Object.assign({},Mr),e)),xr()}var Ur=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 Lr=e=>{const{uuid:t}=e,n=Ur(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Hr=e=>{const{uuidAsString:t}=e,n=Ur(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Qn(t):void 0})},_r=e=>{const{uuidAsString:t}=e,n=Ur(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Qn(t):void 0})},Vr=e=>{const{uuid:t}=e,n=Ur(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Br(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 jr=rr("flushMessageQueue");function Wr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Lr(o);jr("Flushing message %s from %s message queue via postMessage.",Br(n),r),e.postMessage(n,t)}}}const zr=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function qr(e,t){const n=e.split("."),r=t.split(".");if(r.length!==n.length)return!1;let o=!1;for(let e=0;e<n.length;e++)if(n[e]!==r[e]){if("*"!==n[e])return!1;if(e===n.length-1||o)return!1;o=!0}return!0}class $r{constructor(e,t,n){this.protocol=e,this.host=t,this.logger=n}static canUse(e){return zr.test(e)}static create(e,t){const n=e.split("://");return new $r(n[0],n[1],t.extend("InternalURLPattern"))}test(e){return this.logger("Testing URL %s against pattern protocol: %s, host: %s",e,this.protocol,this.host),e.protocol===`${this.protocol}:`&&(!e.host||qr(this.host,e.host))}}function Gr(e){return $r.canUse(e)}function Jr(e,t){if($r.canUse(e))return $r.create(e,t);t("No URL verifier available for pattern: %s",e)}const Kr=rr("internal"),Qr=Kr.extend("ensureInitializeCalled"),Zr=Kr.extend("ensureInitialized");function Xr(){if(!Xn.initializeCalled)throw Qr(ft),new Error(ft)}function Yr(e,...t){if(!Xn.initializeCompleted)throw Zr("%s. initializeCalled: %s",ft,Xn.initializeCalled.toString()),new Error(ft);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Xn.frameContext){e=!0;break}if(!e){const e=`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Xn.frameContext}".`;throw Zr(e),new Error(e)}}return dr(e)}function eo(e=Ze){const t=In(Xn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function to(){return Xn.hostClientType==dn.android||Xn.hostClientType==dn.ios||Xn.hostClientType==dn.ipados||Xn.hostClientType==dn.visionOS}function no(e=Ze){if(!to()){throw{errorCode:Be.NOT_SUPPORTED_ON_PLATFORM}}if(!eo(e)){throw{errorCode:Be.OLD_PLATFORM}}}function ro(e){let t=Xn.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&Gr(e)));const n={};t=t.filter(e=>!n[e]&&(n[e]=!0,!0)),Xn.additionalValidOrigins=t}function oo(e){if(!co(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${ao}-${so}).`)}function io(e){if(jn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(uo(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const ao=4,so=256;function co(e){return e.length<so&&e.length>ao}function uo(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}function lo(e){if(!(e instanceof po))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class fo{constructor(e){this.idAsString=e,io(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class po extends fo{constructor(e){super(e),oo(e)}toJSON(){return{appIdAsString:this.toString()}}}function go(e){return null==e}var ho=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 mo;const vo="v1",wo=rr("messageChannels.telemetry");function Co(){return ho(this,void 0,void 0,function*(){if(mo)return wo("Returning telemetry port from cache"),mo;if(!yo())throw Cn;return mo=yield Mc(or(vo,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),mo})}function yo(){var e;return!(!Yr(fr)||!(null===(e=fr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function So(){mo=void 0}var bo=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 Ao;const Eo="v1",Io=rr("messageChannels.dataLayer");function Po(){return bo(this,void 0,void 0,function*(){if(Ao)return Io("Returning dataLayer port from cache"),Ao;if(!To())throw Cn;return Ao=yield Mc(or(Eo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),Ao})}function To(){var e;return!(!Yr(fr)||!(null===(e=fr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Oo(){Ao=void 0}function Ro(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Yr(fr),Ks(e)}function Fo(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Yr(fr),Qs(e)}const ko="v2",Mo=rr("app"),xo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var No,Do;function Uo(){return Xn.initializeCompleted}function Lo(){return Xn.frameContext}function Ho(e){return ca(or(ko,"app.initialize"),e)}function _o(){var e,t;if(Hn())return null;const n=null!==(e=yc.currentWindow)&&void 0!==e?e:window;if(n.parent===n)return null;const r=n.location.ancestorOrigins,o=null==r?void 0:r.item(0);if(o)return o;const i=null===(t=n.document)||void 0===t?void 0:t.referrer;if(!i)return null;try{const e=new URL(i).origin;return e===n.location.origin?null:e}catch(e){return null}}function Vo(e){yc.currentWindow=e}function Bo(){Xn.initializeCalled&&(ks(),Xn.initializeCalled=!1,Xn.initializeCompleted=!1,Xn.initializePromise=void 0,Xn.additionalValidOrigins=[],Xn.frameContext=void 0,Xn.hostClientType=void 0,Xn.isFramelessWindow=!1,So(),Oo(),Ac())}function jo(){return new Promise(e=>{Xr(),e(Ec(or(ko,"app.getContext"),"getContext"))}).then(e=>Zo(e))}function Wo(){Xr(),ua(or(ko,"app.notifyAppLoaded"))}function zo(){return fa(or(ko,"app.notifySuccess"))}function qo(e){Xr(),da(or(ko,"app.notifyFailure"),e)}function $o(e){Xr(),la(or(ko,"app.notifyExpectedFailure"),e)}function Go(e){va(or(ko,"app.registerOnThemeChangeHandler"),e)}function Jo(e){wa(or(ko,"app.registerOnContextChangeHandler"),e)}function Ko(e){js(e)}function Qo(e){return Ca(or(ko,"app.openLink"),e)}function Zo(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",brandColorPalettes:e.brandColorPalettes,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:fn.teams,clientType:e.hostClientType?e.hostClientType:dn.web,features:e.hostFeatures,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new po(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Xn.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 Xo(e){pi(or(di,"dialog.update.resize"),e)}function Yo(){return!(!Yr(fr)||!fr.supports.dialog)&&!!fr.supports.dialog.update}function ei(e,t,n){hi(or(di,"dialog.url.bot.open"),e,t,n)}function ti(){return Yr(fr)&&void 0!==(fr.supports.dialog&&fr.supports.dialog.url&&fr.supports.dialog.url.bot)}function ni(e){if(Yr(fr,pn.task),!ii())throw Cn;Dc(or(di,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function ri(e){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!ii())throw Cn;Dc(or(di,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function oi(e){if(Yr(fr,pn.task),!ii())throw Cn;for(Ds("messageForChild"),Ns(or(di,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),Ci.reverse();Ci.length>0;){e(Ci.pop())}}function ii(){var e,t;return Yr(fr)&&!!(null===(t=null===(e=fr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function ai(e,t,n){gi(or(di,"dialog.url.open"),e,t,n)}function si(e,t){mi(or(di,"dialog.url.submit"),e,t)}function ci(){return Yr(fr)&&void 0!==(fr.supports.dialog&&fr.supports.dialog.url)}function ui(e){return Object.assign({url:e.url,height:e.size?e.size.height:vn.Small,width:e.size?e.size.width:vn.Small,title:e.title,fallbackUrl:e.fallbackUrl},void 0!==e.useHeaderlessDialog?{useHeaderlessDialog:e.useHeaderlessDialog}:{})}function li(e){const t=ui(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(No||(No={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Do||(Do={})),Mo("teamsjs instance is version %s, starting at %s UTC (%s local)",Tr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Hn())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?Mo("teamsjs is being used from %s. %s",t,n):Mo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const di="v2",fi="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 pi(e,t){if(Yr(fr,pn.content,pn.sidePanel,pn.task,pn.meetingStage),!Yo())throw Cn;Dc(e,"tasks.updateTask",[t])}function gi(e,t,n,r){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!ci())throw Cn;r&&Ns(or(di,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Dc(e,"tasks.startTask",[ui(t)],(e,t)=>{null==n||n({err:e,result:t}),Ds("messageForParent")})}function hi(e,t,n,r){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!ti())throw Cn;r&&Ns(or(di,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Dc(e,"tasks.startTask",[li(t)],(e,t)=>{null==n||n({err:e,result:t}),Ds("messageForParent")})}function mi(e,t,n){if(Yr(fr,pn.content,pn.task),!ci())throw Cn;Xn.frameContext===pn.content&&console.warn(fi),Dc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function vi(e){return{card:e.card,height:e.size?e.size.height:vn.Small,width:e.size?e.size.width:vn.Small,title:e.title}}function wi(e){const t=vi(e);return t.completionBotId=e.completionBotId,t}const Ci=[];function yi(e){Xn.frameContext&&(Xn.frameContext===pn.task?Ci.push(e):Ds("messageForChild"))}function Si(e,t){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!bi())throw Cn;const n=wi(e);Dc(or(di,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function bi(){const e=fr.hostVersionsInfo&&fr.hostVersionsInfo.adaptiveCardSchemaVersion&&!xn(fr.hostVersionsInfo.adaptiveCardSchemaVersion);return Yr(fr)&&void 0!==(e&&fr.supports.dialog&&fr.supports.dialog.card&&fr.supports.dialog.card.bot)}function Ai(e,t){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!Ei())throw Cn;const n=vi(e);Dc(or(di,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function Ei(){const e=fr.hostVersionsInfo&&fr.hostVersionsInfo.adaptiveCardSchemaVersion&&!xn(fr.hostVersionsInfo.adaptiveCardSchemaVersion);return Yr(fr)&&void 0!==(e&&fr.supports.dialog&&fr.supports.dialog.card)}function Ii(){Ns(or(di,"dialog.registerMessageForChildHandler"),"messageForChild",yi,!1)}function Pi(){return!(!Yr(fr)||!fr.supports.dialog)}const Ti="v2";var Oi,Ri;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Oi||(Oi={}));class Fi{constructor(){this.enabled=!0,this.selected=!1}}let ki,Mi,xi,Ni,Di;function Ui(){Ns(or(Ti,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Vi,!1),Ns(or(Ti,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",ji,!1),Ns(or(Ti,"menus.registerSetModuleViewHandler"),"setModuleView",Hi,!1)}function Li(e,t){if(Yr(fr),!Wi())throw Cn;xi=t,Dc(or(Ti,"menus.setUpViews"),"setUpViews",[e])}function Hi(e){xi&&xi(e)||(Yr(fr),Dc(or(Ti,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function _i(e,t){if(Yr(fr),!Wi())throw Cn;ki=t,Dc(or(Ti,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Vi(e){ki&&ki(e)||(Yr(fr),Dc(or(Ti,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Bi(e,t){if(Yr(fr),!Wi())throw Cn;Mi=t,Dc(or(Ti,"menus.showActionMenu"),"showActionMenu",[e])}function ji(e){Mi&&Mi(e)||(Yr(fr),Dc(or(Ti,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Wi(){return!(!Yr(fr)||!fr.supports.menus)}function zi(){Ns(or(cs,"pages.config.registerSettingsSaveHandler"),"settings.save",Zi,!1),Ns(or(cs,"pages.config.registerSettingsRemoveHandler"),"settings.remove",ea,!1)}function qi(e){return vs(or(cs,"pages.config.setValidityState"),e)}function $i(e){return Cs(or(cs,"pages.config.setConfig"),e)}function Gi(e){Ji(or(cs,"pages.config.registerOnSaveHandler"),e,()=>{if(!go(e)&&!na())throw Cn})}function Ji(e,t,n){!go(t)&&Yr(fr,pn.settings),n&&n(),Ni=t,!go(t)&&Dc(e,"registerHandler",["save"])}function Ki(e){Qi(or(cs,"pages.config.registerOnRemoveHandler"),e,()=>{if(!go(e)&&!na())throw Cn})}function Qi(e,t,n){!go(t)&&Yr(fr,pn.remove,pn.settings),n&&n(),Di=t,!go(t)&&Dc(e,"registerHandler",["remove"])}function Zi(e){const t=new Yi(e);Ni?Ni(t):tc()?cc("settings.save",[e]):t.notifySuccess()}function Xi(e){Ls(or(cs,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[pn.content],()=>{if(!na())throw Cn})}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Ri||(Ri={}));class Yi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Dc(or(cs,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Dc(or(cs,"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 ea(){const e=new ta;Di?Di(e):tc()?cc("settings.remove",[]):e.notifySuccess()}class ta{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Dc(or(cs,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Dc(or(cs,"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 na(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.config}class ra{}class oa extends ra{validate(e){return!0}deserialize(e){return e}}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())})};const aa=6e4,sa=rr("app");function ca(e,t){if(Hn()){return sa.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return kn(()=>ma(e,t),aa,new Error("SDK initialization timed out."))}function ua(e){Dc(e,xo.AppLoaded,[Tr])}function la(e,t){Dc(e,xo.ExpectedFailure,[t.reason,t.message])}function da(e,t){Dc(e,xo.Failure,[t.reason,t.message,t.authHeader])}function fa(e){return ia(this,void 0,void 0,function*(){if(Xn.initializeCompleted)return ga(e);if(!Xn.initializePromise)throw new Error(ft);return Xn.initializePromise.then(()=>ga(e))})}function pa(){var e;return Yr(fr)&&!!(null===(e=fr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ga(e){return ia(this,void 0,void 0,function*(){return pa()?Fc(xo.Success,[Tr],new oa,e).then(()=>({hasFinishedSuccessfully:!0})):(Dc(e,xo.Success,[Tr]),{hasFinishedSuccessfully:"unknown"})})}const ha=sa.extend("initializeHelper");function ma(e,t){return new Promise(n=>{Xn.initializeCalled||(Xn.initializeCalled=!0,Fs(),Xn.initializePromise=bc(t,e).then(({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Ze})=>{Xn.frameContext=e,Xn.hostClientType=t,Xn.clientSupportedSDKVersion=r;try{ha("Parsing %s",n);let e=JSON.parse(n);if(ha("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=Kn(e),n&&Ir(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ha("Attempting to parse %s as an SDK version",n),isNaN(In(n,Ze))||(Xn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(ha("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=Kn(e),Ir(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Ir(Ar(Xn.clientSupportedSDKVersion,pr,yr))}}Xn.initializeCompleted=!0}),Ui(),zi(),Ii()),Array.isArray(t)&&ro(t),void 0!==Xn.initializePromise?n(Xn.initializePromise):ha("GlobalVars.initializePromise is unexpectedly undefined")})}function va(e,t){!go(t)&&Xr(),Hs(e,t)}function wa(e,t){!go(t)&&Xr(),_s(e,t)}function Ca(e,t){return new Promise(n=>{Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage),n(Ic(e,"executeDeepLink",t))})}var ya=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 Sa=[];const ba=rr("validateOrigin");let Aa;function Ea(){return ya(this,void 0,void 0,function*(){Aa||(yield Pa())})}function Ia(){return 0===Sa.length}function Pa(e=!1){return ya(this,void 0,void 0,function*(){if(!Ia()&&!e)return Sa;if(Aa)return Aa;if(Hn())return Sa=st,st;{ba("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),ct);return Aa=fetch(ut,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ba("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(Ta(JSON.stringify(e)))return Sa=e.validOrigins,Sa;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?ba(`validOrigins fetch call to CDN failed due to Timeout of ${ct} ms. Defaulting to fallback list`):ba("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Sa=st,Sa)),Aa}})}function Ta(e){let t;try{t=JSON.parse(e)}catch(e){return!1}if(!t||!Array.isArray(t.validOrigins))return!1;for(const e of t.validOrigins){if("string"!=typeof e)return!1;try{new URL("https://"+e)}catch(t){return ba("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}}return!0}function Oa(e,t){let n;try{const t=Jr(e,ba);if(!t)return!1;n=t}catch(e){return!1}return n.test(t)}function Ra(e,t){const n=t||Ia()?st:Sa;return Fa(e,n)?Promise.resolve(!0):(ba("Origin %s is not in the local valid origins list, fetching from CDN",e),Pa(t).then(t=>Fa(e,t)))}function Fa(e,t){for(const t of Xn.additionalValidOrigins)if(Oa(t,e))return!0;const n=e.host;return Nn(e)?!!t.some(e=>qr(e,n))||(ba("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,Xn.additionalValidOrigins),!1):(ba("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}function ka(e){Ls(or(cs,"pages.appButton.onClick"),"appButtonClick",e,[pn.content],()=>{if(!Na())throw Cn})}function Ma(e){Ls(or(cs,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[pn.content],()=>{if(!Na())throw Cn})}function xa(e){Ls(or(cs,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[pn.content],()=>{if(!Na())throw Cn})}function Na(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.appButton}function Da(){Is()}function Ua(){return ls(or(cs,"pages.backStack.navigateBack"))}function La(e){Ha(or(cs,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!go(e)&&!_a())throw Cn})}function Ha(e,t,n){!go(t)&&Yr(fr),n&&n(),Es(t),!go(t)&&Dc(e,"registerHandler",["backButton"])}function _a(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.backStack}function Va(e){return new Promise(t=>{if(Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage),!ja())throw Cn;t(Tc(or(cs,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function Ba(){return new Promise(e=>{if(Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage),!ja())throw Cn;e(Tc(or(cs,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function ja(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.currentApp}function Wa(){if(Yr(fr,pn.content),!qa())throw Cn;Dc(or(cs,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function za(){if(Yr(fr,pn.content),!qa())throw Cn;Dc(or(cs,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function qa(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.fullTrust}function $a(e){return ds(or(cs,"pages.tabs.navigateToTab"),e)}function Ga(e){return ps(or(cs,"pages.tabs.getTabInstances"),e)}function Ja(e){return gs(or(cs,"pages.tabs.getMruTabInstances"),e)}function Ka(){return!(!Yr(fr)||!fr.supports.pages)&&!!fr.supports.pages.tabs}var Qa,Za;function Xa(e){const t=or(cs,"pages.returnFocus");if(Yr(fr),!ss())throw Cn;if(void 0===e&&Dc(t,"returnFocus",[!1]),"boolean"==typeof e)Dc(t,"returnFocus",[e]);else switch(e){case Za.PreviousLandmark:case Za.GoToActivityFeed:Dc(t,"returnFocus",[!1,e]);break;case Za.NextLandmark:Dc(t,"returnFocus",[!0,e])}}function Ya(e){Ls(or(cs,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!ss())throw Cn})}function es(e){ms(or(cs,"pages.setCurrentFrame"),e)}function ts(e,t,n){Ea(),ca(or(cs,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),es(e)}function ns(){return ws(or(cs,"pages.getConfig."))}function rs(e){return us(or(cs,"pages.navigateCrossDomain"),e)}function os(e){return new Promise(t=>{if(Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage),!ss())throw Cn;const n=or(cs,"pages.navigateToApp");if(fr.isLegacyTeams){t(Ic(n,"executeDeepLink",Mn(ys(e)?e:Ss(e))))}else{t(Ic(n,"pages.navigateToApp",ys(e)?bs(e):e))}})}function is(e){return hs(or(cs,"pages.shareDeepLink"),e)}function as(e){Ls(or(cs,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!go(e)&&!ss())throw Cn})}function ss(){return!(!Yr(fr)||!fr.supports.pages)}Ea(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Qa||(Qa={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Za||(Za={}));const cs="v2";function us(e,t){return new Promise(n=>{if(Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.remove,pn.task,pn.stage,pn.meetingStage),!ss())throw Cn;n(Pc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function ls(e){return new Promise(t=>{if(Yr(fr),!_a())throw Cn;t(Pc(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function ds(e,t){return new Promise(n=>{if(Yr(fr),!Ka())throw Cn;n(Pc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function fs(e,t){if(Yr(fr),!ss())throw Cn;Dc(e,"returnFocus",[t])}function ps(e,t){return new Promise(n=>{if(Yr(fr),!Ka())throw Cn;n(Ec(e,"getTabInstances",t))})}function gs(e,t){return new Promise(n=>{if(Yr(fr),!Ka())throw Cn;n(Ec(e,"getMruTabInstances",t))})}function hs(e,t){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!ss())throw Cn;Dc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ms(e,t){if(Yr(fr,pn.content),!ss())throw Cn;Dc(e,"setFrameContext",[t])}function vs(e,t){if(Yr(fr,pn.settings,pn.remove),!na())throw Cn;Dc(e,"settings.setValidityState",[t])}function ws(e){return new Promise(t=>{if(Yr(fr,pn.content,pn.settings,pn.remove,pn.sidePanel),!ss())throw Cn;t(Ec(e,"settings.getSettings"))})}function Cs(e,t){return new Promise(n=>{if(Yr(fr,pn.content,pn.settings,pn.sidePanel),!na())throw Cn;n(Ic(e,"settings.setSettings",t))})}function ys(e){return e.appId instanceof po}function Ss(e){return Object.assign(Object.assign({},e),{appId:new po(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function bs(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let As;function Es(e){As=e}function Is(){Ns(or(cs,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Ps,!1)}function Ps(){As&&As()||(tc()?cc("backButtonPress",[]):Ua())}var Ts=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 Os=rr("handlers");class Rs{static initializeHandlers(){Rs.handlers.themeChange=Vs,Rs.handlers.contextChange=Bs,Rs.handlers.load=qs,Rs.handlers.beforeUnload=Js,Is()}static uninitializeHandlers(){Rs.handlers={},Rs.themeChangeHandler=null,Rs.beforeUnloadHandler=null,Rs.beforeSuspendOrTerminateHandler=null,Rs.resumeHandler=null,Rs.contextChangeHandler=null}}function Fs(){Rs.initializeHandlers()}function ks(){Rs.uninitializeHandlers()}Rs.handlers={},Rs.themeChangeHandler=null,Rs.loadHandler=null,Rs.beforeUnloadHandler=null,Rs.beforeSuspendOrTerminateHandler=null,Rs.resumeHandler=null,Rs.hostToAppPerformanceMetricsHandler=null,Rs.contextChangeHandler=null;const Ms=Os.extend("callHandler");function xs(e,t){const n=Rs.handlers[e];if(n){Ms("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return tc()?(cc(e,t),[!1,void 0]):(Ms("Handler for action message %s not found.",e),[!1,void 0])}function Ns(e,t,n,r=!0,o=[]){n?(Rs.handlers[t]=n,r&&Dc(e,"registerHandler",[t,...o])):delete Rs.handlers[t]}function Ds(e){delete Rs.handlers[e]}function Us(e){return null!=Rs.handlers[e]}function Ls(e,t,n,r,o){n&&Yr(fr,...r),o&&o(),Ns(e,t,n)}function Hs(e,t){Rs.themeChangeHandler=t,!go(t)&&Dc(e,"registerHandler",["themeChange"])}function _s(e,t){Rs.contextChangeHandler=t,!go(t)&&Dc(e,"registerHandler",["contextChange"])}function Vs(e,t){const n=!go(t);Rs.themeChangeHandler&&Rs.themeChangeHandler(e,n?t:void 0),tc()&&cc("themeChange",n?[e,t]:[e])}function Bs(e){Rs.contextChangeHandler&&Rs.contextChangeHandler(e),tc()&&cc("contextChange",[e])}function js(e){Rs.hostToAppPerformanceMetricsHandler=e}function Ws(e){Rs.hostToAppPerformanceMetricsHandler&&Rs.hostToAppPerformanceMetricsHandler(e)}function zs(e,t){Rs.loadHandler=t,!go(t)&&Dc(e,"registerHandler",["load"])}function qs(e){const t=$s(e);Rs.resumeHandler?(Rs.resumeHandler(t),tc()&&cc("load",[t])):Rs.loadHandler&&(Rs.loadHandler(e),tc()&&cc("load",[e]))}function $s(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Gs(e,t){Rs.beforeUnloadHandler=t,!go(t)&&Dc(e,"registerHandler",["beforeUnload"])}function Js(){return Ts(this,void 0,void 0,function*(){const e=()=>{Dc(or("v2","handleBeforeUnload"),"readyToUnload",[])};Rs.beforeSuspendOrTerminateHandler?(yield Rs.beforeSuspendOrTerminateHandler(),tc()?cc("beforeUnload"):e()):Rs.beforeUnloadHandler&&Rs.beforeUnloadHandler(e)||(tc()?cc("beforeUnload"):e())})}function Ks(e){Rs.beforeSuspendOrTerminateHandler=e,!go(e)&&Dc(or("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Qs(e){Rs.resumeHandler=e,!go(e)&&Dc(or("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Zs=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 Xs=rr("childProxyingCommunication");class Ys{}function ec(){Ys.window=null,Ys.origin=null,Ys.messageQueue=[]}function tc(){return!!Fr()&&!!Ys.window}function nc(e,t){return!!Fr()&&(Ys.window&&!Ys.window.closed&&e!==Ys.window||(Ys.window=e,Ys.origin=t),Ys.window&&Ys.window.closed?(Ys.window=null,Ys.origin=null,!1):Ys.window===e)}function rc(e,t,n,r){return Zs(this,void 0,void 0,function*(){Ys.window===t&&(Wr(Ys.window,Ys.origin,Ys.messageQueue,"child"),ic(e,n,r))})}Ys.messageQueue=[];const oc=Xs.extend("handleIncomingMessageFromChild");function ic(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Hr(e.data),[o,i]=xs(r.func,r.args);if(o&&void 0!==i)return oc("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Br(r),r.func),void sc(r.id,r.uuid,Array.isArray(i)?i:[i]);oc("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Br(r),r.func),ac(r,t,n)}function ac(e,t,n){const r=t(or("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Ys.origin;n(r.uuid,(...t)=>{if(!Ys.window)return;if(!xr().disableEnforceOriginMatchForChildResponses&&o!==Ys.origin)return void oc("Origin of child window has changed, not sending response back to child window");const n=t.pop();oc("Message from parent being relayed to child, id: %s",Br(e)),sc(e.id,e.uuid,t,n)})}function sc(e,t,n,r){const o=Ys.window,i=uc(e,t,n,r),a=Vr(i),s=Ys.origin;o&&s&&(oc("Sending message %s to %s via postMessage, args = %o",Br(a),"child",a.args),o.postMessage(a,s))}function cc(e,t){const n=Ys.window,r=lc(e,t),o=Ys.origin;n&&o?n.postMessage(r,o):Ys.messageQueue.push(r)}function uc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function lc(e,t){return{func:e,args:t||[]}}class dc{static storeCallbackInformation(e,t){dc.callbackInformation.set(e,t)}static clearMessages(){dc.callbackInformation.clear()}static deleteMessageInformation(e){dc.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Ws({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=dc.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Ws({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),dc.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}dc.callbackInformation=new Map;const fc=rr("nestedAppAuthUtils"),pc=fc.extend("tryPolyfillWithNestedAppAuthBridge"),gc="v2";function hc(e,t,n){var r;const o=pc;if(Xn.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=vc(a,n);s&&(a.nestedAppAuthBridge=s)}const mc=fc.extend("createNestedAppAuthBridge");function vc(e,t){const n=mc;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=or(gc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var wc=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 Cc=rr("communication");class yc{}class Sc{}function bc(e,t){if(Sc.messageListener=e=>Wc(e),yc.currentWindow=yc.currentWindow||Ln(),yc.parentWindow=yc.currentWindow.parent!==yc.currentWindow.self?yc.currentWindow.parent:yc.currentWindow.opener,yc.topWindow=yc.currentWindow.top,(yc.parentWindow||e)&&yc.currentWindow.addEventListener("message",Sc.messageListener,!1),!yc.parentWindow){const e=yc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Xn.isFramelessWindow=!0,e.onNativeMessage=Yc}try{return yc.parentOrigin="*",Oc(t,"initialize",[Tr,cr,e]).then(([e,t,n,r])=>(hc(r,yc.currentWindow,{onMessage:qc,sendPostMessage:Lc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r}))}finally{yc.parentOrigin=null}}function Ac(){yc.currentWindow&&yc.currentWindow.removeEventListener("message",Sc.messageListener,!1),yc.currentWindow=null,yc.parentWindow=null,yc.parentOrigin=null,Sc.parentMessageQueue=[],Sc.nextMessageId=0,Sc.callbacks.clear(),Sc.promiseCallbacks.clear(),Sc.portCallbacks.clear(),Sc.legacyMessageIdsToUuidMap={},dc.clearMessages(),ec()}function Ec(e,t,...n){return Oc(e,t,n).then(([e])=>e)}function Ic(e,t,...n){return Oc(e,t,n).then(([e,t])=>{if(!e)throw new Error(t)})}function Pc(e,t,n,...r){return Oc(e,t,r).then(([e,t])=>{if(!e)throw new Error(t||n)})}function Tc(e,t,...n){return Oc(e,t,n).then(([e,t])=>{if(e)throw e;return t})}function Oc(e,t,n=void 0){if(!ir(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(Nc(Bc(e,t,n).uuid))})}function Rc(e){return e.map(e=>Pr(e)?e.serialize():e)}function Fc(e,t,n,r,o){var i;return wc(this,void 0,void 0,function*(){const a=Rc(t),[s]=yield Oc(r,e,a);if(o&&o(s)||!o&&Ke(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(`${Be.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}function kc(e,t,n,r){var o;return wc(this,void 0,void 0,function*(){const i=Rc(t),[a]=yield Oc(n,e,i);if(r&&r(a)||!r&&Ke(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Be.INTERNAL_ERROR}, message: Invalid response from host`)})}function Mc(e,t,n=void 0){if(!ir(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 xc(Bc(e,t,n).uuid)}function xc(e){return new Promise((t,n)=>{Sc.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 Nc(e){return new Promise(t=>{Sc.promiseCallbacks.set(e,t)})}function Dc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!ir(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&&Sc.callbacks.set(i.uuid,r)}Sc.parentMessageQueue=[],Sc.topMessageQueue=[],Sc.nextMessageId=0,Sc.callbacks=new Map,Sc.promiseCallbacks=new Map,Sc.portCallbacks=new Map,Sc.legacyMessageIdsToUuidMap={};const Uc=Cc.extend("sendNestedAuthRequestToTopWindow");function Lc(e,t){const n=Uc,r=yc.topWindow,o=su(e,t);return n("Message %s information: %o",Br(o),{actionName:o.func}),_c(r,o)}const Hc=Cc.extend("sendRequestToTargetWindowHelper");function _c(e,t){const n=Hc,r=ou(e),o=Lr(t);if(Xn.isFramelessWindow)yc.currentWindow&&yc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Br(o),r),yc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=ru(e);e&&i?(n("Sending message %s to %s via postMessage",Br(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Br(o),r),nu(e).push(t))}return t}const Vc=Cc.extend("sendMessageToParentHelper");function Bc(e,t,n,r,o){const i=Vc,a=yc.parentWindow,s=au(e,t,n,r,o);return dc.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Br(s),{actionName:t,args:n}),_c(a,s)}const jc=Cc.extend("processIncomingMessage");function Wc(e){return wc(this,void 0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void jc("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 Gc(t,n).then(r=>{r?(Jc(t,n),t!==yc.parentWindow?nc(t,n)&&rc(e,t,Bc,(e,t)=>Sc.callbacks.set(e,t)):Yc(e)):jc("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 zc=Cc.extend("processAuthBridgeMessage");function qc(e,t){var n,r;const o=zc;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?Gc(c,u).then(e=>{e?(yc.topWindow&&!yc.topWindow.closed&&c!==yc.topWindow||(yc.topWindow=c,yc.topOrigin=u),yc.topWindow&&yc.topWindow.closed&&(yc.topWindow=null,yc.topOrigin=null),Wr(yc.topWindow,yc.topOrigin,Sc.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")}).catch(e=>{o("Unexpected error verifying message origin: %o",e)}):o("Message being ignored by app because it is coming for a target that is null")}const $c=Cc.extend("verifyIncomingMessageOrigin");function Gc(e,t){return wc(this,void 0,void 0,function*(){if(yc.currentWindow&&e===yc.currentWindow)return $c("Should not process message because it is coming from the current window"),!1;if(yc.currentWindow&&yc.currentWindow.location&&t&&t===yc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return $c("Message has an invalid origin of %s",t),!1}const n=yield Ra(e);return n||$c("Message has an invalid origin of %s",t),n}})}function Jc(e,t){Xn.isFramelessWindow||yc.parentWindow&&!yc.parentWindow.closed&&e!==yc.parentWindow||(yc.parentWindow=e,yc.parentOrigin=t),yc.parentWindow&&yc.parentWindow.closed&&(yc.parentWindow=null,yc.parentOrigin=null),Wr(yc.parentWindow,yc.parentOrigin,Sc.parentMessageQueue,"parent")}const Kc=Cc.extend("handleIncomingMessageFromParent");function Qc(e){const t=Kc;if(!e.uuid)return Sc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Zc(Sc.callbacks,t);if(n)return n;const r=Zc(Sc.promiseCallbacks,t);if(r)return r;const o=Zc(Sc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Br(e))}function Zc(e,t){if(t){const n=[...e].find(([e,n])=>e.toString()===t.toString());if(n)return n[0]}}function Xc(e,t){const n=Zc(t,e.uuid);n&&t.delete(n),e.uuid?Sc.legacyMessageIdsToUuidMap={}:delete Sc.legacyMessageIdsToUuidMap[e.id]}function Yc(e){const t=Kc,n=Gn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=_r(r),i=Qc(o);if(i){const r=Sc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),dc.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]),eu(e)||(t("Removing registered callback for message %s",i.toString()),Xc(o,Sc.callbacks)));const a=Sc.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()),Xc(o,Sc.promiseCallbacks));const s=Sc.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()),Xc(o,Sc.portCallbacks)}o.uuid&&(Sc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;dc.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Br(r),r.func),xs(r.func,r.args)}else t("Received an unknown message: %O",e)}function eu(e){return!0===e.data.isPartialResponse}function tu(){return yc.topWindow!==yc.parentWindow}function nu(e){return e===yc.topWindow&&tu()?Sc.topMessageQueue:e===yc.parentWindow?Sc.parentMessageQueue:[]}function ru(e){return e===yc.topWindow&&tu()?yc.topOrigin:e===yc.parentWindow?yc.parentOrigin:null}function ou(e){return e===yc.topWindow&&tu()?"top":e===yc.parentWindow?"parent":null}function iu(e,t){let n;n=yc.currentWindow.setInterval(()=>{0===nu(e).length&&(clearInterval(n),t())},100)}function au(e,t,n,r,o){const i=Sc.nextMessageId++,a=new Qn;Sc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Xn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Gn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function su(e,t){const n=Sc.nextMessageId++,r=new Qn;return Sc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Gn(),apiVersionTag:t,args:[],data:e}}const cu="v1";function uu(e){if(!go(e)&&Yr(fr),!go(e)&&!lu())throw Cn;e?Ns(or(cu,"log.request"),"log.request",()=>{const t=e();Dc(or(cu,"log.receive"),"log.receive",[t])}):Ds("log.request")}function lu(){return!(!Yr(fr)||!fr.supports.logs)}var du,fu,pu;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(du||(du={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(fu||(fu={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(pu||(pu={}));const gu="v1";function hu(e,t){Yr(fr),Dc(or(gu,"uploadCustomApp"),"uploadCustomApp",[e],t||En())}function mu(e,t,n){Yr(fr),Dc(or(gu,"sendCustomMessage"),e,t,n)}function vu(e,t){if(Yr(fr),!tc())throw new Error("The child window has not yet been initialized or is not present");cc(e,t)}function wu(e,t){Yr(fr),Ns(or(gu,"registerCustomHandler"),e,(...e)=>t.apply(this,e))}function Cu(e,t){Yr(fr),Ns(or(gu,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function yu(e){Yr(fr,pn.content,pn.sidePanel,pn.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,e.messageId,e.callerInfo,e.atpData,e.shareUrl,e.replyChainId];Dc(or(gu,"openFilePreview"),"openFilePreview",t)}const Su="v1";function bu(e){if(Yr(fr,pn.content),!Pu())throw Cn;return kc("contextualSearch.openContextualSearch",[null==e?void 0:e.triggerSource],or(Su,"contextualSearch.openContextualSearch"))}function Au(){if(Yr(fr,pn.content),!Pu())throw Cn;return kc("contextualSearch.closeContextualSearch",[],or(Su,"contextualSearch.closeContextualSearch"))}function Eu(e){Ls(or(Su,"contextualSearch.registerOpenContextualSearchHandler"),"contextualSearchOpened",e,[pn.content],()=>{if(!Pu())throw Cn})}function Iu(e){Ls(or(Su,"contextualSearch.registerCloseContextualSearchHandler"),"contextualSearchClosed",e,[pn.content],()=>{if(!Pu())throw Cn})}function Pu(){return Yr(fr)&&!!fr.supports.contextualSearch}const Tu="v1";function Ou(e){return new Promise(t=>{if(Yr(fr,pn.content),!ku())throw Cn;const n=Ic(or(Tu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Ns(or(Tu,"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&&Ns(or(Tu,"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 Ru(){if(Yr(fr,pn.content),!ku())throw Cn;Dc(or(Tu,"conversations.closeConversation"),"conversations.closeConversation"),Ds("startConversation"),Ds("closeConversation")}function Fu(){return new Promise(e=>{if(Yr(fr),!ku())throw Cn;e(Ec(or(Tu,"conversations.getChatMember"),"getChatMembers"))})}function ku(){return!(!Yr(fr)||!fr.supports.conversations)}var Mu=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 xu="v2",Nu=rr("copilot");function Du(){var e;return Yr(fr)&&!!(null===(e=fr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Uu(e,t){var n;return void 0===t&&(t=null!==(n=Gn())&&void 0!==n?n:Date.now()),Mu(this,void 0,void 0,function*(){return Yr(fr),Nu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),kc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],or(xu,"copilot.customTelemetry.sendCustomTelemetryData"))})}var Lu=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 Hu="v2",_u=rr("copilot");function Vu(){var e,t;return Yr(fr)&&(!!(null===(e=fr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=fr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Bu(e){var t,n,r;return Lu(this,void 0,void 0,function*(){if(Yr(fr),!Vu())throw new Error(`Error code: ${Cn.errorCode}, message: Not supported on platform`);if((null===(t=fr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return _u("Eligibility information is already available on runtime."),fr.hostVersionsInfo.appEligibilityInformation;_u("Eligibility information is not available on runtime. Requesting from host.");const o=yield Ec(or(Hu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Ke(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(!ju(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=qe.NotAdult),o})}function ju(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,zu,qu,$u,Gu,Ju,Ku,Qu,Zu;!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"}(zu||(zu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(qu||(qu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}($u||($u={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Gu||(Gu={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Ju||(Ju={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Ku||(Ku={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Qu||(Qu={})),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"}(Zu||(Zu={}));class Xu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Yu=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 el="v2";function tl(){var e;return Yr(fr)&&!!(null===(e=fr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function nl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Zu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||Ke(e)}function rl(e){return Yu(this,void 0,void 0,function*(){Yr(fr);return Fc("copilot.sidePanel.getContent",e?[new ul(e)]:[],new sl,or(el,"copilot.sidePanel.getContent"),nl)})}function ol(e){return Yu(this,void 0,void 0,function*(){Yr(fr);return Fc("copilot.sidePanel.preCheckUserConsent",e?[new ll(e)]:[],new cl,or(el,"copilot.sidePanel.preCheckUserConsent"),nl)})}function il(e){Ls(or(el,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[pn.content],()=>{if(!tl())throw al})}const al=new Xu(Zu.NotSupportedOnPlatform,"This API is not supported on the current platform.");class sl extends ra{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class cl extends ra{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class ul{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class ll{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var dl=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 fl="v2";function pl(){var e;return Yr(fr)&&!!(null===(e=fr.supports.copilot)||void 0===e?void 0:e.view)}function gl(){return dl(this,void 0,void 0,function*(){Yr(fr),yield Fc("copilot.view.closeSidePanel",[],new hl,or(fl,"copilot.view.closeSidePanel"))})}class hl extends ra{validate(e){return!0}deserialize(e){return e}}const ml="v2";class vl{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function wl(e){if("object"!=typeof e||null===e)return!1;const t=e;return t.responseType===Sl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Cl="Action.Execute";var yl,Sl,bl,Al;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(yl||(yl={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(Sl||(Sl={}));class El extends ra{validate(e){return wl(e)}deserialize(e){return e}}function Il(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 Pl(e){e.requestType===yl.ActionExecuteInvokeRequest?Tl(e):e.requestType===yl.QueryMessageExtensionRequest&&Ol(e)}function Tl(e){if(e.type!==Cl){throw{errorCode:bl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Cl}"`}}if(!Jn(e.data)){throw{errorCode:bl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Ol(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 Rl(e,t,n){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;const r=new po(e);return Pl(n),Oc(or(ml,"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 Fl(e,t){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;const n=new po(e);return Oc(or(ml,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([e,t])=>{if(!e)throw t})}function kl(e,t,n){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;const r=new po(e);return Pl(n),Oc(or(ml,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then(([e,t])=>{if(e&&null!=t.responseType)return t;throw t})}function Ml(e,t,n){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;return _n(e,new Error("titleId is Invalid.")),_n(t,new Error("oauthConfigId is Invalid.")),Oc(or(ml,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([e,t])=>{if(!e)throw t})}function xl(e,t,n){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;return _n(e,new Error("titleId is Invalid.")),t&&Vn(t),Oc(or(ml,"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(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(bl||(bl={}));class Nl{constructor(e){this.param=e}serialize(){var e,t,n;return{connectorId:this.param.connectorId,oAuthConfigId:this.param.oAuthConfigId,traceId:null!==(n=null===(t=null===(e=this.param.traceId)||void 0===e?void 0:e.toString)||void 0===t?void 0:t.call(e))&&void 0!==n?n:this.param.traceId,windowParameters:this.param.windowParameters?Object.assign({},this.param.windowParameters):void 0}}}function Dl(e){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;return _n(e.connectorId,new Error("connectorId is Invalid.")),_n(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),kc("externalAppAuthentication.authenticateWithConnector",[new Nl(e)],or(ml,"externalAppAuthentication.authenticateWithConnector"),Il)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(Al||(Al={}));class Ul extends ra{validate(e){return"string"==typeof e&&e in Al}deserialize(e){return e}}function Ll(e){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;return _n(e.connectorId,new Error("connectorId is Invalid.")),_n(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),Fc("externalAppAuthentication.getUserAuthenticationStateForConnector",[new Nl(e)],new Ul,or(ml,"externalAppAuthentication.getUserAuthenticationStateForConnector"),Il)}function Hl(e){if(Yr(fr,pn.content,pn.sidePanel),!_l())throw Cn;return _n(e.connectorId,new Error("connectorId is Invalid.")),_n(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),kc("externalAppAuthentication.disconnectConnector",[new Nl(e)],or(ml,"externalAppAuthentication.disconnectConnector"),Il)}function _l(){return!(!Yr(fr)||!fr.supports.externalAppAuthentication)}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 Bl="v2";function jl(e,t,n){return Vl(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!$l())throw Cn;return Gl(e,t),kc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],or(Bl,"externalAppAuthenticationForCEA.authenticateWithSSO"),Il)})}function Wl(e,t,n){return Vl(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!$l())throw Cn;return Gl(e,t),kc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],or(Bl,"externalAppAuthenticationForCEA.authenticateWithOauth"),Il)})}function zl(e,t,n,r){return Vl(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!$l())throw Cn;return Gl(e,t),Tl(r),Fc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new vl(r),n.url.href,n.width,n.height,n.isExternal],new El,or(Bl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Il)})}function ql(e,t,n,r){return Vl(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!$l())throw Cn;return Gl(e,t),Tl(r),Fc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new vl(r),n.authId,n.connectionName,n.claims,n.silent],new El,or(Bl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Il)})}function $l(){return!(!Yr(fr)||!fr.supports.externalAppAuthenticationForCEA)}function Gl(e,t){_n(t,new Error("conversation id is not valid.")),lo(e)}const Jl="v2";var Kl,Ql;function Zl(e,t){if(Yr(fr,pn.content,pn.sidePanel),!Yl())throw Cn;const n=new po(e);return Oc(or(Jl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([e,t])=>{if(!e)throw t})}function Xl(e,t,n){if(Yr(fr,pn.content,pn.sidePanel),!Yl())throw Cn;const r=new po(e);return Oc(or(Jl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([e,t])=>{if(e)throw e;return t})}function Yl(){return!(!Yr(fr)||!fr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Kl||(Kl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Ql||(Ql={}));var ed=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 td="v2";function nd(e,t,n){return ed(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!od())throw Cn;Gl(e,t);const[r,o]=yield Oc(or(td,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function rd(e,t,n){return ed(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!od())throw Cn;Gl(e,t);const r=yield Ec(or(td,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function od(){return!(!Yr(fr)||!fr.supports.externalAppCardActionsForCEA)}var id;function ad(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(id).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(id||(id={}));var sd=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 cd="v2";function ud(e,t,n){return sd(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!ld())throw Cn;return dd(e,n),kc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new fd(t),n],or(cd,"externalAppCardActionsForDA.processActionOpenUrlDialog"),ad)})}function ld(){return!(!Yr(fr)||!fr.supports.externalAppCardActionsForDA)}function dd(e,t){lo(e),Zn(t)}class fd{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var pd=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 gd="v2";function hd(e,t,n){return pd(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.sidePanel),!md())throw Cn;const r=new po(e),[o,i]=yield Oc(or(gd,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function md(){return!(!Yr(fr)||!fr.supports.externalAppCommands)}const vd="v1";var wd,Cd,yd,Sd,bd,Ad;function Ed(e,t){if(Yr(fr,pn.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");Dc(or(vd,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Id(e,t){if(Yr(fr,pn.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");Dc(or(vd,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Pd(e,t,n){if(Yr(fr,pn.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");Dc(or(vd,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Td(e,t,n){if(Yr(fr,pn.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");Dc(or(vd,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Od(e,t,n){if(Yr(fr,pn.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");Dc(or(vd,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Rd(e=!1,t){if(Yr(fr,pn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Dc(or(vd,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Fd(e,t,n,r,o=!1,i){if(Yr(fr,pn.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");Dc(or(vd,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function kd(e){if(Yr(fr,pn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Dc(or(vd,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Md(e=void 0,t){if(Yr(fr,pn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Dc(or(vd,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function xd(e){if(Yr(fr,pn.content),!e)throw jd(Be.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Dc(or(vd,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Nd(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw jd(Be.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Dc(or(vd,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Dd(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw jd(Be.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Dc(or(vd,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Ud(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw jd(Be.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Dc(or(vd,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Ld(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw jd(Be.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Dc(or(vd,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Hd(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw jd(Be.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Dc(or(vd,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function _d(e,t){if(Yr(fr,pn.content),!t)throw jd(Be.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw jd(Be.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw jd(Be.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Dc(or(vd,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Vd(e){if(Yr(fr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Ns(or(vd,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Bd(e){if(Yr(fr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Ns(or(vd,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function jd(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"}(wd||(wd={})),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"}(Cd||(Cd={})),function(e){e.ClassMaterials="classMaterials"}(yd||(yd={})),function(e){e.Readonly="readonly"}(Sd||(Sd={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(bd||(bd={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Ad||(Ad={}));const Wd="v1";function zd(){return new Promise(e=>{if(Yr(fr),!Jd())throw Cn;e(Tc(or(Wd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function qd(e){return new Promise(t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Yr(fr),!Jd())throw Cn;t(Tc(or(Wd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function $d(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Yr(fr),!Jd())throw Cn;Ns(or(Wd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{Yr(fr),e(t)})}function Gd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Yr(fr),!Jd())throw Cn;Ns(or(Wd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{Yr(fr),e(t)})}function Jd(){return!(!Yr(fr)||!fr.supports.meetingRoom)}function Kd(){return!(!Yr(fr)||!fr.supports.messageChannels)}const Qd="1.0.1",Zd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void af("Invalid message format, ignoring. Message: %o",e);if(!nf(e.source,e.origin))return void af("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return sf("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void af("Invalid response format, ignoring. Message: %o",e);t(r)}};let Xd=null,Yd=!1;function ef(e,t,n=!1){if(Yd=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.`);Xd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void af("Nested App Auth Bridge is already present");const o=tf(r);o&&(r.nestedAppAuthBridge=o)}function tf(e){const t=new WeakMap,{onMessage:n}=Zd,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 af(`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=rf(t);if(e===e.top||!Xd)return void sf("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Xd)}}catch(e){return void sf("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 nf(e,t){if(t===Xd)try{return"https:"===new URL(t).protocol}catch(e){return sf("Invalid message origin URL:",e),!1}return!1}function rf(e){const t=Date.now();return{id:of(),uuid:cn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function of(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function af(...e){Yd&&console.log(...e)}function sf(...e){Yd&&console.error(...e)}const cf="v1";function uf(e){if(Yr(fr,pn.content),!lf())throw Cn;Dc(or(cf,"notifications.showNotification"),"notifications.showNotification",[e])}function lf(){return!(!Yr(fr)||!fr.supports.notifications)}const df="v2";function ff(e){if(!hf())throw new Error(Be.NOT_SUPPORTED_ON_PLATFORM.toString());if(go(e))throw new Error(Be.INVALID_ARGUMENTS.toString());Ns(or(df,"otherApp.install"),"otherApp.install",e)}function pf(){if(!hf())throw new Error(Be.NOT_SUPPORTED_ON_PLATFORM.toString());Dc(or(df,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Ds("otherApp.install")}function gf(e){if(!hf())throw new Error(Be.NOT_SUPPORTED_ON_PLATFORM.toString());return kc("otherApp.notifyInstallCompleted",[e.toString()],or(df,"otherApp.notifyInstallCompleted"))}function hf(){return!(!Yr(fr)||!fr.supports.otherAppStateChange)}var mf=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 vf="v2";function wf(){return Yr(fr)&&!!fr.supports.plugins}function Cf(e){return mf(this,void 0,void 0,function*(){if(Yr(fr),!e.func)throw new Error("func is required in PluginMessage.");return kc("plugins.sendMessage",[new Sf(e)],or(vf,"plugins.sendMessage"))})}function yf(e){Ls(or(vf,"plugins.receiveMessage"),"plugins.receiveMessage",(...t)=>{e(bf(t))},Object.values(pn),()=>{if(!wf())throw new Error("Receiving plugin messages is not supported in the current host.")})}class Sf{constructor(e){this.message=e}serialize(){return this.message}}function bf(e){if(1===e.length&&Af(e[0]))return e[0];const[t,n,r]=e;return{func:"string"==typeof t?t:String(null!=t?t:""),args:n,correlationId:"string"==typeof r?r:void 0}}function Af(e){if(!e||"object"!=typeof e)return!1;return"string"==typeof e.func}const Ef="v1";var If,Pf,Tf;function Of(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Yr(fr,pn.sidePanel),!Uf())throw Cn;Dc(or(Ef,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Rf(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(Yr(fr,pn.sidePanel),!Uf())throw Cn;Dc(or(Ef,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Ff(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(Yr(fr,pn.sidePanel),!Uf())throw Cn;Dc(or(Ef,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function kf(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Yr(fr,pn.sidePanel),!Uf())throw Cn;Dc(or(Ef,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Mf(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Yr(fr,pn.sidePanel),!Uf())throw Cn;Ns(or(Ef,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function xf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Yr(fr,pn.sidePanel),!Uf())throw Cn;Ns(or(Ef,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Nf(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Yr(fr,pn.sidePanel),!Uf())throw Cn;Ns(or(Ef,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Df(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Yr(fr,pn.sidePanel),!Uf())throw Cn;Ns(or(Ef,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Uf(){return!(!Yr(fr)||!fr.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"}(If||(If={})),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"}(Pf||(Pf={})),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"}(Tf||(Tf={}));const Lf="v1";function Hf(e,t,n,r){if(Yr(fr,pn.content),!_f())throw Cn;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");Dc(or(Lf,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function _f(){return!(!Yr(fr)||!fr.supports.appEntity)}const Vf="v1";function Bf(e){return new Promise(t=>{if(Yr(fr),!jf())throw Cn;if((Xn.hostClientType===dn.android||Xn.hostClientType===dn.teamsRoomsAndroid||Xn.hostClientType===dn.teamsPhones||Xn.hostClientType===dn.teamsDisplays)&&!eo(tt)){const e={errorCode:Be.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Ec(or(Vf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function jf(){return!(!Yr(fr)||!fr.supports.teams)&&(!!fr.supports.teams.fullTrust&&!!fr.supports.teams.fullTrust.joinedTeams)}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 zf="v1";function qf(e){return Wf(this,void 0,void 0,function*(){if(Yr(fr),!$f())throw Cn;return Fc("getConfigSetting",[e],new oa,or(zf,"teams.fullTrust.getConfigSetting"))})}function $f(){return!(!Yr(fr)||!fr.supports.teams)&&!!fr.supports.teams.fullTrust}const Gf="v1";var Jf;function Kf(e,t){if(Yr(fr,pn.content),!Zf())throw Cn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Dc(or(Gf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Qf(e,t){if(Yr(fr),!Zf())throw Cn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Dc(or(Gf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Zf(){return!(!Yr(fr)||!fr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Jf||(Jf={}));class Xf{static setTimeout(e,t){const n=performance.now(),r=Pn();return Xf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Xf.setTimeoutCallbacks[e]}static setInterval(e,t){Xf.setTimeout(function n(){e(),Xf.setTimeout(n,t)},t)}static tick(){const e=performance.now(),t=[];for(const n in Xf.setTimeoutCallbacks){const r=Xf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Xf.setTimeoutCallbacks[e].callback(),delete Xf.setTimeoutCallbacks[e]}}}Xf.setTimeoutCallbacks={};class Yf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Xf.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&&Xf.clearTimeout(this.timeoutId),this.timeoutId=Xf.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(Yf.maxSessionTimeoutInMs,2*t.timeoutInMs):Yf.initialSessionTimeoutInMs}}Yf.initialSessionTimeoutInMs=1e3,Yf.maxSessionTimeoutInMs=3e4;const ep="v2";class tp{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Yf(tp.distributionBinSize,e=>this.reportPerformanceEvent(or(ep,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e]))}startMonitorSlowFrameProcessing(){Xf.setInterval(()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(or(ep,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},tp.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){Xf.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(or(ep,"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(or(ep,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}tp.distributionBinSize=1e3,tp.calculateFPSInterval=1e3;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())})},rp=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 op="v2",ip=Hn()?void 0:new tp(Dc);var ap,sp,cp;function up(e){if(Yr(fr,pn.sidePanel),!gp())throw Cn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Ns(or(op,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==ip?void 0:ip.setFrameProcessTimeLimit(e.timeLimit),!1),Cp())hp(e.videoFrameHandler,e.config);else{if(!Sp())throw Cn;vp(e.videoBufferHandler,e.config)}null==ip||ip.startMonitorSlowFrameProcessing()}function lp(e,t){if(Yr(fr,pn.sidePanel),!gp())throw Cn;Dc(or(op,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function dp(e){if(Yr(fr,pn.sidePanel),!gp())throw Cn;Ns(or(op,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",xp(e,ip),!1),Dc(or(op,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function fp(e){Dc(or(op,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function pp(e){Dc(or(op,"videoEffects.notifyError"),"video.notifyError",[e])}function gp(){return Yr(fr)&&!!fr.supports.video&&(!!fr.supports.video.mediaStream||!!fr.supports.video.sharedFrame)}function hp(e,t){if(Yr(fr,pn.sidePanel),!gp()||!Cp())throw Cn;Ns(or(op,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>np(this,void 0,void 0,function*(){const{streamId:n}=t,r=mp(e,ip);yield Ep(n,r,pp,ip)}),!1),Dc(or(op,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function mp(e,t){return n=>np(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 vp(e,t){if(Yr(fr,pn.sidePanel),!gp()||!Sp())throw Cn;Ns(or(op,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",t=>{if(t){const n=t.timestamp;null==ip||ip.reportStartFrameProcessing(t.width,t.height),e(wp(t),()=>{null==ip||ip.reportFrameProcessed(),fp(n)},pp)}},!1),Dc(or(op,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function wp(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=rp(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Cp(){var e;return Yr(fr,pn.sidePanel)&&yp()&&!!(null===(e=fr.supports.video)||void 0===e?void 0:e.mediaStream)}function yp(){var e,t,n,r;return!(!(null===(t=null===(e=Ln().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Ln().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Sp(){var e;return Yr(fr,pn.sidePanel)&&!!(null===(e=fr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(ap||(ap={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(sp||(sp={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(cp||(cp={}));var bp=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 Ap="v2";function Ep(e,t,n,r){var o,i;return bp(this,void 0,void 0,function*(){const a=Tp();!Hn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Op(yield Pp(e,n,r),new Rp(n,t),a.writable)})}function Ip(e,t,n,r){var o,i;return bp(this,void 0,void 0,function*(){const a=Tp();!Hn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Op(yield Pp(e,n,r),new Mp(n,t),a.writable)})}function Pp(e,t,n){return bp(this,void 0,void 0,function*(){if(Hn())throw Cn;const r=Ln().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 Tp(){if(Hn())throw Cn;const e=window.MediaStreamTrackGenerator;if(!e)throw Cn;return new e({kind:"video"})}function Op(e,t,n){new(0,Ln().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Rp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>bp(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 Fp{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 kp{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 Mp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>bp(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=>bp(this,void 0,void 0,function*(){if(Hn())throw Cn;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 Fp(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 kp(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}}}),Ns(or(Ap,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e})}}function xp(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{null==t||t.reportVideoEffectChanged(n||"",r),Dc(or(Ap,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(e=>{const t=e in cp?e:cp.InitializationFailure;Dc(or(Ap,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])})}}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 Dp="v2",Up=2e3,Lp=Hn()?void 0:new tp(Dc);var Hp;function _p(e){var t,n;if(!$p())throw Cn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Yr(fr,pn.sidePanel)){if(Ns(or(Dp,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Lp?void 0:Lp.setFrameProcessTimeLimit(e),!1),null===(t=fr.supports.video)||void 0===t?void 0:t.mediaStream)Ns(or(Dp,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>Np(this,void 0,void 0,function*(){const{streamId:n,metadataInTexture:r}=t,o=Lp?Bp(e.videoFrameHandler,Lp):e.videoFrameHandler;r?yield Ip(n,o,Jp,Lp):yield Ep(n,o,Jp,Lp)}),!1),Dc(or(Dp,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=fr.supports.video)||void 0===n?void 0:n.sharedFrame))throw Cn;Ns(or(Dp,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",t=>{if(t){null==Lp||Lp.reportStartFrameProcessing(t.width,t.height);const n=Vp(),r=t.timestamp;e.videoBufferHandler(jp(t),()=>{n(),null==Lp||Lp.reportFrameProcessed(),Gp(r)},Jp)}},!1),Dc(or(Dp,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Lp||Lp.startMonitorSlowFrameProcessing()}}function Vp(){const e=setTimeout(()=>{Jp(`Frame not processed in ${Up}ms`,Hp.Warn)},Up);return function(){clearTimeout(e)}}function Bp(e,t){return n=>Np(this,void 0,void 0,function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Vp(),i=yield e(n);return o(),t.reportFrameProcessed(),i})}function jp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Wp(e,t,n){if(Yr(fr,pn.sidePanel),!$p())throw Cn;Dc(or(Dp,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function zp(e){if(Yr(fr,pn.sidePanel),!$p())throw Cn;Ns(or(Dp,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",xp(e,Lp),!1),Dc(or(Dp,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function qp(e){if(Yr(fr,pn.sidePanel),!gp())throw Cn;Dc(or(Dp,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function $p(){return Yr(fr),gp()}function Gp(e){Dc(or(Dp,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Jp(e,t=Hp.Warn){Dc(or(Dp,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Kp(e){if(Yr(fr),!gp())throw Cn;Jp(e,Hp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Hp||(Hp={}));const Qp="v2";class Zp extends ra{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Xp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Yp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class eg extends ra{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class tg{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class ng extends ra{validate(e){const t=new eg;let n=!0;return e.allTabs&&e.allTabs.forEach(e=>{n||(n=t.validate(e))}),n}deserialize(e){return e}}function rg(e,t){if(Yr(fr),!cg())throw new Error(`Error code: ${Be.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(ug(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Be.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Fc("hostEntity.tab.addAndConfigure",[new Yp(e),t],new eg,or(Qp,"hostEntity.tab.addAndConfigure"))}function og(e){if(Yr(fr),!cg())throw new Error(`Error code: ${Be.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return ug(e.threadId),Fc("hostEntity.tab.getAll",[new Yp(e)],new ng,or(Qp,"hostEntity.tab.getAll"))}function ig(e,t){if(Yr(fr),!cg())throw new Error(`Error code: ${Be.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return lg(e),ug(t.threadId),Fc("hostEntity.tab.reconfigure",[new Xp(e),new Yp(t)],new Zp,or(Qp,"hostEntity.tab.reconfigure"))}function ag(e,t){if(Yr(fr),!cg())throw new Error(`Error code: ${Be.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return lg(e),ug(t.threadId),Fc("hostEntity.tab.rename",[new Xp(e),new Yp(t)],new Zp,or(Qp,"hostEntity.tab.rename"))}function sg(e,t){if(Yr(fr),!cg())throw new Error(`Error code: ${Be.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return ug(t.threadId),lg(e),Fc("hostEntity.tab.remove",[new tg(e),new Yp(t)],new oa,or(Qp,"hostEntity.tab.remove"))}function cg(){var e;return!!(Yr(fr)&&fg()&&(null===(e=fr.supports.hostEntity)||void 0===e?void 0:e.tab))}function ug(e){if(!e||0==e.length)throw new Error(`Error code: ${Be.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function lg(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Be.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var dg;function fg(){return!(!Yr(fr)||!fr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(dg||(dg={}));var pg=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 gg="v2",hg="Invalid store dialog size",mg="No App Id present, but AppId needed to open AppDetail store",vg="No Collection Id present, but CollectionId needed to open a store specific to a collection";function wg(e){return pg(this,void 0,void 0,function*(){Ag();const{size:t}=null!=e?e:{};return kc("store.openFullStore",[Eg(t)],or(gg,"store.openFullStore"))})}function Cg(e){return pg(this,void 0,void 0,function*(){Ag();const{size:t,appId:n}=e;if(!(n instanceof po))throw new Error(mg);return kc("store.openAppDetail",[Eg(t),n],or(gg,"store.openAppDetail"))})}function yg(e){return pg(this,void 0,void 0,function*(){Ag();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return kc("store.openInContextStore",[Eg(t),n,r,o,null==i?void 0:i.map(e=>e.toString())],or(gg,"store.openInContextStore"))})}function Sg(e){return pg(this,void 0,void 0,function*(){Ag();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(vg);return kc("store.openSpecificStore",[Eg(t),n],or(gg,"store.openSpecificStore"))})}function bg(){return Yr(fr)&&!!fr.supports.store}function Ag(){if(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),!bg())throw Cn}function Eg(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(hg);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(hg);return JSON.stringify(e)}var Ig=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 Pg="v1",Tg=rr("widgetHosting");function Og(){return Yr(fr)&&!!fr.supports.widgetHosting}function Rg(e,t){return Ig(this,void 0,void 0,function*(){return Xr(),Tg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),Fc("widgetHosting.callTool",[new Vg(e,t)],new Hg,or(Pg,"widgetHosting.callTool"),Ke)})}function Fg(e,t){return Ig(this,void 0,void 0,function*(){return Xr(),Tg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),kc("widgetHosting.sendFollowUpMessage",[new Bg(e,t)],or(Pg,"widgetHosting.sendFollowUpMessage"))})}function kg(e,t){return Ig(this,void 0,void 0,function*(){return Xr(),Tg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),kc("widgetHosting.requestDisplayMode",[new jg(e,t)],or(Pg,"widgetHosting.requestDisplayMode"))})}function Mg(e,t){return Ig(this,void 0,void 0,function*(){return Xr(),Tg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),Fc("widgetHosting.requestModal",[new $g(e,t)],new _g,or(Pg,"widgetHosting.requestModal"),Ke)})}function xg(e,t){Xr(),Tg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),kc("widgetHosting.notifyIntrinsicHeight",[new qg(e,t)],or(Pg,"widgetHosting.notifyIntrinsicHeight"))}function Ng(e,t,n){Xr(),Tg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),kc("widgetHosting.contentSizeChanged",[new Gg(e,t,n)],or(Pg,"widgetHosting.contentSizeChanged"))}function Dg(e,t){return Ig(this,void 0,void 0,function*(){return Xr(),Tg("Setting widget state with widgetId: ",{widgetId:e,state:t}),kc("widgetHosting.setWidgetState",[new zg(e,t)],or(Pg,"widgetHosting.setWidgetState"))})}function Ug(e,t){Xr(),Tg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),kc("widgetHosting.openExternal",[new Wg(e,t)],or(Pg,"widgetHosting.openExternal"))}function Lg(e){Ls(or(Pg,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!Og())throw new Error("Widget Hosting is not supported on this platform")})}class Hg extends ra{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class _g extends ra{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Vg{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class Bg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class jg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class Wg{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class zg{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class qg{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class $g{constructor(e,t){this.widgetId=e,this.options=t}serialize(){return{widgetId:this.widgetId,id:this.options.id,title:this.options.title,content:this.options.content,width:this.options.width,height:this.options.height}}}class Gg{constructor(e,t,n){this.widgetId=e,this.width=t,this.height=n}serialize(){return{widgetId:this.widgetId,width:this.width,height:this.height}}}var Jg=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 Kg="v1",Qg="v2";let Zg;function Xg(e){Zg=e}function Yg(e){const t=void 0!==e,n=t?e:Zg;if(!n)throw new Error("No parameters are provided for authentication");Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.remove,pn.task,pn.stage,pn.meetingStage);return eh(n.successCallback||n.failureCallback?or(Kg,"authentication.authenticate"):or(Qg,"authentication.authenticate"),n).then(e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Zg=void 0)}}).catch(e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Zg=void 0)}})}function eh(e,t){return Jg(this,void 0,void 0,function*(){const n=Bn(t.url);return Vn(n),Oc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then(([e,t])=>{if(e)return t;throw new Error(t)})})}function th(e){Xr();return nh(e&&(e.successCallback||e.failureCallback)?or(Kg,"authentication.getAuthToken"):or(Qg,"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 nh(e,t){return new Promise(n=>{n(Oc(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 rh(e){Xr();return oh(e&&(e.successCallback||e.failureCallback)?or(Kg,"authentication.getUser"):or(Qg,"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 oh(e){return new Promise(t=>{t(Oc(e,"authentication.getUser"))}).then(([e,t])=>{if(e)return t;throw t})}function ih(e,t){Yr(fr,pn.authentication);Dc(or(t?Kg:Qg,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),iu(yc.parentWindow,()=>setTimeout(()=>yc.currentWindow.close(),200))}function ah(e,t){Yr(fr,pn.authentication);Dc(or(t?Kg:Qg,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),iu(yc.parentWindow,()=>setTimeout(()=>yc.currentWindow.close(),200))}var sh;function ch(){return Yr(fr)&&!!fr.supports.appPerformanceMetrics}function uh(e){Yr(fr),Ns(or("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}function lh(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"}(sh||(sh={}));class dh{constructor(e){this.val=e,lh(e)}toString(){return this.val}}const fh="/l/app/",ph="/l/meeting/new",gh="attendees",hh="startTime",mh="endTime",vh="subject",wh="content",Ch="/l/call/0/0",yh="source",Sh="withVideo",bh="/l/chat/0/0",Ah="users",Eh="topicName",Ih="message";function Ph(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Ah}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${Eh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Ih}=${encodeURIComponent(n)}`;return`${lt}://${dt}${bh}?${r}${o}${i}`}function Th(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Ah}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${Sh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${yh}=${encodeURIComponent(n)}`;return`${lt}://${dt}${Ch}?${r}${o}${i}`}function Oh(e,t,n,r,o){const i=void 0===e?"":`${gh}=`+e.map(e=>encodeURIComponent(e)).join(","),a=void 0===t?"":`&${hh}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${mh}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${vh}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${wh}=${encodeURIComponent(o)}`;return`${lt}://${dt}${ph}?${i}${a}${s}${c}${u}`}function Rh(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${lt}://${dt}${fh}${encodeURIComponent(e)}`}const Fh="v1";function kh(e){return new Promise(t=>{if(Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage),!Mh())throw new Error("Not supported");const n=or(Fh,"appInstallDialog.openAppInstallDialog");fr.isLegacyTeams?t(Ic(n,"executeDeepLink",Rh(e.appId))):(Dc(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function Mh(){return!(!Yr(fr)||!fr.supports.appInstallDialog)}const xh="v1",Nh=rr("media");var Dh,Uh,Lh,Hh,_h,Vh,Bh;!function(e){e.Base64="base64",e.ID="id"}(Dh||(Dh={}));class jh{}function Wh(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Yr(fr,pn.content,pn.task),!Xn.isFramelessWindow){return void e({errorCode:Be.NOT_SUPPORTED_ON_PLATFORM},[])}if(!eo(ot)){return void e({errorCode:Be.OLD_PLATFORM},[])}Dc(or(xh,"media.captureImage"),"captureImage",e)}function zh(){if(Yr(fr,pn.content,pn.task),!$h())throw Cn;const e=je.Media;return new Promise(t=>{t(Tc(or(xh,"media.hasPermission"),"permissions.has",e))})}function qh(){if(Yr(fr,pn.content,pn.task),!$h())throw Cn;const e=je.Media;return new Promise(t=>{t(Tc(or(xh,"media.requestPermission"),"permissions.request",e))})}function $h(){return!(!Yr(fr)||!fr.supports.permissions)}class Gh extends jh{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(Yr(fr,pn.content,pn.task),!eo(it)){return void e({errorCode:Be.OLD_PLATFORM},new Blob)}if(!sm(this.mimeType,this.format,this.content)){return void e({errorCode:Be.INVALID_ARGUMENTS},new Blob)}eo("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e)}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Dc(or(xh,"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=Yh(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=em(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Nh(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Be.INTERNAL_ERROR,message:"data received is null"},new Blob)})}getMediaViaHandler(e){const t=Pn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!go(e)&&Dc(or(xh,"media.getMedia"),"getMedia",r),Ns(or(xh,"media.registerGetMediaRequestHandler"),"getMedia"+t,function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Ds("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Yh(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Ds("getMedia"+t)}else{const e=em(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Be.INTERNAL_ERROR,message:"data received is null"},new Blob),Ds("getMedia"+t)}})}}class Jh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Yr(fr,pn.content,pn.task);try{no(Ye)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Dc(or(xh,"media.controller"),"media.controller",[n],e=>{t&&t(e)})}stop(e){this.notifyEventToHost(Uh.StopRecording,e)}}class Kh extends Jh{getMediaType(){return _h.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Uh.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Qh(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Yr(fr,pn.content,pn.task),!eo(it)){const e={errorCode:Be.OLD_PLATFORM};return void t(e,[])}try{tm(e)}catch(e){return void t(e,[])}if(!rm(e)){const e={errorCode:Be.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Dc(or(xh,"media.selectMedia"),"selectMedia",n,(n,r,o)=>{var i,a;if(o)return void(nm(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 Gh(e));t(n,s)})}function Zh(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Yr(fr,pn.content,pn.task),!eo(it)){return void t({errorCode:Be.OLD_PLATFORM})}if(!cm(e)){return void t({errorCode:Be.INVALID_ARGUMENTS})}const n=[e];Dc(or(xh,"media.viewImages"),"viewImages",n,t)}function Xh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Yr(fr,pn.content,pn.task),Xn.hostClientType===dn.desktop||Xn.hostClientType===dn.web||Xn.hostClientType===dn.rigel||Xn.hostClientType===dn.teamsRoomsWindows||Xn.hostClientType===dn.teamsRoomsAndroid||Xn.hostClientType===dn.teamsPhones||Xn.hostClientType===dn.teamsDisplays){return void e({errorCode:Be.NOT_SUPPORTED_ON_PLATFORM},"")}if(!eo(at)){return void e({errorCode:Be.OLD_PLATFORM},"")}if(!um(t)){return void e({errorCode:Be.INVALID_ARGUMENTS},"")}Dc(or(xh,"media.scanBarCode"),"media.scanBarCode",[t],e)}function Yh(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 em(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 tm(e){im(e)?no(Xe):am(e)?no(Ye):om(e)&&no(et)}function nm(e){return!(e.mediaType!=_h.Video||!e.videoProps||!e.videoProps.videoController)}function rm(e){return!(null==e||e.maxMediaCount>10)}function om(e){var t;return!((null==e?void 0:e.mediaType)!=_h.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function im(e){return!(!e||e.mediaType!=_h.VideoAndImage&&!e.videoAndImageProps)}function am(e){return!(!e||e.mediaType!=_h.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function sm(e,t,n){return null!=e&&null!=t&&t==Dh.ID&&null!=n}function cm(e){return!(null==e||e.length<=0||e.length>10)}function um(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function lm(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"}(Uh||(Uh={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Lh||(Lh={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Hh||(Hh={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(_h||(_h={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Vh||(Vh={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Bh||(Bh={}));const dm="v2";function fm(e){return new Promise(t=>{if(Yr(fr,pn.content,pn.task),!hm())throw Cn;if(!um(e))throw{errorCode:Be.INVALID_ARGUMENTS};t(Tc(or(dm,"barCode.scanBarCode"),"media.scanBarCode",e))})}function pm(){if(Yr(fr,pn.content,pn.task),!hm())throw Cn;const e=je.Media;return new Promise(t=>{t(Tc(or(dm,"barCode.hasPermission"),"permissions.has",e))})}function gm(){if(Yr(fr,pn.content,pn.task),!hm())throw Cn;const e=je.Media;return new Promise(t=>{t(Tc(or(dm,"barCode.requestPermission"),"permissions.request",e))})}function hm(){return!!(Yr(fr)&&fr.supports.barCode&&fr.supports.permissions)}const mm="v2";function vm(e){return wm(or(mm,"chat.openChat"),e)}function wm(e,t){return new Promise(n=>{if(Yr(fr,pn.content,pn.task),!ym())throw Cn;if(fr.isLegacyTeams)n(Ic(e,"executeDeepLink",Ph([t.user],void 0,t.message)));else{n(Ic(e,"chat.openChat",{members:[t.user],message:t.message}))}})}function Cm(e){const t=or(mm,"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(wm(t,r))}else{if(Yr(fr,pn.content,pn.task),!ym())throw Cn;if(fr.isLegacyTeams)n(Ic(t,"executeDeepLink",Ph(e.users,e.topic,e.message)));else{n(Ic(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}})}function ym(){return!(!Yr(fr)||!fr.supports.chat)}var Sm=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 bm="v2";function Am(e){return Sm(this,void 0,void 0,function*(){if(Yr(fr,pn.content,pn.meetingStage,pn.task,pn.settings,pn.stage,pn.sidePanel),!Tm())throw Cn;if(!e.type||!Object.values(Ge).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Ge)}`);const t=yield Un(e),n={mimeType:e.type,content:t};return Tc(or(bm,"clipboard.write"),"clipboard.writeToClipboard",n)})}function Em(){return Sm(this,void 0,void 0,function*(){Yr(fr,pn.content,pn.meetingStage,pn.task,pn.settings,pn.stage,pn.sidePanel);const e=or(bm,"clipboard.read");if(!Tm())throw Cn;const t=yield Tc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Dn(e.mimeType,e.content)}return t})}function Im(){if(Yr(fr,pn.content,pn.task),!Om())throw Cn;const e=je.ClipboardRead;return Tc(or(bm,"clipboard.hasPermission"),"permissions.has",e)}function Pm(){if(Yr(fr,pn.content,pn.task),!Om())throw Cn;const e=je.ClipboardRead;return Tc(or(bm,"clipboard.requestPermission"),"permissions.request",e)}function Tm(){return Xn.isFramelessWindow?!(!Yr(fr)||!fr.supports.clipboard):!!(Yr(fr)&&navigator&&navigator.clipboard&&fr.supports.clipboard)}function Om(){var e;return Yr(fr)&&!!(null===(e=fr.supports.permissions)||void 0===e?void 0:e.clipboardRead)}var Rm=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",km={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var Mm;function xm(){var e;return null!==(e=Yr(fr)&&(fr.isNAAChannelRecommended||Hm()))&&void 0!==e&&e}function Nm(){return Yr(fr),yc.parentOrigin}function Dm(){var e;return null!==(e=Yr(fr)&&fr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Um(){var e;return null!==(e=Yr(fr)&&(fr.isDeeplyNestedAuthSupported||Lm()))&&void 0!==e&&e}function Lm(){return!!(Yr(fr)&&_m()&&fr.isLegacyTeams&&eo(Cr))}function Hm(){return!!(Yr(fr)&&_m()&&fr.isLegacyTeams&&fr.supports.nestedAppAuth)}function _m(){return Xn.hostClientType===dn.android||Xn.hostClientType===dn.ios||Xn.hostClientType===dn.ipados||Xn.hostClientType===dn.visionOS}function Vm(e){return Rm(this,void 0,void 0,function*(){if(!Dm())throw Cn;const t=e.map(Wm);return jm(Mm.ADD,t)})}function Bm(e){return Rm(this,void 0,void 0,function*(){if(!Dm())throw Cn;const t=e.map(Wm);return jm(Mm.DELETE,t)})}function jm(e,t){return Rm(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 Fc("nestedAppAuth.manageNAATrustedOrigins",[new zm(e,t)],km,or(Fm,"nestedAppAuth.manageNAATrustedOrigins"))})}function Wm(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"}(Mm||(Mm={}));class zm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const qm="v2";function $m(){if(Yr(fr,pn.content,pn.task),!Jm())throw Cn;return Tc(or(qm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Gm(e){if(Yr(fr,pn.content,pn.task),!Jm())throw Cn;if(!e)throw{errorCode:Be.INVALID_ARGUMENTS};return Tc(or(qm,"geoLocation.showLocation"),"location.showLocation",e)}function Jm(){return!!(Yr(fr)&&fr.supports.geoLocation&&fr.supports.geoLocation.map&&fr.supports.permissions)}const Km="v2";function Qm(){if(Yr(fr,pn.content,pn.task),!Ym())throw Cn;return Tc(or(Km,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Zm(){if(Yr(fr,pn.content,pn.task),!Ym())throw Cn;const e=je.GeoLocation;return new Promise(t=>{t(Tc(or(Km,"geoLocation.hasPermission"),"permissions.has",e))})}function Xm(){if(Yr(fr,pn.content,pn.task),!Ym())throw Cn;const e=je.GeoLocation;return new Promise(t=>{t(Tc(or(Km,"geoLocation.requestPermission"),"permissions.request",e))})}function Ym(){return!!(Yr(fr)&&fr.supports.geoLocation&&fr.supports.permissions)}function ev(){return fr.hostVersionsInfo?fr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const tv="v1";class nv{postMessage(e,t){Yr(fr),Dc(or(tv,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||En())}addEventListener(e,t){Yr(fr),"message"===e&&Ns(or(tv,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class rv{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Yr(fr,pn.task),Dc(or(tv,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||En())}addEventListener(e,t){Yr(fr,pn.task),"message"===e&&Ns(or(tv,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const ov="v2";function iv(e){if(Yr(fr,pn.content),!av())throw Cn;if(!e||!Nn(e))throw{errorCode:Be.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Tc(or(ov,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function av(){return!(!Yr(fr)||!fr.supports.secondaryBrowser)}const sv="v1";function cv(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Yr(fr,pn.content,pn.task),!eo(nt))throw{errorCode:Be.OLD_PLATFORM};if(!e)throw{errorCode:Be.INVALID_ARGUMENTS};if(!lv())throw Cn;Dc(or(sv,"location.getLocation"),"location.getLocation",[e],t)}function uv(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Yr(fr,pn.content,pn.task),!eo(nt))throw{errorCode:Be.OLD_PLATFORM};if(!e)throw{errorCode:Be.INVALID_ARGUMENTS};if(!lv())throw Cn;Dc(or(sv,"location.showLocation"),"location.showLocation",[e],t)}function lv(){return!(!Yr(fr)||!fr.supports.location)}const dv="v2";function fv(){if(Yr(fr,pn.content,pn.task),!gv())throw Cn;return Tc(or(dv,"localNetworkAccess.hasPermission"),"permissions.has",je.LocalNetworkAccess)}function pv(){if(Yr(fr,pn.content,pn.task),!gv())throw Cn;return Tc(or(dv,"localNetworkAccess.requestPermission"),"permissions.request",je.LocalNetworkAccess)}function gv(){var e;return Yr(fr)&&!!(null===(e=fr.supports.permissions)||void 0===e?void 0:e.localNetworkAccess)}const hv="v1";function mv(e){Yr(fr,pn.sidePanel),e.contentUrl&&new URL(e.contentUrl),Dc(or(hv,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var vv=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="v1";var Cv,yv,Sv,bv,Av,Ev;function Iv(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Dc(or(wv,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Pv(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Dc(or(wv,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Tv(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage,pn.settings,pn.content),Dc(or(wv,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Ov(){var e,t,n;return vv(this,void 0,void 0,function*(){let r;Yr(fr,pn.sidePanel,pn.meetingStage,pn.settings,pn.content);try{const e=!0;r=yield Tc(or("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)==bv.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==bv.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Be.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function Rv(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage,pn.task),Dc(or(wv,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Fv(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Yr(fr,pn.sidePanel),Dc(or(wv,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function kv(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Yr(fr,pn.sidePanel),Dc(or(wv,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Mv(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Yr(fr,pn.sidePanel),Dc(or(wv,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function xv(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Yr(fr,pn.sidePanel),Ns(or(wv,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Nv(e,t,n={sharingProtocol:Av.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Dc(or(wv,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Dv(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Dc(or(wv,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Uv(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Dc(or(wv,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Lv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Dc(or(wv,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Hv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Ns(or(wv,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function _v(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Ns(or(wv,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Vv(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Yr(fr,pn.sidePanel,pn.meetingStage),Ns(or(wv,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Bv(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Yr(fr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Ev.Other};return Tc(or("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function jv(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");Yr(fr,pn.sidePanel,pn.meetingStage),e.isAppHandlingAudio?Wv(e,t):zv(e,t)}function Wv(e,t){Dc(or(wv,"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");Ns(or(wv,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",t=>vv(this,void 0,void 0,function*(){try{const n=yield e.micMuteStateChangedCallback(t);$v(n,n.isMicMuted===t.isMicMuted?Cv.HostInitiated:Cv.AppDeclinedToChange)}catch(e){$v(t,Cv.AppFailedToChange)}}));Ns(or(wv,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)}),t(r)})}function zv(e,t){Dc(or(wv,"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");Us("meeting.micStateChanged")&&Ds("meeting.micStateChanged"),Us("meeting.audioDeviceSelectionChanged")&&Ds("meeting.audioDeviceSelectionChanged"),t(n)})}function qv(e){$v(e,Cv.AppInitiated)}function $v(e,t){Yr(fr,pn.sidePanel,pn.meetingStage),Dc(or(wv,"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"}(Cv||(Cv={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(yv||(yv={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Sv||(Sv={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(bv||(bv={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Av||(Av={})),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.M365CalendarMeetNow="m365_calendar_meet_now",e.Other="other"}(Ev||(Ev={}));const Gv="v1",Jv="v2";function Kv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=or(Gv,"monetization.openPurchaseExperience")):(r=e,o=or(Jv,"monetization.openPurchaseExperience"));return Yr(fr,pn.content),Fn(()=>new Promise(e=>{if(!Qv())throw Cn;e(Tc(o,"monetization.openPurchaseExperience",r))}),n)}function Qv(){return!(!Yr(fr)||!fr.supports.monetization)}const Zv="v2";function Xv(e){return new Promise(t=>{if(Yr(fr,pn.content),!ew())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(Ic(or(Zv,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function Yv(e){return new Promise(t=>{if(Yr(fr,pn.content),!ew())throw new Error("Not supported");const n=or(Zv,"calendar.composeMeeting");fr.isLegacyTeams?t(Ic(n,"executeDeepLink",Oh(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(Ic(n,"calendar.composeMeeting",e))})}function ew(){return!(!Yr(fr)||!fr.supports.calendar)}const tw="v2";function nw(e){e&&0!==e.length&&e.forEach(e=>{lh(e)})}function rw(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===dw.New&&(nw(t.toRecipients),nw(t.ccRecipients),nw(t.bccRecipients))}function ow(e){if(Yr(fr,pn.content),!iw())throw new Error("Not supported");return rw(e),kc("mail.handoff.composeMail",[new aw(e)],or(tw,"mail.handoff.composeMail"))}function iw(){return!!(Yr(fr)&&fr.supports.mail&&fr.supports.mail.handoff)}class aw{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const sw="v2";function cw(e){return new Promise(t=>{if(Yr(fr,pn.content),!lw())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(Ic(or(sw,"mail.openMailItem"),"mail.openMailItem",e))})}function uw(e){return new Promise(t=>{if(Yr(fr,pn.content),!lw())throw new Error("Not supported");t(Ic(or(sw,"mail.composeMail"),"mail.composeMail",e))})}function lw(){return!(!Yr(fr)||!fr.supports.mail)}var dw;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(dw||(dw={}));const fw="v2";function pw(){if(!Xn.printCapabilityEnabled){if(Yr(fr),!Cw())throw Cn;Xn.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(gw(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function gw(){Ln().print()}function hw(e){mw(or(fw,"teamsAPIs_registerOnLoadHandler"),e,()=>{if(!go(e)&&!Cw())throw Cn})}function mw(e,t,n){!go(t)&&Yr(fr),!go(t)&&n&&n(),zs(e,t)}function vw(e){ww(or(fw,"teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!go(e)&&!Cw())throw Cn})}function ww(e,t,n){!go(t)&&Yr(fr),!go(t)&&n&&n(),Gs(e,t)}function Cw(){return!(!Yr(fr)||!fr.supports.teamsCore)}const yw="v1",Sw="v2";function bw(e,t){let n,r;Yr(fr,pn.content,pn.task,pn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=or(yw,"people.selectPeople")):(r=e,o=or(Sw,"people.selectPeople")),On(Aw,n,o,r)}function Aw(e,t){return new Promise(n=>{if(!eo(rt))throw{errorCode:Be.OLD_PLATFORM};if(!lm(t))throw{errorCode:Be.INVALID_ARGUMENTS};if(!Ew())throw Cn;n(Tc(e,"people.selectPeople",t))})}function Ew(){return!(!Yr(fr)||!fr.supports.people)}function Iw(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?Pw(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Pw(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 Tw="v2";function Ow(e){return Yr(fr,pn.content),new Promise(t=>{const[n,r]=Iw(e);if(!n)throw{errorCode:Be.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(Tc(or(Tw,"profile.showProfile"),"profile.showProfile",o))})}function Rw(){return!(!Yr(fr)||!fr.supports.profile)}const Fw="v2",kw="search.queryChange",Mw="search.queryClose",xw="search.queryExecute";function Nw(e,t,n){if(Yr(fr,pn.content),!Uw())throw Cn;Ns(or(Fw,"search.registerOnClosedHandler"),Mw,e),Ns(or(Fw,"search.registerOnExecutedHandler"),xw,t),n&&Ns(or(Fw,"search.registerOnChangeHandler"),kw,n)}function Dw(){if(Yr(fr,pn.content),!Uw())throw Cn;Dc(or(Fw,"search.unregisterHandlers"),"search.unregister"),Ds(kw),Ds(Mw),Ds(xw)}function Uw(){return!(!Yr(fr)||!fr.supports.search)}function Lw(){return new Promise(e=>{if(Yr(fr,pn.content),!Uw())throw new Error("Not supported");e(Ic(or(Fw,"search.closeSearch"),"search.closeSearch"))})}var Hw=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 _w="v2";function Vw(){return Hw(this,void 0,void 0,function*(){if(Yr(fr,pn.sidePanel,pn.meetingStage),!Bw())throw Cn;return yield Tc(or(_w,"sharing.history.getContent"),"sharing.history.getContent")})}function Bw(){var e;return Yr(fr)&&void 0!==(null===(e=fr.supports.sharing)||void 0===e?void 0:e.history)}const jw="v1",Ww="v2",zw={shareWebContent:"sharing.shareWebContent"};function qw(e,t){try{Gw(e),Jw(e),Qw(e)}catch(e){return Rn(()=>Promise.reject(e),t)}Yr(fr,pn.content,pn.sidePanel,pn.task,pn.stage,pn.meetingStage);return Rn($w,t,or(t?jw:Ww,"sharing.shareWebContent"),e)}function $w(e,t){return new Promise(n=>{if(!Zw())throw Cn;n(Tc(e,zw.shareWebContent,t))})}function Gw(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Be.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Jw(e){let t;if(e.content.some(e=>!e.type))throw t={errorCode:Be.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some(t=>t.type!==e.content[0].type))throw t={errorCode:Be.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Kw(e){if("URL"===e.type){if(!e.url)throw{errorCode:Be.INVALID_ARGUMENTS,message:"URLs are required for URL content types"}}else{if("FILE"!==e.type)throw{errorCode:Be.INVALID_ARGUMENTS,message:"Content type is unsupported"};if(!e.url)throw{errorCode:Be.INVALID_ARGUMENTS,message:"File URLs are required for File content types"}}}function Qw(e){e.content.forEach(Kw)}function Zw(){return!(!Yr(fr)||!fr.supports.sharing)}const Xw="v2";function Yw(e){return new Promise(t=>{if(Yr(fr,pn.content),!eC()||void 0!==e&&!tC())throw Cn;if(void 0!==e&&"string"!=typeof e)throw new Error("[stageView.self.close] Result must be a string");t(Tc(or(Xw,"stageView.self.close"),"stageView.self.close",...void 0===e?[]:[e]))})}function eC(){var e;return Yr(fr)&&void 0!==(null===(e=fr.supports.stageView)||void 0===e?void 0:e.self)}function tC(){var e,t;return Yr(fr)&&!!(null===(t=null===(e=fr.supports.stageView)||void 0===e?void 0:e.self)||void 0===t?void 0:t.closeResult)}const nC="v2";var rC;function oC(e){return new Promise(t=>{if(Yr(fr,pn.content),!iC())throw Cn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Tc(or(nC,"stageView.open"),"stageView.open",e))})}function iC(){return!(!Yr(fr)||!fr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(rC||(rC={}));const aC=10;var sC=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 cC="v2";function uC(e){return sC(this,void 0,void 0,function*(){Yr(fr,pn.content,pn.task),fC(),pC(e);const t=yield Tc(or(cC,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return gC(e.maxVisualMediaCount,t),t})}function lC(e){return sC(this,void 0,void 0,function*(){Yr(fr,pn.content,pn.task),fC(),pC(e);const t=yield Tc(or(cC,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return gC(e.maxVisualMediaCount,t),t})}function dC(){return!!(Yr(fr)&&fr.supports.visualMedia&&fr.supports.visualMedia.image&&fr.supports.permissions)}function fC(){if(!dC())throw Cn}function pC(e){if(!e||e.maxVisualMediaCount>aC||e.maxVisualMediaCount<1)throw bn}function gC(e,t){if(t.length>e)throw An}const hC="v2";var mC,vC;function wC(){if(Yr(fr,pn.content,pn.task),!dC())throw Cn;const e=je.Media;return Tc(or(hC,"visualMedia.hasPermission"),"permissions.has",e)}function CC(){if(Yr(fr,pn.content,pn.task),!dC())throw Cn;const e=je.Media;return Tc(or(hC,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(mC||(mC={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(vC||(vC={}));var yC=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 SC=null;function bC(){return yC(this,void 0,void 0,function*(){return null===SC&&(SC=(yield jo()).app.host.name),SC})}var AC=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 EC(){return AC(this,void 0,void 0,function*(){if(Yr(fr),!PC())throw Cn;return!(!fr.isLegacyTeams||Xn.hostClientType!==dn.android&&Xn.hostClientType!==dn.ios&&Xn.hostClientType!==dn.ipados&&Xn.hostClientType!==dn.visionOS||(yield IC())!==fn.teams)||(yield Ec(or("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function IC(){return AC(this,void 0,void 0,function*(){return bC()})}function PC(){return Yr(fr)&&void 0!==fr.supports.webStorage}const TC="v2";var OC;function RC(e){const t=or(TC,"call.startCall");return new Promise(n=>{var r;if(Yr(fr,pn.content,pn.task),!FC())throw Cn;if(!fr.isLegacyTeams)return Dc(t,"call.startCall",[e],n);n(Ec(t,"executeDeepLink",Th(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(OC.Video),e.source)).then(e=>{if(!e)throw new Error(ht);return e}))})}function FC(){return!(!Yr(fr)||!fr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(OC||(OC={}));const kC="v1";function MC(){ua(or(kC,"appInitialization.notifyAppLoaded"))}function xC(){Dc(or(kC,"appInitialization.notifySuccess"),xo.Success,[Tr])}function NC(e){da(or(kC,"appInitialization.notifyFailure"),e)}function DC(e){la(or(kC,"appInitialization.notifyExpectedFailure"),e)}const UC=rr("thirdPartyCloudStorage"),LC="v2";class HC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let _C=[],VC=null,BC=!0,jC=null;function WC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||""===e){return void t([],{errorCode:Be.INVALID_ARGUMENTS})}if(Yr(fr,pn.content,pn.task),!qC())throw Cn;if(jC)throw jC=null,new Error("getDragAndDropFiles cannot be called twice");jC=t,BC=!0,Dc(or(LC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],zC)}function zC(e){if(jC)if(e&&e.error)jC([],e.error),jC=null;else if(e&&e.fileChunk)try{BC||0!==e.fileChunk.chunkSequence||(UC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),BC=!0,jC([],{errorCode:Be.INTERNAL_ERROR,message:"error occurred while receiving data"}),_C=[],jC=null);const t=em(e.fileChunk,e.fileType);if(t?(VC||(VC=new HC(e.fileType,[])),VC.assembleAttachment.push(t)):(UC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),jC?jC([],{errorCode:Be.INTERNAL_ERROR,message:"error occurred while receiving data"}):jC=null,_C=[],jC=null,BC=!0),BC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&VC){const t=Yh(VC.assembleAttachment,VC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});_C.push(n)}e.isLastFile&&jC&&(jC(_C,e.error),_C=[],jC=null,BC=!0),VC=null}}catch(e){jC&&(jC([],{errorCode:Be.INTERNAL_ERROR,message:e}),_C=[],jC=null,BC=!0)}else jC([],{errorCode:Be.INTERNAL_ERROR,message:"data received is null"}),_C=[],jC=null,BC=!0}function qC(){return!(!Yr(fr)||!fr.supports.thirdPartyCloudStorage)}const $C="v1";function GC(e,t){ca(or($C,"initialize"),t).then(()=>{e&&e()})}function JC(){pw()}function KC(){gw()}function QC(e){Xr(),Dc(or($C,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=Xn.frameContext),e(t)})}function ZC(e){va(or($C,"registerOnThemeChangeHandlerHelper"),e)}function XC(e){Ls(or($C,"registerFullScreenHandler"),"fullScreenChange",e,[])}function YC(e){Ls(or($C,"registerAppButtonClickHandler"),"appButtonClick",e,[pn.content])}function ey(e){Ls(or($C,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[pn.content])}function ty(e){Ls(or($C,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[pn.content])}function ny(e){Ha(or($C,"registerBackButtonHandler"),e)}function ry(e){mw(or($C,"registerOnLoadHandler"),e)}function oy(e){ww(or($C,"registerBeforeUnloadHandler"),e)}function iy(e){Ls(or($C,"registerFocusEnterHandler"),"focusEnter",e,[])}function ay(e){Ls(or($C,"registerChangeSettingsHandler"),"changeSettings",e,[pn.content])}function sy(e,t){Yr(fr),ps(or($C,"getTabInstances"),t).then(t=>{e(t)})}function cy(e,t){Yr(fr),gs(or($C,"getMruTabInstances"),t).then(t=>{e(t)})}function uy(e){hs(or($C,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function ly(e,t){Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.task,pn.stage,pn.meetingStage);const n=null!=t?t:En();Ca(or($C,"executeDeepLink"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function dy(e){ms(or($C,"setFrameContext"),e)}function fy(e,t,n){ca(or($C,"initializeWithFrameContext"),n).then(()=>t&&t()),ms(or($C,"setFrameContext"),e)}const py="v1";function gy(e){fs(or(py,"navigation.returnFocus"),e)}function hy(e,t){Yr(fr);const n=null!=t?t:En();ds(or(py,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function my(e,t){Yr(fr,pn.content,pn.sidePanel,pn.settings,pn.remove,pn.task,pn.stage,pn.meetingStage);const n=null!=t?t:En();us(or(py,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function vy(e){Yr(fr);const t=null!=e?e:En();ls(or(py,"navigation.navigateBack")).then(()=>{t(!0)}).catch(e=>{t(!1,e.message)})}const wy="v1";function Cy(e){vs(or(wy,"settings.setValidityState"),e)}function yy(e){Yr(fr,pn.content,pn.settings,pn.remove,pn.sidePanel),ws(or(wy,"settings.getSettings")).then(t=>{e(t)})}function Sy(e,t){Yr(fr,pn.content,pn.settings,pn.sidePanel);const n=null!=t?t:En();Cs(or(wy,"settings.setSettings"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function by(e){Ji(or(wy,"settings.registerOnSaveHandler"),e)}function Ay(e){Qi(or(wy,"settings.registerOnRemoveHandler"),e)}var Ey=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 Iy="v1";function Py(e,t){const n=or(Iy,"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?(Yr(fr,pn.content,pn.sidePanel,pn.meetingStage),Dc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?hi(n,Fy(e),r):gi(n,Ry(e),r),new nv}function Ty(e){e=ky(e);const{width:t,height:n}=e,r=Ey(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");pi(or(Iy,"tasks.updateTask"),e)}function Oy(e,t){mi(or(Iy,"tasks.submitTask"),e,t)}function Ry(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:vn.Small,width:e.width?e.width:vn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Fy(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:vn.Small,width:e.width?e.width:vn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function ky(e){return e.height=e.height?e.height:vn.Small,e.width=e.width?e.width:vn.Small,e}const My="v2";var xy,Ny;function Dy(){return!(!Yr(fr,pn.meetingStage,pn.sidePanel,pn.content)||!fr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(xy||(xy={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Ny||(Ny={}));class Uy{getFluidTenantInfo(){return Ly(),new Promise(e=>{e(Tc(or(My,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(e){return Ly(),new Promise(t=>{t(Tc(or(My,"interactive.getFluidToken"),"interactive.getFluidToken",e))})}getFluidContainerId(){return Ly(),new Promise(e=>{e(Tc(or(My,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(e){return Ly(),new Promise(t=>{t(Tc(or(My,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))})}getNtpTime(){return Ly(),new Promise(e=>{e(Tc(or(My,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(e){return Ly(),new Promise(t=>{t(Tc(or(My,"interactive.registerClientId"),"interactive.registerClientId",e))})}getClientRoles(e){return Ly(),new Promise(t=>{t(Tc(or(My,"interactive.getClientRoles"),"interactive.getClientRoles",e))})}getClientInfo(e){return Ly(),new Promise(t=>{t(Tc(or(My,"interactive.getClientInfo"),"interactive.getClientInfo",e))})}static create(){return Ly(),new Uy}}function Ly(){if(!Dy())throw new Error("LiveShareHost Not supported")}var Hy=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 _y(e){try{return e.cartItems=Vy(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Vy(e){return e.map(e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Vy(e.accessories)),e})}const By=e=>{try{return e.map(e=>{const{imageURL:t,accessories:n}=e,r=Hy(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=By(n)),o})}catch(e){throw new Error("Error serializing cart items")}};function jy(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)zy(t),Wy(t.accessories)}function Wy(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");zy(t)}}}function zy(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");$y(e.price),Gy(e.quantity)}function qy(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===ln(e))throw new Error("id must be a valid UUID")}}function $y(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 Gy(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Jy(e){if(!Object.values(Xy).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Ky="v2",Qy={majorVersion:1,minorVersion:1};var Zy,Xy;function Yy(){if(Yr(fr,pn.content,pn.task),!rS())throw Cn;return Tc(or(Ky,"marketplace.getCart"),"marketplace.getCart",Qy).then(_y)}function eS(e){if(Yr(fr,pn.content,pn.task),!rS())throw Cn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return qy(null==e?void 0:e.cartId),jy(null==e?void 0:e.cartItems),Tc(or(Ky,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:By(e.cartItems),cartVersion:Qy})).then(_y)}function tS(e){if(Yr(fr,pn.content,pn.task),!rS())throw Cn;if(!e)throw new Error("removeCartItemsParams must be provided");if(qy(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 Tc(or(Ky,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Qy})).then(_y)}function nS(e){if(Yr(fr,pn.content,pn.task),!rS())throw Cn;if(!e)throw new Error("updateCartStatusParams must be provided");return qy(null==e?void 0:e.cartId),Jy(null==e?void 0:e.cartStatus),Tc(or(Ky,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Qy})).then(_y)}function rS(){return!(!Yr(fr)||!fr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(Zy||(Zy={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Xy||(Xy={}));var oS=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 iS=3,aS=4;class sS{constructor(e){this.direction=e}serialize(){return{direction:this.direction}}}function cS(e){return e===iS?"back":e===aS?"forward":void 0}function uS(e){void 0!==cS(e.button)&&(e.preventDefault(),e.stopImmediatePropagation())}function lS(e){const t=cS(e.button);t&&(e.preventDefault(),e.stopImmediatePropagation(),kc("mouseRelay.navigateHistory",[new sS(t)],or("v2","mouseRelay.navigateHistory")))}let dS=!1;function fS(){return oS(this,void 0,void 0,function*(){if(!gS())throw Cn;dS||(document.addEventListener("mousedown",uS,{capture:!0}),document.addEventListener("mouseup",lS,{capture:!0}),document.addEventListener("auxclick",uS,{capture:!0})),dS=!0})}function pS(){if(!gS())throw Cn;dS=!1,document.removeEventListener("mousedown",uS,{capture:!0}),document.removeEventListener("mouseup",lS,{capture:!0}),document.removeEventListener("auxclick",uS,{capture:!0})}function gS(){return!(!Yr(fr)||!fr.supports.mouseRelay)}var hS=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())})};class mS{constructor(e){this.event=e}serialize(){return{altKey:this.event.altKey,bubbles:this.event.bubbles,cancelBubble:this.event.cancelBubble,charCode:this.event.charCode,code:this.event.code,composed:this.event.composed,ctrlKey:this.event.ctrlKey,defaultPrevented:this.event.defaultPrevented,detail:this.event.detail,eventPhase:this.event.eventPhase,isComposing:this.event.isComposing,isTrusted:this.event.isTrusted,key:this.event.key,keyCode:this.event.keyCode,location:this.event.location,metaKey:this.event.metaKey,repeat:this.event.repeat,returnValue:this.event.returnValue,shiftKey:this.event.shiftKey,timeStamp:this.event.timeStamp,type:this.event.type,which:this.event.which}}}function vS(e){return e.toLowerCase().split("+").sort().join("+")}function wS(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function CS(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()||!!e.key&&/^F\d+$/i.test(e.key)}function yS(e,t){if(CS(t)){const n=wS(t);if(e.has(n))return{matchedShortcut:n,isOverridable:IS.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function SS(e){PS.clear(),e.shortcuts.forEach(e=>{PS.add(vS(e))}),IS.clear(),e.overridableShortcuts.forEach(e=>{IS.add(vS(e))})}class bS extends ra{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function AS(e){Ns(or("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function ES(e){if(e.target.closest(`[${xS}]`))return;const{matchedShortcut:t,isOverridable:n}=yS(PS,e);if(!t)return;if(n&&TS){if(TS(e,{matchedShortcut:t}))return}kc("shortcutRelay.forwardShortcutEvent",[new mS(e)],or("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const IS=new Set,PS=new Set;let TS,OS=!1;function RS(e){if(!MS())throw Cn;const t=TS;return TS=e,t}function FS(){if(!MS())throw Cn;OS=!1,PS.clear(),IS.clear(),TS=void 0,document.removeEventListener("keydown",ES,{capture:!0})}function kS(){return hS(this,void 0,void 0,function*(){if(!MS())throw Cn;SS(yield Fc("shortcutRelay.getHostShortcuts",[],new bS,or("v2","shortcutRelay.getHostShortcuts"))),OS||document.addEventListener("keydown",ES,{capture:!0}),OS=!0,AS(e=>{SS(e)})})}function MS(){return!(!Yr(fr)||!fr.supports.shortcutRelay)}const xS="data-disable-shortcuts-forwarding"})(),r})());
|
|
2
2
|
//# sourceMappingURL=MicrosoftTeams.min.js.map
|