@microsoft/teams-js 2.34.1-beta.0 → 2.34.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],l=i[1],u=new o(c(e,a,l)),d=0,f=l>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)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},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(u(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 l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(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(l(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?l(e,i,o,"day"):i>=r?l(e,i,r,"hour"):i>=n?l(e,i,n,"minute"):i>=t?l(e,i,t,"second"):e+" ms"}function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>Et,AppId:()=>Or,ChannelType:()=>Ht,ChildAppWindow:()=>cg,DialogDimension:()=>Lt,EduType:()=>Ft,EmailAddress:()=>Nf,ErrorCode:()=>It,FileOpenPreference:()=>St,FrameContexts:()=>xt,HostClientType:()=>Mt,HostName:()=>Nt,LiveShareHost:()=>Dv,NotificationTypes:()=>vc,ParentAppWindow:()=>lg,SecondaryM365ContentIdName:()=>At,TaskModuleDimension:()=>Lt,TeamType:()=>Ut,UUID:()=>vn,UserSettingTypes:()=>Cc,UserTeamRole:()=>Dt,ViewerActionTypes:()=>wc,app:()=>i,appEntity:()=>L,appInitialization:()=>be,appInstallDialog:()=>G,authentication:()=>q,barCode:()=>K,calendar:()=>ae,call:()=>ye,chat:()=>Z,clipboard:()=>Q,conversations:()=>S,copilot:()=>I,dialog:()=>f,enablePrintCapability:()=>Jh,executeDeepLink:()=>uv,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>R,externalAppCommands:()=>F,files:()=>k,geoLocation:()=>ee,getAdaptiveCardSchemaVersion:()=>ag,getContext:()=>Zh,getMruTabInstances:()=>cv,getTabInstances:()=>sv,hostEntity:()=>z,initialize:()=>Gh,initializeWithFrameContext:()=>fv,liveShare:()=>Ie,location:()=>ne,logs:()=>b,mail:()=>ce,marketplace:()=>Te,media:()=>J,meeting:()=>oe,meetingRoom:()=>M,menus:()=>p,messageChannels:()=>N,monetization:()=>ie,navigateBack:()=>vv,navigateCrossDomain:()=>hv,navigateToTab:()=>mv,nestedAppAuth:()=>X,notifications:()=>x,openFilePreview:()=>Tc,otherAppStateChange:()=>U,pages:()=>C,people:()=>ue,print:()=>Kh,profile:()=>de,registerAppButtonClickHandler:()=>Yh,registerAppButtonHoverEnterHandler:()=>ev,registerAppButtonHoverLeaveHandler:()=>tv,registerBackButtonHandler:()=>nv,registerBeforeUnloadHandler:()=>ov,registerChangeSettingsHandler:()=>av,registerCustomHandler:()=>Ac,registerFocusEnterHandler:()=>iv,registerFullScreenHandler:()=>Xh,registerOnLoadHandler:()=>rv,registerOnThemeChangeHandler:()=>Qh,registerUserSettingsChangeHandler:()=>Ic,remoteCamera:()=>D,returnFocus:()=>gv,search:()=>fe,secondaryBrowser:()=>te,sendCustomEvent:()=>Ec,sendCustomMessage:()=>Sc,setFrameContext:()=>dv,settings:()=>Ee,shareDeepLink:()=>lv,sharing:()=>ge,stageView:()=>he,store:()=>$,tasks:()=>Ae,teams:()=>_,teamsCore:()=>le,thirdPartyCloudStorage:()=>Se,uploadCustomApp:()=>bc,version:()=>fr,videoEffects:()=>W,videoEffectsEx:()=>B,visualMedia:()=>we,webStorage:()=>Ce});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>Dr,getTelemetryPort:()=>xr,isSupported:()=>Ur});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>jr,getDataLayerPort:()=>Wr,isSupported:()=>Br});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>zr,registerOnResumeHandler:()=>$r});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Zr,FailedReason:()=>Kr,Messages:()=>Jr,_initialize:()=>eo,_uninitialize:()=>to,getContext:()=>no,getFrameContext:()=>Xr,initialize:()=>Yr,isInitialized:()=>Qr,lifecycle:()=>o,notifyAppLoaded:()=>ro,notifyExpectedFailure:()=>ao,notifyFailure:()=>io,notifySuccess:()=>oo,openLink:()=>lo,registerHostToAppPerformanceMetricsHandler:()=>co,registerOnThemeChangeHandler:()=>so});var a={};n.r(a),n.d(a,{isSupported:()=>po,resize:()=>fo});var s={};n.r(s),n.d(s,{isSupported:()=>mo,open:()=>go});var c={};n.r(c),n.d(c,{isSupported:()=>Co,registerOnMessageFromParent:()=>wo,sendMessageToDialog:()=>vo,sendMessageToParentFromDialog:()=>ho});var l={};n.r(l),n.d(l,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Ao,getDialogInfoFromUrlDialogInfo:()=>Eo,isSupported:()=>So,open:()=>yo,parentCommunication:()=>c,submit:()=>bo});var u={};n.r(u),n.d(u,{isSupported:()=>Uo,open:()=>xo});var d={};n.r(d),n.d(d,{bot:()=>u,isSupported:()=>Lo,open:()=>Do});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>Ho,isSupported:()=>Vo,update:()=>a,url:()=>l});var p={};n.r(p),n.d(p,{DisplayMode:()=>Wo,MenuItem:()=>jo,MenuListType:()=>Bo,initialize:()=>Ko,isSupported:()=>ni,setNavBarMenu:()=>Xo,setUpViews:()=>Zo,showActionMenu:()=>ei});var g={};n.r(g),n.d(g,{initialize:()=>ri,isSupported:()=>mi,registerChangeConfigHandler:()=>di,registerOnRemoveHandler:()=>ci,registerOnRemoveHandlerHelper:()=>li,registerOnSaveHandler:()=>ai,registerOnSaveHandlerHelper:()=>si,setConfig:()=>ii,setValidityState:()=>oi});var m={};n.r(m),n.d(m,{isSupported:()=>zi,onClick:()=>Wi,onHoverEnter:()=>Bi,onHoverLeave:()=>ji});var h={};n.r(h),n.d(h,{isSupported:()=>Gi,navigateTo:()=>$i,navigateToDefaultPage:()=>qi});var v={};n.r(v),n.d(v,{enterFullscreen:()=>Ji,exitFullscreen:()=>Ki,isSupported:()=>Zi});var w={};n.r(w),n.d(w,{getMruTabInstances:()=>Yi,getTabInstances:()=>Xi,isSupported:()=>ea,navigateToTab:()=>Qi});var C={};n.r(C),n.d(C,{EnterFocusType:()=>ta,ReturnFocusType:()=>na,appButton:()=>m,backStack:()=>y,config:()=>g,currentApp:()=>h,fullTrust:()=>v,getConfig:()=>sa,initializeWithFrameContext:()=>aa,isSupported:()=>fa,navigateCrossDomain:()=>ca,navigateToApp:()=>la,registerFocusEnterHandler:()=>oa,registerFullScreenHandler:()=>da,returnFocus:()=>ra,setCurrentFrame:()=>ia,shareDeepLink:()=>ua,tabs:()=>w});var y={};n.r(y),n.d(y,{_initialize:()=>Ra,isSupported:()=>xa,navigateBack:()=>Fa,registerBackButtonHandler:()=>ka,registerBackButtonHandlerHelper:()=>Ma});var b={};n.r(b),n.d(b,{isSupported:()=>hc,registerGetLogHandler:()=>mc});var S={};n.r(S),n.d(S,{closeConversation:()=>Rc,getChatMembers:()=>Fc,isSupported:()=>kc,openConversation:()=>Oc});var E={};n.r(E),n.d(E,{isSupported:()=>Uc,sendCustomTelemetryData:()=>Dc});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>Wc,isSupported:()=>_c});var I={};n.r(I),n.d(I,{customTelemetry:()=>E,eligibility:()=>A});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>qc,ActionExecuteResponseHandler:()=>Zc,InvokeErrorCode:()=>Kc,InvokeResponseType:()=>Jc,OriginalRequestType:()=>Gc,SerializableActionExecuteInvokeRequest:()=>zc,authenticateAndResendRequest:()=>tl,authenticateWithOauth2:()=>ol,authenticateWithPowerPlatformConnectorPlugins:()=>il,authenticateWithSSO:()=>nl,authenticateWithSSOAndResendRequest:()=>rl,isActionExecuteResponse:()=>$c,isInvokeError:()=>Qc,isSupported:()=>al,validateActionExecuteInvokeRequest:()=>Yc});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>dl,authenticateWithOauth:()=>ul,authenticateWithSSO:()=>ll,authenticateWithSSOAndResendRequest:()=>fl,isSupported:()=>pl,validateInput:()=>gl});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>vl,ActionOpenUrlType:()=>hl,isSupported:()=>yl,processActionOpenUrl:()=>Cl,processActionSubmit:()=>wl});var R={};n.r(R),n.d(R,{isSupported:()=>Il,processActionOpenUrl:()=>El,processActionSubmit:()=>Al});var F={};n.r(F),n.d(F,{isSupported:()=>Rl,processActionCommand:()=>Ol});var k={};n.r(k),n.d(k,{CloudStorageProvider:()=>kl,CloudStorageProviderFileAction:()=>Dl,CloudStorageProviderType:()=>Ml,DocumentLibraryAccessType:()=>xl,FileDownloadStatus:()=>Ul,SpecialDocumentLibraryType:()=>Nl,addCloudStorageFolder:()=>Hl,addCloudStorageProvider:()=>ql,addCloudStorageProviderFile:()=>Jl,copyMoveFiles:()=>jl,deleteCloudStorageFolder:()=>Vl,deleteCloudStorageProviderFile:()=>Zl,downloadCloudStorageProviderFile:()=>Ql,getCloudStorageFolderContents:()=>_l,getCloudStorageFolders:()=>Ll,getExternalProviders:()=>Bl,getFileDownloads:()=>zl,openCloudStorageFile:()=>Wl,openDownloadFolder:()=>$l,registerCloudStorageProviderContentChangeHandler:()=>eu,registerCloudStorageProviderListChangeHandler:()=>Yl,removeCloudStorageProvider:()=>Gl,renameCloudStorageProviderFile:()=>Kl,uploadCloudStorageProviderFile:()=>Xl});var M={};n.r(M),n.d(M,{getPairedMeetingRoomInfo:()=>ru,isSupported:()=>su,registerMeetingRoomCapabilitiesUpdateHandler:()=>iu,registerMeetingRoomStatesUpdateHandler:()=>au,sendCommandToPairedMeetingRoom:()=>ou});var N={};n.r(N),n.d(N,{dataLayer:()=>t,isSupported:()=>cu,telemetry:()=>e});var x={};n.r(x),n.d(x,{isSupported:()=>du,showNotification:()=>uu});var U={};n.r(U),n.d(U,{isSupported:()=>hu,notifyInstallCompleted:()=>mu,registerAppInstallationHandler:()=>pu,unregisterAppInstallationHandler:()=>gu});var D={};n.r(D),n.d(D,{ControlCommand:()=>wu,ErrorReason:()=>Cu,SessionTerminatedReason:()=>yu,getCapableParticipants:()=>bu,isSupported:()=>Ru,registerOnCapableParticipantsChangeHandler:()=>Iu,registerOnDeviceStateChangeHandler:()=>Pu,registerOnErrorHandler:()=>Tu,registerOnSessionStatusChangeHandler:()=>Ou,requestControl:()=>Su,sendControlCommand:()=>Eu,terminateSession:()=>Au});var L={};n.r(L),n.d(L,{isSupported:()=>Mu,selectAppEntity:()=>ku});var H={};n.r(H),n.d(H,{getUserJoinedTeams:()=>xu,isSupported:()=>Uu});var V={};n.r(V),n.d(V,{getConfigSetting:()=>Lu,isSupported:()=>Hu,joinedTeams:()=>H});var _={};n.r(_),n.d(_,{ChannelType:()=>_u,fullTrust:()=>V,getTeamChannels:()=>Wu,isSupported:()=>ju,refreshSiteUrl:()=>Bu});var W={};n.r(W),n.d(W,{EffectChangeType:()=>Yu,EffectFailureReason:()=>ed,VideoFrameFormat:()=>Xu,isSupported:()=>ad,notifySelectedVideoEffectChanged:()=>nd,registerForVideoEffect:()=>rd,registerForVideoFrame:()=>td});var B={};n.r(B),n.d(B,{ErrorLevel:()=>Fd,frameProcessingTimeoutInMs:()=>Od,isSupported:()=>Hd,notifyFatalError:()=>Wd,notifySelectedVideoEffectChanged:()=>Ud,registerForVideoEffect:()=>Dd,registerForVideoFrame:()=>kd,updatePersonalizedEffects:()=>Ld});var j={};n.r(j),n.d(j,{addAndConfigure:()=>Kd,getAll:()=>Zd,isSupported:()=>ef,reconfigure:()=>Qd,remove:()=>Yd,rename:()=>Xd});var z={};n.r(z),n.d(z,{AppTypes:()=>rf,isSupported:()=>of,tab:()=>j});var $={};n.r($),n.d($,{isSupported:()=>mf,openAppDetail:()=>ff,openFullStore:()=>df,openInContextStore:()=>pf,openSpecificStore:()=>gf});var q={};n.r(q),n.d(q,{DataResidency:()=>kf,authenticate:()=>Ef,getAuthToken:()=>If,getUser:()=>Pf,notifyFailure:()=>Ff,notifySuccess:()=>Rf,registerAuthenticationHandlers:()=>Sf});var G={};n.r(G),n.d(G,{isSupported:()=>ep,openAppInstallDialog:()=>Yf});var J={};n.r(J),n.d(J,{CameraStartMode:()=>ip,File:()=>up,FileFormat:()=>rp,ImageOutputFormats:()=>lp,ImageUriType:()=>cp,Media:()=>mp,MediaControllerEvent:()=>op,MediaType:()=>sp,Source:()=>ap,VideoController:()=>vp,captureImage:()=>dp,hasPermission:()=>fp,requestPermission:()=>pp,scanBarCode:()=>yp,selectMedia:()=>wp,viewImages:()=>Cp});var K={};n.r(K),n.d(K,{hasPermission:()=>Up,isSupported:()=>Lp,requestPermission:()=>Dp,scanBarCode:()=>xp});var Z={};n.r(Z),n.d(Z,{isSupported:()=>Bp,openChat:()=>Vp,openGroupChat:()=>Wp});var Q={};n.r(Q),n.d(Q,{isSupported:()=>Gp,read:()=>qp,write:()=>$p});var X={};n.r(X),n.d(X,{isNAAChannelRecommended:()=>Jp});var Y={};n.r(Y),n.d(Y,{chooseLocation:()=>Xp,isSupported:()=>eg,showLocation:()=>Yp});var ee={};n.r(ee),n.d(ee,{getCurrentLocation:()=>ng,hasPermission:()=>rg,isSupported:()=>ig,map:()=>Y,requestPermission:()=>og});var te={};n.r(te),n.d(te,{isSupported:()=>fg,open:()=>dg});var ne={};n.r(ne),n.d(ne,{getLocation:()=>gg,isSupported:()=>hg,showLocation:()=>mg});var re={};n.r(re),n.d(re,{setOptions:()=>wg});var oe={};n.r(oe),n.d(oe,{CallType:()=>Ag,EventActionSource:()=>Tg,MeetingReactionType:()=>Sg,MeetingType:()=>Eg,SharingProtocol:()=>Ig,appShareButton:()=>re,getAppContentStageSharingCapabilities:()=>Lg,getAppContentStageSharingState:()=>Vg,getAuthenticationTokenForAnonymousUser:()=>kg,getIncomingClientAudioState:()=>Pg,getLiveStreamState:()=>Mg,getMeetingDetails:()=>Rg,getMeetingDetailsVerbose:()=>Fg,joinMeeting:()=>jg,registerLiveStreamChangedHandler:()=>Ug,registerMeetingReactionReceivedHandler:()=>Bg,registerRaiseHandStateChangedHandler:()=>Wg,registerSpeakingStateChangeHandler:()=>_g,requestAppAudioHandling:()=>zg,requestStartLiveStreaming:()=>Ng,requestStopLiveStreaming:()=>xg,shareAppContentToStage:()=>Dg,stopSharingAppContentToStage:()=>Hg,toggleIncomingClientAudio:()=>Og,updateMicState:()=>Gg});var ie={};n.r(ie),n.d(ie,{isSupported:()=>Xg,openPurchaseExperience:()=>Qg});var ae={};n.r(ae),n.d(ae,{composeMeeting:()=>tm,isSupported:()=>nm,openCalendarItem:()=>em});var se={};n.r(se),n.d(se,{composeMailWithHandoff:()=>am,isSupported:()=>sm});var ce={};n.r(ce),n.d(ce,{ComposeMailType:()=>pm,composeMail:()=>dm,handoff:()=>se,isSupported:()=>fm,openMailItem:()=>um});var le={};n.r(le),n.d(le,{enablePrintCapability:()=>mm,isSupported:()=>bm,print:()=>hm,registerBeforeUnloadHandler:()=>Cm,registerBeforeUnloadHandlerHelper:()=>ym,registerOnLoadHandler:()=>vm,registerOnLoadHandlerHelper:()=>wm});var ue={};n.r(ue),n.d(ue,{isSupported:()=>Tm,selectPeople:()=>Am});var de={};n.r(de),n.d(de,{isSupported:()=>km,showProfile:()=>Fm});var fe={};n.r(fe),n.d(fe,{closeSearch:()=>Vm,isSupported:()=>Hm,registerHandlers:()=>Dm,unregisterHandlers:()=>Lm});var pe={};n.r(pe),n.d(pe,{getContent:()=>Bm,isSupported:()=>jm});var ge={};n.r(ge),n.d(ge,{SharingAPIMessages:()=>qm,history:()=>pe,isSupported:()=>Xm,shareWebContent:()=>Gm});var me={};n.r(me),n.d(me,{close:()=>eh,isSupported:()=>th});var he={};n.r(he),n.d(he,{StageViewOpenMode:()=>rh,isSupported:()=>ih,open:()=>oh,self:()=>me});var ve={};n.r(ve),n.d(ve,{captureImages:()=>lh,isSupported:()=>dh,retrieveImages:()=>uh});var we={};n.r(we),n.d(we,{CameraRestriction:()=>hh,Source:()=>vh,hasPermission:()=>wh,image:()=>ve,requestPermission:()=>Ch});var Ce={};n.r(Ce),n.d(Ce,{isSupported:()=>Th,isWebStorageClearedOnUserLogOut:()=>Ah});var ye={};n.r(ye),n.d(ye,{CallModalities:()=>Oh,isSupported:()=>Fh,startCall:()=>Rh});var be={};n.r(be),n.d(be,{ExpectedFailureReason:()=>Zr,FailedReason:()=>Kr,Messages:()=>Jr,notifyAppLoaded:()=>Mh,notifyExpectedFailure:()=>Uh,notifyFailure:()=>xh,notifySuccess:()=>Nh});var Se={};n.r(Se),n.d(Se,{getDragAndDropFiles:()=>jh,isSupported:()=>$h});var Ee={};n.r(Ee),n.d(Ee,{getSettings:()=>yv,registerOnRemoveHandler:()=>Ev,registerOnSaveHandler:()=>Sv,setSettings:()=>bv,setValidityState:()=>Cv});var Ae={};n.r(Ae),n.d(Ae,{getDefaultSizeIfNotProvided:()=>kv,startTask:()=>Tv,submitTask:()=>Ov,updateTask:()=>Pv});var Ie={};n.r(Ie),n.d(Ie,{ContainerState:()=>xv,LiveShareHost:()=>Dv,UserMeetingRole:()=>Nv,isSupported:()=>Uv});var Te={};n.r(Te),n.d(Te,{CartStatus:()=>Xv,Intent:()=>Qv,addOrUpdateCartItems:()=>ew,cartVersion:()=>Zv,getCart:()=>Yv,isSupported:()=>rw,removeCartItems:()=>tw,updateCartStatus:()=>nw});var Pe=n(815),Oe=n(933);const Re=ke,Fe=2147483647;function ke(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 Ne(e)}return Me(e,t,n)}function Me(e,t,n){if("string"==typeof e)return Le(e,t);if(ArrayBuffer.isView(e))return ze(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(Ve(e,ArrayBuffer)||e&&Ve(e.buffer,ArrayBuffer))return $e(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Ve(e,SharedArrayBuffer)||e&&Ve(e.buffer,SharedArrayBuffer)))return $e(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 ke.from(r,t,n);const o=ft(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ke.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 Ne(e){return xe(e),Ue(e<0?0:0|De(e))}function xe(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 Ue(e){if(e>Fe)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ke.prototype),t}function De(e){if(e>=Fe)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Fe.toString(16)+" bytes");return 0|e}function Le(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ke.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|He(e,t);let r=Ue(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function He(e,t){if(ke.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Ve(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 _e(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return We(e).length;default:if(o)return r?-1:_e(e).length;t=(""+t).toLowerCase(),o=!0}}function Ve(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function _e(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 We(e){return Oe.toByteArray(je(e))}ke.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}}(),ke.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ke.from=function(e,t,n){return Me(e,t,n)},Object.setPrototypeOf(ke.prototype,Uint8Array.prototype),Object.setPrototypeOf(ke,Uint8Array),ke.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}},ke.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ke.prototype};const Be=/[^+/0-9A-Za-z-_]/g;function je(e){if((e=(e=e.split("=")[0]).trim().replace(Be,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function ze(e){if(Ve(e,Uint8Array)){const t=new Uint8Array(e);return $e(t.buffer,t.byteOffset,t.byteLength)}return qe(e)}function $e(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,ke.prototype),r}function qe(e){const t=e.length<0?0:0|De(e.length),n=Ue(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Ge(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 Ze(r)}function Je(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 Qe(this,t,n);case"utf8":case"utf-8":return Ge(this,t,n);case"ascii":return Xe(this,t,n);case"latin1":case"binary":return Ye(this,t,n);case"base64":return et(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ke.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Ge(this,0,e):Je.apply(this,arguments)};const Ke=4096;function Ze(e){const t=e.length;if(t<=Ke)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ke));return n}function Qe(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+=dt[e[r]];return o}function Xe(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 Ye(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 et(e,t,n){return 0===t&&n===e.length?Oe.fromByteArray(e):Oe.fromByteArray(e.slice(t,n))}function tt(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 nt(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(ut(r))return a;e[n+a]=r}return a}function rt(e,t,n,r){return lt(_e(t,e.length-n),e,n,r)}function ot(e,t,n,r){return lt(st(t),e,n,r)}function it(e,t,n,r){return lt(We(t),e,n,r)}function at(e,t,n,r){return lt(ct(t,e.length-n),e,n,r)}function st(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function ct(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 lt(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 ut(e){return e!=e}ke.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 nt(this,e,t,n);case"utf8":case"utf-8":return rt(this,e,t,n);case"ascii":case"latin1":case"binary":return ot(this,e,t,n);case"base64":return it(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const dt=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 ft(e){if(ke.isBuffer(e)){const t=0|De(e.length),n=Ue(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ut(e.length)?Ue(0):qe(e):"Buffer"===e.type&&Array.isArray(e.data)?qe(e.data):void 0}const pt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let gt;const mt=new Uint8Array(16);function ht(){if(!gt&&(gt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gt(mt)}const vt=[];for(let e=0;e<256;++e)vt.push((e+256).toString(16).slice(1));function wt(e,t=0){return vt[e[t+0]]+vt[e[t+1]]+vt[e[t+2]]+vt[e[t+3]]+"-"+vt[e[t+4]]+vt[e[t+5]]+"-"+vt[e[t+6]]+vt[e[t+7]]+"-"+vt[e[t+8]]+vt[e[t+9]]+"-"+vt[e[t+10]]+vt[e[t+11]]+vt[e[t+12]]+vt[e[t+13]]+vt[e[t+14]]+vt[e[t+15]]}const Ct=function(e,t,n){if(pt.randomUUID&&!t&&!e)return pt.randomUUID();const r=(e=e||{}).random||(e.rng||ht)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return wt(r)},yt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const bt=function(e){return"string"==typeof e&&yt.test(e)};var St,Et,At,It,Tt,Pt,Ot,Rt,Ft,kt,Mt,Nt,xt,Ut,Dt,Lt,Ht;function Vt(e){return void 0!==(null==e?void 0:e.errorCode)}!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(St||(St={})),function(e){e.M365Content="m365content"}(Et||(Et={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(At||(At={})),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"}(It||(It={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Tt||(Tt={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Pt||(Pt={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Ot||(Ot={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Rt||(Rt={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Ft||(Ft={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(kt||(kt={})),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"}(Mt||(Mt={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(Nt||(Nt={})),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"}(xt||(xt={})),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"}(Ut||(Ut={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(Dt||(Dt={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Lt||(Lt={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Ht||(Ht={}));const _t={errorCode:It.NOT_SUPPORTED_ON_PLATFORM},Wt={majorVersion:1,minorVersion:5},Bt={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},jt=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),zt=new Error("Invalid response: Received more images than the specified max limit in the response.");function $t(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function qt(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 Gt(){return Ct()}function Jt(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&Jt(e[t])})),Object.freeze(e)}function Kt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Zt(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Qt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Xt(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 Yt(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 en(e){return!(qt(`${e.majorVersion}.${e.minorVersion}`,`${Wt.majorVersion}.${Wt.minorVersion}`)>=0)}function tn(e){return"https:"===e.protocol}function nn(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=Re.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function rn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function on(){if(an())throw new Error("window object undefined at SSR check");return window}function an(){return"undefined"==typeof window}function sn(e,t){if(un(e)||!dn(e)||!fn(e))throw t||new Error("id is not valid.")}function cn(e,t){const n=e.toString().toLocaleLowerCase();if(un(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!tn(e))throw t||new Error("Url should be a valid https url")}function ln(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function un(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function dn(e){return e.length<256&&e.length>4}function fn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function pn(e){if(!e)throw new Error("id must not be empty");if(!1===bt(e))throw new Error("id must be a valid UUID")}const gn=!!performance&&"now"in performance;function mn(){return gn?performance.now()+performance.timeOrigin:void 0}function hn(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=>hn(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=>hn(e[n],t+1)))}class vn{constructor(e=Gt()){this.uuid=e,pn(e)}toString(){return this.uuid}}const wn=new vn,Cn=Pe.debug.formatArgs;Pe.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${wn.toString()}]`,Cn.call(this,e)};const yn=(0,Pe.debug)("teamsJs");function bn(e){return yn.extend(e)}function Sn(e,t){return`${e}_${t}`}function En(e){return/^v\d+_[\w.]+$/.test(e)}const An=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const In="2.0.1",Tn="2.0.2",Pn="2.0.3",On="2.0.4",Rn="2.0.1",Fn="1.9.0",kn="2.0.0",Mn="1.7.0",Nn="1.8.0",xn="1.9.0",Un=n.t(An,2).validOrigins,Dn=1500,Ln=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),Hn=/^https:\/\//,Vn="https",_n="teams.microsoft.com",Wn="The library has not yet been initialized",Bn="The runtime has not yet been initialized",jn="The runtime version is not supported",zn="The call was not properly started";class $n{}$n.initializeCalled=!1,$n.initializeCompleted=!1,$n.additionalValidOrigins=[],$n.initializePromise=void 0,$n.isFramelessWindow=!1,$n.frameContext=void 0,$n.hostClientType=void 0,$n.printCapabilityEnabled=!1;var qn=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 Gn=bn("runtime"),Jn=4;function Kn(e){return e.apiVersion===Jn}const Zn={apiVersion:-1,supports:{}};function Qn(e){if(Kn(e))return!0;throw-1===e.apiVersion?new Error(Bn):new Error(jn)}let Xn=Zn;const Yn={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:Bt,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:{}}}},er=[Mt.desktop,Mt.web,Mt.rigel,Mt.surfaceHub,Mt.teamsRoomsWindows,Mt.teamsRoomsAndroid,Mt.teamsPhones,Mt.teamsDisplays],tr=[Mt.android,Mt.ios,Mt.ipados,Mt.visionOS],nr=[...er,...tr];function rr(e){let t=e;if(t.apiVersion<Jn&&or.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),Kn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const or=[{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=qn(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})}}}],ir={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:er}],"1.9.0":[{capability:{location:{}},hostClientTypes:nr}],"2.0.0":[{capability:{people:{}},hostClientTypes:nr},{capability:{sharing:{}},hostClientTypes:[Mt.desktop,Mt.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[Mt.android,Mt.desktop,Mt.ios,Mt.teamsRoomsAndroid,Mt.teamsPhones,Mt.teamsDisplays,Mt.web]},{capability:{webStorage:{}},hostClientTypes:[Mt.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[Mt.android,Mt.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[Mt.android,Mt.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[Mt.android,Mt.ios,Mt.ipados,Mt.visionOS]}]},ar=Gn.extend("generateBackCompatRuntimeConfig");function sr(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]=sr(e[r]||{},t[r]));return n}function cr(e,t,n){ar("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);ar("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{qt(e,t)>=0&&n[t].forEach((e=>{void 0!==$n.hostClientType&&e.hostClientTypes.includes($n.hostClientType)&&(r=sr(r,e.capability))}))}));const o={apiVersion:Jn,hostVersionsInfo:Bt,isLegacyTeams:!0,supports:r};return ar("Runtime config after updating based on highestSupportedVersion: %o",o),o}const lr=Gn.extend("applyRuntimeConfig");function ur(e){"string"==typeof e.apiVersion&&(lr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),lr("Fast-forwarding runtime %o",e);const t=rr(e);lr("Applying runtime %o",t),Xn=Jt(t)}function dr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const fr="2.34.1-beta.0",pr=bn("internal"),gr=pr.extend("ensureInitializeCalled"),mr=pr.extend("ensureInitialized");function hr(){if(!$n.initializeCalled)throw gr(Wn),new Error(Wn)}function vr(e,...t){if(!$n.initializeCompleted)throw mr("%s. initializeCalled: %s",Wn,$n.initializeCalled.toString()),new Error(Wn);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===$n.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${$n.frameContext}".`)}return Qn(e)}function wr(e=In){const t=qt($n.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Cr(){return $n.hostClientType==Mt.android||$n.hostClientType==Mt.ios||$n.hostClientType==Mt.ipados||$n.hostClientType==Mt.visionOS}function yr(e=In){if(!Cr()){throw{errorCode:It.NOT_SUPPORTED_ON_PLATFORM}}if(!wr(e)){throw{errorCode:It.OLD_PLATFORM}}}function br(e){let t=$n.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&Hn.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),$n.additionalValidOrigins=t}function Sr(e){if(un(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Ir(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Er}-${Ar}).`);if(Tr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Er=4,Ar=256;function Ir(e){return e.length<Ar&&e.length>Er}function Tr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Pr(e){if(!(e instanceof Or))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Or{constructor(e){this.appIdAsString=e,Sr(e)}serialize(){return this.toString()}toString(){return this.appIdAsString}}function Rr(e){return null==e}var Fr=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 kr;const Mr="v1",Nr=bn("messageChannels.telemetry");function xr(){return Fr(this,void 0,void 0,(function*(){if(kr)return Nr("Returning telemetry port from cache"),kr;if(!Ur())throw _t;return kr=yield Os(Sn(Mr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),kr}))}function Ur(){var e;return!(!vr(Xn)||!(null===(e=Xn.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function Dr(){kr=void 0}var Lr=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 Hr;const Vr="v1",_r=bn("messageChannels.dataLayer");function Wr(){return Lr(this,void 0,void 0,(function*(){if(Hr)return _r("Returning dataLayer port from cache"),Hr;if(!Br())throw _t;return Hr=yield Os(Sn(Vr,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),Hr}))}function Br(){var e;return!(!vr(Xn)||!(null===(e=Xn.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function jr(){Hr=void 0}function zr(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");vr(Xn),ts(e)}function $r(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");vr(Xn),ns(e)}const qr="v2",Gr=bn("app"),Jr={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Kr,Zr;function Qr(){return $n.initializeCompleted}function Xr(){return $n.frameContext}function Yr(e){return bi(Sn(qr,"app.initialize"),e)}function eo(e){hs.currentWindow=e}function to(){$n.initializeCalled&&(Va(),$n.initializeCalled=!1,$n.initializeCompleted=!1,$n.initializePromise=void 0,$n.additionalValidOrigins=[],$n.frameContext=void 0,$n.hostClientType=void 0,$n.isFramelessWindow=!1,Dr(),jr(),Cs())}function no(){return new Promise((e=>{hr(),e(ys(Sn(qr,"app.getContext"),"getContext"))})).then((e=>uo(e)))}function ro(){hr(),Si(Sn(qr,"app.notifyAppLoaded"))}function oo(){return Ii(Sn(qr,"app.notifySuccess"))}function io(e){hr(),Ai(Sn(qr,"app.notifyFailure"),e)}function ao(e){hr(),Ei(Sn(qr,"app.notifyExpectedFailure"),e)}function so(e){Fi(Sn(qr,"app.registerOnThemeChangeHandler"),e)}function co(e){Ja(e)}function lo(e){return ki(Sn(qr,"app.openLink"),e)}function uo(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:Nt.teams,clientType:e.hostClientType?e.hostClientType:Mt.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Or(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:$n.frameContext,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 fo(e){To(Sn(Io,"dialog.update.resize"),e)}function po(){return!(!vr(Xn)||!Xn.supports.dialog)&&!!Xn.supports.dialog.update}function go(e,t,n){Oo(Sn(Io,"dialog.url.bot.open"),e,t,n)}function mo(){return vr(Xn)&&void 0!==(Xn.supports.dialog&&Xn.supports.dialog.url&&Xn.supports.dialog.url.bot)}function ho(e){if(vr(Xn,xt.task),!Co())throw _t;ks(Sn(Io,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function vo(e){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!Co())throw _t;ks(Sn(Io,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function wo(e){if(vr(Xn,xt.task),!Co())throw _t;for(ja("messageForChild"),Ba(Sn(Io,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),Mo.reverse();Mo.length>0;){e(Mo.pop())}}function Co(){var e,t;return vr(Xn)&&!!(null===(t=null===(e=Xn.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function yo(e,t,n){Po(Sn(Io,"dialog.url.open"),e,t,n)}function bo(e,t){Ro(Sn(Io,"dialog.url.submit"),e,t)}function So(){return vr(Xn)&&void 0!==(Xn.supports.dialog&&Xn.supports.dialog.url)}function Eo(e){return{url:e.url,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Ao(e){const t=Eo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Kr||(Kr={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Zr||(Zr={})),Gr("teamsjs instance is version %s, starting at %s UTC (%s local)",fr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(an())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?Gr("teamsjs is being used from %s. %s",t,n):Gr("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const Io="v2";function To(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.task,xt.meetingStage),!po())throw _t;ks(e,"tasks.updateTask",[t])}function Po(e,t,n,r){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!So())throw _t;r&&Ba(Sn(Io,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);ks(e,"tasks.startTask",[Eo(t)],((e,t)=>{null==n||n({err:e,result:t}),ja("messageForParent")}))}function Oo(e,t,n,r){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!mo())throw _t;r&&Ba(Sn(Io,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);ks(e,"tasks.startTask",[Ao(t)],((e,t)=>{null==n||n({err:e,result:t}),ja("messageForParent")}))}function Ro(e,t,n){if(vr(Xn,xt.task),!So())throw _t;ks(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function Fo(e){return{card:e.card,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title}}function ko(e){const t=Fo(e);return t.completionBotId=e.completionBotId,t}const Mo=[];function No(e){$n.frameContext&&($n.frameContext===xt.task?Mo.push(e):ja("messageForChild"))}function xo(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!Uo())throw _t;const n=ko(e);ks(Sn(Io,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function Uo(){const e=Xn.hostVersionsInfo&&Xn.hostVersionsInfo.adaptiveCardSchemaVersion&&!en(Xn.hostVersionsInfo.adaptiveCardSchemaVersion);return vr(Xn)&&void 0!==(e&&Xn.supports.dialog&&Xn.supports.dialog.card&&Xn.supports.dialog.card.bot)}function Do(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!Lo())throw _t;const n=Fo(e);ks(Sn(Io,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function Lo(){const e=Xn.hostVersionsInfo&&Xn.hostVersionsInfo.adaptiveCardSchemaVersion&&!en(Xn.hostVersionsInfo.adaptiveCardSchemaVersion);return vr(Xn)&&void 0!==(e&&Xn.supports.dialog&&Xn.supports.dialog.card)}function Ho(){Ba(Sn(Io,"dialog.registerMessageForChildHandler"),"messageForChild",No,!1)}function Vo(){return!(!vr(Xn)||!Xn.supports.dialog)}const _o="v2";var Wo,Bo;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Wo||(Wo={}));class jo{constructor(){this.enabled=!0,this.selected=!1}}let zo,$o,qo,Go,Jo;function Ko(){Ba(Sn(_o,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Yo,!1),Ba(Sn(_o,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",ti,!1),Ba(Sn(_o,"menus.registerSetModuleViewHandler"),"setModuleView",Qo,!1)}function Zo(e,t){if(vr(Xn),!ni())throw _t;qo=t,ks(Sn(_o,"menus.setUpViews"),"setUpViews",[e])}function Qo(e){qo&&qo(e)||(vr(Xn),ks(Sn(_o,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Xo(e,t){if(vr(Xn),!ni())throw _t;zo=t,ks(Sn(_o,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Yo(e){zo&&zo(e)||(vr(Xn),ks(Sn(_o,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function ei(e,t){if(vr(Xn),!ni())throw _t;$o=t,ks(Sn(_o,"menus.showActionMenu"),"showActionMenu",[e])}function ti(e){$o&&$o(e)||(vr(Xn),ks(Sn(_o,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function ni(){return!(!vr(Xn)||!Xn.supports.menus)}function ri(){Ba(Sn(pa,"pages.config.registerSettingsSaveHandler"),"settings.save",ui,!1),Ba(Sn(pa,"pages.config.registerSettingsRemoveHandler"),"settings.remove",pi,!1)}function oi(e){return Sa(Sn(pa,"pages.config.setValidityState"),e)}function ii(e){return Aa(Sn(pa,"pages.config.setConfig"),e)}function ai(e){si(Sn(pa,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Rr(e)&&!mi())throw _t}))}function si(e,t,n){!Rr(t)&&vr(Xn,xt.settings),n&&n(),Go=t,!Rr(t)&&ks(e,"registerHandler",["save"])}function ci(e){li(Sn(pa,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Rr(e)&&!mi())throw _t}))}function li(e,t,n){!Rr(t)&&vr(Xn,xt.remove,xt.settings),n&&n(),Jo=t,!Rr(t)&&ks(e,"registerHandler",["remove"])}function ui(e){const t=new fi(e);Go?Go(t):hs.childWindow?sc("settings.save",[e]):t.notifySuccess()}function di(e){$a(Sn(pa,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[xt.content],(()=>{if(!mi())throw _t}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Bo||(Bo={}));class fi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),ks(Sn(pa,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),ks(Sn(pa,"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 pi(){const e=new gi;Jo?Jo(e):hs.childWindow?sc("settings.remove",[]):e.notifySuccess()}class gi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),ks(Sn(pa,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),ks(Sn(pa,"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 mi(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.config}class hi{}class vi extends hi{validate(e){return!0}deserialize(e){return e}}var wi=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 Ci=6e4,yi=bn("app");function bi(e,t){if(an()){return yi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Xt((()=>Ri(e,t)),Ci,new Error("SDK initialization timed out."))}function Si(e){ks(e,Jr.AppLoaded,[fr])}function Ei(e,t){ks(e,Jr.ExpectedFailure,[t.reason,t.message])}function Ai(e,t){ks(e,Jr.Failure,[t.reason,t.message])}function Ii(e){return wi(this,void 0,void 0,(function*(){if($n.initializeCompleted)return Pi(e);if(!$n.initializePromise)throw new Error(Wn);return $n.initializePromise.then((()=>Pi(e)))}))}function Ti(){var e;return vr(Xn)&&!!(null===(e=Xn.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Pi(e){return wi(this,void 0,void 0,(function*(){return Ti()?Ts(Jr.Success,[fr],new vi,e).then((()=>({hasFinishedSuccessfully:!0}))):(ks(e,Jr.Success,[fr]),{hasFinishedSuccessfully:"unknown"})}))}const Oi=yi.extend("initializeHelper");function Ri(e,t){return new Promise((n=>{$n.initializeCalled||($n.initializeCalled=!0,Ha(),$n.initializePromise=ws(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=In})=>{$n.frameContext=e,$n.hostClientType=t,$n.clientSupportedSDKVersion=r;try{Oi("Parsing %s",n);const e=JSON.parse(n);if(Oi("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&ur(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Oi("Attempting to parse %s as an SDK version",n),isNaN(qt(n,In))||($n.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Oi("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");ur(e)}catch(e){if(!(e instanceof SyntaxError))throw e;ur(cr($n.clientSupportedSDKVersion,Yn,ir))}}$n.initializeCompleted=!0})),Ko(),ri(),Ho()),Array.isArray(t)&&br(t),void 0!==$n.initializePromise?n($n.initializePromise):Oi("GlobalVars.initializePromise is unexpectedly undefined")}))}function Fi(e,t){!Rr(t)&&hr(),qa(e,t)}function ki(e,t){return new Promise((n=>{vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),n(bs(e,"executeDeepLink",t))}))}var Mi=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 Ni=[];const xi=bn("validateOrigin");function Ui(){return Mi(this,void 0,void 0,(function*(){yield Li()}))}function Di(){return 0===Ni.length}function Li(e=!1){return Mi(this,void 0,void 0,(function*(){if(!Di()&&!e)return Ni;if(an())return Ni=Un,Un;{xi("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),Dn);return fetch(Ln,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return xi("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(Hi(JSON.stringify(e)))return Ni=e.validOrigins,Ni;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?xi(`validOrigins fetch call to CDN failed due to Timeout of ${Dn} ms. Defaulting to fallback list`):xi("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Ni=Un,Ni)))}}))}function Hi(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return xi("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function Vi(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function _i(e,t){return Li(t).then((t=>{if(!tn(e))return xi("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>Vi(e,n))))return!0;for(const e of $n.additionalValidOrigins){if(Vi("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return xi("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,$n.additionalValidOrigins),!1}))}function Wi(e){$a(Sn(pa,"pages.appButton.onClick"),"appButtonClick",e,[xt.content],(()=>{if(!zi())throw _t}))}function Bi(e){$a(Sn(pa,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[xt.content],(()=>{if(!zi())throw _t}))}function ji(e){$a(Sn(pa,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[xt.content],(()=>{if(!zi())throw _t}))}function zi(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.appButton}function $i(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!Gi())throw _t;t(Es(Sn(pa,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function qi(){return new Promise((e=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!Gi())throw _t;e(Es(Sn(pa,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Gi(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.currentApp}function Ji(){if(vr(Xn,xt.content),!Zi())throw _t;ks(Sn(pa,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Ki(){if(vr(Xn,xt.content),!Zi())throw _t;ks(Sn(pa,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Zi(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.fullTrust}function Qi(e){return ha(Sn(pa,"pages.tabs.navigateToTab"),e)}function Xi(e){return wa(Sn(pa,"pages.tabs.getTabInstances"),e)}function Yi(e){return Ca(Sn(pa,"pages.tabs.getMruTabInstances"),e)}function ea(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.tabs}var ta,na;function ra(e){const t=Sn(pa,"pages.returnFocus");if(vr(Xn),!fa())throw _t;if(void 0===e&&ks(t,"returnFocus",[!1]),"boolean"==typeof e)ks(t,"returnFocus",[e]);else switch(e){case na.PreviousLandmark:case na.GoToActivityFeed:ks(t,"returnFocus",[!1,e]);break;case na.NextLandmark:ks(t,"returnFocus",[!0,e])}}function oa(e){$a(Sn(pa,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!fa())throw _t}))}function ia(e){ba(Sn(pa,"pages.setCurrentFrame"),e)}function aa(e,t,n){Ui(),bi(Sn(pa,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),ia(e)}function sa(){return Ea(Sn(pa,"pages.getConfig."))}function ca(e){return ga(Sn(pa,"pages.navigateCrossDomain"),e)}function la(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!fa())throw _t;const n=Sn(pa,"pages.navigateToApp");if(Xn.isLegacyTeams){t(bs(n,"executeDeepLink",Yt(Ia(e)?e:Ta(e))))}else{t(bs(n,"pages.navigateToApp",Ia(e)?Pa(e):e))}}))}function ua(e){return ya(Sn(pa,"pages.shareDeepLink"),e)}function da(e){$a(Sn(pa,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Rr(e)&&!fa())throw _t}))}function fa(){return!(!vr(Xn)||!Xn.supports.pages)}Ui(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(ta||(ta={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(na||(na={}));const pa="v2";function ga(e,t){return new Promise((n=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage),!fa())throw _t;n(Ss(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function ma(e){return new Promise((t=>{if(vr(Xn),!xa())throw _t;t(Ss(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function ha(e,t){return new Promise((n=>{if(vr(Xn),!ea())throw _t;n(Ss(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function va(e,t){if(vr(Xn),!fa())throw _t;ks(e,"returnFocus",[t])}function wa(e,t){return new Promise((n=>{if(vr(Xn),!ea())throw _t;n(ys(e,"getTabInstances",t))}))}function Ca(e,t){return new Promise((n=>{if(vr(Xn),!ea())throw _t;n(ys(e,"getMruTabInstances",t))}))}function ya(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!fa())throw _t;ks(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ba(e,t){if(vr(Xn,xt.content),!fa())throw _t;ks(e,"setFrameContext",[t])}function Sa(e,t){if(vr(Xn,xt.settings,xt.remove),!mi())throw _t;ks(e,"settings.setValidityState",[t])}function Ea(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.settings,xt.remove,xt.sidePanel),!fa())throw _t;t(ys(e,"settings.getSettings"))}))}function Aa(e,t){return new Promise((n=>{if(vr(Xn,xt.content,xt.settings,xt.sidePanel),!mi())throw _t;n(bs(e,"settings.setSettings",t))}))}function Ia(e){return e.appId instanceof Or}function Ta(e){return Object.assign(Object.assign({},e),{appId:new Or(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Pa(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Oa;function Ra(){Ba(Sn(pa,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Na,!1)}function Fa(){return ma(Sn(pa,"pages.backStack.navigateBack"))}function ka(e){Ma(Sn(pa,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Rr(e)&&!xa())throw _t}))}function Ma(e,t,n){!Rr(t)&&vr(Xn),n&&n(),Oa=t,!Rr(t)&&ks(e,"registerHandler",["backButton"])}function Na(){Oa&&Oa()||(hs.childWindow?sc("backButtonPress",[]):Fa())}function xa(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.backStack}var Ua=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 Da=bn("handlers");class La{static initializeHandlers(){La.handlers.themeChange=Ga,La.handlers.load=Qa,La.handlers.beforeUnload=es,Ra()}static uninitializeHandlers(){La.handlers={},La.themeChangeHandler=null,La.loadHandler=null,La.beforeUnloadHandler=null,La.beforeSuspendOrTerminateHandler=null,La.resumeHandler=null}}function Ha(){La.initializeHandlers()}function Va(){La.uninitializeHandlers()}La.handlers={},La.themeChangeHandler=null,La.loadHandler=null,La.beforeUnloadHandler=null,La.beforeSuspendOrTerminateHandler=null,La.resumeHandler=null,La.hostToAppPerformanceMetricsHandler=null;const _a=Da.extend("callHandler");function Wa(e,t){const n=La.handlers[e];if(n){_a("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return hs.childWindow?(sc(e,t),[!1,void 0]):(_a("Handler for action message %s not found.",e),[!1,void 0])}function Ba(e,t,n,r=!0,o=[]){n?(La.handlers[t]=n,r&&ks(e,"registerHandler",[t,...o])):delete La.handlers[t]}function ja(e){delete La.handlers[e]}function za(e){return null!=La.handlers[e]}function $a(e,t,n,r,o){n&&vr(Xn,...r),o&&o(),Ba(e,t,n)}function qa(e,t){La.themeChangeHandler=t,!Rr(t)&&ks(e,"registerHandler",["themeChange"])}function Ga(e){La.themeChangeHandler&&La.themeChangeHandler(e),hs.childWindow&&sc("themeChange",[e])}function Ja(e){La.hostToAppPerformanceMetricsHandler=e}function Ka(e){La.hostToAppPerformanceMetricsHandler&&La.hostToAppPerformanceMetricsHandler(e)}function Za(e,t){La.loadHandler=t,!Rr(t)&&ks(e,"registerHandler",["load"])}function Qa(e){const t=Xa(e);La.resumeHandler?(La.resumeHandler(t),hs.childWindow&&sc("load",[t])):La.loadHandler&&(La.loadHandler(e),hs.childWindow&&sc("load",[e]))}function Xa(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Ya(e,t){La.beforeUnloadHandler=t,!Rr(t)&&ks(e,"registerHandler",["beforeUnload"])}function es(){return Ua(this,void 0,void 0,(function*(){const e=()=>{ks(Sn("v2","handleBeforeUnload"),"readyToUnload",[])};La.beforeSuspendOrTerminateHandler?(yield La.beforeSuspendOrTerminateHandler(),hs.childWindow?sc("beforeUnload"):e()):La.beforeUnloadHandler&&La.beforeUnloadHandler(e)||(hs.childWindow?sc("beforeUnload"):e())}))}function ts(e){La.beforeSuspendOrTerminateHandler=e,!Rr(e)&&ks(Sn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function ns(e){La.resumeHandler=e,!Rr(e)&&ks(Sn("v2","registerOnResumeHandler"),"registerHandler",["load"])}class rs{static storeCallbackInformation(e,t){rs.callbackInformation.set(e,t)}static clearMessages(){rs.callbackInformation.clear()}static deleteMessageInformation(e){rs.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Ka({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=rs.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Ka({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),rs.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}rs.callbackInformation=new Map;var os=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 is=e=>{const{uuid:t}=e,n=os(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},as=e=>{const{uuidAsString:t}=e,n=os(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new vn(t):void 0})},ss=e=>{const{uuidAsString:t}=e,n=os(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new vn(t):void 0})},cs=e=>{const{uuid:t}=e,n=os(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},ls=bn("nestedAppAuthUtils"),us=ls.extend("tryPolyfillWithNestedAppAuthBridge");function ds(e,t,n){var r;const o=us;if($n.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");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=ps(a,n);s&&(a.nestedAppAuthBridge=s)}const fs=ls.extend("createNestedAppAuthBridge");function ps(e,t){const n=fs;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}})();t&&"object"==typeof t&&"NestedAppAuthRequest"===t.messageType?o(e):n("Unrecognized data format received by app, message being ignored. Message: %o",e)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var gs=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 ms=bn("communication");class hs{}class vs{}function ws(e,t){if(vs.messageListener=e=>Vs(e),hs.currentWindow=hs.currentWindow||on(),hs.parentWindow=hs.currentWindow.parent!==hs.currentWindow.self?hs.currentWindow.parent:hs.currentWindow.opener,hs.topWindow=hs.currentWindow.top,(hs.parentWindow||e)&&hs.currentWindow.addEventListener("message",vs.messageListener,!1),!hs.parentWindow){const e=hs.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));$n.isFramelessWindow=!0,e.onNativeMessage=Ks}try{return hs.parentOrigin="*",As(t,"initialize",[fr,Jn,e]).then((([e,t,n,r])=>(ds(r,hs.currentWindow,{onMessage:Ws,sendPostMessage:Ns}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{hs.parentOrigin=null}}function Cs(){hs.currentWindow&&hs.currentWindow.removeEventListener("message",vs.messageListener,!1),hs.currentWindow=null,hs.parentWindow=null,hs.parentOrigin=null,hs.childWindow=null,hs.childOrigin=null,vs.parentMessageQueue=[],vs.childMessageQueue=[],vs.nextMessageId=0,vs.callbacks.clear(),vs.promiseCallbacks.clear(),vs.portCallbacks.clear(),vs.legacyMessageIdsToUuidMap={},rs.clearMessages()}function ys(e,t,...n){return As(e,t,n).then((([e])=>e))}function bs(e,t,...n){return As(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function Ss(e,t,n,...r){return As(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function Es(e,t,...n){return As(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function As(e,t,n=void 0){if(!En(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(Fs(Ls(e,t,n).uuid))}))}function Is(e){return e.map((e=>dr(e)?e.serialize():e))}function Ts(e,t,n,r,o){var i;return gs(this,void 0,void 0,(function*(){const a=Is(t),[s]=yield As(r,e,a);if(o&&o(s)||!o&&Vt(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(`${It.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function Ps(e,t,n,r){var o;return gs(this,void 0,void 0,(function*(){const i=Is(t),[a]=yield As(n,e,i);if(r&&r(a)||!r&&Vt(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${It.INTERNAL_ERROR}, message: Invalid response from host`)}))}function Os(e,t,n=void 0){if(!En(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 Rs(Ls(e,t,n).uuid)}function Rs(e){return new Promise(((t,n)=>{vs.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 Fs(e){return new Promise((t=>{vs.promiseCallbacks.set(e,t)}))}function ks(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!En(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=Ls(e,t,o);r&&vs.callbacks.set(i.uuid,r)}vs.parentMessageQueue=[],vs.childMessageQueue=[],vs.topMessageQueue=[],vs.nextMessageId=0,vs.callbacks=new Map,vs.promiseCallbacks=new Map,vs.portCallbacks=new Map,vs.legacyMessageIdsToUuidMap={};const Ms=ms.extend("sendNestedAuthRequestToTopWindow");function Ns(e){const t=Ms,n=hs.topWindow,r=lc(e);return t("Message %s information: %o",fc(r),{actionName:r.func}),Us(n,r)}const xs=ms.extend("sendRequestToTargetWindowHelper");function Us(e,t){const n=xs,r=nc(e),o=is(t);if($n.isFramelessWindow)hs.currentWindow&&hs.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",fc(o),r),hs.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=tc(e);e&&i?(n("Sending message %s to %s via postMessage",fc(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",fc(o),r),ec(e).push(t))}return t}const Ds=ms.extend("sendMessageToParentHelper");function Ls(e,t,n,r){const o=Ds,i=hs.parentWindow,a=cc(e,t,n,r);return rs.storeCallbackInformation(a.uuid,{name:t,calledAt:a.timestamp}),o("Message %s information: %o",fc(a),{actionName:t,args:n}),Us(i,a)}const Hs=ms.extend("processIncomingMessage");function Vs(e){return gs(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Hs("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 js(t,n).then((r=>{r?(zs(t,n),t===hs.parentWindow?Ks(e):t===hs.childWindow&&Xs(e)):Hs("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 _s=ms.extend("processAuthBridgeMessage");function Ws(e,t){var n,r;const o=_s;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),l=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?js(c,l)?(hs.topWindow&&!hs.topWindow.closed&&c!==hs.topWindow||(hs.topWindow=c,hs.topOrigin=l),hs.topWindow&&hs.topWindow.closed&&(hs.topWindow=null,hs.topOrigin=null),oc(hs.topWindow),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const Bs=ms.extend("shouldProcessIncomingMessage");function js(e,t){return gs(this,void 0,void 0,(function*(){if(hs.currentWindow&&e===hs.currentWindow)return Bs("Should not process message because it is coming from the current window"),!1;if(hs.currentWindow&&hs.currentWindow.location&&t&&t===hs.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Bs("Message has an invalid origin of %s",t),!1}const n=yield _i(e);return n||Bs("Message has an invalid origin of %s",t),n}}))}function zs(e,t){$n.isFramelessWindow||hs.parentWindow&&!hs.parentWindow.closed&&e!==hs.parentWindow?hs.childWindow&&!hs.childWindow.closed&&e!==hs.childWindow||(hs.childWindow=e,hs.childOrigin=t):(hs.parentWindow=e,hs.parentOrigin=t),hs.parentWindow&&hs.parentWindow.closed&&(hs.parentWindow=null,hs.parentOrigin=null),hs.childWindow&&hs.childWindow.closed&&(hs.childWindow=null,hs.childOrigin=null),oc(hs.parentWindow),oc(hs.childWindow)}const $s=ms.extend("handleIncomingMessageFromParent");function qs(e){const t=$s;if(!e.uuid)return vs.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Gs(vs.callbacks,t);if(n)return n;const r=Gs(vs.promiseCallbacks,t);if(r)return r;const o=Gs(vs.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",fc(e))}function Gs(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Js(e,t){const n=Gs(t,e.uuid);n&&t.delete(n),e.uuid?vs.legacyMessageIdsToUuidMap={}:delete vs.legacyMessageIdsToUuidMap[e.id]}function Ks(e){const t=$s,n=mn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=ss(r),i=qs(o);if(i){const r=vs.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),rs.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]),Zs(e)||(t("Removing registered callback for message %s",i.toString()),Js(o,vs.callbacks)));const a=vs.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()),Js(o,vs.promiseCallbacks));const s=vs.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()),Js(o,vs.portCallbacks)}o.uuid&&(vs.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;rs.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',fc(r),r.func),Wa(r.func,r.args)}else t("Received an unknown message: %O",e)}function Zs(e){return!0===e.data.isPartialResponse}const Qs=ms.extend("handleIncomingMessageFromChild");function Xs(e){if("id"in e.data&&"func"in e.data){const t=as(e.data),[n,r]=Wa(t.func,t.args);n&&void 0!==r?(Qs("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",fc(t),t.func),ac(t.id,t.uuid,Array.isArray(r)?r:[r])):(Qs("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",fc(t),t.func),pc(t))}}function Ys(){return hs.topWindow!==hs.parentWindow}function ec(e){return e===hs.topWindow&&Ys()?vs.topMessageQueue:e===hs.parentWindow?vs.parentMessageQueue:e===hs.childWindow?vs.childMessageQueue:[]}function tc(e){return e===hs.topWindow&&Ys()?hs.topOrigin:e===hs.parentWindow?hs.parentOrigin:e===hs.childWindow?hs.childOrigin:null}function nc(e){return e===hs.topWindow&&Ys()?"top":e===hs.parentWindow?"parent":e===hs.childWindow?"child":null}const rc=ms.extend("flushMessageQueue");function oc(e){const t=tc(e),n=ec(e),r=nc(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=is(o);rc("Flushing message %s from %s message queue via postMessage.",fc(n),r),e.postMessage(n,t)}}}function ic(e,t){let n;n=hs.currentWindow.setInterval((()=>{0===ec(e).length&&(clearInterval(n),t())}),100)}function ac(e,t,n,r){const o=hs.childWindow,i=uc(e,t,n,r),a=cs(i),s=tc(o);o&&s&&(Qs("Sending message %s to %s via postMessage, args = %o",fc(a),nc(o),a.args),o.postMessage(a,s))}function sc(e,t){const n=hs.childWindow,r=dc(e,t),o=tc(n);n&&o?n.postMessage(r,o):ec(n).push(r)}function cc(e,t,n,r){const o=vs.nextMessageId++,i=new vn;return vs.legacyMessageIdsToUuidMap[o]=i,{id:o,uuid:i,func:t,timestamp:Date.now(),monotonicTimestamp:mn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r}}function lc(e){const t=vs.nextMessageId++,n=new vn;return vs.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:mn(),args:[],data:e}}function uc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function dc(e,t){return{func:e,args:t||[]}}function fc(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}function pc(e){const t=Ls(Sn("v2","tasks.startTask"),e.func,e.args,!0);vs.callbacks.set(t.uuid,((...t)=>{if(hs.childWindow){const n=t.pop();Qs("Message from parent being relayed to child, id: %s",fc(e)),ac(e.id,e.uuid,t,n)}}))}const gc="v1";function mc(e){if(!Rr(e)&&vr(Xn),!Rr(e)&&!hc())throw _t;e?Ba(Sn(gc,"log.request"),"log.request",(()=>{const t=e();ks(Sn(gc,"log.receive"),"log.receive",[t])})):ja("log.request")}function hc(){return!(!vr(Xn)||!Xn.supports.logs)}var vc,wc,Cc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(vc||(vc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(wc||(wc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Cc||(Cc={}));const yc="v1";function bc(e,t){vr(Xn),ks(Sn(yc,"uploadCustomApp"),"uploadCustomApp",[e],t||$t())}function Sc(e,t,n){vr(Xn),ks(Sn(yc,"sendCustomMessage"),e,t,n)}function Ec(e,t){if(vr(Xn),!hs.childWindow)throw new Error("The child window has not yet been initialized or is not present");sc(e,t)}function Ac(e,t){vr(Xn),Ba(Sn(yc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Ic(e,t){vr(Xn),Ba(Sn(yc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Tc(e){vr(Xn,xt.content,xt.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];ks(Sn(yc,"openFilePreview"),"openFilePreview",t)}const Pc="v1";function Oc(e){return new Promise((t=>{if(vr(Xn,xt.content),!kc())throw _t;const n=bs(Sn(Pc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Ba(Sn(Pc,"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&&Ba(Sn(Pc,"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 Rc(){if(vr(Xn,xt.content),!kc())throw _t;ks(Sn(Pc,"conversations.closeConversation"),"conversations.closeConversation"),ja("startConversation"),ja("closeConversation")}function Fc(){return new Promise((e=>{if(vr(Xn),!kc())throw _t;e(ys(Sn(Pc,"conversations.getChatMember"),"getChatMembers"))}))}function kc(){return!(!vr(Xn)||!Xn.supports.conversations)}var Mc=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Nc="v2",xc=bn("copilot");function Uc(){var e;return vr(Xn)&&!!(null===(e=Xn.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Dc(e,t){var n;return void 0===t&&(t=null!==(n=mn())&&void 0!==n?n:Date.now()),Mc(this,void 0,void 0,(function*(){return vr(Xn),xc("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Ps("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Sn(Nc,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var Lc=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 Hc="v2",Vc=bn("copilot");function _c(){var e,t;return vr(Xn)&&(!!(null===(e=Xn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=Xn.supports.copilot)||void 0===t?void 0:t.eligibility))}function Wc(){var e,t;return Lc(this,void 0,void 0,(function*(){if(vr(Xn),!_c())throw new Error(`Error code: ${_t.errorCode}, message: Not supported on platform`);if(null===(e=Xn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return Vc("Eligibility information is already available on runtime."),Xn.hostVersionsInfo.appEligibilityInformation;Vc("Eligibility information is not available on runtime. Requesting from host.");const n=yield ys(Sn(Hc,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(Vt(n))throw new Error(`Error code: ${n.errorCode}, message: ${null!==(t=n.message)&&void 0!==t?t:"Failed to get eligibility information from the host."}`);if(!Bc(n))throw new Error("Error deserializing eligibility information");return n}))}function Bc(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)}const jc="v2";class zc{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function $c(e){const t=e;return t.responseType===Jc.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const qc="Action.Execute";var Gc,Jc,Kc;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Gc||(Gc={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(Jc||(Jc={}));class Zc extends hi{validate(e){return $c(e)}deserialize(e){return e}}function Qc(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Kc).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function Xc(e){e.requestType===Gc.ActionExecuteInvokeRequest?Yc(e):e.requestType===Gc.QueryMessageExtensionRequest&&el(e)}function Yc(e){if(e.type!==qc){throw{errorCode:Kc.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${qc}"`}}if(!hn(e.data)){throw{errorCode:Kc.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function el(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 tl(e,t,n){if(vr(Xn,xt.content),!al())throw _t;const r=new Or(e);return Xc(n),As(Sn(jc,"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 nl(e,t){if(vr(Xn,xt.content),!al())throw _t;const n=new Or(e);return As(Sn(jc,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function rl(e,t,n){if(vr(Xn,xt.content),!al())throw _t;const r=new Or(e);return Xc(n),As(Sn(jc,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function ol(e,t,n){if(vr(Xn,xt.content),!al())throw _t;return sn(e,new Error("titleId is Invalid.")),sn(t,new Error("oauthConfigId is Invalid.")),As(Sn(jc,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function il(e,t,n){if(vr(Xn,xt.content),!al())throw _t;return sn(e,new Error("titleId is Invalid.")),t&&cn(t),As(Sn(jc,"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 al(){return!(!vr(Xn)||!Xn.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Kc||(Kc={}));var sl=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 cl="v2";function ll(e,t,n){return sl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!pl())throw _t;return gl(e,t),Ps("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.claims,n.silent],Sn(cl,"externalAppAuthenticationForCEA.authenticateWithSSO"),Qc)}))}function ul(e,t,n){return sl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!pl())throw _t;return gl(e,t),Ps("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Sn(cl,"externalAppAuthenticationForCEA.authenticateWithOauth"),Qc)}))}function dl(e,t,n,r){return sl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!pl())throw _t;return gl(e,t),Yc(r),Ts("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new zc(r),n.url.href,n.width,n.height,n.isExternal],new Zc,Sn(cl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Qc)}))}function fl(e,t,n,r){return sl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!pl())throw _t;return gl(e,t),Yc(r),Ts("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new zc(r),n.claims,n.silent],new Zc,Sn(cl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Qc)}))}function pl(){return!(!vr(Xn)||!Xn.supports.externalAppAuthenticationForCEA)}function gl(e,t){sn(t,new Error("conversation id is not valid.")),Pr(e)}const ml="v2";var hl,vl;function wl(e,t){if(vr(Xn,xt.content),!yl())throw _t;const n=new Or(e);return As(Sn(ml,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Cl(e,t,n){if(vr(Xn,xt.content),!yl())throw _t;const r=new Or(e);return As(Sn(ml,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function yl(){return!(!vr(Xn)||!Xn.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(hl||(hl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(vl||(vl={}));var bl=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 Sl="v2";function El(e,t,n){return bl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Il())throw _t;gl(e,t);const[r,o]=yield As(Sn(Sl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Al(e,t,n){return bl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Il())throw _t;gl(e,t);const r=yield ys(Sn(Sl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Il(){return!(!vr(Xn)||!Xn.supports.externalAppCardActionsForCEA)}var Tl=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 Pl="v2";function Ol(e,t,n){return Tl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Rl())throw _t;const r=new Or(e),[o,i]=yield As(Sn(Pl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Rl(){return!(!vr(Xn)||!Xn.supports.externalAppCommands)}const Fl="v1";var kl,Ml,Nl,xl,Ul,Dl;function Ll(e,t){if(vr(Xn,xt.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");ks(Sn(Fl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Hl(e,t){if(vr(Xn,xt.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");ks(Sn(Fl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Vl(e,t,n){if(vr(Xn,xt.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");ks(Sn(Fl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function _l(e,t,n){if(vr(Xn,xt.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");ks(Sn(Fl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Wl(e,t,n){if(vr(Xn,xt.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");ks(Sn(Fl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Bl(e=!1,t){if(vr(Xn,xt.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");ks(Sn(Fl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function jl(e,t,n,r,o=!1,i){if(vr(Xn,xt.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");ks(Sn(Fl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function zl(e){if(vr(Xn,xt.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");ks(Sn(Fl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function $l(e=void 0,t){if(vr(Xn,xt.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");ks(Sn(Fl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function ql(e){if(vr(Xn,xt.content),!e)throw tu(It.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");ks(Sn(Fl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Gl(e,t){if(vr(Xn,xt.content),!t)throw tu(It.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw tu(It.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");ks(Sn(Fl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Jl(e,t){if(vr(Xn,xt.content),!t)throw tu(It.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw tu(It.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");ks(Sn(Fl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Kl(e,t){if(vr(Xn,xt.content),!t)throw tu(It.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw tu(It.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");ks(Sn(Fl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Zl(e,t){if(vr(Xn,xt.content),!t)throw tu(It.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw tu(It.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");ks(Sn(Fl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Ql(e,t){if(vr(Xn,xt.content),!t)throw tu(It.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw tu(It.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");ks(Sn(Fl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Xl(e,t){if(vr(Xn,xt.content),!t)throw tu(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw tu(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw tu(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");ks(Sn(Fl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Yl(e){if(vr(Xn),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Ba(Sn(Fl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function eu(e){if(vr(Xn),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Ba(Sn(Fl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function tu(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"}(kl||(kl={})),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"}(Ml||(Ml={})),function(e){e.ClassMaterials="classMaterials"}(Nl||(Nl={})),function(e){e.Readonly="readonly"}(xl||(xl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(Ul||(Ul={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Dl||(Dl={}));const nu="v1";function ru(){return new Promise((e=>{if(vr(Xn),!su())throw _t;e(Es(Sn(nu,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function ou(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(vr(Xn),!su())throw _t;t(Es(Sn(nu,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function iu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(vr(Xn),!su())throw _t;Ba(Sn(nu,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{vr(Xn),e(t)}))}function au(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(vr(Xn),!su())throw _t;Ba(Sn(nu,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{vr(Xn),e(t)}))}function su(){return!(!vr(Xn)||!Xn.supports.meetingRoom)}function cu(){return!(!vr(Xn)||!Xn.supports.messageChannels)}const lu="v1";function uu(e){if(vr(Xn,xt.content),!du())throw _t;ks(Sn(lu,"notifications.showNotification"),"notifications.showNotification",[e])}function du(){return!(!vr(Xn)||!Xn.supports.notifications)}const fu="v2";function pu(e){if(!hu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());if(Rr(e))throw new Error(It.INVALID_ARGUMENTS.toString());Ba(Sn(fu,"otherApp.install"),"otherApp.install",e)}function gu(){if(!hu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());ks(Sn(fu,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),ja("otherApp.install")}function mu(e){if(!hu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());return Ps("otherApp.notifyInstallCompleted",[e.toString()],Sn(fu,"otherApp.notifyInstallCompleted"))}function hu(){return!(!vr(Xn)||!Xn.supports.otherAppStateChange)}const vu="v1";var wu,Cu,yu;function bu(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(vr(Xn,xt.sidePanel),!Ru())throw _t;ks(Sn(vu,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Su(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(vr(Xn,xt.sidePanel),!Ru())throw _t;ks(Sn(vu,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Eu(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(vr(Xn,xt.sidePanel),!Ru())throw _t;ks(Sn(vu,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Au(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(vr(Xn,xt.sidePanel),!Ru())throw _t;ks(Sn(vu,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Iu(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!Ru())throw _t;Ba(Sn(vu,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Tu(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!Ru())throw _t;Ba(Sn(vu,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Pu(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!Ru())throw _t;Ba(Sn(vu,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Ou(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!Ru())throw _t;Ba(Sn(vu,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Ru(){return!(!vr(Xn)||!Xn.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"}(wu||(wu={})),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"}(Cu||(Cu={})),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"}(yu||(yu={}));const Fu="v1";function ku(e,t,n,r){if(vr(Xn,xt.content),!Mu())throw _t;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");ks(Sn(Fu,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Mu(){return!(!vr(Xn)||!Xn.supports.appEntity)}const Nu="v1";function xu(e){return new Promise((t=>{if(vr(Xn),!Uu())throw _t;if(($n.hostClientType===Mt.android||$n.hostClientType===Mt.teamsRoomsAndroid||$n.hostClientType===Mt.teamsPhones||$n.hostClientType===Mt.teamsDisplays)&&!wr(Rn)){const e={errorCode:It.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(ys(Sn(Nu,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Uu(){return!(!vr(Xn)||!Xn.supports.teams)&&(!!Xn.supports.teams.fullTrust&&!!Xn.supports.teams.fullTrust.joinedTeams)}const Du="v1";function Lu(e){return new Promise((t=>{if(vr(Xn),!Hu())throw _t;t(ys(Sn(Du,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Hu(){return!(!vr(Xn)||!Xn.supports.teams)&&!!Xn.supports.teams.fullTrust}const Vu="v1";var _u;function Wu(e,t){if(vr(Xn,xt.content),!ju())throw _t;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");ks(Sn(Vu,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Bu(e,t){if(vr(Xn),!ju())throw _t;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");ks(Sn(Vu,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function ju(){return!(!vr(Xn)||!Xn.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(_u||(_u={}));class zu{static setTimeout(e,t){const n=performance.now(),r=Gt();return zu.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete zu.setTimeoutCallbacks[e]}static setInterval(e,t){zu.setTimeout((function n(){e(),zu.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in zu.setTimeoutCallbacks){const r=zu.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){zu.setTimeoutCallbacks[e].callback(),delete zu.setTimeoutCallbacks[e]}}}zu.setTimeoutCallbacks={};class $u{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){zu.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&&zu.clearTimeout(this.timeoutId),this.timeoutId=zu.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($u.maxSessionTimeoutInMs,2*t.timeoutInMs):$u.initialSessionTimeoutInMs}}$u.initialSessionTimeoutInMs=1e3,$u.maxSessionTimeoutInMs=3e4;const qu="v2";class Gu{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new $u(Gu.distributionBinSize,(e=>this.reportPerformanceEvent(Sn(qu,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){zu.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Sn(qu,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),Gu.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){zu.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(Sn(qu,"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(Sn(qu,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Gu.distributionBinSize=1e3,Gu.calculateFPSInterval=1e3;var Ju=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())}))},Ku=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 Zu="v2",Qu=an()?void 0:new Gu(ks);var Xu,Yu,ed;function td(e){if(vr(Xn,xt.sidePanel),!ad())throw _t;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Ba(Sn(Zu,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Qu?void 0:Qu.setFrameProcessTimeLimit(e.timeLimit)),!1),dd())sd(e.videoFrameHandler,e.config);else{if(!pd())throw _t;ld(e.videoBufferHandler,e.config)}null==Qu||Qu.startMonitorSlowFrameProcessing()}function nd(e,t){if(vr(Xn,xt.sidePanel),!ad())throw _t;ks(Sn(Zu,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function rd(e){if(vr(Xn,xt.sidePanel),!ad())throw _t;Ba(Sn(Zu,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Id(e,Qu),!1),ks(Sn(Zu,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function od(e){ks(Sn(Zu,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function id(e){ks(Sn(Zu,"videoEffects.notifyError"),"video.notifyError",[e])}function ad(){return vr(Xn)&&!!Xn.supports.video&&(!!Xn.supports.video.mediaStream||!!Xn.supports.video.sharedFrame)}function sd(e,t){if(vr(Xn,xt.sidePanel),!ad()||!dd())throw _t;Ba(Sn(Zu,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Ju(this,void 0,void 0,(function*(){const{streamId:n}=t,r=cd(e,Qu);yield hd(n,r,id,Qu)}))),!1),ks(Sn(Zu,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function cd(e,t){return n=>Ju(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 ld(e,t){if(vr(Xn,xt.sidePanel),!ad()||!pd())throw _t;Ba(Sn(Zu,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Qu||Qu.reportStartFrameProcessing(t.width,t.height),e(ud(t),(()=>{null==Qu||Qu.reportFrameProcessed(),od(n)}),id)}}),!1),ks(Sn(Zu,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function ud(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Ku(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function dd(){var e;return vr(Xn,xt.sidePanel)&&fd()&&!!(null===(e=Xn.supports.video)||void 0===e?void 0:e.mediaStream)}function fd(){var e,t,n,r;return!(!(null===(t=null===(e=on().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=on().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function pd(){var e;return vr(Xn,xt.sidePanel)&&!!(null===(e=Xn.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Xu||(Xu={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Yu||(Yu={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(ed||(ed={}));var gd=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 md="v2";function hd(e,t,n,r){var o,i;return gd(this,void 0,void 0,(function*(){const a=Cd();!an()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),yd(yield wd(e,n,r),new bd(n,t),a.writable)}))}function vd(e,t,n,r){var o,i;return gd(this,void 0,void 0,(function*(){const a=Cd();!an()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),yd(yield wd(e,n,r),new Ad(n,t),a.writable)}))}function wd(e,t,n){return gd(this,void 0,void 0,(function*(){if(an())throw _t;const r=on().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 Cd(){if(an())throw _t;const e=window.MediaStreamTrackGenerator;if(!e)throw _t;return new e({kind:"video"})}function yd(e,t,n){new(0,on().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class bd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>gd(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 Sd{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 Ed{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 Ad{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>gd(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=>gd(this,void 0,void 0,(function*(){if(an())throw _t;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 Sd(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 Ed(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}}})),Ba(Sn(md,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Id(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),ks(Sn(md,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in ed?e:ed.InitializationFailure;ks(Sn(md,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Td=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 Pd="v2",Od=2e3,Rd=an()?void 0:new Gu(ks);var Fd;function kd(e){var t,n;if(!Hd())throw _t;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(vr(Xn,xt.sidePanel)){if(Ba(Sn(Pd,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Rd?void 0:Rd.setFrameProcessTimeLimit(e)),!1),null===(t=Xn.supports.video)||void 0===t?void 0:t.mediaStream)Ba(Sn(Pd,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Td(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Rd?Nd(e.videoFrameHandler,Rd):e.videoFrameHandler;r?yield vd(n,o,_d,Rd):yield hd(n,o,_d,Rd)}))),!1),ks(Sn(Pd,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=Xn.supports.video)||void 0===n?void 0:n.sharedFrame))throw _t;Ba(Sn(Pd,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Rd||Rd.reportStartFrameProcessing(t.width,t.height);const n=Md(),r=t.timestamp;e.videoBufferHandler(xd(t),(()=>{n(),null==Rd||Rd.reportFrameProcessed(),Vd(r)}),_d)}}),!1),ks(Sn(Pd,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Rd||Rd.startMonitorSlowFrameProcessing()}}function Md(){const e=setTimeout((()=>{_d(`Frame not processed in ${Od}ms`,Fd.Warn)}),Od);return function(){clearTimeout(e)}}function Nd(e,t){return n=>Td(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Md(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function xd(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Ud(e,t,n){if(vr(Xn,xt.sidePanel),!Hd())throw _t;ks(Sn(Pd,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Dd(e){if(vr(Xn,xt.sidePanel),!Hd())throw _t;Ba(Sn(Pd,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Id(e,Rd),!1),ks(Sn(Pd,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Ld(e){if(vr(Xn,xt.sidePanel),!ad())throw _t;ks(Sn(Pd,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Hd(){return vr(Xn),ad()}function Vd(e){ks(Sn(Pd,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function _d(e,t=Fd.Warn){ks(Sn(Pd,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Wd(e){if(vr(Xn),!ad())throw _t;_d(e,Fd.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Fd||(Fd={}));const Bd="v2";class jd extends hi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class zd{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class $d{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class qd extends hi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Gd{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Jd extends hi{validate(e){const t=new qd;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Kd(e,t){if(vr(Xn),!ef())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(tf(e.threadId),t&&0===t.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Ts("hostEntity.tab.addAndConfigure",[new $d(e),t],new qd,Sn(Bd,"hostEntity.tab.addAndConfigure"))}function Zd(e){if(vr(Xn),!ef())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return tf(e.threadId),Ts("hostEntity.tab.getAll",[new $d(e)],new Jd,Sn(Bd,"hostEntity.tab.getAll"))}function Qd(e,t){if(vr(Xn),!ef())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return nf(e),tf(t.threadId),Ts("hostEntity.tab.reconfigure",[new zd(e),new $d(t)],new jd,Sn(Bd,"hostEntity.tab.reconfigure"))}function Xd(e,t){if(vr(Xn),!ef())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return nf(e),tf(t.threadId),Ts("hostEntity.tab.rename",[new zd(e),new $d(t)],new jd,Sn(Bd,"hostEntity.tab.rename"))}function Yd(e,t){if(vr(Xn),!ef())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return tf(t.threadId),nf(e),Ts("hostEntity.tab.remove",[new Gd(e),new $d(t)],new vi,Sn(Bd,"hostEntity.tab.remove"))}function ef(){var e;return!!(vr(Xn)&&of()&&(null===(e=Xn.supports.hostEntity)||void 0===e?void 0:e.tab))}function tf(e){if(!e||0==e.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function nf(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var rf;function of(){return!(!vr(Xn)||!Xn.supports.hostEntity)}!function(e){e.edu="EDU"}(rf||(rf={}));var af=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 sf="v2",cf="Invalid store dialog size",lf="No App Id present, but AppId needed to open AppDetail store",uf="No Collection Id present, but CollectionId needed to open a store specific to a collection";function df(e){return af(this,void 0,void 0,(function*(){hf();const{size:t}=null!=e?e:{};return Ps("store.openFullStore",[vf(t)],Sn(sf,"store.openFullStore"))}))}function ff(e){return af(this,void 0,void 0,(function*(){hf();const{size:t,appId:n}=e;if(!(n instanceof Or))throw new Error(lf);return Ps("store.openAppDetail",[vf(t),n],Sn(sf,"store.openAppDetail"))}))}function pf(e){return af(this,void 0,void 0,(function*(){hf();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Ps("store.openInContextStore",[vf(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Sn(sf,"store.openInContextStore"))}))}function gf(e){return af(this,void 0,void 0,(function*(){hf();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(uf);return Ps("store.openSpecificStore",[vf(t),n],Sn(sf,"store.openSpecificStore"))}))}function mf(){return vr(Xn)&&!!Xn.supports.store}function hf(){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!mf())throw _t}function vf(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(cf);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(cf);return JSON.stringify(e)}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 Cf="v1",yf="v2";let bf;function Sf(e){bf=e}function Ef(e){const t=void 0!==e,n=t?e:bf;if(!n)throw new Error("No parameters are provided for authentication");vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage);return Af(n.successCallback||n.failureCallback?Sn(Cf,"authentication.authenticate"):Sn(yf,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(bf=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(bf=void 0)}}))}function Af(e,t){return wf(this,void 0,void 0,(function*(){const n=ln(t.url);return cn(n),As(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function If(e){hr();return Tf(e&&(e.successCallback||e.failureCallback)?Sn(Cf,"authentication.getAuthToken"):Sn(yf,"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 Tf(e,t){return new Promise((n=>{n(As(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 Pf(e){hr();return Of(e&&(e.successCallback||e.failureCallback)?Sn(Cf,"authentication.getUser"):Sn(yf,"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 Of(e){return new Promise((t=>{t(As(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function Rf(e,t){vr(Xn,xt.authentication);ks(Sn(t?Cf:yf,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),ic(hs.parentWindow,(()=>setTimeout((()=>hs.currentWindow.close()),200)))}function Ff(e,t){vr(Xn,xt.authentication);ks(Sn(t?Cf:yf,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),ic(hs.parentWindow,(()=>setTimeout((()=>hs.currentWindow.close()),200)))}var kf;function Mf(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"}(kf||(kf={}));class Nf{constructor(e){this.val=e,Mf(e)}toString(){return this.val}}const xf="/l/app/",Uf="/l/meeting/new",Df="attendees",Lf="startTime",Hf="endTime",Vf="subject",_f="content",Wf="/l/call/0/0",Bf="source",jf="withVideo",zf="/l/chat/0/0",$f="users",qf="topicName",Gf="message";function Jf(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${$f}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${qf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Gf}=${encodeURIComponent(n)}`;return`${Vn}://${_n}${zf}?${r}${o}${i}`}function Kf(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${$f}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${jf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Bf}=${encodeURIComponent(n)}`;return`${Vn}://${_n}${Wf}?${r}${o}${i}`}function Zf(e,t,n,r,o){const i=void 0===e?"":`${Df}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Lf}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Hf}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Vf}=${encodeURIComponent(r)}`,l=void 0===o?"":`&${_f}=${encodeURIComponent(o)}`;return`${Vn}://${_n}${Uf}?${i}${a}${s}${c}${l}`}function Qf(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${Vn}://${_n}${xf}${encodeURIComponent(e)}`}const Xf="v1";function Yf(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!ep())throw new Error("Not supported");const n=Sn(Xf,"appInstallDialog.openAppInstallDialog");Xn.isLegacyTeams?t(bs(n,"executeDeepLink",Qf(e.appId))):(ks(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function ep(){return!(!vr(Xn)||!Xn.supports.appInstallDialog)}const tp="v1",np=bn("media");var rp,op,ip,ap,sp,cp,lp;!function(e){e.Base64="base64",e.ID="id"}(rp||(rp={}));class up{}function dp(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(vr(Xn,xt.content,xt.task),$n.isFramelessWindow)if(wr(Mn))ks(Sn(tp,"media.captureImage"),"captureImage",e);else{e({errorCode:It.OLD_PLATFORM},[])}else{e({errorCode:It.NOT_SUPPORTED_ON_PLATFORM},[])}}function fp(){if(vr(Xn,xt.content,xt.task),!gp())throw _t;const e=Tt.Media;return new Promise((t=>{t(Es(Sn(tp,"media.hasPermission"),"permissions.has",e))}))}function pp(){if(vr(Xn,xt.content,xt.task),!gp())throw _t;const e=Tt.Media;return new Promise((t=>{t(Es(Sn(tp,"media.requestPermission"),"permissions.request",e))}))}function gp(){return!(!vr(Xn)||!Xn.supports.permissions)}class mp extends up{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(vr(Xn,xt.content,xt.task),wr(Nn))if(Rp(this.mimeType,this.format,this.content))wr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:It.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:It.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];ks(Sn(tp,"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=bp(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Sp(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):np(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:It.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Gt(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Rr(e)&&ks(Sn(tp,"media.getMedia"),"getMedia",r),Ba(Sn(tp,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),ja("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=bp(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),ja("getMedia"+t)}else{const e=Sp(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:It.INTERNAL_ERROR,message:"data received is null"},new Blob),ja("getMedia"+t)}}))}}class hp{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){vr(Xn,xt.content,xt.task);try{yr(Pn)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};ks(Sn(tp,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(op.StopRecording,e)}}class vp extends hp{getMediaType(){return sp.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case op.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function wp(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Nn)){const e={errorCode:It.OLD_PLATFORM};return void t(e,[])}try{Ep(e)}catch(e){return void t(e,[])}if(!Ip(e)){const e={errorCode:It.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];ks(Sn(tp,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Ap(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 mp(e));t(n,s)}))}function Cp(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Nn)){return void t({errorCode:It.OLD_PLATFORM})}if(!Fp(e)){return void t({errorCode:It.INVALID_ARGUMENTS})}const n=[e];ks(Sn(tp,"media.viewImages"),"viewImages",n,t)}function yp(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(vr(Xn,xt.content,xt.task),$n.hostClientType!==Mt.desktop&&$n.hostClientType!==Mt.web&&$n.hostClientType!==Mt.rigel&&$n.hostClientType!==Mt.teamsRoomsWindows&&$n.hostClientType!==Mt.teamsRoomsAndroid&&$n.hostClientType!==Mt.teamsPhones&&$n.hostClientType!==Mt.teamsDisplays)if(wr(xn))if(kp(t))ks(Sn(tp,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:It.INVALID_ARGUMENTS},"")}else{e({errorCode:It.OLD_PLATFORM},"")}else{e({errorCode:It.NOT_SUPPORTED_ON_PLATFORM},"")}}function bp(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 Sp(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 Ep(e){Pp(e)?yr(Tn):Op(e)?yr(Pn):Tp(e)&&yr(On)}function Ap(e){return!(e.mediaType!=sp.Video||!e.videoProps||!e.videoProps.videoController)}function Ip(e){return!(null==e||e.maxMediaCount>10)}function Tp(e){var t;return!((null==e?void 0:e.mediaType)!=sp.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Pp(e){return!(!e||e.mediaType!=sp.VideoAndImage&&!e.videoAndImageProps)}function Op(e){return!(!e||e.mediaType!=sp.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Rp(e,t,n){return null!=e&&null!=t&&t==rp.ID&&null!=n}function Fp(e){return!(null==e||e.length<=0||e.length>10)}function kp(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Mp(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"}(op||(op={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(ip||(ip={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(ap||(ap={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(sp||(sp={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(cp||(cp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(lp||(lp={}));const Np="v2";function xp(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.task),!Lp())throw _t;if(!kp(e))throw{errorCode:It.INVALID_ARGUMENTS};t(Es(Sn(Np,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Up(){if(vr(Xn,xt.content,xt.task),!Lp())throw _t;const e=Tt.Media;return new Promise((t=>{t(Es(Sn(Np,"barCode.hasPermission"),"permissions.has",e))}))}function Dp(){if(vr(Xn,xt.content,xt.task),!Lp())throw _t;const e=Tt.Media;return new Promise((t=>{t(Es(Sn(Np,"barCode.requestPermission"),"permissions.request",e))}))}function Lp(){return!!(vr(Xn)&&Xn.supports.barCode&&Xn.supports.permissions)}const Hp="v2";function Vp(e){return _p(Sn(Hp,"chat.openChat"),e)}function _p(e,t){return new Promise((n=>{if(vr(Xn,xt.content,xt.task),!Bp())throw _t;if(Xn.isLegacyTeams)n(bs(e,"executeDeepLink",Jf([t.user],void 0,t.message)));else{n(bs(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Wp(e){const t=Sn(Hp,"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(_p(t,r))}else{if(vr(Xn,xt.content,xt.task),!Bp())throw _t;if(Xn.isLegacyTeams)n(bs(t,"executeDeepLink",Jf(e.users,e.topic,e.message)));else{n(bs(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Bp(){return!(!vr(Xn)||!Xn.supports.chat)}var jp=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 zp="v2";function $p(e){return jp(this,void 0,void 0,(function*(){if(vr(Xn,xt.content,xt.meetingStage,xt.task,xt.settings,xt.stage,xt.sidePanel),!Gp())throw _t;if(!e.type||!Object.values(kt).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(kt)}`);const t=yield rn(e),n={mimeType:e.type,content:t};return Es(Sn(zp,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function qp(){return jp(this,void 0,void 0,(function*(){vr(Xn,xt.content,xt.meetingStage,xt.task,xt.settings,xt.stage,xt.sidePanel);const e=Sn(zp,"clipboard.read");if(!Gp())throw _t;const t=yield Es(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return nn(e.mimeType,e.content)}return t}))}function Gp(){return $n.isFramelessWindow?!(!vr(Xn)||!Xn.supports.clipboard):!!(vr(Xn)&&navigator&&navigator.clipboard&&Xn.supports.clipboard)}function Jp(){var e;return null!==(e=vr(Xn)&&(Xn.isNAAChannelRecommended||Kp()))&&void 0!==e&&e}function Kp(){return!!(vr(Xn)&&Zp()&&Xn.isLegacyTeams&&Xn.supports.nestedAppAuth)}function Zp(){return $n.hostClientType===Mt.android||$n.hostClientType===Mt.ios||$n.hostClientType===Mt.ipados||$n.hostClientType===Mt.visionOS}const Qp="v2";function Xp(){if(vr(Xn,xt.content,xt.task),!eg())throw _t;return Es(Sn(Qp,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Yp(e){if(vr(Xn,xt.content,xt.task),!eg())throw _t;if(!e)throw{errorCode:It.INVALID_ARGUMENTS};return Es(Sn(Qp,"geoLocation.showLocation"),"location.showLocation",e)}function eg(){return!!(vr(Xn)&&Xn.supports.geoLocation&&Xn.supports.geoLocation.map&&Xn.supports.permissions)}const tg="v2";function ng(){if(vr(Xn,xt.content,xt.task),!ig())throw _t;return Es(Sn(tg,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function rg(){if(vr(Xn,xt.content,xt.task),!ig())throw _t;const e=Tt.GeoLocation;return new Promise((t=>{t(Es(Sn(tg,"geoLocation.hasPermission"),"permissions.has",e))}))}function og(){if(vr(Xn,xt.content,xt.task),!ig())throw _t;const e=Tt.GeoLocation;return new Promise((t=>{t(Es(Sn(tg,"geoLocation.requestPermission"),"permissions.request",e))}))}function ig(){return!!(vr(Xn)&&Xn.supports.geoLocation&&Xn.supports.permissions)}function ag(){return Xn.hostVersionsInfo?Xn.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const sg="v1";class cg{postMessage(e,t){vr(Xn),ks(Sn(sg,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||$t())}addEventListener(e,t){vr(Xn),"message"===e&&Ba(Sn(sg,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class lg{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){vr(Xn,xt.task),ks(Sn(sg,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||$t())}addEventListener(e,t){vr(Xn,xt.task),"message"===e&&Ba(Sn(sg,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const ug="v2";function dg(e){if(vr(Xn,xt.content),!fg())throw _t;if(!e||!tn(e))throw{errorCode:It.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Es(Sn(ug,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function fg(){return!(!vr(Xn)||!Xn.supports.secondaryBrowser)}const pg="v1";function gg(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Fn))throw{errorCode:It.OLD_PLATFORM};if(!e)throw{errorCode:It.INVALID_ARGUMENTS};if(!hg())throw _t;ks(Sn(pg,"location.getLocation"),"location.getLocation",[e],t)}function mg(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Fn))throw{errorCode:It.OLD_PLATFORM};if(!e)throw{errorCode:It.INVALID_ARGUMENTS};if(!hg())throw _t;ks(Sn(pg,"location.showLocation"),"location.showLocation",[e],t)}function hg(){return!(!vr(Xn)||!Xn.supports.location)}const vg="v1";function wg(e){vr(Xn,xt.sidePanel),e.contentUrl&&new URL(e.contentUrl),ks(Sn(vg,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Cg=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 yg="v1";var bg,Sg,Eg,Ag,Ig,Tg;function Pg(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),ks(Sn(yg,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Og(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),ks(Sn(yg,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Rg(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage,xt.settings,xt.content),ks(Sn(yg,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Fg(){var e,t,n;return Cg(this,void 0,void 0,(function*(){let r;vr(Xn,xt.sidePanel,xt.meetingStage,xt.settings,xt.content);try{const e=!0;r=yield Es(Sn("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)==Ag.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Ag.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function kg(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage,xt.task),ks(Sn(yg,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Mg(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");vr(Xn,xt.sidePanel),ks(Sn(yg,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Ng(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");vr(Xn,xt.sidePanel),ks(Sn(yg,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function xg(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");vr(Xn,xt.sidePanel),ks(Sn(yg,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Ug(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");vr(Xn,xt.sidePanel),Ba(Sn(yg,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Dg(e,t,n={sharingProtocol:Ig.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),ks(Sn(yg,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Lg(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),ks(Sn(yg,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Hg(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),ks(Sn(yg,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Vg(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),ks(Sn(yg,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function _g(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ba(Sn(yg,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Wg(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ba(Sn(yg,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Bg(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ba(Sn(yg,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function jg(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));vr(Xn);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Tg.Other};return Es(Sn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function zg(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");vr(Xn,xt.sidePanel,xt.meetingStage),e.isAppHandlingAudio?$g(e,t):qg(e,t)}function $g(e,t){ks(Sn(yg,"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");Ba(Sn(yg,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>Cg(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);Jg(n,n.isMicMuted===t.isMicMuted?bg.HostInitiated:bg.AppDeclinedToChange)}catch(e){Jg(t,bg.AppFailedToChange)}}))));Ba(Sn(yg,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function qg(e,t){ks(Sn(yg,"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");za("meeting.micStateChanged")&&ja("meeting.micStateChanged"),za("meeting.audioDeviceSelectionChanged")&&ja("meeting.audioDeviceSelectionChanged"),t(n)}))}function Gg(e){Jg(e,bg.AppInitiated)}function Jg(e,t){vr(Xn,xt.sidePanel,xt.meetingStage),ks(Sn(yg,"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"}(bg||(bg={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Sg||(Sg={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Eg||(Eg={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Ag||(Ag={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Ig||(Ig={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(Tg||(Tg={}));const Kg="v1",Zg="v2";function Qg(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Sn(Kg,"monetization.openPurchaseExperience")):(r=e,o=Sn(Zg,"monetization.openPurchaseExperience"));return vr(Xn,xt.content),Qt((()=>new Promise((e=>{if(!Xg())throw _t;e(Es(o,"monetization.openPurchaseExperience",r))}))),n)}function Xg(){return!(!vr(Xn)||!Xn.supports.monetization)}const Yg="v2";function em(e){return new Promise((t=>{if(vr(Xn,xt.content),!nm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(bs(Sn(Yg,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function tm(e){return new Promise((t=>{if(vr(Xn,xt.content),!nm())throw new Error("Not supported");const n=Sn(Yg,"calendar.composeMeeting");Xn.isLegacyTeams?t(bs(n,"executeDeepLink",Zf(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(bs(n,"calendar.composeMeeting",e))}))}function nm(){return!(!vr(Xn)||!Xn.supports.calendar)}const rm="v2";function om(e){e&&0!==e.length&&e.forEach((e=>{Mf(e)}))}function im(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===pm.New&&(om(t.toRecipients),om(t.ccRecipients),om(t.bccRecipients))}function am(e){if(vr(Xn,xt.content),!sm())throw new Error("Not supported");return im(e),Ps("mail.handoff.composeMail",[new cm(e)],Sn(rm,"mail.handoff.composeMail"))}function sm(){return!!(vr(Xn)&&Xn.supports.mail&&Xn.supports.mail.handoff)}class cm{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const lm="v2";function um(e){return new Promise((t=>{if(vr(Xn,xt.content),!fm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(bs(Sn(lm,"mail.openMailItem"),"mail.openMailItem",e))}))}function dm(e){return new Promise((t=>{if(vr(Xn,xt.content),!fm())throw new Error("Not supported");t(bs(Sn(lm,"mail.composeMail"),"mail.composeMail",e))}))}function fm(){return!(!vr(Xn)||!Xn.supports.mail)}var pm;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(pm||(pm={}));const gm="v2";function mm(){if(!$n.printCapabilityEnabled){if(vr(Xn),!bm())throw _t;$n.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(hm(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function hm(){on().print()}function vm(e){wm(Sn(gm,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Rr(e)&&!bm())throw _t}))}function wm(e,t,n){!Rr(t)&&vr(Xn),!Rr(t)&&n&&n(),Za(e,t)}function Cm(e){ym(Sn(gm,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Rr(e)&&!bm())throw _t}))}function ym(e,t,n){!Rr(t)&&vr(Xn),!Rr(t)&&n&&n(),Ya(e,t)}function bm(){return!(!vr(Xn)||!Xn.supports.teamsCore)}const Sm="v1",Em="v2";function Am(e,t){let n,r;vr(Xn,xt.content,xt.task,xt.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Sn(Sm,"people.selectPeople")):(r=e,o=Sn(Em,"people.selectPeople")),Kt(Im,n,o,r)}function Im(e,t){return new Promise((n=>{if(!wr(kn))throw{errorCode:It.OLD_PLATFORM};if(!Mp(t))throw{errorCode:It.INVALID_ARGUMENTS};if(!Tm())throw _t;n(Es(e,"people.selectPeople",t))}))}function Tm(){return!(!vr(Xn)||!Xn.supports.people)}function Pm(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?Om(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Om(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 Rm="v2";function Fm(e){return vr(Xn,xt.content),new Promise((t=>{const[n,r]=Pm(e);if(!n)throw{errorCode:It.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(Es(Sn(Rm,"profile.showProfile"),"profile.showProfile",o))}))}function km(){return!(!vr(Xn)||!Xn.supports.profile)}const Mm="v2",Nm="search.queryChange",xm="search.queryClose",Um="search.queryExecute";function Dm(e,t,n){if(vr(Xn,xt.content),!Hm())throw _t;Ba(Sn(Mm,"search.registerOnClosedHandler"),xm,e),Ba(Sn(Mm,"search.registerOnExecutedHandler"),Um,t),n&&Ba(Sn(Mm,"search.registerOnChangeHandler"),Nm,n)}function Lm(){if(vr(Xn,xt.content),!Hm())throw _t;ks(Sn(Mm,"search.unregisterHandlers"),"search.unregister"),ja(Nm),ja(xm),ja(Um)}function Hm(){return!(!vr(Xn)||!Xn.supports.search)}function Vm(){return new Promise((e=>{if(vr(Xn,xt.content),!Hm())throw new Error("Not supported");e(bs(Sn(Mm,"search.closeSearch"),"search.closeSearch"))}))}var _m=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 Wm="v2";function Bm(){return _m(this,void 0,void 0,(function*(){if(vr(Xn,xt.sidePanel,xt.meetingStage),!jm())throw _t;return yield Es(Sn(Wm,"sharing.history.getContent"),"sharing.history.getContent")}))}function jm(){var e;return vr(Xn)&&void 0!==(null===(e=Xn.supports.sharing)||void 0===e?void 0:e.history)}const zm="v1",$m="v2",qm={shareWebContent:"sharing.shareWebContent"};function Gm(e,t){try{Km(e),Zm(e),Qm(e)}catch(e){return Zt((()=>Promise.reject(e)),t)}vr(Xn,xt.content,xt.sidePanel,xt.task,xt.stage,xt.meetingStage);return Zt(Jm,t,Sn(t?zm:$m,"sharing.shareWebContent"),e)}function Jm(e,t){return new Promise((n=>{if(!Xm())throw _t;n(Es(e,qm.shareWebContent,t))}))}function Km(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:It.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Zm(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Qm(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:It.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Xm(){return!(!vr(Xn)||!Xn.supports.sharing)}const Ym="v2";function eh(){return new Promise((e=>{if(vr(Xn,xt.content),!th())throw _t;e(Es(Sn(Ym,"stageView.self.close"),"stageView.self.close"))}))}function th(){var e;return vr(Xn)&&void 0!==(null===(e=Xn.supports.stageView)||void 0===e?void 0:e.self)}const nh="v2";var rh;function oh(e){return new Promise((t=>{if(vr(Xn,xt.content),!ih())throw _t;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Es(Sn(nh,"stageView.open"),"stageView.open",e))}))}function ih(){return!(!vr(Xn)||!Xn.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(rh||(rh={}));const ah=10;var sh=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 ch="v2";function lh(e){return sh(this,void 0,void 0,(function*(){vr(Xn,xt.content,xt.task),fh(),ph(e);const t=yield Es(Sn(ch,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return gh(e.maxVisualMediaCount,t),t}))}function uh(e){return sh(this,void 0,void 0,(function*(){vr(Xn,xt.content,xt.task),fh(),ph(e);const t=yield Es(Sn(ch,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return gh(e.maxVisualMediaCount,t),t}))}function dh(){return!!(vr(Xn)&&Xn.supports.visualMedia&&Xn.supports.visualMedia.image&&Xn.supports.permissions)}function fh(){if(!dh())throw _t}function ph(e){if(!e||e.maxVisualMediaCount>ah||e.maxVisualMediaCount<1)throw jt}function gh(e,t){if(t.length>e)throw zt}const mh="v2";var hh,vh;function wh(){if(vr(Xn,xt.content,xt.task),!dh())throw _t;const e=Tt.Media;return Es(Sn(mh,"visualMedia.hasPermission"),"permissions.has",e)}function Ch(){if(vr(Xn,xt.content,xt.task),!dh())throw _t;const e=Tt.Media;return Es(Sn(mh,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(hh||(hh={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(vh||(vh={}));var yh=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 bh=null;function Sh(){return yh(this,void 0,void 0,(function*(){return null===bh&&(bh=(yield no()).app.host.name),bh}))}var Eh=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};function Ah(){return Eh(this,void 0,void 0,(function*(){if(vr(Xn),!Th())throw _t;return!(!Xn.isLegacyTeams||$n.hostClientType!==Mt.android&&$n.hostClientType!==Mt.ios&&$n.hostClientType!==Mt.ipados&&$n.hostClientType!==Mt.visionOS||(yield Ih())!==Nt.teams)||(yield ys(Sn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Ih(){return Eh(this,void 0,void 0,(function*(){return Sh()}))}function Th(){return vr(Xn)&&void 0!==Xn.supports.webStorage}const Ph="v2";var Oh;function Rh(e){const t=Sn(Ph,"call.startCall");return new Promise((n=>{var r;if(vr(Xn,xt.content,xt.task),!Fh())throw _t;if(!Xn.isLegacyTeams)return ks(t,"call.startCall",[e],n);n(ys(t,"executeDeepLink",Kf(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Oh.Video),e.source)).then((e=>{if(!e)throw new Error(zn);return e})))}))}function Fh(){return!(!vr(Xn)||!Xn.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Oh||(Oh={}));const kh="v1";function Mh(){Si(Sn(kh,"appInitialization.notifyAppLoaded"))}function Nh(){ks(Sn(kh,"appInitialization.notifySuccess"),Jr.Success,[fr])}function xh(e){Ai(Sn(kh,"appInitialization.notifyFailure"),e)}function Uh(e){Ei(Sn(kh,"appInitialization.notifyExpectedFailure"),e)}const Dh=bn("thirdPartyCloudStorage"),Lh="v2";class Hh{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Vh=[],_h=null,Wh=!0,Bh=null;function jh(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(vr(Xn,xt.content,xt.task),!$h())throw _t;if(Bh)throw Bh=null,new Error("getDragAndDropFiles cannot be called twice");Bh=t,Wh=!0,ks(Sn(Lh,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],zh)}else{t([],{errorCode:It.INVALID_ARGUMENTS})}}function zh(e){if(Bh)if(e&&e.error)Bh([],e.error),Bh=null;else if(e&&e.fileChunk)try{Wh||0!==e.fileChunk.chunkSequence||(Dh("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Wh=!0,Bh([],{errorCode:It.INTERNAL_ERROR,message:"error occurred while receiving data"}),Vh=[],Bh=null);const t=Sp(e.fileChunk,e.fileType);if(t?(_h||(_h=new Hh(e.fileType,[])),_h.assembleAttachment.push(t)):(Dh(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Bh?Bh([],{errorCode:It.INTERNAL_ERROR,message:"error occurred while receiving data"}):Bh=null,Vh=[],Bh=null,Wh=!0),Wh=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&_h){const t=bp(_h.assembleAttachment,_h.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Vh.push(n)}e.isLastFile&&Bh&&(Bh(Vh,e.error),Vh=[],Bh=null,Wh=!0),_h=null}}catch(e){Bh&&(Bh([],{errorCode:It.INTERNAL_ERROR,message:e}),Vh=[],Bh=null,Wh=!0)}else Bh([],{errorCode:It.INTERNAL_ERROR,message:"data received is null"}),Vh=[],Bh=null,Wh=!0}function $h(){return!(!vr(Xn)||!Xn.supports.thirdPartyCloudStorage)}const qh="v1";function Gh(e,t){bi(Sn(qh,"initialize"),t).then((()=>{e&&e()}))}function Jh(){mm()}function Kh(){hm()}function Zh(e){hr(),ks(Sn(qh,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=$n.frameContext),e(t)}))}function Qh(e){Fi(Sn(qh,"registerOnThemeChangeHandlerHelper"),e)}function Xh(e){$a(Sn(qh,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Yh(e){$a(Sn(qh,"registerAppButtonClickHandler"),"appButtonClick",e,[xt.content])}function ev(e){$a(Sn(qh,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[xt.content])}function tv(e){$a(Sn(qh,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[xt.content])}function nv(e){Ma(Sn(qh,"registerBackButtonHandler"),e)}function rv(e){wm(Sn(qh,"registerOnLoadHandler"),e)}function ov(e){ym(Sn(qh,"registerBeforeUnloadHandler"),e)}function iv(e){$a(Sn(qh,"registerFocusEnterHandler"),"focusEnter",e,[])}function av(e){$a(Sn(qh,"registerChangeSettingsHandler"),"changeSettings",e,[xt.content])}function sv(e,t){vr(Xn),wa(Sn(qh,"getTabInstances"),t).then((t=>{e(t)}))}function cv(e,t){vr(Xn),Ca(Sn(qh,"getMruTabInstances"),t).then((t=>{e(t)}))}function lv(e){ya(Sn(qh,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function uv(e,t){vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage);const n=null!=t?t:$t();ki(Sn(qh,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function dv(e){ba(Sn(qh,"setFrameContext"),e)}function fv(e,t,n){bi(Sn(qh,"initializeWithFrameContext"),n).then((()=>t&&t())),ba(Sn(qh,"setFrameContext"),e)}const pv="v1";function gv(e){va(Sn(pv,"navigation.returnFocus"),e)}function mv(e,t){vr(Xn);const n=null!=t?t:$t();ha(Sn(pv,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function hv(e,t){vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage);const n=null!=t?t:$t();ga(Sn(pv,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function vv(e){vr(Xn);const t=null!=e?e:$t();ma(Sn(pv,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const wv="v1";function Cv(e){Sa(Sn(wv,"settings.setValidityState"),e)}function yv(e){vr(Xn,xt.content,xt.settings,xt.remove,xt.sidePanel),Ea(Sn(wv,"settings.getSettings")).then((t=>{e(t)}))}function bv(e,t){vr(Xn,xt.content,xt.settings,xt.sidePanel);const n=null!=t?t:$t();Aa(Sn(wv,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Sv(e){si(Sn(wv,"settings.registerOnSaveHandler"),e)}function Ev(e){li(Sn(wv,"settings.registerOnRemoveHandler"),e)}var Av=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 Iv="v1";function Tv(e,t){const n=Sn(Iv,"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?(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),ks(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Oo(n,Fv(e),r):Po(n,Rv(e),r),new cg}function Pv(e){e=kv(e);const{width:t,height:n}=e,r=Av(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");To(Sn(Iv,"tasks.updateTask"),e)}function Ov(e,t){Ro(Sn(Iv,"tasks.submitTask"),e,t)}function Rv(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:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Fv(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:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function kv(e){return e.height=e.height?e.height:Lt.Small,e.width=e.width?e.width:Lt.Small,e}const Mv="v2";var Nv,xv;function Uv(){return!(!vr(Xn,xt.meetingStage,xt.sidePanel,xt.content)||!Xn.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Nv||(Nv={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(xv||(xv={}));class Dv{getFluidTenantInfo(){return Lv(),new Promise((e=>{e(Es(Sn(Mv,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Lv(),new Promise((t=>{t(Es(Sn(Mv,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Lv(),new Promise((e=>{e(Es(Sn(Mv,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Lv(),new Promise((t=>{t(Es(Sn(Mv,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Lv(),new Promise((e=>{e(Es(Sn(Mv,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Lv(),new Promise((t=>{t(Es(Sn(Mv,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Lv(),new Promise((t=>{t(Es(Sn(Mv,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Lv(),new Promise((t=>{t(Es(Sn(Mv,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Lv(),new Dv}}function Lv(){if(!Uv())throw new Error("LiveShareHost Not supported")}var Hv=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 Vv(e){try{return e.cartItems=_v(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function _v(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=_v(e.accessories)),e}))}const Wv=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Hv(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Wv(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function Bv(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)zv(t),jv(t.accessories)}function jv(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");zv(t)}}}function zv(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");qv(e.price),Gv(e.quantity)}function $v(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===bt(e))throw new Error("id must be a valid UUID")}}function qv(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 Gv(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Jv(e){if(!Object.values(Xv).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Kv="v2",Zv={majorVersion:1,minorVersion:1};var Qv,Xv;function Yv(){if(vr(Xn,xt.content,xt.task),!rw())throw _t;return Es(Sn(Kv,"marketplace.getCart"),"marketplace.getCart",Zv).then(Vv)}function ew(e){if(vr(Xn,xt.content,xt.task),!rw())throw _t;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return $v(null==e?void 0:e.cartId),Bv(null==e?void 0:e.cartItems),Es(Sn(Kv,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Wv(e.cartItems),cartVersion:Zv})).then(Vv)}function tw(e){if(vr(Xn,xt.content,xt.task),!rw())throw _t;if(!e)throw new Error("removeCartItemsParams must be provided");if($v(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 Es(Sn(Kv,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Zv})).then(Vv)}function nw(e){if(vr(Xn,xt.content,xt.task),!rw())throw _t;if(!e)throw new Error("updateCartStatusParams must be provided");return $v(null==e?void 0:e.cartId),Jv(null==e?void 0:e.cartStatus),Es(Sn(Kv,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Zv})).then(Vv)}function rw(){return!(!vr(Xn)||!Xn.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(Qv||(Qv={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Xv||(Xv={}))})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],l=i[1],u=new o(c(e,a,l)),d=0,f=l>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)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},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(u(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 l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(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(l(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?l(e,i,o,"day"):i>=r?l(e,i,r,"hour"):i>=n?l(e,i,n,"minute"):i>=t?l(e,i,t,"second"):e+" ms"}function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>Et,AppId:()=>Or,ChannelType:()=>Ht,ChildAppWindow:()=>ug,DialogDimension:()=>Lt,EduType:()=>Ft,EmailAddress:()=>Uf,ErrorCode:()=>It,FileOpenPreference:()=>St,FrameContexts:()=>xt,HostClientType:()=>Mt,HostName:()=>Nt,LiveShareHost:()=>Hv,NotificationTypes:()=>Cc,ParentAppWindow:()=>dg,SecondaryM365ContentIdName:()=>At,TaskModuleDimension:()=>Lt,TeamType:()=>Ut,UUID:()=>vn,UserSettingTypes:()=>bc,UserTeamRole:()=>Dt,ViewerActionTypes:()=>yc,app:()=>i,appEntity:()=>L,appInitialization:()=>be,appInstallDialog:()=>G,authentication:()=>q,barCode:()=>K,calendar:()=>ae,call:()=>ye,chat:()=>Z,clipboard:()=>Q,conversations:()=>S,copilot:()=>I,dialog:()=>f,enablePrintCapability:()=>Zh,executeDeepLink:()=>fv,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>R,externalAppCommands:()=>F,files:()=>k,geoLocation:()=>ee,getAdaptiveCardSchemaVersion:()=>cg,getContext:()=>Xh,getMruTabInstances:()=>uv,getTabInstances:()=>lv,hostEntity:()=>z,initialize:()=>Kh,initializeWithFrameContext:()=>gv,liveShare:()=>Ie,location:()=>ne,logs:()=>b,mail:()=>ce,marketplace:()=>Te,media:()=>J,meeting:()=>oe,meetingRoom:()=>M,menus:()=>p,messageChannels:()=>N,monetization:()=>ie,navigateBack:()=>Cv,navigateCrossDomain:()=>wv,navigateToTab:()=>vv,nestedAppAuth:()=>X,notifications:()=>x,openFilePreview:()=>Oc,otherAppStateChange:()=>U,pages:()=>y,people:()=>ue,print:()=>Qh,profile:()=>de,registerAppButtonClickHandler:()=>tv,registerAppButtonHoverEnterHandler:()=>nv,registerAppButtonHoverLeaveHandler:()=>rv,registerBackButtonHandler:()=>ov,registerBeforeUnloadHandler:()=>av,registerChangeSettingsHandler:()=>cv,registerCustomHandler:()=>Tc,registerFocusEnterHandler:()=>sv,registerFullScreenHandler:()=>ev,registerOnLoadHandler:()=>iv,registerOnThemeChangeHandler:()=>Yh,registerUserSettingsChangeHandler:()=>Pc,remoteCamera:()=>D,returnFocus:()=>hv,search:()=>fe,secondaryBrowser:()=>te,sendCustomEvent:()=>Ic,sendCustomMessage:()=>Ac,setFrameContext:()=>pv,settings:()=>Ee,shareDeepLink:()=>dv,sharing:()=>ge,stageView:()=>he,store:()=>$,tasks:()=>Ae,teams:()=>_,teamsCore:()=>le,thirdPartyCloudStorage:()=>Se,uploadCustomApp:()=>Ec,version:()=>fr,videoEffects:()=>W,videoEffectsEx:()=>B,visualMedia:()=>we,webStorage:()=>Ce});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>Dr,getTelemetryPort:()=>xr,isSupported:()=>Ur});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>jr,getDataLayerPort:()=>Wr,isSupported:()=>Br});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>zr,registerOnResumeHandler:()=>$r});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Zr,FailedReason:()=>Kr,Messages:()=>Jr,_initialize:()=>eo,_uninitialize:()=>to,getContext:()=>no,getFrameContext:()=>Xr,initialize:()=>Yr,isInitialized:()=>Qr,lifecycle:()=>o,notifyAppLoaded:()=>ro,notifyExpectedFailure:()=>ao,notifyFailure:()=>io,notifySuccess:()=>oo,openLink:()=>lo,registerHostToAppPerformanceMetricsHandler:()=>co,registerOnThemeChangeHandler:()=>so});var a={};n.r(a),n.d(a,{isSupported:()=>po,resize:()=>fo});var s={};n.r(s),n.d(s,{isSupported:()=>mo,open:()=>go});var c={};n.r(c),n.d(c,{isSupported:()=>Co,registerOnMessageFromParent:()=>wo,sendMessageToDialog:()=>vo,sendMessageToParentFromDialog:()=>ho});var l={};n.r(l),n.d(l,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Ao,getDialogInfoFromUrlDialogInfo:()=>Eo,isSupported:()=>So,open:()=>yo,parentCommunication:()=>c,submit:()=>bo});var u={};n.r(u),n.d(u,{isSupported:()=>Uo,open:()=>xo});var d={};n.r(d),n.d(d,{bot:()=>u,isSupported:()=>Lo,open:()=>Do});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>Ho,isSupported:()=>Vo,update:()=>a,url:()=>l});var p={};n.r(p),n.d(p,{DisplayMode:()=>Wo,MenuItem:()=>jo,MenuListType:()=>Bo,initialize:()=>Ko,isSupported:()=>ni,setNavBarMenu:()=>Xo,setUpViews:()=>Zo,showActionMenu:()=>ei});var g={};n.r(g),n.d(g,{initialize:()=>ri,isSupported:()=>mi,registerChangeConfigHandler:()=>di,registerOnRemoveHandler:()=>ci,registerOnRemoveHandlerHelper:()=>li,registerOnSaveHandler:()=>ai,registerOnSaveHandlerHelper:()=>si,setConfig:()=>ii,setValidityState:()=>oi});var m={};n.r(m),n.d(m,{isSupported:()=>zi,onClick:()=>Wi,onHoverEnter:()=>Bi,onHoverLeave:()=>ji});var h={};n.r(h),n.d(h,{_initialize:()=>$i,isSupported:()=>Ki,navigateBack:()=>qi,registerBackButtonHandler:()=>Gi,registerBackButtonHandlerHelper:()=>Ji});var v={};n.r(v),n.d(v,{isSupported:()=>Xi,navigateTo:()=>Zi,navigateToDefaultPage:()=>Qi});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Yi,exitFullscreen:()=>ea,isSupported:()=>ta});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>oa,getTabInstances:()=>ra,isSupported:()=>ia,navigateToTab:()=>na});var y={};n.r(y),n.d(y,{EnterFocusType:()=>aa,ReturnFocusType:()=>sa,appButton:()=>m,backStack:()=>h,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>fa,initializeWithFrameContext:()=>da,isSupported:()=>va,navigateCrossDomain:()=>pa,navigateToApp:()=>ga,registerFocusEnterHandler:()=>la,registerFullScreenHandler:()=>ha,returnFocus:()=>ca,setCurrentFrame:()=>ua,shareDeepLink:()=>ma,tabs:()=>C});var b={};n.r(b),n.d(b,{isSupported:()=>wc,registerGetLogHandler:()=>vc});var S={};n.r(S),n.d(S,{closeConversation:()=>kc,getChatMembers:()=>Mc,isSupported:()=>Nc,openConversation:()=>Fc});var E={};n.r(E),n.d(E,{isSupported:()=>Lc,sendCustomTelemetryData:()=>Hc});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>jc,isSupported:()=>Bc});var I={};n.r(I),n.d(I,{customTelemetry:()=>E,eligibility:()=>A});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>Jc,ActionExecuteResponseHandler:()=>Xc,InvokeErrorCode:()=>Qc,InvokeResponseType:()=>Zc,OriginalRequestType:()=>Kc,SerializableActionExecuteInvokeRequest:()=>qc,authenticateAndResendRequest:()=>rl,authenticateWithOauth2:()=>al,authenticateWithPowerPlatformConnectorPlugins:()=>sl,authenticateWithSSO:()=>ol,authenticateWithSSOAndResendRequest:()=>il,isActionExecuteResponse:()=>Gc,isInvokeError:()=>Yc,isSupported:()=>cl,validateActionExecuteInvokeRequest:()=>tl});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>pl,authenticateWithOauth:()=>fl,authenticateWithSSO:()=>dl,authenticateWithSSOAndResendRequest:()=>gl,isSupported:()=>ml,validateInput:()=>hl});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>Cl,ActionOpenUrlType:()=>wl,isSupported:()=>Sl,processActionOpenUrl:()=>bl,processActionSubmit:()=>yl});var R={};n.r(R),n.d(R,{isSupported:()=>Pl,processActionOpenUrl:()=>Il,processActionSubmit:()=>Tl});var F={};n.r(F),n.d(F,{isSupported:()=>kl,processActionCommand:()=>Fl});var k={};n.r(k),n.d(k,{CloudStorageProvider:()=>Nl,CloudStorageProviderFileAction:()=>Hl,CloudStorageProviderType:()=>xl,DocumentLibraryAccessType:()=>Dl,FileDownloadStatus:()=>Ll,SpecialDocumentLibraryType:()=>Ul,addCloudStorageFolder:()=>_l,addCloudStorageProvider:()=>Jl,addCloudStorageProviderFile:()=>Zl,copyMoveFiles:()=>$l,deleteCloudStorageFolder:()=>Wl,deleteCloudStorageProviderFile:()=>Xl,downloadCloudStorageProviderFile:()=>Yl,getCloudStorageFolderContents:()=>Bl,getCloudStorageFolders:()=>Vl,getExternalProviders:()=>zl,getFileDownloads:()=>ql,openCloudStorageFile:()=>jl,openDownloadFolder:()=>Gl,registerCloudStorageProviderContentChangeHandler:()=>nu,registerCloudStorageProviderListChangeHandler:()=>tu,removeCloudStorageProvider:()=>Kl,renameCloudStorageProviderFile:()=>Ql,uploadCloudStorageProviderFile:()=>eu});var M={};n.r(M),n.d(M,{getPairedMeetingRoomInfo:()=>iu,isSupported:()=>lu,registerMeetingRoomCapabilitiesUpdateHandler:()=>su,registerMeetingRoomStatesUpdateHandler:()=>cu,sendCommandToPairedMeetingRoom:()=>au});var N={};n.r(N),n.d(N,{dataLayer:()=>t,isSupported:()=>uu,telemetry:()=>e});var x={};n.r(x),n.d(x,{isSupported:()=>pu,showNotification:()=>fu});var U={};n.r(U),n.d(U,{isSupported:()=>wu,notifyInstallCompleted:()=>vu,registerAppInstallationHandler:()=>mu,unregisterAppInstallationHandler:()=>hu});var D={};n.r(D),n.d(D,{ControlCommand:()=>yu,ErrorReason:()=>bu,SessionTerminatedReason:()=>Su,getCapableParticipants:()=>Eu,isSupported:()=>ku,registerOnCapableParticipantsChangeHandler:()=>Pu,registerOnDeviceStateChangeHandler:()=>Ru,registerOnErrorHandler:()=>Ou,registerOnSessionStatusChangeHandler:()=>Fu,requestControl:()=>Au,sendControlCommand:()=>Iu,terminateSession:()=>Tu});var L={};n.r(L),n.d(L,{isSupported:()=>xu,selectAppEntity:()=>Nu});var H={};n.r(H),n.d(H,{getUserJoinedTeams:()=>Du,isSupported:()=>Lu});var V={};n.r(V),n.d(V,{getConfigSetting:()=>Vu,isSupported:()=>_u,joinedTeams:()=>H});var _={};n.r(_),n.d(_,{ChannelType:()=>Bu,fullTrust:()=>V,getTeamChannels:()=>ju,isSupported:()=>$u,refreshSiteUrl:()=>zu});var W={};n.r(W),n.d(W,{EffectChangeType:()=>td,EffectFailureReason:()=>nd,VideoFrameFormat:()=>ed,isSupported:()=>cd,notifySelectedVideoEffectChanged:()=>od,registerForVideoEffect:()=>id,registerForVideoFrame:()=>rd});var B={};n.r(B),n.d(B,{ErrorLevel:()=>Md,frameProcessingTimeoutInMs:()=>Fd,isSupported:()=>_d,notifyFatalError:()=>jd,notifySelectedVideoEffectChanged:()=>Ld,registerForVideoEffect:()=>Hd,registerForVideoFrame:()=>Nd,updatePersonalizedEffects:()=>Vd});var j={};n.r(j),n.d(j,{addAndConfigure:()=>Qd,getAll:()=>Xd,isSupported:()=>nf,reconfigure:()=>Yd,remove:()=>tf,rename:()=>ef});var z={};n.r(z),n.d(z,{AppTypes:()=>af,isSupported:()=>sf,tab:()=>j});var $={};n.r($),n.d($,{isSupported:()=>vf,openAppDetail:()=>gf,openFullStore:()=>pf,openInContextStore:()=>mf,openSpecificStore:()=>hf});var q={};n.r(q),n.d(q,{DataResidency:()=>Nf,authenticate:()=>If,getAuthToken:()=>Pf,getUser:()=>Rf,notifyFailure:()=>Mf,notifySuccess:()=>kf,registerAuthenticationHandlers:()=>Af});var G={};n.r(G),n.d(G,{isSupported:()=>np,openAppInstallDialog:()=>tp});var J={};n.r(J),n.d(J,{CameraStartMode:()=>sp,File:()=>fp,FileFormat:()=>ip,ImageOutputFormats:()=>dp,ImageUriType:()=>up,Media:()=>vp,MediaControllerEvent:()=>ap,MediaType:()=>lp,Source:()=>cp,VideoController:()=>Cp,captureImage:()=>pp,hasPermission:()=>gp,requestPermission:()=>mp,scanBarCode:()=>Sp,selectMedia:()=>yp,viewImages:()=>bp});var K={};n.r(K),n.d(K,{hasPermission:()=>Lp,isSupported:()=>Vp,requestPermission:()=>Hp,scanBarCode:()=>Dp});var Z={};n.r(Z),n.d(Z,{isSupported:()=>zp,openChat:()=>Wp,openGroupChat:()=>jp});var Q={};n.r(Q),n.d(Q,{isSupported:()=>Kp,read:()=>Jp,write:()=>Gp});var X={};n.r(X),n.d(X,{isNAAChannelRecommended:()=>Zp});var Y={};n.r(Y),n.d(Y,{chooseLocation:()=>eg,isSupported:()=>ng,showLocation:()=>tg});var ee={};n.r(ee),n.d(ee,{getCurrentLocation:()=>og,hasPermission:()=>ig,isSupported:()=>sg,map:()=>Y,requestPermission:()=>ag});var te={};n.r(te),n.d(te,{isSupported:()=>gg,open:()=>pg});var ne={};n.r(ne),n.d(ne,{getLocation:()=>hg,isSupported:()=>wg,showLocation:()=>vg});var re={};n.r(re),n.d(re,{setOptions:()=>yg});var oe={};n.r(oe),n.d(oe,{CallType:()=>Tg,EventActionSource:()=>Og,MeetingReactionType:()=>Ag,MeetingType:()=>Ig,SharingProtocol:()=>Pg,appShareButton:()=>re,getAppContentStageSharingCapabilities:()=>Vg,getAppContentStageSharingState:()=>Wg,getAuthenticationTokenForAnonymousUser:()=>Ng,getIncomingClientAudioState:()=>Rg,getLiveStreamState:()=>xg,getMeetingDetails:()=>kg,getMeetingDetailsVerbose:()=>Mg,joinMeeting:()=>$g,registerLiveStreamChangedHandler:()=>Lg,registerMeetingReactionReceivedHandler:()=>zg,registerRaiseHandStateChangedHandler:()=>jg,registerSpeakingStateChangeHandler:()=>Bg,requestAppAudioHandling:()=>qg,requestStartLiveStreaming:()=>Ug,requestStopLiveStreaming:()=>Dg,shareAppContentToStage:()=>Hg,stopSharingAppContentToStage:()=>_g,toggleIncomingClientAudio:()=>Fg,updateMicState:()=>Kg});var ie={};n.r(ie),n.d(ie,{isSupported:()=>em,openPurchaseExperience:()=>Yg});var ae={};n.r(ae),n.d(ae,{composeMeeting:()=>rm,isSupported:()=>om,openCalendarItem:()=>nm});var se={};n.r(se),n.d(se,{composeMailWithHandoff:()=>cm,isSupported:()=>lm});var ce={};n.r(ce),n.d(ce,{ComposeMailType:()=>mm,composeMail:()=>pm,handoff:()=>se,isSupported:()=>gm,openMailItem:()=>fm});var le={};n.r(le),n.d(le,{enablePrintCapability:()=>vm,isSupported:()=>Em,print:()=>wm,registerBeforeUnloadHandler:()=>bm,registerBeforeUnloadHandlerHelper:()=>Sm,registerOnLoadHandler:()=>Cm,registerOnLoadHandlerHelper:()=>ym});var ue={};n.r(ue),n.d(ue,{isSupported:()=>Om,selectPeople:()=>Tm});var de={};n.r(de),n.d(de,{isSupported:()=>Nm,showProfile:()=>Mm});var fe={};n.r(fe),n.d(fe,{closeSearch:()=>Wm,isSupported:()=>_m,registerHandlers:()=>Hm,unregisterHandlers:()=>Vm});var pe={};n.r(pe),n.d(pe,{getContent:()=>zm,isSupported:()=>$m});var ge={};n.r(ge),n.d(ge,{SharingAPIMessages:()=>Jm,history:()=>pe,isSupported:()=>eh,shareWebContent:()=>Km});var me={};n.r(me),n.d(me,{close:()=>nh,isSupported:()=>rh});var he={};n.r(he),n.d(he,{StageViewOpenMode:()=>ih,isSupported:()=>sh,open:()=>ah,self:()=>me});var ve={};n.r(ve),n.d(ve,{captureImages:()=>dh,isSupported:()=>ph,retrieveImages:()=>fh});var we={};n.r(we),n.d(we,{CameraRestriction:()=>wh,Source:()=>Ch,hasPermission:()=>yh,image:()=>ve,requestPermission:()=>bh});var Ce={};n.r(Ce),n.d(Ce,{isSupported:()=>Oh,isWebStorageClearedOnUserLogOut:()=>Th});var ye={};n.r(ye),n.d(ye,{CallModalities:()=>Fh,isSupported:()=>Mh,startCall:()=>kh});var be={};n.r(be),n.d(be,{ExpectedFailureReason:()=>Zr,FailedReason:()=>Kr,Messages:()=>Jr,notifyAppLoaded:()=>xh,notifyExpectedFailure:()=>Lh,notifyFailure:()=>Dh,notifySuccess:()=>Uh});var Se={};n.r(Se),n.d(Se,{getDragAndDropFiles:()=>$h,isSupported:()=>Gh});var Ee={};n.r(Ee),n.d(Ee,{getSettings:()=>Sv,registerOnRemoveHandler:()=>Iv,registerOnSaveHandler:()=>Av,setSettings:()=>Ev,setValidityState:()=>bv});var Ae={};n.r(Ae),n.d(Ae,{getDefaultSizeIfNotProvided:()=>Nv,startTask:()=>Ov,submitTask:()=>Fv,updateTask:()=>Rv});var Ie={};n.r(Ie),n.d(Ie,{ContainerState:()=>Dv,LiveShareHost:()=>Hv,UserMeetingRole:()=>Uv,isSupported:()=>Lv});var Te={};n.r(Te),n.d(Te,{CartStatus:()=>ew,Intent:()=>Yv,addOrUpdateCartItems:()=>nw,cartVersion:()=>Xv,getCart:()=>tw,isSupported:()=>iw,removeCartItems:()=>rw,updateCartStatus:()=>ow});var Pe=n(815),Oe=n(933);const Re=ke,Fe=2147483647;function ke(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 Ne(e)}return Me(e,t,n)}function Me(e,t,n){if("string"==typeof e)return Le(e,t);if(ArrayBuffer.isView(e))return ze(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(Ve(e,ArrayBuffer)||e&&Ve(e.buffer,ArrayBuffer))return $e(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Ve(e,SharedArrayBuffer)||e&&Ve(e.buffer,SharedArrayBuffer)))return $e(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 ke.from(r,t,n);const o=ft(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ke.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 Ne(e){return xe(e),Ue(e<0?0:0|De(e))}function xe(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 Ue(e){if(e>Fe)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ke.prototype),t}function De(e){if(e>=Fe)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Fe.toString(16)+" bytes");return 0|e}function Le(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ke.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|He(e,t);let r=Ue(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function He(e,t){if(ke.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Ve(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 _e(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return We(e).length;default:if(o)return r?-1:_e(e).length;t=(""+t).toLowerCase(),o=!0}}function Ve(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function _e(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 We(e){return Oe.toByteArray(je(e))}ke.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}}(),ke.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ke.from=function(e,t,n){return Me(e,t,n)},Object.setPrototypeOf(ke.prototype,Uint8Array.prototype),Object.setPrototypeOf(ke,Uint8Array),ke.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}},ke.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ke.prototype};const Be=/[^+/0-9A-Za-z-_]/g;function je(e){if((e=(e=e.split("=")[0]).trim().replace(Be,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function ze(e){if(Ve(e,Uint8Array)){const t=new Uint8Array(e);return $e(t.buffer,t.byteOffset,t.byteLength)}return qe(e)}function $e(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,ke.prototype),r}function qe(e){const t=e.length<0?0:0|De(e.length),n=Ue(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Ge(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 Ze(r)}function Je(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 Qe(this,t,n);case"utf8":case"utf-8":return Ge(this,t,n);case"ascii":return Xe(this,t,n);case"latin1":case"binary":return Ye(this,t,n);case"base64":return et(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ke.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Ge(this,0,e):Je.apply(this,arguments)};const Ke=4096;function Ze(e){const t=e.length;if(t<=Ke)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ke));return n}function Qe(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+=dt[e[r]];return o}function Xe(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 Ye(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 et(e,t,n){return 0===t&&n===e.length?Oe.fromByteArray(e):Oe.fromByteArray(e.slice(t,n))}function tt(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 nt(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(ut(r))return a;e[n+a]=r}return a}function rt(e,t,n,r){return lt(_e(t,e.length-n),e,n,r)}function ot(e,t,n,r){return lt(st(t),e,n,r)}function it(e,t,n,r){return lt(We(t),e,n,r)}function at(e,t,n,r){return lt(ct(t,e.length-n),e,n,r)}function st(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function ct(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 lt(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 ut(e){return e!=e}ke.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 nt(this,e,t,n);case"utf8":case"utf-8":return rt(this,e,t,n);case"ascii":case"latin1":case"binary":return ot(this,e,t,n);case"base64":return it(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const dt=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 ft(e){if(ke.isBuffer(e)){const t=0|De(e.length),n=Ue(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ut(e.length)?Ue(0):qe(e):"Buffer"===e.type&&Array.isArray(e.data)?qe(e.data):void 0}const pt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let gt;const mt=new Uint8Array(16);function ht(){if(!gt&&(gt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gt(mt)}const vt=[];for(let e=0;e<256;++e)vt.push((e+256).toString(16).slice(1));function wt(e,t=0){return vt[e[t+0]]+vt[e[t+1]]+vt[e[t+2]]+vt[e[t+3]]+"-"+vt[e[t+4]]+vt[e[t+5]]+"-"+vt[e[t+6]]+vt[e[t+7]]+"-"+vt[e[t+8]]+vt[e[t+9]]+"-"+vt[e[t+10]]+vt[e[t+11]]+vt[e[t+12]]+vt[e[t+13]]+vt[e[t+14]]+vt[e[t+15]]}const Ct=function(e,t,n){if(pt.randomUUID&&!t&&!e)return pt.randomUUID();const r=(e=e||{}).random||(e.rng||ht)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return wt(r)},yt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const bt=function(e){return"string"==typeof e&&yt.test(e)};var St,Et,At,It,Tt,Pt,Ot,Rt,Ft,kt,Mt,Nt,xt,Ut,Dt,Lt,Ht;function Vt(e){return void 0!==(null==e?void 0:e.errorCode)}!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(St||(St={})),function(e){e.M365Content="m365content"}(Et||(Et={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(At||(At={})),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"}(It||(It={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Tt||(Tt={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Pt||(Pt={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Ot||(Ot={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Rt||(Rt={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Ft||(Ft={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(kt||(kt={})),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"}(Mt||(Mt={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(Nt||(Nt={})),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"}(xt||(xt={})),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"}(Ut||(Ut={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(Dt||(Dt={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Lt||(Lt={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Ht||(Ht={}));const _t={errorCode:It.NOT_SUPPORTED_ON_PLATFORM},Wt={majorVersion:1,minorVersion:5},Bt={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},jt=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),zt=new Error("Invalid response: Received more images than the specified max limit in the response.");function $t(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function qt(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 Gt(){return Ct()}function Jt(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&Jt(e[t])})),Object.freeze(e)}function Kt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Zt(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Qt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Xt(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 Yt(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 en(e){return!(qt(`${e.majorVersion}.${e.minorVersion}`,`${Wt.majorVersion}.${Wt.minorVersion}`)>=0)}function tn(e){return"https:"===e.protocol}function nn(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=Re.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function rn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function on(){if(an())throw new Error("window object undefined at SSR check");return window}function an(){return"undefined"==typeof window}function sn(e,t){if(un(e)||!dn(e)||!fn(e))throw t||new Error("id is not valid.")}function cn(e,t){const n=e.toString().toLocaleLowerCase();if(un(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!tn(e))throw t||new Error("Url should be a valid https url")}function ln(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function un(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function dn(e){return e.length<256&&e.length>4}function fn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function pn(e){if(!e)throw new Error("id must not be empty");if(!1===bt(e))throw new Error("id must be a valid UUID")}const gn=!!performance&&"now"in performance;function mn(){return gn?performance.now()+performance.timeOrigin:void 0}function hn(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=>hn(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=>hn(e[n],t+1)))}class vn{constructor(e=Gt()){this.uuid=e,pn(e)}toString(){return this.uuid}}const wn=new vn,Cn=Pe.debug.formatArgs;Pe.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${wn.toString()}]`,Cn.call(this,e)};const yn=(0,Pe.debug)("teamsJs");function bn(e){return yn.extend(e)}function Sn(e,t){return`${e}_${t}`}function En(e){return/^v\d+_[\w.]+$/.test(e)}const An=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const In="2.0.1",Tn="2.0.2",Pn="2.0.3",On="2.0.4",Rn="2.0.1",Fn="1.9.0",kn="2.0.0",Mn="1.7.0",Nn="1.8.0",xn="1.9.0",Un=n.t(An,2).validOrigins,Dn=1500,Ln=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),Hn=/^https:\/\//,Vn="https",_n="teams.microsoft.com",Wn="The library has not yet been initialized",Bn="The runtime has not yet been initialized",jn="The runtime version is not supported",zn="The call was not properly started";class $n{}$n.initializeCalled=!1,$n.initializeCompleted=!1,$n.additionalValidOrigins=[],$n.initializePromise=void 0,$n.isFramelessWindow=!1,$n.frameContext=void 0,$n.hostClientType=void 0,$n.printCapabilityEnabled=!1;var qn=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 Gn=bn("runtime"),Jn=4;function Kn(e){return e.apiVersion===Jn}const Zn={apiVersion:-1,supports:{}};function Qn(e){if(Kn(e))return!0;throw-1===e.apiVersion?new Error(Bn):new Error(jn)}let Xn=Zn;const Yn={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:Bt,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:{}}}},er=[Mt.desktop,Mt.web,Mt.rigel,Mt.surfaceHub,Mt.teamsRoomsWindows,Mt.teamsRoomsAndroid,Mt.teamsPhones,Mt.teamsDisplays],tr=[Mt.android,Mt.ios,Mt.ipados,Mt.visionOS],nr=[...er,...tr];function rr(e){let t=e;if(t.apiVersion<Jn&&or.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),Kn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const or=[{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=qn(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})}}}],ir={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:er}],"1.9.0":[{capability:{location:{}},hostClientTypes:nr}],"2.0.0":[{capability:{people:{}},hostClientTypes:nr},{capability:{sharing:{}},hostClientTypes:[Mt.desktop,Mt.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[Mt.android,Mt.desktop,Mt.ios,Mt.teamsRoomsAndroid,Mt.teamsPhones,Mt.teamsDisplays,Mt.web]},{capability:{webStorage:{}},hostClientTypes:[Mt.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[Mt.android,Mt.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[Mt.android,Mt.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[Mt.android,Mt.ios,Mt.ipados,Mt.visionOS]}]},ar=Gn.extend("generateBackCompatRuntimeConfig");function sr(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]=sr(e[r]||{},t[r]));return n}function cr(e,t,n){ar("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);ar("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{qt(e,t)>=0&&n[t].forEach((e=>{void 0!==$n.hostClientType&&e.hostClientTypes.includes($n.hostClientType)&&(r=sr(r,e.capability))}))}));const o={apiVersion:Jn,hostVersionsInfo:Bt,isLegacyTeams:!0,supports:r};return ar("Runtime config after updating based on highestSupportedVersion: %o",o),o}const lr=Gn.extend("applyRuntimeConfig");function ur(e){"string"==typeof e.apiVersion&&(lr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),lr("Fast-forwarding runtime %o",e);const t=rr(e);lr("Applying runtime %o",t),Xn=Jt(t)}function dr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const fr="2.34.1-beta.1",pr=bn("internal"),gr=pr.extend("ensureInitializeCalled"),mr=pr.extend("ensureInitialized");function hr(){if(!$n.initializeCalled)throw gr(Wn),new Error(Wn)}function vr(e,...t){if(!$n.initializeCompleted)throw mr("%s. initializeCalled: %s",Wn,$n.initializeCalled.toString()),new Error(Wn);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===$n.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${$n.frameContext}".`)}return Qn(e)}function wr(e=In){const t=qt($n.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Cr(){return $n.hostClientType==Mt.android||$n.hostClientType==Mt.ios||$n.hostClientType==Mt.ipados||$n.hostClientType==Mt.visionOS}function yr(e=In){if(!Cr()){throw{errorCode:It.NOT_SUPPORTED_ON_PLATFORM}}if(!wr(e)){throw{errorCode:It.OLD_PLATFORM}}}function br(e){let t=$n.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&Hn.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),$n.additionalValidOrigins=t}function Sr(e){if(un(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Ir(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Er}-${Ar}).`);if(Tr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Er=4,Ar=256;function Ir(e){return e.length<Ar&&e.length>Er}function Tr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Pr(e){if(!(e instanceof Or))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Or{constructor(e){this.appIdAsString=e,Sr(e)}serialize(){return this.toString()}toString(){return this.appIdAsString}}function Rr(e){return null==e}var Fr=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 kr;const Mr="v1",Nr=bn("messageChannels.telemetry");function xr(){return Fr(this,void 0,void 0,(function*(){if(kr)return Nr("Returning telemetry port from cache"),kr;if(!Ur())throw _t;return kr=yield Fs(Sn(Mr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),kr}))}function Ur(){var e;return!(!vr(Xn)||!(null===(e=Xn.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function Dr(){kr=void 0}var Lr=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 Hr;const Vr="v1",_r=bn("messageChannels.dataLayer");function Wr(){return Lr(this,void 0,void 0,(function*(){if(Hr)return _r("Returning dataLayer port from cache"),Hr;if(!Br())throw _t;return Hr=yield Fs(Sn(Vr,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),Hr}))}function Br(){var e;return!(!vr(Xn)||!(null===(e=Xn.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function jr(){Hr=void 0}function zr(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");vr(Xn),rs(e)}function $r(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");vr(Xn),os(e)}const qr="v2",Gr=bn("app"),Jr={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Kr,Zr;function Qr(){return $n.initializeCompleted}function Xr(){return $n.frameContext}function Yr(e){return bi(Sn(qr,"app.initialize"),e)}function eo(e){ws.currentWindow=e}function to(){$n.initializeCalled&&(Wa(),$n.initializeCalled=!1,$n.initializeCompleted=!1,$n.initializePromise=void 0,$n.additionalValidOrigins=[],$n.frameContext=void 0,$n.hostClientType=void 0,$n.isFramelessWindow=!1,Dr(),jr(),bs())}function no(){return new Promise((e=>{hr(),e(Ss(Sn(qr,"app.getContext"),"getContext"))})).then((e=>uo(e)))}function ro(){hr(),Si(Sn(qr,"app.notifyAppLoaded"))}function oo(){return Ii(Sn(qr,"app.notifySuccess"))}function io(e){hr(),Ai(Sn(qr,"app.notifyFailure"),e)}function ao(e){hr(),Ei(Sn(qr,"app.notifyExpectedFailure"),e)}function so(e){Fi(Sn(qr,"app.registerOnThemeChangeHandler"),e)}function co(e){Za(e)}function lo(e){return ki(Sn(qr,"app.openLink"),e)}function uo(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:Nt.teams,clientType:e.hostClientType?e.hostClientType:Mt.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Or(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:$n.frameContext,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 fo(e){To(Sn(Io,"dialog.update.resize"),e)}function po(){return!(!vr(Xn)||!Xn.supports.dialog)&&!!Xn.supports.dialog.update}function go(e,t,n){Oo(Sn(Io,"dialog.url.bot.open"),e,t,n)}function mo(){return vr(Xn)&&void 0!==(Xn.supports.dialog&&Xn.supports.dialog.url&&Xn.supports.dialog.url.bot)}function ho(e){if(vr(Xn,xt.task),!Co())throw _t;Ns(Sn(Io,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function vo(e){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!Co())throw _t;Ns(Sn(Io,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function wo(e){if(vr(Xn,xt.task),!Co())throw _t;for($a("messageForChild"),za(Sn(Io,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),Mo.reverse();Mo.length>0;){e(Mo.pop())}}function Co(){var e,t;return vr(Xn)&&!!(null===(t=null===(e=Xn.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function yo(e,t,n){Po(Sn(Io,"dialog.url.open"),e,t,n)}function bo(e,t){Ro(Sn(Io,"dialog.url.submit"),e,t)}function So(){return vr(Xn)&&void 0!==(Xn.supports.dialog&&Xn.supports.dialog.url)}function Eo(e){return{url:e.url,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Ao(e){const t=Eo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Kr||(Kr={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Zr||(Zr={})),Gr("teamsjs instance is version %s, starting at %s UTC (%s local)",fr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(an())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?Gr("teamsjs is being used from %s. %s",t,n):Gr("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const Io="v2";function To(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.task,xt.meetingStage),!po())throw _t;Ns(e,"tasks.updateTask",[t])}function Po(e,t,n,r){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!So())throw _t;r&&za(Sn(Io,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Ns(e,"tasks.startTask",[Eo(t)],((e,t)=>{null==n||n({err:e,result:t}),$a("messageForParent")}))}function Oo(e,t,n,r){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!mo())throw _t;r&&za(Sn(Io,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Ns(e,"tasks.startTask",[Ao(t)],((e,t)=>{null==n||n({err:e,result:t}),$a("messageForParent")}))}function Ro(e,t,n){if(vr(Xn,xt.task),!So())throw _t;Ns(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function Fo(e){return{card:e.card,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title}}function ko(e){const t=Fo(e);return t.completionBotId=e.completionBotId,t}const Mo=[];function No(e){$n.frameContext&&($n.frameContext===xt.task?Mo.push(e):$a("messageForChild"))}function xo(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!Uo())throw _t;const n=ko(e);Ns(Sn(Io,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function Uo(){const e=Xn.hostVersionsInfo&&Xn.hostVersionsInfo.adaptiveCardSchemaVersion&&!en(Xn.hostVersionsInfo.adaptiveCardSchemaVersion);return vr(Xn)&&void 0!==(e&&Xn.supports.dialog&&Xn.supports.dialog.card&&Xn.supports.dialog.card.bot)}function Do(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!Lo())throw _t;const n=Fo(e);Ns(Sn(Io,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function Lo(){const e=Xn.hostVersionsInfo&&Xn.hostVersionsInfo.adaptiveCardSchemaVersion&&!en(Xn.hostVersionsInfo.adaptiveCardSchemaVersion);return vr(Xn)&&void 0!==(e&&Xn.supports.dialog&&Xn.supports.dialog.card)}function Ho(){za(Sn(Io,"dialog.registerMessageForChildHandler"),"messageForChild",No,!1)}function Vo(){return!(!vr(Xn)||!Xn.supports.dialog)}const _o="v2";var Wo,Bo;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Wo||(Wo={}));class jo{constructor(){this.enabled=!0,this.selected=!1}}let zo,$o,qo,Go,Jo;function Ko(){za(Sn(_o,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Yo,!1),za(Sn(_o,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",ti,!1),za(Sn(_o,"menus.registerSetModuleViewHandler"),"setModuleView",Qo,!1)}function Zo(e,t){if(vr(Xn),!ni())throw _t;qo=t,Ns(Sn(_o,"menus.setUpViews"),"setUpViews",[e])}function Qo(e){qo&&qo(e)||(vr(Xn),Ns(Sn(_o,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Xo(e,t){if(vr(Xn),!ni())throw _t;zo=t,Ns(Sn(_o,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Yo(e){zo&&zo(e)||(vr(Xn),Ns(Sn(_o,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function ei(e,t){if(vr(Xn),!ni())throw _t;$o=t,Ns(Sn(_o,"menus.showActionMenu"),"showActionMenu",[e])}function ti(e){$o&&$o(e)||(vr(Xn),Ns(Sn(_o,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function ni(){return!(!vr(Xn)||!Xn.supports.menus)}function ri(){za(Sn(wa,"pages.config.registerSettingsSaveHandler"),"settings.save",ui,!1),za(Sn(wa,"pages.config.registerSettingsRemoveHandler"),"settings.remove",pi,!1)}function oi(e){return Pa(Sn(wa,"pages.config.setValidityState"),e)}function ii(e){return Ra(Sn(wa,"pages.config.setConfig"),e)}function ai(e){si(Sn(wa,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Rr(e)&&!mi())throw _t}))}function si(e,t,n){!Rr(t)&&vr(Xn,xt.settings),n&&n(),Go=t,!Rr(t)&&Ns(e,"registerHandler",["save"])}function ci(e){li(Sn(wa,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Rr(e)&&!mi())throw _t}))}function li(e,t,n){!Rr(t)&&vr(Xn,xt.remove,xt.settings),n&&n(),Jo=t,!Rr(t)&&Ns(e,"registerHandler",["remove"])}function ui(e){const t=new fi(e);Go?Go(t):ws.childWindow?lc("settings.save",[e]):t.notifySuccess()}function di(e){Ga(Sn(wa,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[xt.content],(()=>{if(!mi())throw _t}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Bo||(Bo={}));class fi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Ns(Sn(wa,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ns(Sn(wa,"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 pi(){const e=new gi;Jo?Jo(e):ws.childWindow?lc("settings.remove",[]):e.notifySuccess()}class gi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Ns(Sn(wa,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ns(Sn(wa,"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 mi(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.config}class hi{}class vi extends hi{validate(e){return!0}deserialize(e){return e}}var wi=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 Ci=6e4,yi=bn("app");function bi(e,t){if(an()){return yi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Xt((()=>Ri(e,t)),Ci,new Error("SDK initialization timed out."))}function Si(e){Ns(e,Jr.AppLoaded,[fr])}function Ei(e,t){Ns(e,Jr.ExpectedFailure,[t.reason,t.message])}function Ai(e,t){Ns(e,Jr.Failure,[t.reason,t.message])}function Ii(e){return wi(this,void 0,void 0,(function*(){if($n.initializeCompleted)return Pi(e);if(!$n.initializePromise)throw new Error(Wn);return $n.initializePromise.then((()=>Pi(e)))}))}function Ti(){var e;return vr(Xn)&&!!(null===(e=Xn.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Pi(e){return wi(this,void 0,void 0,(function*(){return Ti()?Os(Jr.Success,[fr],new vi,e).then((()=>({hasFinishedSuccessfully:!0}))):(Ns(e,Jr.Success,[fr]),{hasFinishedSuccessfully:"unknown"})}))}const Oi=yi.extend("initializeHelper");function Ri(e,t){return new Promise((n=>{$n.initializeCalled||($n.initializeCalled=!0,_a(),$n.initializePromise=ys(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=In})=>{$n.frameContext=e,$n.hostClientType=t,$n.clientSupportedSDKVersion=r;try{Oi("Parsing %s",n);const e=JSON.parse(n);if(Oi("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&ur(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Oi("Attempting to parse %s as an SDK version",n),isNaN(qt(n,In))||($n.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Oi("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");ur(e)}catch(e){if(!(e instanceof SyntaxError))throw e;ur(cr($n.clientSupportedSDKVersion,Yn,ir))}}$n.initializeCompleted=!0})),Ko(),ri(),Ho()),Array.isArray(t)&&br(t),void 0!==$n.initializePromise?n($n.initializePromise):Oi("GlobalVars.initializePromise is unexpectedly undefined")}))}function Fi(e,t){!Rr(t)&&hr(),Ja(e,t)}function ki(e,t){return new Promise((n=>{vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),n(Es(e,"executeDeepLink",t))}))}var Mi=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 Ni=[];const xi=bn("validateOrigin");function Ui(){return Mi(this,void 0,void 0,(function*(){yield Li()}))}function Di(){return 0===Ni.length}function Li(e=!1){return Mi(this,void 0,void 0,(function*(){if(!Di()&&!e)return Ni;if(an())return Ni=Un,Un;{xi("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),Dn);return fetch(Ln,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return xi("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(Hi(JSON.stringify(e)))return Ni=e.validOrigins,Ni;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?xi(`validOrigins fetch call to CDN failed due to Timeout of ${Dn} ms. Defaulting to fallback list`):xi("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Ni=Un,Ni)))}}))}function Hi(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return xi("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function Vi(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function _i(e,t){return Li(t).then((t=>{if(!tn(e))return xi("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>Vi(e,n))))return!0;for(const e of $n.additionalValidOrigins){if(Vi("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return xi("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,$n.additionalValidOrigins),!1}))}function Wi(e){Ga(Sn(wa,"pages.appButton.onClick"),"appButtonClick",e,[xt.content],(()=>{if(!zi())throw _t}))}function Bi(e){Ga(Sn(wa,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[xt.content],(()=>{if(!zi())throw _t}))}function ji(e){Ga(Sn(wa,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[xt.content],(()=>{if(!zi())throw _t}))}function zi(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.appButton}function $i(){Ua()}function qi(){return ya(Sn(wa,"pages.backStack.navigateBack"))}function Gi(e){Ji(Sn(wa,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Rr(e)&&!Ki())throw _t}))}function Ji(e,t,n){!Rr(t)&&vr(Xn),n&&n(),xa(t),!Rr(t)&&Ns(e,"registerHandler",["backButton"])}function Ki(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.backStack}function Zi(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!Xi())throw _t;t(Is(Sn(wa,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Qi(){return new Promise((e=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!Xi())throw _t;e(Is(Sn(wa,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Xi(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.currentApp}function Yi(){if(vr(Xn,xt.content),!ta())throw _t;Ns(Sn(wa,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function ea(){if(vr(Xn,xt.content),!ta())throw _t;Ns(Sn(wa,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function ta(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.fullTrust}function na(e){return ba(Sn(wa,"pages.tabs.navigateToTab"),e)}function ra(e){return Ea(Sn(wa,"pages.tabs.getTabInstances"),e)}function oa(e){return Aa(Sn(wa,"pages.tabs.getMruTabInstances"),e)}function ia(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.tabs}var aa,sa;function ca(e){const t=Sn(wa,"pages.returnFocus");if(vr(Xn),!va())throw _t;if(void 0===e&&Ns(t,"returnFocus",[!1]),"boolean"==typeof e)Ns(t,"returnFocus",[e]);else switch(e){case sa.PreviousLandmark:case sa.GoToActivityFeed:Ns(t,"returnFocus",[!1,e]);break;case sa.NextLandmark:Ns(t,"returnFocus",[!0,e])}}function la(e){Ga(Sn(wa,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!va())throw _t}))}function ua(e){Ta(Sn(wa,"pages.setCurrentFrame"),e)}function da(e,t,n){Ui(),bi(Sn(wa,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),ua(e)}function fa(){return Oa(Sn(wa,"pages.getConfig."))}function pa(e){return Ca(Sn(wa,"pages.navigateCrossDomain"),e)}function ga(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!va())throw _t;const n=Sn(wa,"pages.navigateToApp");if(Xn.isLegacyTeams){t(Es(n,"executeDeepLink",Yt(Fa(e)?e:ka(e))))}else{t(Es(n,"pages.navigateToApp",Fa(e)?Ma(e):e))}}))}function ma(e){return Ia(Sn(wa,"pages.shareDeepLink"),e)}function ha(e){Ga(Sn(wa,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Rr(e)&&!va())throw _t}))}function va(){return!(!vr(Xn)||!Xn.supports.pages)}Ui(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(aa||(aa={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(sa||(sa={}));const wa="v2";function Ca(e,t){return new Promise((n=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage),!va())throw _t;n(As(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function ya(e){return new Promise((t=>{if(vr(Xn),!Ki())throw _t;t(As(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function ba(e,t){return new Promise((n=>{if(vr(Xn),!ia())throw _t;n(As(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Sa(e,t){if(vr(Xn),!va())throw _t;Ns(e,"returnFocus",[t])}function Ea(e,t){return new Promise((n=>{if(vr(Xn),!ia())throw _t;n(Ss(e,"getTabInstances",t))}))}function Aa(e,t){return new Promise((n=>{if(vr(Xn),!ia())throw _t;n(Ss(e,"getMruTabInstances",t))}))}function Ia(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!va())throw _t;Ns(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Ta(e,t){if(vr(Xn,xt.content),!va())throw _t;Ns(e,"setFrameContext",[t])}function Pa(e,t){if(vr(Xn,xt.settings,xt.remove),!mi())throw _t;Ns(e,"settings.setValidityState",[t])}function Oa(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.settings,xt.remove,xt.sidePanel),!va())throw _t;t(Ss(e,"settings.getSettings"))}))}function Ra(e,t){return new Promise((n=>{if(vr(Xn,xt.content,xt.settings,xt.sidePanel),!mi())throw _t;n(Es(e,"settings.setSettings",t))}))}function Fa(e){return e.appId instanceof Or}function ka(e){return Object.assign(Object.assign({},e),{appId:new Or(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Ma(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Na;function xa(e){Na=e}function Ua(){za(Sn(wa,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Da,!1)}function Da(){Na&&Na()||(ws.childWindow?lc("backButtonPress",[]):qi())}var La=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 Ha=bn("handlers");class Va{static initializeHandlers(){Va.handlers.themeChange=Ka,Va.handlers.load=Ya,Va.handlers.beforeUnload=ns,Ua()}static uninitializeHandlers(){Va.handlers={},Va.themeChangeHandler=null,Va.loadHandler=null,Va.beforeUnloadHandler=null,Va.beforeSuspendOrTerminateHandler=null,Va.resumeHandler=null}}function _a(){Va.initializeHandlers()}function Wa(){Va.uninitializeHandlers()}Va.handlers={},Va.themeChangeHandler=null,Va.loadHandler=null,Va.beforeUnloadHandler=null,Va.beforeSuspendOrTerminateHandler=null,Va.resumeHandler=null,Va.hostToAppPerformanceMetricsHandler=null;const Ba=Ha.extend("callHandler");function ja(e,t){const n=Va.handlers[e];if(n){Ba("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return ws.childWindow?(lc(e,t),[!1,void 0]):(Ba("Handler for action message %s not found.",e),[!1,void 0])}function za(e,t,n,r=!0,o=[]){n?(Va.handlers[t]=n,r&&Ns(e,"registerHandler",[t,...o])):delete Va.handlers[t]}function $a(e){delete Va.handlers[e]}function qa(e){return null!=Va.handlers[e]}function Ga(e,t,n,r,o){n&&vr(Xn,...r),o&&o(),za(e,t,n)}function Ja(e,t){Va.themeChangeHandler=t,!Rr(t)&&Ns(e,"registerHandler",["themeChange"])}function Ka(e){Va.themeChangeHandler&&Va.themeChangeHandler(e),ws.childWindow&&lc("themeChange",[e])}function Za(e){Va.hostToAppPerformanceMetricsHandler=e}function Qa(e){Va.hostToAppPerformanceMetricsHandler&&Va.hostToAppPerformanceMetricsHandler(e)}function Xa(e,t){Va.loadHandler=t,!Rr(t)&&Ns(e,"registerHandler",["load"])}function Ya(e){const t=es(e);Va.resumeHandler?(Va.resumeHandler(t),ws.childWindow&&lc("load",[t])):Va.loadHandler&&(Va.loadHandler(e),ws.childWindow&&lc("load",[e]))}function es(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function ts(e,t){Va.beforeUnloadHandler=t,!Rr(t)&&Ns(e,"registerHandler",["beforeUnload"])}function ns(){return La(this,void 0,void 0,(function*(){const e=()=>{Ns(Sn("v2","handleBeforeUnload"),"readyToUnload",[])};Va.beforeSuspendOrTerminateHandler?(yield Va.beforeSuspendOrTerminateHandler(),ws.childWindow?lc("beforeUnload"):e()):Va.beforeUnloadHandler&&Va.beforeUnloadHandler(e)||(ws.childWindow?lc("beforeUnload"):e())}))}function rs(e){Va.beforeSuspendOrTerminateHandler=e,!Rr(e)&&Ns(Sn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function os(e){Va.resumeHandler=e,!Rr(e)&&Ns(Sn("v2","registerOnResumeHandler"),"registerHandler",["load"])}class is{static storeCallbackInformation(e,t){is.callbackInformation.set(e,t)}static clearMessages(){is.callbackInformation.clear()}static deleteMessageInformation(e){is.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Qa({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=is.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Qa({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),is.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}is.callbackInformation=new Map;var as=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 ss=e=>{const{uuid:t}=e,n=as(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},cs=e=>{const{uuidAsString:t}=e,n=as(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new vn(t):void 0})},ls=e=>{const{uuidAsString:t}=e,n=as(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new vn(t):void 0})},us=e=>{const{uuid:t}=e,n=as(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},ds=bn("nestedAppAuthUtils"),fs=ds.extend("tryPolyfillWithNestedAppAuthBridge");function ps(e,t,n){var r;const o=fs;if($n.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");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=ms(a,n);s&&(a.nestedAppAuthBridge=s)}const gs=ds.extend("createNestedAppAuthBridge");function ms(e,t){const n=gs;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}})();t&&"object"==typeof t&&"NestedAppAuthRequest"===t.messageType?o(e):n("Unrecognized data format received by app, message being ignored. Message: %o",e)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}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())}))};const vs=bn("communication");class ws{}class Cs{}function ys(e,t){if(Cs.messageListener=e=>Ws(e),ws.currentWindow=ws.currentWindow||on(),ws.parentWindow=ws.currentWindow.parent!==ws.currentWindow.self?ws.currentWindow.parent:ws.currentWindow.opener,ws.topWindow=ws.currentWindow.top,(ws.parentWindow||e)&&ws.currentWindow.addEventListener("message",Cs.messageListener,!1),!ws.parentWindow){const e=ws.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));$n.isFramelessWindow=!0,e.onNativeMessage=Qs}try{return ws.parentOrigin="*",Ts(t,"initialize",[fr,Jn,e]).then((([e,t,n,r])=>(ps(r,ws.currentWindow,{onMessage:js,sendPostMessage:Us}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{ws.parentOrigin=null}}function bs(){ws.currentWindow&&ws.currentWindow.removeEventListener("message",Cs.messageListener,!1),ws.currentWindow=null,ws.parentWindow=null,ws.parentOrigin=null,ws.childWindow=null,ws.childOrigin=null,Cs.parentMessageQueue=[],Cs.childMessageQueue=[],Cs.nextMessageId=0,Cs.callbacks.clear(),Cs.promiseCallbacks.clear(),Cs.portCallbacks.clear(),Cs.legacyMessageIdsToUuidMap={},is.clearMessages()}function Ss(e,t,...n){return Ts(e,t,n).then((([e])=>e))}function Es(e,t,...n){return Ts(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function As(e,t,n,...r){return Ts(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function Is(e,t,...n){return Ts(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function Ts(e,t,n=void 0){if(!En(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(Ms(Vs(e,t,n).uuid))}))}function Ps(e){return e.map((e=>dr(e)?e.serialize():e))}function Os(e,t,n,r,o){var i;return hs(this,void 0,void 0,(function*(){const a=Ps(t),[s]=yield Ts(r,e,a);if(o&&o(s)||!o&&Vt(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(`${It.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function Rs(e,t,n,r){var o;return hs(this,void 0,void 0,(function*(){const i=Ps(t),[a]=yield Ts(n,e,i);if(r&&r(a)||!r&&Vt(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${It.INTERNAL_ERROR}, message: Invalid response from host`)}))}function Fs(e,t,n=void 0){if(!En(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 ks(Vs(e,t,n).uuid)}function ks(e){return new Promise(((t,n)=>{Cs.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 Ms(e){return new Promise((t=>{Cs.promiseCallbacks.set(e,t)}))}function Ns(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!En(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=Vs(e,t,o);r&&Cs.callbacks.set(i.uuid,r)}Cs.parentMessageQueue=[],Cs.childMessageQueue=[],Cs.topMessageQueue=[],Cs.nextMessageId=0,Cs.callbacks=new Map,Cs.promiseCallbacks=new Map,Cs.portCallbacks=new Map,Cs.legacyMessageIdsToUuidMap={};const xs=vs.extend("sendNestedAuthRequestToTopWindow");function Us(e){const t=xs,n=ws.topWindow,r=dc(e);return t("Message %s information: %o",gc(r),{actionName:r.func}),Ls(n,r)}const Ds=vs.extend("sendRequestToTargetWindowHelper");function Ls(e,t){const n=Ds,r=oc(e),o=ss(t);if($n.isFramelessWindow)ws.currentWindow&&ws.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",gc(o),r),ws.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=rc(e);e&&i?(n("Sending message %s to %s via postMessage",gc(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",gc(o),r),nc(e).push(t))}return t}const Hs=vs.extend("sendMessageToParentHelper");function Vs(e,t,n,r){const o=Hs,i=ws.parentWindow,a=uc(e,t,n,r);return is.storeCallbackInformation(a.uuid,{name:t,calledAt:a.timestamp}),o("Message %s information: %o",gc(a),{actionName:t,args:n}),Ls(i,a)}const _s=vs.extend("processIncomingMessage");function Ws(e){return hs(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void _s("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 $s(t,n).then((r=>{r?(qs(t,n),t===ws.parentWindow?Qs(e):t===ws.childWindow&&ec(e)):_s("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 Bs=vs.extend("processAuthBridgeMessage");function js(e,t){var n,r;const o=Bs;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),l=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?$s(c,l)?(ws.topWindow&&!ws.topWindow.closed&&c!==ws.topWindow||(ws.topWindow=c,ws.topOrigin=l),ws.topWindow&&ws.topWindow.closed&&(ws.topWindow=null,ws.topOrigin=null),ac(ws.topWindow),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const zs=vs.extend("shouldProcessIncomingMessage");function $s(e,t){return hs(this,void 0,void 0,(function*(){if(ws.currentWindow&&e===ws.currentWindow)return zs("Should not process message because it is coming from the current window"),!1;if(ws.currentWindow&&ws.currentWindow.location&&t&&t===ws.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return zs("Message has an invalid origin of %s",t),!1}const n=yield _i(e);return n||zs("Message has an invalid origin of %s",t),n}}))}function qs(e,t){$n.isFramelessWindow||ws.parentWindow&&!ws.parentWindow.closed&&e!==ws.parentWindow?ws.childWindow&&!ws.childWindow.closed&&e!==ws.childWindow||(ws.childWindow=e,ws.childOrigin=t):(ws.parentWindow=e,ws.parentOrigin=t),ws.parentWindow&&ws.parentWindow.closed&&(ws.parentWindow=null,ws.parentOrigin=null),ws.childWindow&&ws.childWindow.closed&&(ws.childWindow=null,ws.childOrigin=null),ac(ws.parentWindow),ac(ws.childWindow)}const Gs=vs.extend("handleIncomingMessageFromParent");function Js(e){const t=Gs;if(!e.uuid)return Cs.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Ks(Cs.callbacks,t);if(n)return n;const r=Ks(Cs.promiseCallbacks,t);if(r)return r;const o=Ks(Cs.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",gc(e))}function Ks(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Zs(e,t){const n=Ks(t,e.uuid);n&&t.delete(n),e.uuid?Cs.legacyMessageIdsToUuidMap={}:delete Cs.legacyMessageIdsToUuidMap[e.id]}function Qs(e){const t=Gs,n=mn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=ls(r),i=Js(o);if(i){const r=Cs.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),is.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]),Xs(e)||(t("Removing registered callback for message %s",i.toString()),Zs(o,Cs.callbacks)));const a=Cs.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()),Zs(o,Cs.promiseCallbacks));const s=Cs.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()),Zs(o,Cs.portCallbacks)}o.uuid&&(Cs.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;is.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',gc(r),r.func),ja(r.func,r.args)}else t("Received an unknown message: %O",e)}function Xs(e){return!0===e.data.isPartialResponse}const Ys=vs.extend("handleIncomingMessageFromChild");function ec(e){if("id"in e.data&&"func"in e.data){const t=cs(e.data),[n,r]=ja(t.func,t.args);n&&void 0!==r?(Ys("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",gc(t),t.func),cc(t.id,t.uuid,Array.isArray(r)?r:[r])):(Ys("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",gc(t),t.func),mc(t))}}function tc(){return ws.topWindow!==ws.parentWindow}function nc(e){return e===ws.topWindow&&tc()?Cs.topMessageQueue:e===ws.parentWindow?Cs.parentMessageQueue:e===ws.childWindow?Cs.childMessageQueue:[]}function rc(e){return e===ws.topWindow&&tc()?ws.topOrigin:e===ws.parentWindow?ws.parentOrigin:e===ws.childWindow?ws.childOrigin:null}function oc(e){return e===ws.topWindow&&tc()?"top":e===ws.parentWindow?"parent":e===ws.childWindow?"child":null}const ic=vs.extend("flushMessageQueue");function ac(e){const t=rc(e),n=nc(e),r=oc(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=ss(o);ic("Flushing message %s from %s message queue via postMessage.",gc(n),r),e.postMessage(n,t)}}}function sc(e,t){let n;n=ws.currentWindow.setInterval((()=>{0===nc(e).length&&(clearInterval(n),t())}),100)}function cc(e,t,n,r){const o=ws.childWindow,i=fc(e,t,n,r),a=us(i),s=rc(o);o&&s&&(Ys("Sending message %s to %s via postMessage, args = %o",gc(a),oc(o),a.args),o.postMessage(a,s))}function lc(e,t){const n=ws.childWindow,r=pc(e,t),o=rc(n);n&&o?n.postMessage(r,o):nc(n).push(r)}function uc(e,t,n,r){const o=Cs.nextMessageId++,i=new vn;return Cs.legacyMessageIdsToUuidMap[o]=i,{id:o,uuid:i,func:t,timestamp:Date.now(),monotonicTimestamp:mn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r}}function dc(e){const t=Cs.nextMessageId++,n=new vn;return Cs.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:mn(),args:[],data:e}}function fc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function pc(e,t){return{func:e,args:t||[]}}function gc(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}function mc(e){const t=Vs(Sn("v2","tasks.startTask"),e.func,e.args,!0);Cs.callbacks.set(t.uuid,((...t)=>{if(ws.childWindow){const n=t.pop();Ys("Message from parent being relayed to child, id: %s",gc(e)),cc(e.id,e.uuid,t,n)}}))}const hc="v1";function vc(e){if(!Rr(e)&&vr(Xn),!Rr(e)&&!wc())throw _t;e?za(Sn(hc,"log.request"),"log.request",(()=>{const t=e();Ns(Sn(hc,"log.receive"),"log.receive",[t])})):$a("log.request")}function wc(){return!(!vr(Xn)||!Xn.supports.logs)}var Cc,yc,bc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Cc||(Cc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(yc||(yc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(bc||(bc={}));const Sc="v1";function Ec(e,t){vr(Xn),Ns(Sn(Sc,"uploadCustomApp"),"uploadCustomApp",[e],t||$t())}function Ac(e,t,n){vr(Xn),Ns(Sn(Sc,"sendCustomMessage"),e,t,n)}function Ic(e,t){if(vr(Xn),!ws.childWindow)throw new Error("The child window has not yet been initialized or is not present");lc(e,t)}function Tc(e,t){vr(Xn),za(Sn(Sc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Pc(e,t){vr(Xn),za(Sn(Sc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Oc(e){vr(Xn,xt.content,xt.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];Ns(Sn(Sc,"openFilePreview"),"openFilePreview",t)}const Rc="v1";function Fc(e){return new Promise((t=>{if(vr(Xn,xt.content),!Nc())throw _t;const n=Es(Sn(Rc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&za(Sn(Rc,"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&&za(Sn(Rc,"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 kc(){if(vr(Xn,xt.content),!Nc())throw _t;Ns(Sn(Rc,"conversations.closeConversation"),"conversations.closeConversation"),$a("startConversation"),$a("closeConversation")}function Mc(){return new Promise((e=>{if(vr(Xn),!Nc())throw _t;e(Ss(Sn(Rc,"conversations.getChatMember"),"getChatMembers"))}))}function Nc(){return!(!vr(Xn)||!Xn.supports.conversations)}var xc=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 Uc="v2",Dc=bn("copilot");function Lc(){var e;return vr(Xn)&&!!(null===(e=Xn.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Hc(e,t){var n;return void 0===t&&(t=null!==(n=mn())&&void 0!==n?n:Date.now()),xc(this,void 0,void 0,(function*(){return vr(Xn),Dc("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Rs("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Sn(Uc,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var Vc=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 _c="v2",Wc=bn("copilot");function Bc(){var e,t;return vr(Xn)&&(!!(null===(e=Xn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=Xn.supports.copilot)||void 0===t?void 0:t.eligibility))}function jc(){var e,t;return Vc(this,void 0,void 0,(function*(){if(vr(Xn),!Bc())throw new Error(`Error code: ${_t.errorCode}, message: Not supported on platform`);if(null===(e=Xn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return Wc("Eligibility information is already available on runtime."),Xn.hostVersionsInfo.appEligibilityInformation;Wc("Eligibility information is not available on runtime. Requesting from host.");const n=yield Ss(Sn(_c,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(Vt(n))throw new Error(`Error code: ${n.errorCode}, message: ${null!==(t=n.message)&&void 0!==t?t:"Failed to get eligibility information from the host."}`);if(!zc(n))throw new Error("Error deserializing eligibility information");return n}))}function zc(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)}const $c="v2";class qc{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function Gc(e){const t=e;return t.responseType===Zc.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Jc="Action.Execute";var Kc,Zc,Qc;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Kc||(Kc={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(Zc||(Zc={}));class Xc extends hi{validate(e){return Gc(e)}deserialize(e){return e}}function Yc(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Qc).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function el(e){e.requestType===Kc.ActionExecuteInvokeRequest?tl(e):e.requestType===Kc.QueryMessageExtensionRequest&&nl(e)}function tl(e){if(e.type!==Jc){throw{errorCode:Qc.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Jc}"`}}if(!hn(e.data)){throw{errorCode:Qc.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function nl(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(vr(Xn,xt.content),!cl())throw _t;const r=new Or(e);return el(n),Ts(Sn($c,"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 ol(e,t){if(vr(Xn,xt.content),!cl())throw _t;const n=new Or(e);return Ts(Sn($c,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function il(e,t,n){if(vr(Xn,xt.content),!cl())throw _t;const r=new Or(e);return el(n),Ts(Sn($c,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function al(e,t,n){if(vr(Xn,xt.content),!cl())throw _t;return sn(e,new Error("titleId is Invalid.")),sn(t,new Error("oauthConfigId is Invalid.")),Ts(Sn($c,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function sl(e,t,n){if(vr(Xn,xt.content),!cl())throw _t;return sn(e,new Error("titleId is Invalid.")),t&&cn(t),Ts(Sn($c,"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 cl(){return!(!vr(Xn)||!Xn.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Qc||(Qc={}));var ll=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ul="v2";function dl(e,t,n){return ll(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!ml())throw _t;return hl(e,t),Rs("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.claims,n.silent],Sn(ul,"externalAppAuthenticationForCEA.authenticateWithSSO"),Yc)}))}function fl(e,t,n){return ll(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!ml())throw _t;return hl(e,t),Rs("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Sn(ul,"externalAppAuthenticationForCEA.authenticateWithOauth"),Yc)}))}function pl(e,t,n,r){return ll(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!ml())throw _t;return hl(e,t),tl(r),Os("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new qc(r),n.url.href,n.width,n.height,n.isExternal],new Xc,Sn(ul,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Yc)}))}function gl(e,t,n,r){return ll(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!ml())throw _t;return hl(e,t),tl(r),Os("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new qc(r),n.claims,n.silent],new Xc,Sn(ul,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Yc)}))}function ml(){return!(!vr(Xn)||!Xn.supports.externalAppAuthenticationForCEA)}function hl(e,t){sn(t,new Error("conversation id is not valid.")),Pr(e)}const vl="v2";var wl,Cl;function yl(e,t){if(vr(Xn,xt.content),!Sl())throw _t;const n=new Or(e);return Ts(Sn(vl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function bl(e,t,n){if(vr(Xn,xt.content),!Sl())throw _t;const r=new Or(e);return Ts(Sn(vl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Sl(){return!(!vr(Xn)||!Xn.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(wl||(wl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Cl||(Cl={}));var El=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 Al="v2";function Il(e,t,n){return El(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Pl())throw _t;hl(e,t);const[r,o]=yield Ts(Sn(Al,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Tl(e,t,n){return El(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Pl())throw _t;hl(e,t);const r=yield Ss(Sn(Al,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Pl(){return!(!vr(Xn)||!Xn.supports.externalAppCardActionsForCEA)}var Ol=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 Rl="v2";function Fl(e,t,n){return Ol(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!kl())throw _t;const r=new Or(e),[o,i]=yield Ts(Sn(Rl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function kl(){return!(!vr(Xn)||!Xn.supports.externalAppCommands)}const Ml="v1";var Nl,xl,Ul,Dl,Ll,Hl;function Vl(e,t){if(vr(Xn,xt.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");Ns(Sn(Ml,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function _l(e,t){if(vr(Xn,xt.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");Ns(Sn(Ml,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Wl(e,t,n){if(vr(Xn,xt.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");Ns(Sn(Ml,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Bl(e,t,n){if(vr(Xn,xt.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");Ns(Sn(Ml,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function jl(e,t,n){if(vr(Xn,xt.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");Ns(Sn(Ml,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function zl(e=!1,t){if(vr(Xn,xt.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Ns(Sn(Ml,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function $l(e,t,n,r,o=!1,i){if(vr(Xn,xt.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");Ns(Sn(Ml,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function ql(e){if(vr(Xn,xt.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Ns(Sn(Ml,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Gl(e=void 0,t){if(vr(Xn,xt.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Ns(Sn(Ml,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Jl(e){if(vr(Xn,xt.content),!e)throw ru(It.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Ns(Sn(Ml,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Kl(e,t){if(vr(Xn,xt.content),!t)throw ru(It.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw ru(It.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Ns(Sn(Ml,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Zl(e,t){if(vr(Xn,xt.content),!t)throw ru(It.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw ru(It.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ns(Sn(Ml,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Ql(e,t){if(vr(Xn,xt.content),!t)throw ru(It.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw ru(It.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ns(Sn(Ml,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Xl(e,t){if(vr(Xn,xt.content),!t)throw ru(It.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw ru(It.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ns(Sn(Ml,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Yl(e,t){if(vr(Xn,xt.content),!t)throw ru(It.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw ru(It.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ns(Sn(Ml,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function eu(e,t){if(vr(Xn,xt.content),!t)throw ru(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw ru(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw ru(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Ns(Sn(Ml,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function tu(e){if(vr(Xn),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");za(Sn(Ml,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function nu(e){if(vr(Xn),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");za(Sn(Ml,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function ru(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"}(Nl||(Nl={})),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"}(xl||(xl={})),function(e){e.ClassMaterials="classMaterials"}(Ul||(Ul={})),function(e){e.Readonly="readonly"}(Dl||(Dl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(Ll||(Ll={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Hl||(Hl={}));const ou="v1";function iu(){return new Promise((e=>{if(vr(Xn),!lu())throw _t;e(Is(Sn(ou,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function au(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(vr(Xn),!lu())throw _t;t(Is(Sn(ou,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function su(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(vr(Xn),!lu())throw _t;za(Sn(ou,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{vr(Xn),e(t)}))}function cu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(vr(Xn),!lu())throw _t;za(Sn(ou,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{vr(Xn),e(t)}))}function lu(){return!(!vr(Xn)||!Xn.supports.meetingRoom)}function uu(){return!(!vr(Xn)||!Xn.supports.messageChannels)}const du="v1";function fu(e){if(vr(Xn,xt.content),!pu())throw _t;Ns(Sn(du,"notifications.showNotification"),"notifications.showNotification",[e])}function pu(){return!(!vr(Xn)||!Xn.supports.notifications)}const gu="v2";function mu(e){if(!wu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());if(Rr(e))throw new Error(It.INVALID_ARGUMENTS.toString());za(Sn(gu,"otherApp.install"),"otherApp.install",e)}function hu(){if(!wu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());Ns(Sn(gu,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),$a("otherApp.install")}function vu(e){if(!wu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());return Rs("otherApp.notifyInstallCompleted",[e.toString()],Sn(gu,"otherApp.notifyInstallCompleted"))}function wu(){return!(!vr(Xn)||!Xn.supports.otherAppStateChange)}const Cu="v1";var yu,bu,Su;function Eu(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(vr(Xn,xt.sidePanel),!ku())throw _t;Ns(Sn(Cu,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Au(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(vr(Xn,xt.sidePanel),!ku())throw _t;Ns(Sn(Cu,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Iu(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(vr(Xn,xt.sidePanel),!ku())throw _t;Ns(Sn(Cu,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Tu(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(vr(Xn,xt.sidePanel),!ku())throw _t;Ns(Sn(Cu,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Pu(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!ku())throw _t;za(Sn(Cu,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Ou(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!ku())throw _t;za(Sn(Cu,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Ru(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!ku())throw _t;za(Sn(Cu,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Fu(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!ku())throw _t;za(Sn(Cu,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function ku(){return!(!vr(Xn)||!Xn.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"}(yu||(yu={})),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"}(bu||(bu={})),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"}(Su||(Su={}));const Mu="v1";function Nu(e,t,n,r){if(vr(Xn,xt.content),!xu())throw _t;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");Ns(Sn(Mu,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function xu(){return!(!vr(Xn)||!Xn.supports.appEntity)}const Uu="v1";function Du(e){return new Promise((t=>{if(vr(Xn),!Lu())throw _t;if(($n.hostClientType===Mt.android||$n.hostClientType===Mt.teamsRoomsAndroid||$n.hostClientType===Mt.teamsPhones||$n.hostClientType===Mt.teamsDisplays)&&!wr(Rn)){const e={errorCode:It.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Ss(Sn(Uu,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Lu(){return!(!vr(Xn)||!Xn.supports.teams)&&(!!Xn.supports.teams.fullTrust&&!!Xn.supports.teams.fullTrust.joinedTeams)}const Hu="v1";function Vu(e){return new Promise((t=>{if(vr(Xn),!_u())throw _t;t(Ss(Sn(Hu,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function _u(){return!(!vr(Xn)||!Xn.supports.teams)&&!!Xn.supports.teams.fullTrust}const Wu="v1";var Bu;function ju(e,t){if(vr(Xn,xt.content),!$u())throw _t;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Ns(Sn(Wu,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function zu(e,t){if(vr(Xn),!$u())throw _t;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Ns(Sn(Wu,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function $u(){return!(!vr(Xn)||!Xn.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Bu||(Bu={}));class qu{static setTimeout(e,t){const n=performance.now(),r=Gt();return qu.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete qu.setTimeoutCallbacks[e]}static setInterval(e,t){qu.setTimeout((function n(){e(),qu.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in qu.setTimeoutCallbacks){const r=qu.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){qu.setTimeoutCallbacks[e].callback(),delete qu.setTimeoutCallbacks[e]}}}qu.setTimeoutCallbacks={};class Gu{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){qu.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&&qu.clearTimeout(this.timeoutId),this.timeoutId=qu.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(Gu.maxSessionTimeoutInMs,2*t.timeoutInMs):Gu.initialSessionTimeoutInMs}}Gu.initialSessionTimeoutInMs=1e3,Gu.maxSessionTimeoutInMs=3e4;const Ju="v2";class Ku{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Gu(Ku.distributionBinSize,(e=>this.reportPerformanceEvent(Sn(Ju,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){qu.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Sn(Ju,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),Ku.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){qu.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(Sn(Ju,"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(Sn(Ju,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Ku.distributionBinSize=1e3,Ku.calculateFPSInterval=1e3;var Zu=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())}))},Qu=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 Xu="v2",Yu=an()?void 0:new Ku(Ns);var ed,td,nd;function rd(e){if(vr(Xn,xt.sidePanel),!cd())throw _t;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(za(Sn(Xu,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Yu?void 0:Yu.setFrameProcessTimeLimit(e.timeLimit)),!1),pd())ld(e.videoFrameHandler,e.config);else{if(!md())throw _t;dd(e.videoBufferHandler,e.config)}null==Yu||Yu.startMonitorSlowFrameProcessing()}function od(e,t){if(vr(Xn,xt.sidePanel),!cd())throw _t;Ns(Sn(Xu,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function id(e){if(vr(Xn,xt.sidePanel),!cd())throw _t;za(Sn(Xu,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Pd(e,Yu),!1),Ns(Sn(Xu,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function ad(e){Ns(Sn(Xu,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function sd(e){Ns(Sn(Xu,"videoEffects.notifyError"),"video.notifyError",[e])}function cd(){return vr(Xn)&&!!Xn.supports.video&&(!!Xn.supports.video.mediaStream||!!Xn.supports.video.sharedFrame)}function ld(e,t){if(vr(Xn,xt.sidePanel),!cd()||!pd())throw _t;za(Sn(Xu,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Zu(this,void 0,void 0,(function*(){const{streamId:n}=t,r=ud(e,Yu);yield wd(n,r,sd,Yu)}))),!1),Ns(Sn(Xu,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function ud(e,t){return n=>Zu(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 dd(e,t){if(vr(Xn,xt.sidePanel),!cd()||!md())throw _t;za(Sn(Xu,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Yu||Yu.reportStartFrameProcessing(t.width,t.height),e(fd(t),(()=>{null==Yu||Yu.reportFrameProcessed(),ad(n)}),sd)}}),!1),Ns(Sn(Xu,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function fd(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Qu(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function pd(){var e;return vr(Xn,xt.sidePanel)&&gd()&&!!(null===(e=Xn.supports.video)||void 0===e?void 0:e.mediaStream)}function gd(){var e,t,n,r;return!(!(null===(t=null===(e=on().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=on().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function md(){var e;return vr(Xn,xt.sidePanel)&&!!(null===(e=Xn.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(ed||(ed={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(td||(td={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(nd||(nd={}));var hd=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 vd="v2";function wd(e,t,n,r){var o,i;return hd(this,void 0,void 0,(function*(){const a=bd();!an()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Sd(yield yd(e,n,r),new Ed(n,t),a.writable)}))}function Cd(e,t,n,r){var o,i;return hd(this,void 0,void 0,(function*(){const a=bd();!an()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Sd(yield yd(e,n,r),new Td(n,t),a.writable)}))}function yd(e,t,n){return hd(this,void 0,void 0,(function*(){if(an())throw _t;const r=on().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 bd(){if(an())throw _t;const e=window.MediaStreamTrackGenerator;if(!e)throw _t;return new e({kind:"video"})}function Sd(e,t,n){new(0,on().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Ed{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>hd(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 Ad{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 Id{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 Td{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>hd(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=>hd(this,void 0,void 0,(function*(){if(an())throw _t;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 Ad(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 Id(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}}})),za(Sn(vd,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Pd(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Ns(Sn(vd,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in nd?e:nd.InitializationFailure;Ns(Sn(vd,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Od=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 Rd="v2",Fd=2e3,kd=an()?void 0:new Ku(Ns);var Md;function Nd(e){var t,n;if(!_d())throw _t;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(vr(Xn,xt.sidePanel)){if(za(Sn(Rd,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==kd?void 0:kd.setFrameProcessTimeLimit(e)),!1),null===(t=Xn.supports.video)||void 0===t?void 0:t.mediaStream)za(Sn(Rd,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Od(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=kd?Ud(e.videoFrameHandler,kd):e.videoFrameHandler;r?yield Cd(n,o,Bd,kd):yield wd(n,o,Bd,kd)}))),!1),Ns(Sn(Rd,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=Xn.supports.video)||void 0===n?void 0:n.sharedFrame))throw _t;za(Sn(Rd,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==kd||kd.reportStartFrameProcessing(t.width,t.height);const n=xd(),r=t.timestamp;e.videoBufferHandler(Dd(t),(()=>{n(),null==kd||kd.reportFrameProcessed(),Wd(r)}),Bd)}}),!1),Ns(Sn(Rd,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==kd||kd.startMonitorSlowFrameProcessing()}}function xd(){const e=setTimeout((()=>{Bd(`Frame not processed in ${Fd}ms`,Md.Warn)}),Fd);return function(){clearTimeout(e)}}function Ud(e,t){return n=>Od(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=xd(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function Dd(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Ld(e,t,n){if(vr(Xn,xt.sidePanel),!_d())throw _t;Ns(Sn(Rd,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Hd(e){if(vr(Xn,xt.sidePanel),!_d())throw _t;za(Sn(Rd,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Pd(e,kd),!1),Ns(Sn(Rd,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Vd(e){if(vr(Xn,xt.sidePanel),!cd())throw _t;Ns(Sn(Rd,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function _d(){return vr(Xn),cd()}function Wd(e){Ns(Sn(Rd,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Bd(e,t=Md.Warn){Ns(Sn(Rd,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function jd(e){if(vr(Xn),!cd())throw _t;Bd(e,Md.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Md||(Md={}));const zd="v2";class $d extends hi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class qd{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Gd{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Jd extends hi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Kd{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Zd extends hi{validate(e){const t=new Jd;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Qd(e,t){if(vr(Xn),!nf())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(rf(e.threadId),t&&0===t.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Os("hostEntity.tab.addAndConfigure",[new Gd(e),t],new Jd,Sn(zd,"hostEntity.tab.addAndConfigure"))}function Xd(e){if(vr(Xn),!nf())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return rf(e.threadId),Os("hostEntity.tab.getAll",[new Gd(e)],new Zd,Sn(zd,"hostEntity.tab.getAll"))}function Yd(e,t){if(vr(Xn),!nf())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return of(e),rf(t.threadId),Os("hostEntity.tab.reconfigure",[new qd(e),new Gd(t)],new $d,Sn(zd,"hostEntity.tab.reconfigure"))}function ef(e,t){if(vr(Xn),!nf())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return of(e),rf(t.threadId),Os("hostEntity.tab.rename",[new qd(e),new Gd(t)],new $d,Sn(zd,"hostEntity.tab.rename"))}function tf(e,t){if(vr(Xn),!nf())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return rf(t.threadId),of(e),Os("hostEntity.tab.remove",[new Kd(e),new Gd(t)],new vi,Sn(zd,"hostEntity.tab.remove"))}function nf(){var e;return!!(vr(Xn)&&sf()&&(null===(e=Xn.supports.hostEntity)||void 0===e?void 0:e.tab))}function rf(e){if(!e||0==e.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function of(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var af;function sf(){return!(!vr(Xn)||!Xn.supports.hostEntity)}!function(e){e.edu="EDU"}(af||(af={}));var cf=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 lf="v2",uf="Invalid store dialog size",df="No App Id present, but AppId needed to open AppDetail store",ff="No Collection Id present, but CollectionId needed to open a store specific to a collection";function pf(e){return cf(this,void 0,void 0,(function*(){wf();const{size:t}=null!=e?e:{};return Rs("store.openFullStore",[Cf(t)],Sn(lf,"store.openFullStore"))}))}function gf(e){return cf(this,void 0,void 0,(function*(){wf();const{size:t,appId:n}=e;if(!(n instanceof Or))throw new Error(df);return Rs("store.openAppDetail",[Cf(t),n],Sn(lf,"store.openAppDetail"))}))}function mf(e){return cf(this,void 0,void 0,(function*(){wf();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Rs("store.openInContextStore",[Cf(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Sn(lf,"store.openInContextStore"))}))}function hf(e){return cf(this,void 0,void 0,(function*(){wf();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(ff);return Rs("store.openSpecificStore",[Cf(t),n],Sn(lf,"store.openSpecificStore"))}))}function vf(){return vr(Xn)&&!!Xn.supports.store}function wf(){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!vf())throw _t}function Cf(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(uf);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(uf);return JSON.stringify(e)}var yf=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 bf="v1",Sf="v2";let Ef;function Af(e){Ef=e}function If(e){const t=void 0!==e,n=t?e:Ef;if(!n)throw new Error("No parameters are provided for authentication");vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage);return Tf(n.successCallback||n.failureCallback?Sn(bf,"authentication.authenticate"):Sn(Sf,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Ef=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Ef=void 0)}}))}function Tf(e,t){return yf(this,void 0,void 0,(function*(){const n=ln(t.url);return cn(n),Ts(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function Pf(e){hr();return Of(e&&(e.successCallback||e.failureCallback)?Sn(bf,"authentication.getAuthToken"):Sn(Sf,"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 Of(e,t){return new Promise((n=>{n(Ts(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 Rf(e){hr();return Ff(e&&(e.successCallback||e.failureCallback)?Sn(bf,"authentication.getUser"):Sn(Sf,"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 Ff(e){return new Promise((t=>{t(Ts(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function kf(e,t){vr(Xn,xt.authentication);Ns(Sn(t?bf:Sf,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),sc(ws.parentWindow,(()=>setTimeout((()=>ws.currentWindow.close()),200)))}function Mf(e,t){vr(Xn,xt.authentication);Ns(Sn(t?bf:Sf,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),sc(ws.parentWindow,(()=>setTimeout((()=>ws.currentWindow.close()),200)))}var Nf;function xf(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"}(Nf||(Nf={}));class Uf{constructor(e){this.val=e,xf(e)}toString(){return this.val}}const Df="/l/app/",Lf="/l/meeting/new",Hf="attendees",Vf="startTime",_f="endTime",Wf="subject",Bf="content",jf="/l/call/0/0",zf="source",$f="withVideo",qf="/l/chat/0/0",Gf="users",Jf="topicName",Kf="message";function Zf(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Gf}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Jf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Kf}=${encodeURIComponent(n)}`;return`${Vn}://${_n}${qf}?${r}${o}${i}`}function Qf(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Gf}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${$f}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${zf}=${encodeURIComponent(n)}`;return`${Vn}://${_n}${jf}?${r}${o}${i}`}function Xf(e,t,n,r,o){const i=void 0===e?"":`${Hf}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Vf}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${_f}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Wf}=${encodeURIComponent(r)}`,l=void 0===o?"":`&${Bf}=${encodeURIComponent(o)}`;return`${Vn}://${_n}${Lf}?${i}${a}${s}${c}${l}`}function Yf(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${Vn}://${_n}${Df}${encodeURIComponent(e)}`}const ep="v1";function tp(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!np())throw new Error("Not supported");const n=Sn(ep,"appInstallDialog.openAppInstallDialog");Xn.isLegacyTeams?t(Es(n,"executeDeepLink",Yf(e.appId))):(Ns(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function np(){return!(!vr(Xn)||!Xn.supports.appInstallDialog)}const rp="v1",op=bn("media");var ip,ap,sp,cp,lp,up,dp;!function(e){e.Base64="base64",e.ID="id"}(ip||(ip={}));class fp{}function pp(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(vr(Xn,xt.content,xt.task),$n.isFramelessWindow)if(wr(Mn))Ns(Sn(rp,"media.captureImage"),"captureImage",e);else{e({errorCode:It.OLD_PLATFORM},[])}else{e({errorCode:It.NOT_SUPPORTED_ON_PLATFORM},[])}}function gp(){if(vr(Xn,xt.content,xt.task),!hp())throw _t;const e=Tt.Media;return new Promise((t=>{t(Is(Sn(rp,"media.hasPermission"),"permissions.has",e))}))}function mp(){if(vr(Xn,xt.content,xt.task),!hp())throw _t;const e=Tt.Media;return new Promise((t=>{t(Is(Sn(rp,"media.requestPermission"),"permissions.request",e))}))}function hp(){return!(!vr(Xn)||!Xn.supports.permissions)}class vp extends fp{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(vr(Xn,xt.content,xt.task),wr(Nn))if(kp(this.mimeType,this.format,this.content))wr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:It.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:It.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Ns(Sn(rp,"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=Ep(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Ap(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):op(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:It.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Gt(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Rr(e)&&Ns(Sn(rp,"media.getMedia"),"getMedia",r),za(Sn(rp,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),$a("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Ep(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),$a("getMedia"+t)}else{const e=Ap(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:It.INTERNAL_ERROR,message:"data received is null"},new Blob),$a("getMedia"+t)}}))}}class wp{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){vr(Xn,xt.content,xt.task);try{yr(Pn)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Ns(Sn(rp,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(ap.StopRecording,e)}}class Cp extends wp{getMediaType(){return lp.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case ap.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function yp(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Nn)){const e={errorCode:It.OLD_PLATFORM};return void t(e,[])}try{Ip(e)}catch(e){return void t(e,[])}if(!Pp(e)){const e={errorCode:It.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Ns(Sn(rp,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Tp(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 vp(e));t(n,s)}))}function bp(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Nn)){return void t({errorCode:It.OLD_PLATFORM})}if(!Mp(e)){return void t({errorCode:It.INVALID_ARGUMENTS})}const n=[e];Ns(Sn(rp,"media.viewImages"),"viewImages",n,t)}function Sp(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(vr(Xn,xt.content,xt.task),$n.hostClientType!==Mt.desktop&&$n.hostClientType!==Mt.web&&$n.hostClientType!==Mt.rigel&&$n.hostClientType!==Mt.teamsRoomsWindows&&$n.hostClientType!==Mt.teamsRoomsAndroid&&$n.hostClientType!==Mt.teamsPhones&&$n.hostClientType!==Mt.teamsDisplays)if(wr(xn))if(Np(t))Ns(Sn(rp,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:It.INVALID_ARGUMENTS},"")}else{e({errorCode:It.OLD_PLATFORM},"")}else{e({errorCode:It.NOT_SUPPORTED_ON_PLATFORM},"")}}function Ep(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 Ap(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 Ip(e){Rp(e)?yr(Tn):Fp(e)?yr(Pn):Op(e)&&yr(On)}function Tp(e){return!(e.mediaType!=lp.Video||!e.videoProps||!e.videoProps.videoController)}function Pp(e){return!(null==e||e.maxMediaCount>10)}function Op(e){var t;return!((null==e?void 0:e.mediaType)!=lp.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Rp(e){return!(!e||e.mediaType!=lp.VideoAndImage&&!e.videoAndImageProps)}function Fp(e){return!(!e||e.mediaType!=lp.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function kp(e,t,n){return null!=e&&null!=t&&t==ip.ID&&null!=n}function Mp(e){return!(null==e||e.length<=0||e.length>10)}function Np(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function xp(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"}(ap||(ap={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(sp||(sp={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(cp||(cp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(lp||(lp={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(up||(up={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(dp||(dp={}));const Up="v2";function Dp(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.task),!Vp())throw _t;if(!Np(e))throw{errorCode:It.INVALID_ARGUMENTS};t(Is(Sn(Up,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Lp(){if(vr(Xn,xt.content,xt.task),!Vp())throw _t;const e=Tt.Media;return new Promise((t=>{t(Is(Sn(Up,"barCode.hasPermission"),"permissions.has",e))}))}function Hp(){if(vr(Xn,xt.content,xt.task),!Vp())throw _t;const e=Tt.Media;return new Promise((t=>{t(Is(Sn(Up,"barCode.requestPermission"),"permissions.request",e))}))}function Vp(){return!!(vr(Xn)&&Xn.supports.barCode&&Xn.supports.permissions)}const _p="v2";function Wp(e){return Bp(Sn(_p,"chat.openChat"),e)}function Bp(e,t){return new Promise((n=>{if(vr(Xn,xt.content,xt.task),!zp())throw _t;if(Xn.isLegacyTeams)n(Es(e,"executeDeepLink",Zf([t.user],void 0,t.message)));else{n(Es(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function jp(e){const t=Sn(_p,"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(Bp(t,r))}else{if(vr(Xn,xt.content,xt.task),!zp())throw _t;if(Xn.isLegacyTeams)n(Es(t,"executeDeepLink",Zf(e.users,e.topic,e.message)));else{n(Es(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function zp(){return!(!vr(Xn)||!Xn.supports.chat)}var $p=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 qp="v2";function Gp(e){return $p(this,void 0,void 0,(function*(){if(vr(Xn,xt.content,xt.meetingStage,xt.task,xt.settings,xt.stage,xt.sidePanel),!Kp())throw _t;if(!e.type||!Object.values(kt).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(kt)}`);const t=yield rn(e),n={mimeType:e.type,content:t};return Is(Sn(qp,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Jp(){return $p(this,void 0,void 0,(function*(){vr(Xn,xt.content,xt.meetingStage,xt.task,xt.settings,xt.stage,xt.sidePanel);const e=Sn(qp,"clipboard.read");if(!Kp())throw _t;const t=yield Is(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return nn(e.mimeType,e.content)}return t}))}function Kp(){return $n.isFramelessWindow?!(!vr(Xn)||!Xn.supports.clipboard):!!(vr(Xn)&&navigator&&navigator.clipboard&&Xn.supports.clipboard)}function Zp(){var e;return null!==(e=vr(Xn)&&(Xn.isNAAChannelRecommended||Qp()))&&void 0!==e&&e}function Qp(){return!!(vr(Xn)&&Xp()&&Xn.isLegacyTeams&&Xn.supports.nestedAppAuth)}function Xp(){return $n.hostClientType===Mt.android||$n.hostClientType===Mt.ios||$n.hostClientType===Mt.ipados||$n.hostClientType===Mt.visionOS}const Yp="v2";function eg(){if(vr(Xn,xt.content,xt.task),!ng())throw _t;return Is(Sn(Yp,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function tg(e){if(vr(Xn,xt.content,xt.task),!ng())throw _t;if(!e)throw{errorCode:It.INVALID_ARGUMENTS};return Is(Sn(Yp,"geoLocation.showLocation"),"location.showLocation",e)}function ng(){return!!(vr(Xn)&&Xn.supports.geoLocation&&Xn.supports.geoLocation.map&&Xn.supports.permissions)}const rg="v2";function og(){if(vr(Xn,xt.content,xt.task),!sg())throw _t;return Is(Sn(rg,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function ig(){if(vr(Xn,xt.content,xt.task),!sg())throw _t;const e=Tt.GeoLocation;return new Promise((t=>{t(Is(Sn(rg,"geoLocation.hasPermission"),"permissions.has",e))}))}function ag(){if(vr(Xn,xt.content,xt.task),!sg())throw _t;const e=Tt.GeoLocation;return new Promise((t=>{t(Is(Sn(rg,"geoLocation.requestPermission"),"permissions.request",e))}))}function sg(){return!!(vr(Xn)&&Xn.supports.geoLocation&&Xn.supports.permissions)}function cg(){return Xn.hostVersionsInfo?Xn.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const lg="v1";class ug{postMessage(e,t){vr(Xn),Ns(Sn(lg,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||$t())}addEventListener(e,t){vr(Xn),"message"===e&&za(Sn(lg,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class dg{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){vr(Xn,xt.task),Ns(Sn(lg,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||$t())}addEventListener(e,t){vr(Xn,xt.task),"message"===e&&za(Sn(lg,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const fg="v2";function pg(e){if(vr(Xn,xt.content),!gg())throw _t;if(!e||!tn(e))throw{errorCode:It.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Is(Sn(fg,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function gg(){return!(!vr(Xn)||!Xn.supports.secondaryBrowser)}const mg="v1";function hg(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Fn))throw{errorCode:It.OLD_PLATFORM};if(!e)throw{errorCode:It.INVALID_ARGUMENTS};if(!wg())throw _t;Ns(Sn(mg,"location.getLocation"),"location.getLocation",[e],t)}function vg(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Fn))throw{errorCode:It.OLD_PLATFORM};if(!e)throw{errorCode:It.INVALID_ARGUMENTS};if(!wg())throw _t;Ns(Sn(mg,"location.showLocation"),"location.showLocation",[e],t)}function wg(){return!(!vr(Xn)||!Xn.supports.location)}const Cg="v1";function yg(e){vr(Xn,xt.sidePanel),e.contentUrl&&new URL(e.contentUrl),Ns(Sn(Cg,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var bg=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 Sg="v1";var Eg,Ag,Ig,Tg,Pg,Og;function Rg(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ns(Sn(Sg,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Fg(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ns(Sn(Sg,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function kg(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage,xt.settings,xt.content),Ns(Sn(Sg,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Mg(){var e,t,n;return bg(this,void 0,void 0,(function*(){let r;vr(Xn,xt.sidePanel,xt.meetingStage,xt.settings,xt.content);try{const e=!0;r=yield Is(Sn("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)==Tg.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Tg.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Ng(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage,xt.task),Ns(Sn(Sg,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function xg(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");vr(Xn,xt.sidePanel),Ns(Sn(Sg,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Ug(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");vr(Xn,xt.sidePanel),Ns(Sn(Sg,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Dg(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");vr(Xn,xt.sidePanel),Ns(Sn(Sg,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Lg(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");vr(Xn,xt.sidePanel),za(Sn(Sg,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Hg(e,t,n={sharingProtocol:Pg.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ns(Sn(Sg,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Vg(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ns(Sn(Sg,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function _g(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ns(Sn(Sg,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Wg(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ns(Sn(Sg,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Bg(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),za(Sn(Sg,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function jg(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),za(Sn(Sg,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function zg(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),za(Sn(Sg,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function $g(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));vr(Xn);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Og.Other};return Is(Sn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function qg(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");vr(Xn,xt.sidePanel,xt.meetingStage),e.isAppHandlingAudio?Gg(e,t):Jg(e,t)}function Gg(e,t){Ns(Sn(Sg,"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");za(Sn(Sg,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>bg(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);Zg(n,n.isMicMuted===t.isMicMuted?Eg.HostInitiated:Eg.AppDeclinedToChange)}catch(e){Zg(t,Eg.AppFailedToChange)}}))));za(Sn(Sg,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function Jg(e,t){Ns(Sn(Sg,"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");qa("meeting.micStateChanged")&&$a("meeting.micStateChanged"),qa("meeting.audioDeviceSelectionChanged")&&$a("meeting.audioDeviceSelectionChanged"),t(n)}))}function Kg(e){Zg(e,Eg.AppInitiated)}function Zg(e,t){vr(Xn,xt.sidePanel,xt.meetingStage),Ns(Sn(Sg,"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"}(Eg||(Eg={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Ag||(Ag={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Ig||(Ig={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Tg||(Tg={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Pg||(Pg={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(Og||(Og={}));const Qg="v1",Xg="v2";function Yg(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Sn(Qg,"monetization.openPurchaseExperience")):(r=e,o=Sn(Xg,"monetization.openPurchaseExperience"));return vr(Xn,xt.content),Qt((()=>new Promise((e=>{if(!em())throw _t;e(Is(o,"monetization.openPurchaseExperience",r))}))),n)}function em(){return!(!vr(Xn)||!Xn.supports.monetization)}const tm="v2";function nm(e){return new Promise((t=>{if(vr(Xn,xt.content),!om())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(Es(Sn(tm,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function rm(e){return new Promise((t=>{if(vr(Xn,xt.content),!om())throw new Error("Not supported");const n=Sn(tm,"calendar.composeMeeting");Xn.isLegacyTeams?t(Es(n,"executeDeepLink",Xf(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(Es(n,"calendar.composeMeeting",e))}))}function om(){return!(!vr(Xn)||!Xn.supports.calendar)}const im="v2";function am(e){e&&0!==e.length&&e.forEach((e=>{xf(e)}))}function sm(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===mm.New&&(am(t.toRecipients),am(t.ccRecipients),am(t.bccRecipients))}function cm(e){if(vr(Xn,xt.content),!lm())throw new Error("Not supported");return sm(e),Rs("mail.handoff.composeMail",[new um(e)],Sn(im,"mail.handoff.composeMail"))}function lm(){return!!(vr(Xn)&&Xn.supports.mail&&Xn.supports.mail.handoff)}class um{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const dm="v2";function fm(e){return new Promise((t=>{if(vr(Xn,xt.content),!gm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(Es(Sn(dm,"mail.openMailItem"),"mail.openMailItem",e))}))}function pm(e){return new Promise((t=>{if(vr(Xn,xt.content),!gm())throw new Error("Not supported");t(Es(Sn(dm,"mail.composeMail"),"mail.composeMail",e))}))}function gm(){return!(!vr(Xn)||!Xn.supports.mail)}var mm;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(mm||(mm={}));const hm="v2";function vm(){if(!$n.printCapabilityEnabled){if(vr(Xn),!Em())throw _t;$n.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(wm(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function wm(){on().print()}function Cm(e){ym(Sn(hm,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Rr(e)&&!Em())throw _t}))}function ym(e,t,n){!Rr(t)&&vr(Xn),!Rr(t)&&n&&n(),Xa(e,t)}function bm(e){Sm(Sn(hm,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Rr(e)&&!Em())throw _t}))}function Sm(e,t,n){!Rr(t)&&vr(Xn),!Rr(t)&&n&&n(),ts(e,t)}function Em(){return!(!vr(Xn)||!Xn.supports.teamsCore)}const Am="v1",Im="v2";function Tm(e,t){let n,r;vr(Xn,xt.content,xt.task,xt.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Sn(Am,"people.selectPeople")):(r=e,o=Sn(Im,"people.selectPeople")),Kt(Pm,n,o,r)}function Pm(e,t){return new Promise((n=>{if(!wr(kn))throw{errorCode:It.OLD_PLATFORM};if(!xp(t))throw{errorCode:It.INVALID_ARGUMENTS};if(!Om())throw _t;n(Is(e,"people.selectPeople",t))}))}function Om(){return!(!vr(Xn)||!Xn.supports.people)}function Rm(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?Fm(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Fm(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 km="v2";function Mm(e){return vr(Xn,xt.content),new Promise((t=>{const[n,r]=Rm(e);if(!n)throw{errorCode:It.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(Is(Sn(km,"profile.showProfile"),"profile.showProfile",o))}))}function Nm(){return!(!vr(Xn)||!Xn.supports.profile)}const xm="v2",Um="search.queryChange",Dm="search.queryClose",Lm="search.queryExecute";function Hm(e,t,n){if(vr(Xn,xt.content),!_m())throw _t;za(Sn(xm,"search.registerOnClosedHandler"),Dm,e),za(Sn(xm,"search.registerOnExecutedHandler"),Lm,t),n&&za(Sn(xm,"search.registerOnChangeHandler"),Um,n)}function Vm(){if(vr(Xn,xt.content),!_m())throw _t;Ns(Sn(xm,"search.unregisterHandlers"),"search.unregister"),$a(Um),$a(Dm),$a(Lm)}function _m(){return!(!vr(Xn)||!Xn.supports.search)}function Wm(){return new Promise((e=>{if(vr(Xn,xt.content),!_m())throw new Error("Not supported");e(Es(Sn(xm,"search.closeSearch"),"search.closeSearch"))}))}var Bm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const jm="v2";function zm(){return Bm(this,void 0,void 0,(function*(){if(vr(Xn,xt.sidePanel,xt.meetingStage),!$m())throw _t;return yield Is(Sn(jm,"sharing.history.getContent"),"sharing.history.getContent")}))}function $m(){var e;return vr(Xn)&&void 0!==(null===(e=Xn.supports.sharing)||void 0===e?void 0:e.history)}const qm="v1",Gm="v2",Jm={shareWebContent:"sharing.shareWebContent"};function Km(e,t){try{Qm(e),Xm(e),Ym(e)}catch(e){return Zt((()=>Promise.reject(e)),t)}vr(Xn,xt.content,xt.sidePanel,xt.task,xt.stage,xt.meetingStage);return Zt(Zm,t,Sn(t?qm:Gm,"sharing.shareWebContent"),e)}function Zm(e,t){return new Promise((n=>{if(!eh())throw _t;n(Is(e,Jm.shareWebContent,t))}))}function Qm(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:It.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Xm(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Ym(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:It.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function eh(){return!(!vr(Xn)||!Xn.supports.sharing)}const th="v2";function nh(){return new Promise((e=>{if(vr(Xn,xt.content),!rh())throw _t;e(Is(Sn(th,"stageView.self.close"),"stageView.self.close"))}))}function rh(){var e;return vr(Xn)&&void 0!==(null===(e=Xn.supports.stageView)||void 0===e?void 0:e.self)}const oh="v2";var ih;function ah(e){return new Promise((t=>{if(vr(Xn,xt.content),!sh())throw _t;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Is(Sn(oh,"stageView.open"),"stageView.open",e))}))}function sh(){return!(!vr(Xn)||!Xn.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(ih||(ih={}));const ch=10;var lh=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 uh="v2";function dh(e){return lh(this,void 0,void 0,(function*(){vr(Xn,xt.content,xt.task),gh(),mh(e);const t=yield Is(Sn(uh,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return hh(e.maxVisualMediaCount,t),t}))}function fh(e){return lh(this,void 0,void 0,(function*(){vr(Xn,xt.content,xt.task),gh(),mh(e);const t=yield Is(Sn(uh,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return hh(e.maxVisualMediaCount,t),t}))}function ph(){return!!(vr(Xn)&&Xn.supports.visualMedia&&Xn.supports.visualMedia.image&&Xn.supports.permissions)}function gh(){if(!ph())throw _t}function mh(e){if(!e||e.maxVisualMediaCount>ch||e.maxVisualMediaCount<1)throw jt}function hh(e,t){if(t.length>e)throw zt}const vh="v2";var wh,Ch;function yh(){if(vr(Xn,xt.content,xt.task),!ph())throw _t;const e=Tt.Media;return Is(Sn(vh,"visualMedia.hasPermission"),"permissions.has",e)}function bh(){if(vr(Xn,xt.content,xt.task),!ph())throw _t;const e=Tt.Media;return Is(Sn(vh,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(wh||(wh={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Ch||(Ch={}));var Sh=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 Eh=null;function Ah(){return Sh(this,void 0,void 0,(function*(){return null===Eh&&(Eh=(yield no()).app.host.name),Eh}))}var Ih=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 Th(){return Ih(this,void 0,void 0,(function*(){if(vr(Xn),!Oh())throw _t;return!(!Xn.isLegacyTeams||$n.hostClientType!==Mt.android&&$n.hostClientType!==Mt.ios&&$n.hostClientType!==Mt.ipados&&$n.hostClientType!==Mt.visionOS||(yield Ph())!==Nt.teams)||(yield Ss(Sn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Ph(){return Ih(this,void 0,void 0,(function*(){return Ah()}))}function Oh(){return vr(Xn)&&void 0!==Xn.supports.webStorage}const Rh="v2";var Fh;function kh(e){const t=Sn(Rh,"call.startCall");return new Promise((n=>{var r;if(vr(Xn,xt.content,xt.task),!Mh())throw _t;if(!Xn.isLegacyTeams)return Ns(t,"call.startCall",[e],n);n(Ss(t,"executeDeepLink",Qf(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Fh.Video),e.source)).then((e=>{if(!e)throw new Error(zn);return e})))}))}function Mh(){return!(!vr(Xn)||!Xn.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Fh||(Fh={}));const Nh="v1";function xh(){Si(Sn(Nh,"appInitialization.notifyAppLoaded"))}function Uh(){Ns(Sn(Nh,"appInitialization.notifySuccess"),Jr.Success,[fr])}function Dh(e){Ai(Sn(Nh,"appInitialization.notifyFailure"),e)}function Lh(e){Ei(Sn(Nh,"appInitialization.notifyExpectedFailure"),e)}const Hh=bn("thirdPartyCloudStorage"),Vh="v2";class _h{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Wh=[],Bh=null,jh=!0,zh=null;function $h(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(vr(Xn,xt.content,xt.task),!Gh())throw _t;if(zh)throw zh=null,new Error("getDragAndDropFiles cannot be called twice");zh=t,jh=!0,Ns(Sn(Vh,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],qh)}else{t([],{errorCode:It.INVALID_ARGUMENTS})}}function qh(e){if(zh)if(e&&e.error)zh([],e.error),zh=null;else if(e&&e.fileChunk)try{jh||0!==e.fileChunk.chunkSequence||(Hh("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),jh=!0,zh([],{errorCode:It.INTERNAL_ERROR,message:"error occurred while receiving data"}),Wh=[],zh=null);const t=Ap(e.fileChunk,e.fileType);if(t?(Bh||(Bh=new _h(e.fileType,[])),Bh.assembleAttachment.push(t)):(Hh(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),zh?zh([],{errorCode:It.INTERNAL_ERROR,message:"error occurred while receiving data"}):zh=null,Wh=[],zh=null,jh=!0),jh=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Bh){const t=Ep(Bh.assembleAttachment,Bh.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Wh.push(n)}e.isLastFile&&zh&&(zh(Wh,e.error),Wh=[],zh=null,jh=!0),Bh=null}}catch(e){zh&&(zh([],{errorCode:It.INTERNAL_ERROR,message:e}),Wh=[],zh=null,jh=!0)}else zh([],{errorCode:It.INTERNAL_ERROR,message:"data received is null"}),Wh=[],zh=null,jh=!0}function Gh(){return!(!vr(Xn)||!Xn.supports.thirdPartyCloudStorage)}const Jh="v1";function Kh(e,t){bi(Sn(Jh,"initialize"),t).then((()=>{e&&e()}))}function Zh(){vm()}function Qh(){wm()}function Xh(e){hr(),Ns(Sn(Jh,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=$n.frameContext),e(t)}))}function Yh(e){Fi(Sn(Jh,"registerOnThemeChangeHandlerHelper"),e)}function ev(e){Ga(Sn(Jh,"registerFullScreenHandler"),"fullScreenChange",e,[])}function tv(e){Ga(Sn(Jh,"registerAppButtonClickHandler"),"appButtonClick",e,[xt.content])}function nv(e){Ga(Sn(Jh,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[xt.content])}function rv(e){Ga(Sn(Jh,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[xt.content])}function ov(e){Ji(Sn(Jh,"registerBackButtonHandler"),e)}function iv(e){ym(Sn(Jh,"registerOnLoadHandler"),e)}function av(e){Sm(Sn(Jh,"registerBeforeUnloadHandler"),e)}function sv(e){Ga(Sn(Jh,"registerFocusEnterHandler"),"focusEnter",e,[])}function cv(e){Ga(Sn(Jh,"registerChangeSettingsHandler"),"changeSettings",e,[xt.content])}function lv(e,t){vr(Xn),Ea(Sn(Jh,"getTabInstances"),t).then((t=>{e(t)}))}function uv(e,t){vr(Xn),Aa(Sn(Jh,"getMruTabInstances"),t).then((t=>{e(t)}))}function dv(e){Ia(Sn(Jh,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function fv(e,t){vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage);const n=null!=t?t:$t();ki(Sn(Jh,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function pv(e){Ta(Sn(Jh,"setFrameContext"),e)}function gv(e,t,n){bi(Sn(Jh,"initializeWithFrameContext"),n).then((()=>t&&t())),Ta(Sn(Jh,"setFrameContext"),e)}const mv="v1";function hv(e){Sa(Sn(mv,"navigation.returnFocus"),e)}function vv(e,t){vr(Xn);const n=null!=t?t:$t();ba(Sn(mv,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function wv(e,t){vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage);const n=null!=t?t:$t();Ca(Sn(mv,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Cv(e){vr(Xn);const t=null!=e?e:$t();ya(Sn(mv,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const yv="v1";function bv(e){Pa(Sn(yv,"settings.setValidityState"),e)}function Sv(e){vr(Xn,xt.content,xt.settings,xt.remove,xt.sidePanel),Oa(Sn(yv,"settings.getSettings")).then((t=>{e(t)}))}function Ev(e,t){vr(Xn,xt.content,xt.settings,xt.sidePanel);const n=null!=t?t:$t();Ra(Sn(yv,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Av(e){si(Sn(yv,"settings.registerOnSaveHandler"),e)}function Iv(e){li(Sn(yv,"settings.registerOnRemoveHandler"),e)}var Tv=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 Pv="v1";function Ov(e,t){const n=Sn(Pv,"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?(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),Ns(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Oo(n,Mv(e),r):Po(n,kv(e),r),new ug}function Rv(e){e=Nv(e);const{width:t,height:n}=e,r=Tv(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");To(Sn(Pv,"tasks.updateTask"),e)}function Fv(e,t){Ro(Sn(Pv,"tasks.submitTask"),e,t)}function kv(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:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Mv(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:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function Nv(e){return e.height=e.height?e.height:Lt.Small,e.width=e.width?e.width:Lt.Small,e}const xv="v2";var Uv,Dv;function Lv(){return!(!vr(Xn,xt.meetingStage,xt.sidePanel,xt.content)||!Xn.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Uv||(Uv={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Dv||(Dv={}));class Hv{getFluidTenantInfo(){return Vv(),new Promise((e=>{e(Is(Sn(xv,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Vv(),new Promise((t=>{t(Is(Sn(xv,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Vv(),new Promise((e=>{e(Is(Sn(xv,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Vv(),new Promise((t=>{t(Is(Sn(xv,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Vv(),new Promise((e=>{e(Is(Sn(xv,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Vv(),new Promise((t=>{t(Is(Sn(xv,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Vv(),new Promise((t=>{t(Is(Sn(xv,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Vv(),new Promise((t=>{t(Is(Sn(xv,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Vv(),new Hv}}function Vv(){if(!Lv())throw new Error("LiveShareHost Not supported")}var _v=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 Wv(e){try{return e.cartItems=Bv(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Bv(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Bv(e.accessories)),e}))}const jv=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=_v(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=jv(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function zv(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)qv(t),$v(t.accessories)}function $v(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");qv(t)}}}function qv(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");Jv(e.price),Kv(e.quantity)}function Gv(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===bt(e))throw new Error("id must be a valid UUID")}}function Jv(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 Kv(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Zv(e){if(!Object.values(ew).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Qv="v2",Xv={majorVersion:1,minorVersion:1};var Yv,ew;function tw(){if(vr(Xn,xt.content,xt.task),!iw())throw _t;return Is(Sn(Qv,"marketplace.getCart"),"marketplace.getCart",Xv).then(Wv)}function nw(e){if(vr(Xn,xt.content,xt.task),!iw())throw _t;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Gv(null==e?void 0:e.cartId),zv(null==e?void 0:e.cartItems),Is(Sn(Qv,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:jv(e.cartItems),cartVersion:Xv})).then(Wv)}function rw(e){if(vr(Xn,xt.content,xt.task),!iw())throw _t;if(!e)throw new Error("removeCartItemsParams must be provided");if(Gv(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 Is(Sn(Qv,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Xv})).then(Wv)}function ow(e){if(vr(Xn,xt.content,xt.task),!iw())throw _t;if(!e)throw new Error("updateCartStatusParams must be provided");return Gv(null==e?void 0:e.cartId),Zv(null==e?void 0:e.cartStatus),Is(Sn(Qv,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Xv})).then(Wv)}function iw(){return!(!vr(Xn)||!Xn.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(Yv||(Yv={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(ew||(ew={}))})(),r})()));
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map