@microsoft/teams-js 2.35.0 → 2.37.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/esm/packages/teams-js/dts/internal/childCommunication.d.ts +1 -1
- package/dist/esm/packages/teams-js/dts/internal/communication.d.ts +1 -1
- package/dist/esm/packages/teams-js/dts/internal/globalVars.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/internal/{appIdValidation.d.ts → idValidation.d.ts} +12 -1
- package/dist/esm/packages/teams-js/dts/internal/messageObjects.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/internal/nestedAppAuthUtils.d.ts +3 -1
- package/dist/esm/packages/teams-js/dts/internal/telemetry.d.ts +3 -0
- package/dist/esm/packages/teams-js/dts/private/copilot/eligibility.d.ts +6 -4
- package/dist/esm/packages/teams-js/dts/private/externalAppCardActionsForDA.d.ts +75 -0
- package/dist/esm/packages/teams-js/dts/private/externalAppErrorHandling.d.ts +19 -0
- package/dist/esm/packages/teams-js/dts/private/index.d.ts +2 -0
- package/dist/esm/packages/teams-js/dts/private/nestedAppAuth/nestedAppAuthBridge.d.ts +32 -0
- package/dist/esm/packages/teams-js/dts/public/appId.d.ts +6 -11
- package/dist/esm/packages/teams-js/dts/public/featureFlags.d.ts +44 -0
- package/dist/esm/packages/teams-js/dts/public/index.d.ts +2 -0
- package/dist/esm/packages/teams-js/dts/public/nestedAppAuth.d.ts +55 -5
- package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +3 -0
- package/dist/esm/packages/teams-js/dts/public/uuidObject.d.ts +15 -1
- package/dist/esm/packages/teams-js/dts/public/validatedSafeString.d.ts +25 -0
- package/dist/esm/packages/teams-js/src/index.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/childCommunication.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/dialogHelpers.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/globalVars.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/idValidation.js +1 -0
- package/dist/esm/packages/teams-js/src/internal/nestedAppAuthUtils.js +1 -1
- package/dist/esm/packages/teams-js/src/private/constants.js +1 -0
- package/dist/esm/packages/teams-js/src/private/copilot/eligibility.js +1 -1
- package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
- package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForDA.js +1 -0
- package/dist/esm/packages/teams-js/src/private/externalAppErrorHandling.js +1 -0
- package/dist/esm/packages/teams-js/src/private/nestedAppAuth/nestedAppAuthBridge.js +1 -0
- package/dist/esm/packages/teams-js/src/public/appId.js +1 -1
- package/dist/esm/packages/teams-js/src/public/featureFlags.js +1 -0
- package/dist/esm/packages/teams-js/src/public/nestedAppAuth.js +1 -1
- package/dist/esm/packages/teams-js/src/public/runtime.js +1 -1
- package/dist/esm/packages/teams-js/src/public/uuidObject.js +1 -1
- package/dist/esm/packages/teams-js/src/public/validatedSafeString.js +1 -0
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/umd/MicrosoftTeams.js +789 -56
- package/dist/umd/MicrosoftTeams.js.map +1 -1
- package/dist/umd/MicrosoftTeams.min.js +1 -1
- package/dist/umd/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -53
- package/dist/esm/packages/teams-js/src/internal/appIdValidation.js +0 -1
@@ -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:()=>Pe,AppId:()=>Ur,ChannelType:()=>cn,ChildAppWindow:()=>vg,DialogDimension:()=>sn,EduType:()=>xe,EmailAddress:()=>Wf,ErrorCode:()=>Re,FileOpenPreference:()=>Te,FrameContexts:()=>rn,HostClientType:()=>tn,HostName:()=>nn,LiveShareHost:()=>$v,NotificationTypes:()=>Tc,ParentAppWindow:()=>wg,SecondaryM365ContentIdName:()=>Oe,TaskModuleDimension:()=>sn,TeamType:()=>on,UUID:()=>Vn,UserSettingTypes:()=>Oc,UserTeamRole:()=>an,ViewerActionTypes:()=>Pc,app:()=>i,appEntity:()=>D,appInitialization:()=>be,appInstallDialog:()=>G,authentication:()=>q,barCode:()=>K,calendar:()=>ae,call:()=>ye,chat:()=>Q,clipboard:()=>Z,conversations:()=>S,copilot:()=>I,dialog:()=>f,enablePrintCapability:()=>rv,executeDeepLink:()=>Cv,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>R,externalAppCommands:()=>F,files:()=>k,geoLocation:()=>ee,getAdaptiveCardSchemaVersion:()=>mg,getContext:()=>iv,getMruTabInstances:()=>vv,getTabInstances:()=>hv,hostEntity:()=>z,initialize:()=>nv,initializeWithFrameContext:()=>bv,liveShare:()=>Ie,location:()=>ne,logs:()=>b,mail:()=>ce,marketplace:()=>Ue,media:()=>J,meeting:()=>oe,meetingRoom:()=>M,menus:()=>p,messageChannels:()=>N,monetization:()=>ie,navigateBack:()=>Tv,navigateCrossDomain:()=>Iv,navigateToTab:()=>Av,nestedAppAuth:()=>X,notifications:()=>x,openFilePreview:()=>Lc,otherAppStateChange:()=>L,pages:()=>y,people:()=>ue,print:()=>ov,profile:()=>de,registerAppButtonClickHandler:()=>cv,registerAppButtonHoverEnterHandler:()=>lv,registerAppButtonHoverLeaveHandler:()=>uv,registerBackButtonHandler:()=>dv,registerBeforeUnloadHandler:()=>pv,registerChangeSettingsHandler:()=>mv,registerCustomHandler:()=>Nc,registerFocusEnterHandler:()=>gv,registerFullScreenHandler:()=>sv,registerOnLoadHandler:()=>fv,registerOnThemeChangeHandler:()=>av,registerUserSettingsChangeHandler:()=>xc,remoteCamera:()=>U,returnFocus:()=>Ev,search:()=>fe,secondaryBrowser:()=>te,sendCustomEvent:()=>Mc,sendCustomMessage:()=>kc,setFrameContext:()=>yv,settings:()=>Ee,shareDeepLink:()=>wv,sharing:()=>ge,stageView:()=>he,store:()=>$,tasks:()=>Ae,teams:()=>_,teamsCore:()=>le,thirdPartyCloudStorage:()=>Se,uploadCustomApp:()=>Fc,version:()=>fr,videoEffects:()=>B,videoEffectsEx:()=>W,visualMedia:()=>we,webStorage:()=>Ce});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>zr,getTelemetryPort:()=>Wr,isSupported:()=>jr});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Zr,getDataLayerPort:()=>Kr,isSupported:()=>Qr});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Xr,registerOnResumeHandler:()=>Yr});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>oo,FailedReason:()=>ro,Messages:()=>no,_initialize:()=>co,_uninitialize:()=>lo,getContext:()=>uo,getFrameContext:()=>ao,initialize:()=>so,isInitialized:()=>io,lifecycle:()=>o,notifyAppLoaded:()=>fo,notifyExpectedFailure:()=>mo,notifyFailure:()=>go,notifySuccess:()=>po,openLink:()=>wo,registerHostToAppPerformanceMetricsHandler:()=>vo,registerOnThemeChangeHandler:()=>ho});var a={};n.r(a),n.d(a,{isSupported:()=>bo,resize:()=>yo});var s={};n.r(s),n.d(s,{isSupported:()=>Eo,open:()=>So});var c={};n.r(c),n.d(c,{isSupported:()=>Po,registerOnMessageFromParent:()=>To,sendMessageToDialog:()=>Io,sendMessageToParentFromDialog:()=>Ao});var l={};n.r(l),n.d(l,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Mo,getDialogInfoFromUrlDialogInfo:()=>ko,isSupported:()=>Fo,open:()=>Oo,parentCommunication:()=>c,submit:()=>Ro});var u={};n.r(u),n.d(u,{isSupported:()=>jo,open:()=>Wo});var d={};n.r(d),n.d(d,{bot:()=>u,isSupported:()=>$o,open:()=>zo});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>qo,isSupported:()=>Go,update:()=>a,url:()=>l});var p={};n.r(p),n.d(p,{DisplayMode:()=>Ko,MenuItem:()=>Zo,MenuListType:()=>Qo,initialize:()=>ri,isSupported:()=>ui,setNavBarMenu:()=>ai,setUpViews:()=>oi,showActionMenu:()=>ci});var g={};n.r(g),n.d(g,{initialize:()=>di,isSupported:()=>Ei,registerChangeConfigHandler:()=>Ci,registerOnRemoveHandler:()=>hi,registerOnRemoveHandlerHelper:()=>vi,registerOnSaveHandler:()=>gi,registerOnSaveHandlerHelper:()=>mi,setConfig:()=>pi,setValidityState:()=>fi});var m={};n.r(m),n.d(m,{isSupported:()=>Xi,onClick:()=>Ki,onHoverEnter:()=>Qi,onHoverLeave:()=>Zi});var h={};n.r(h),n.d(h,{_initialize:()=>Yi,isSupported:()=>ra,navigateBack:()=>ea,registerBackButtonHandler:()=>ta,registerBackButtonHandlerHelper:()=>na});var v={};n.r(v),n.d(v,{isSupported:()=>aa,navigateTo:()=>oa,navigateToDefaultPage:()=>ia});var w={};n.r(w),n.d(w,{enterFullscreen:()=>sa,exitFullscreen:()=>ca,isSupported:()=>la});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>fa,getTabInstances:()=>da,isSupported:()=>pa,navigateToTab:()=>ua});var y={};n.r(y),n.d(y,{EnterFocusType:()=>ga,ReturnFocusType:()=>ma,appButton:()=>m,backStack:()=>h,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>ya,initializeWithFrameContext:()=>Ca,isSupported:()=>Ia,navigateCrossDomain:()=>ba,navigateToApp:()=>Sa,registerFocusEnterHandler:()=>va,registerFullScreenHandler:()=>Aa,returnFocus:()=>ha,setCurrentFrame:()=>wa,shareDeepLink:()=>Ea,tabs:()=>C});var b={};n.r(b),n.d(b,{isSupported:()=>Ic,registerGetLogHandler:()=>Ac});var S={};n.r(S),n.d(S,{closeConversation:()=>Hc,getChatMembers:()=>Vc,isSupported:()=>_c,openConversation:()=>Dc});var E={};n.r(E),n.d(E,{isSupported:()=>zc,sendCustomTelemetryData:()=>$c});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>Qc,isSupported:()=>Kc});var I={};n.r(I),n.d(I,{customTelemetry:()=>E,eligibility:()=>A});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>tl,ActionExecuteResponseHandler:()=>il,InvokeErrorCode:()=>ol,InvokeResponseType:()=>rl,OriginalRequestType:()=>nl,SerializableActionExecuteInvokeRequest:()=>Yc,authenticateAndResendRequest:()=>ul,authenticateWithOauth2:()=>pl,authenticateWithPowerPlatformConnectorPlugins:()=>gl,authenticateWithSSO:()=>dl,authenticateWithSSOAndResendRequest:()=>fl,isActionExecuteResponse:()=>el,isInvokeError:()=>al,isSupported:()=>ml,validateActionExecuteInvokeRequest:()=>cl});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>yl,authenticateWithOauth:()=>Cl,authenticateWithSSO:()=>wl,authenticateWithSSOAndResendRequest:()=>bl,isSupported:()=>Sl,validateInput:()=>El});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>Tl,ActionOpenUrlType:()=>Il,isSupported:()=>Rl,processActionOpenUrl:()=>Ol,processActionSubmit:()=>Pl});var R={};n.r(R),n.d(R,{isSupported:()=>xl,processActionOpenUrl:()=>Ml,processActionSubmit:()=>Nl});var F={};n.r(F),n.d(F,{isSupported:()=>Hl,processActionCommand:()=>Dl});var k={};n.r(k),n.d(k,{CloudStorageProvider:()=>_l,CloudStorageProviderFileAction:()=>$l,CloudStorageProviderType:()=>Bl,DocumentLibraryAccessType:()=>jl,FileDownloadStatus:()=>zl,SpecialDocumentLibraryType:()=>Wl,addCloudStorageFolder:()=>Gl,addCloudStorageProvider:()=>tu,addCloudStorageProviderFile:()=>ru,copyMoveFiles:()=>Xl,deleteCloudStorageFolder:()=>Jl,deleteCloudStorageProviderFile:()=>iu,downloadCloudStorageProviderFile:()=>au,getCloudStorageFolderContents:()=>Kl,getCloudStorageFolders:()=>ql,getExternalProviders:()=>Zl,getFileDownloads:()=>Yl,openCloudStorageFile:()=>Ql,openDownloadFolder:()=>eu,registerCloudStorageProviderContentChangeHandler:()=>lu,registerCloudStorageProviderListChangeHandler:()=>cu,removeCloudStorageProvider:()=>nu,renameCloudStorageProviderFile:()=>ou,uploadCloudStorageProviderFile:()=>su});var M={};n.r(M),n.d(M,{getPairedMeetingRoomInfo:()=>fu,isSupported:()=>hu,registerMeetingRoomCapabilitiesUpdateHandler:()=>gu,registerMeetingRoomStatesUpdateHandler:()=>mu,sendCommandToPairedMeetingRoom:()=>pu});var N={};n.r(N),n.d(N,{dataLayer:()=>t,isSupported:()=>vu,telemetry:()=>e});var x={};n.r(x),n.d(x,{isSupported:()=>yu,showNotification:()=>Cu});var L={};n.r(L),n.d(L,{isSupported:()=>Iu,notifyInstallCompleted:()=>Au,registerAppInstallationHandler:()=>Su,unregisterAppInstallationHandler:()=>Eu});var U={};n.r(U),n.d(U,{ControlCommand:()=>Pu,ErrorReason:()=>Ou,SessionTerminatedReason:()=>Ru,getCapableParticipants:()=>Fu,isSupported:()=>Hu,registerOnCapableParticipantsChangeHandler:()=>xu,registerOnDeviceStateChangeHandler:()=>Uu,registerOnErrorHandler:()=>Lu,registerOnSessionStatusChangeHandler:()=>Du,requestControl:()=>ku,sendControlCommand:()=>Mu,terminateSession:()=>Nu});var D={};n.r(D),n.d(D,{isSupported:()=>Bu,selectAppEntity:()=>_u});var H={};n.r(H),n.d(H,{getUserJoinedTeams:()=>ju,isSupported:()=>zu});var V={};n.r(V),n.d(V,{getConfigSetting:()=>qu,isSupported:()=>Gu,joinedTeams:()=>H});var _={};n.r(_),n.d(_,{ChannelType:()=>Ku,fullTrust:()=>V,getTeamChannels:()=>Qu,isSupported:()=>Xu,refreshSiteUrl:()=>Zu});var B={};n.r(B),n.d(B,{EffectChangeType:()=>cd,EffectFailureReason:()=>ld,VideoFrameFormat:()=>sd,isSupported:()=>md,notifySelectedVideoEffectChanged:()=>dd,registerForVideoEffect:()=>fd,registerForVideoFrame:()=>ud});var W={};n.r(W),n.d(W,{ErrorLevel:()=>Vd,frameProcessingTimeoutInMs:()=>Dd,isSupported:()=>Gd,notifyFatalError:()=>Qd,notifySelectedVideoEffectChanged:()=>zd,registerForVideoEffect:()=>$d,registerForVideoFrame:()=>_d,updatePersonalizedEffects:()=>qd});var j={};n.r(j),n.d(j,{addAndConfigure:()=>of,getAll:()=>af,isSupported:()=>uf,reconfigure:()=>sf,remove:()=>lf,rename:()=>cf});var z={};n.r(z),n.d(z,{AppTypes:()=>pf,isSupported:()=>gf,tab:()=>j});var $={};n.r($),n.d($,{isSupported:()=>Af,openAppDetail:()=>bf,openFullStore:()=>yf,openInContextStore:()=>Sf,openSpecificStore:()=>Ef});var q={};n.r(q),n.d(q,{DataResidency:()=>_f,authenticate:()=>Mf,getAuthToken:()=>xf,getUser:()=>Uf,notifyFailure:()=>Vf,notifySuccess:()=>Hf,registerAuthenticationHandlers:()=>kf});var G={};n.r(G),n.d(G,{isSupported:()=>lp,openAppInstallDialog:()=>cp});var J={};n.r(J),n.d(J,{CameraStartMode:()=>gp,File:()=>Cp,FileFormat:()=>fp,ImageOutputFormats:()=>wp,ImageUriType:()=>vp,Media:()=>Ap,MediaControllerEvent:()=>pp,MediaType:()=>hp,Source:()=>mp,VideoController:()=>Tp,captureImage:()=>yp,hasPermission:()=>bp,requestPermission:()=>Sp,scanBarCode:()=>Rp,selectMedia:()=>Pp,viewImages:()=>Op});var K={};n.r(K),n.d(K,{hasPermission:()=>zp,isSupported:()=>qp,requestPermission:()=>$p,scanBarCode:()=>jp});var Q={};n.r(Q),n.d(Q,{isSupported:()=>Zp,openChat:()=>Jp,openGroupChat:()=>Qp});var Z={};n.r(Z),n.d(Z,{isSupported:()=>ng,read:()=>tg,write:()=>eg});var X={};n.r(X),n.d(X,{isNAAChannelRecommended:()=>rg});var Y={};n.r(Y),n.d(Y,{chooseLocation:()=>sg,isSupported:()=>lg,showLocation:()=>cg});var ee={};n.r(ee),n.d(ee,{getCurrentLocation:()=>dg,hasPermission:()=>fg,isSupported:()=>gg,map:()=>Y,requestPermission:()=>pg});var te={};n.r(te),n.d(te,{isSupported:()=>bg,open:()=>yg});var ne={};n.r(ne),n.d(ne,{getLocation:()=>Eg,isSupported:()=>Ig,showLocation:()=>Ag});var re={};n.r(re),n.d(re,{setOptions:()=>Pg});var oe={};n.r(oe),n.d(oe,{CallType:()=>Ng,EventActionSource:()=>Lg,MeetingReactionType:()=>kg,MeetingType:()=>Mg,SharingProtocol:()=>xg,appShareButton:()=>re,getAppContentStageSharingCapabilities:()=>qg,getAppContentStageSharingState:()=>Jg,getAuthenticationTokenForAnonymousUser:()=>_g,getIncomingClientAudioState:()=>Ug,getLiveStreamState:()=>Bg,getMeetingDetails:()=>Hg,getMeetingDetailsVerbose:()=>Vg,joinMeeting:()=>Xg,registerLiveStreamChangedHandler:()=>zg,registerMeetingReactionReceivedHandler:()=>Zg,registerRaiseHandStateChangedHandler:()=>Qg,registerSpeakingStateChangeHandler:()=>Kg,requestAppAudioHandling:()=>Yg,requestStartLiveStreaming:()=>Wg,requestStopLiveStreaming:()=>jg,shareAppContentToStage:()=>$g,stopSharingAppContentToStage:()=>Gg,toggleIncomingClientAudio:()=>Dg,updateMicState:()=>nm});var ie={};n.r(ie),n.d(ie,{isSupported:()=>sm,openPurchaseExperience:()=>am});var ae={};n.r(ae),n.d(ae,{composeMeeting:()=>um,isSupported:()=>dm,openCalendarItem:()=>lm});var se={};n.r(se),n.d(se,{composeMailWithHandoff:()=>mm,isSupported:()=>hm});var ce={};n.r(ce),n.d(ce,{ComposeMailType:()=>Sm,composeMail:()=>ym,handoff:()=>se,isSupported:()=>bm,openMailItem:()=>Cm});var le={};n.r(le),n.d(le,{enablePrintCapability:()=>Am,isSupported:()=>Fm,print:()=>Im,registerBeforeUnloadHandler:()=>Om,registerBeforeUnloadHandlerHelper:()=>Rm,registerOnLoadHandler:()=>Tm,registerOnLoadHandlerHelper:()=>Pm});var ue={};n.r(ue),n.d(ue,{isSupported:()=>Lm,selectPeople:()=>Nm});var de={};n.r(de),n.d(de,{isSupported:()=>_m,showProfile:()=>Vm});var fe={};n.r(fe),n.d(fe,{closeSearch:()=>Jm,isSupported:()=>Gm,registerHandlers:()=>$m,unregisterHandlers:()=>qm});var pe={};n.r(pe),n.d(pe,{getContent:()=>Zm,isSupported:()=>Xm});var ge={};n.r(ge),n.d(ge,{SharingAPIMessages:()=>th,history:()=>pe,isSupported:()=>sh,shareWebContent:()=>nh});var me={};n.r(me),n.d(me,{close:()=>lh,isSupported:()=>uh});var he={};n.r(he),n.d(he,{StageViewOpenMode:()=>fh,isSupported:()=>gh,open:()=>ph,self:()=>me});var ve={};n.r(ve),n.d(ve,{captureImages:()=>wh,isSupported:()=>yh,retrieveImages:()=>Ch});var we={};n.r(we),n.d(we,{CameraRestriction:()=>Ih,Source:()=>Th,hasPermission:()=>Ph,image:()=>ve,requestPermission:()=>Oh});var Ce={};n.r(Ce),n.d(Ce,{isSupported:()=>Lh,isWebStorageClearedOnUserLogOut:()=>Nh});var ye={};n.r(ye),n.d(ye,{CallModalities:()=>Dh,isSupported:()=>Vh,startCall:()=>Hh});var be={};n.r(be),n.d(be,{ExpectedFailureReason:()=>oo,FailedReason:()=>ro,Messages:()=>no,notifyAppLoaded:()=>Bh,notifyExpectedFailure:()=>zh,notifyFailure:()=>jh,notifySuccess:()=>Wh});var Se={};n.r(Se),n.d(Se,{getDragAndDropFiles:()=>Xh,isSupported:()=>ev});var Ee={};n.r(Ee),n.d(Ee,{getSettings:()=>Rv,registerOnRemoveHandler:()=>Mv,registerOnSaveHandler:()=>kv,setSettings:()=>Fv,setValidityState:()=>Ov});var Ae={};n.r(Ae),n.d(Ae,{getDefaultSizeIfNotProvided:()=>_v,startTask:()=>Lv,submitTask:()=>Dv,updateTask:()=>Uv});var Ie={};n.r(Ie),n.d(Ie,{ContainerState:()=>jv,LiveShareHost:()=>$v,UserMeetingRole:()=>Wv,isSupported:()=>zv});var Te,Pe,Oe,Re,Fe,ke,Me,Ne,xe,Le,Ue={};function De(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(Ue),n.d(Ue,{CartStatus:()=>sw,Intent:()=>aw,addOrUpdateCartItems:()=>lw,cartVersion:()=>iw,getCart:()=>cw,isSupported:()=>fw,removeCartItems:()=>uw,updateCartStatus:()=>dw}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Te||(Te={})),function(e){e.M365Content="m365content"}(Pe||(Pe={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Oe||(Oe={})),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"}(Re||(Re={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Fe||(Fe={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(ke||(ke={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Me||(Me={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Ne||(Ne={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(xe||(xe={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Le||(Le={}));const He=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 Ve="2.0.1",_e="2.0.2",Be="2.0.3",We="2.0.4",je="2.0.1",ze="1.9.0",$e="2.0.0",qe="1.7.0",Ge="1.8.0",Je="1.9.0",Ke=n.t(He,2).validOrigins,Qe=1500,Ze=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),Xe=/^https:\/\//,Ye="https",et="teams.microsoft.com",tt="The library has not yet been initialized",nt="The runtime has not yet been initialized",rt="The runtime version is not supported",ot="The call was not properly started";class it{}it.initializeCalled=!1,it.initializeCompleted=!1,it.additionalValidOrigins=[],it.initializePromise=void 0,it.isFramelessWindow=!1,it.frameContext=void 0,it.hostClientType=void 0,it.printCapabilityEnabled=!1;var at=n(815),st=n(933);const ct=ut,lt=2147483647;function ut(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 ft(e)}return dt(e,t,n)}function dt(e,t,n){if("string"==typeof e)return ht(e,t);if(ArrayBuffer.isView(e))return Et(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(wt(e,ArrayBuffer)||e&&wt(e.buffer,ArrayBuffer))return At(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(wt(e,SharedArrayBuffer)||e&&wt(e.buffer,SharedArrayBuffer)))return At(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 ut.from(r,t,n);const o=$t(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ut.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 ft(e){return pt(e),gt(e<0?0:0|mt(e))}function pt(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 gt(e){if(e>lt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ut.prototype),t}function mt(e){if(e>=lt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+lt.toString(16)+" bytes");return 0|e}function ht(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ut.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|vt(e,t);let r=gt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function vt(e,t){if(ut.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||wt(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 Ct(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return yt(e).length;default:if(o)return r?-1:Ct(e).length;t=(""+t).toLowerCase(),o=!0}}function wt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Ct(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 yt(e){return st.toByteArray(St(e))}ut.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}}(),ut.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ut.from=function(e,t,n){return dt(e,t,n)},Object.setPrototypeOf(ut.prototype,Uint8Array.prototype),Object.setPrototypeOf(ut,Uint8Array),ut.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}},ut.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ut.prototype};const bt=/[^+/0-9A-Za-z-_]/g;function St(e){if((e=(e=e.split("=")[0]).trim().replace(bt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Et(e){if(wt(e,Uint8Array)){const t=new Uint8Array(e);return At(t.buffer,t.byteOffset,t.byteLength)}return It(e)}function At(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,ut.prototype),r}function It(e){const t=e.length<0?0:0|mt(e.length),n=gt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Tt(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 Rt(r)}function Pt(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 Ft(this,t,n);case"utf8":case"utf-8":return Tt(this,t,n);case"ascii":return kt(this,t,n);case"latin1":case"binary":return Mt(this,t,n);case"base64":return Nt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ut.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Tt(this,0,e):Pt.apply(this,arguments)};const Ot=4096;function Rt(e){const t=e.length;if(t<=Ot)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ot));return n}function Ft(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+=zt[e[r]];return o}function kt(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 Mt(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 Nt(e,t,n){return 0===t&&n===e.length?st.fromByteArray(e):st.fromByteArray(e.slice(t,n))}function xt(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function Lt(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(jt(r))return a;e[n+a]=r}return a}function Ut(e,t,n,r){return Wt(Ct(t,e.length-n),e,n,r)}function Dt(e,t,n,r){return Wt(_t(t),e,n,r)}function Ht(e,t,n,r){return Wt(yt(t),e,n,r)}function Vt(e,t,n,r){return Wt(Bt(t,e.length-n),e,n,r)}function _t(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Bt(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 Wt(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 jt(e){return e!=e}ut.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return Lt(this,e,t,n);case"utf8":case"utf-8":return Ut(this,e,t,n);case"ascii":case"latin1":case"binary":return Dt(this,e,t,n);case"base64":return Ht(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const zt=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 $t(e){if(ut.isBuffer(e)){const t=0|mt(e.length),n=gt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||jt(e.length)?gt(0):It(e):"Buffer"===e.type&&Array.isArray(e.data)?It(e.data):void 0}const qt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Gt;const Jt=new Uint8Array(16);function Kt(){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(Jt)}const Qt=[];for(let e=0;e<256;++e)Qt.push((e+256).toString(16).slice(1));function Zt(e,t=0){return Qt[e[t+0]]+Qt[e[t+1]]+Qt[e[t+2]]+Qt[e[t+3]]+"-"+Qt[e[t+4]]+Qt[e[t+5]]+"-"+Qt[e[t+6]]+Qt[e[t+7]]+"-"+Qt[e[t+8]]+Qt[e[t+9]]+"-"+Qt[e[t+10]]+Qt[e[t+11]]+Qt[e[t+12]]+Qt[e[t+13]]+Qt[e[t+14]]+Qt[e[t+15]]}const Xt=function(e,t,n){if(qt.randomUUID&&!t&&!e)return qt.randomUUID();const r=(e=e||{}).random||(e.rng||Kt)();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 Zt(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 en=function(e){return"string"==typeof e&&Yt.test(e)};var tn,nn,rn,on,an,sn,cn;!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"}(tn||(tn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(nn||(nn={})),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"}(rn||(rn={})),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"}(on||(on={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(an||(an={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(sn||(sn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(cn||(cn={}));const ln={errorCode:Re.NOT_SUPPORTED_ON_PLATFORM},un={majorVersion:1,minorVersion:5},dn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},fn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),pn=new Error("Invalid response: Received more images than the specified max limit in the response.");function gn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function mn(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 hn(){return Xt()}function vn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&vn(e[t])})),Object.freeze(e)}function wn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Cn(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function yn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function bn(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 Sn(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!(mn(`${e.majorVersion}.${e.minorVersion}`,`${un.majorVersion}.${un.minorVersion}`)>=0)}function An(e){return"https:"===e.protocol}function In(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=ct.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Tn(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 Pn(){if(On())throw new Error("window object undefined at SSR check");return window}function On(){return"undefined"==typeof window}function Rn(e,t){if(Mn(e)||!Nn(e)||!xn(e))throw t||new Error("id is not valid.")}function Fn(e,t){const n=e.toString().toLocaleLowerCase();if(Mn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!An(e))throw t||new Error("Url should be a valid https url")}function kn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Mn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Nn(e){return e.length<256&&e.length>4}function xn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Ln(e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}const Un=!!performance&&"now"in performance;function Dn(){return Un?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=hn()){this.uuid=e,Ln(e)}toString(){return this.uuid}}const _n=new Vn,Bn=at.debug.formatArgs;at.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${_n.toString()}]`,Bn.call(this,e)};const Wn=(0,at.debug)("teamsJs");function jn(e){return Wn.extend(e)}function zn(e,t){return`${e}_${t}`}function $n(e){return/^v\d+_[\w.]+$/.test(e)}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=jn("runtime"),Jn=4;function Kn(e){return e.apiVersion===Jn}const Qn={apiVersion:-1,supports:{}};function Zn(e){if(Kn(e))return!0;throw-1===e.apiVersion?new Error(nt):new Error(rt)}let Xn=Qn;const Yn={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:dn,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=[tn.desktop,tn.web,tn.rigel,tn.surfaceHub,tn.teamsRoomsWindows,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays],tr=[tn.android,tn.ios,tn.ipados,tn.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:[tn.desktop,tn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[tn.android,tn.desktop,tn.ios,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays,tn.web]},{capability:{webStorage:{}},hostClientTypes:[tn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[tn.android,tn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[tn.android,tn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[tn.android,tn.ios,tn.ipados,tn.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=>{mn(e,t)>=0&&n[t].forEach((e=>{void 0!==it.hostClientType&&e.hostClientTypes.includes(it.hostClientType)&&(r=sr(r,e.capability))}))}));const o={apiVersion:Jn,hostVersionsInfo:dn,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=vn(t)}function dr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const fr="2.35.0";var pr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const gr=e=>{const{uuid:t}=e,n=pr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},mr=e=>{const{uuidAsString:t}=e,n=pr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Vn(t):void 0})},hr=e=>{const{uuidAsString:t}=e,n=pr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Vn(t):void 0})},vr=e=>{const{uuid:t}=e,n=pr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function wr(e){return void 0!==e.uuidAsString?`${e.uuidAsString} (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Cr=jn("flushMessageQueue");function yr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=gr(o);Cr("Flushing message %s from %s message queue via postMessage.",wr(n),r),e.postMessage(n,t)}}}const br=jn("internal"),Sr=br.extend("ensureInitializeCalled"),Er=br.extend("ensureInitialized");function Ar(){if(!it.initializeCalled)throw Sr(tt),new Error(tt)}function Ir(e,...t){if(!it.initializeCompleted)throw Er("%s. initializeCalled: %s",tt,it.initializeCalled.toString()),new Error(tt);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===it.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${it.frameContext}".`)}return Zn(e)}function Tr(e=Ve){const t=mn(it.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Pr(){return it.hostClientType==tn.android||it.hostClientType==tn.ios||it.hostClientType==tn.ipados||it.hostClientType==tn.visionOS}function Or(e=Ve){if(!Pr()){throw{errorCode:Re.NOT_SUPPORTED_ON_PLATFORM}}if(!Tr(e)){throw{errorCode:Re.OLD_PLATFORM}}}function Rr(e){let t=it.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&Xe.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),it.additionalValidOrigins=t}function Fr(e){if(Mn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Nr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${kr}-${Mr}).`);if(xr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const kr=4,Mr=256;function Nr(e){return e.length<Mr&&e.length>kr}function xr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Lr(e){if(!(e instanceof Ur))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Ur{constructor(e){this.appIdAsString=e,Fr(e)}serialize(){return this.toString()}toString(){return this.appIdAsString}}function Dr(e){return null==e}var Hr=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 Vr;const _r="v1",Br=jn("messageChannels.telemetry");function Wr(){return Hr(this,void 0,void 0,(function*(){if(Vr)return Br("Returning telemetry port from cache"),Vr;if(!jr())throw ln;return Vr=yield Gs(zn(_r,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),Vr}))}function jr(){var e;return!(!Ir(Xn)||!(null===(e=Xn.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function zr(){Vr=void 0}var $r=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 qr;const Gr="v1",Jr=jn("messageChannels.dataLayer");function Kr(){return $r(this,void 0,void 0,(function*(){if(qr)return Jr("Returning dataLayer port from cache"),qr;if(!Qr())throw ln;return qr=yield Gs(zn(Gr,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),qr}))}function Qr(){var e;return!(!Ir(Xn)||!(null===(e=Xn.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Zr(){qr=void 0}function Xr(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Ir(Xn),ds(e)}function Yr(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Ir(Xn),fs(e)}const eo="v2",to=jn("app"),no={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var ro,oo;function io(){return it.initializeCompleted}function ao(){return it.frameContext}function so(e){return Ri(zn(eo,"app.initialize"),e)}function co(e){Ls.currentWindow=e}function lo(){it.initializeCalled&&(Ka(),it.initializeCalled=!1,it.initializeCompleted=!1,it.initializePromise=void 0,it.additionalValidOrigins=[],it.frameContext=void 0,it.hostClientType=void 0,it.isFramelessWindow=!1,zr(),Zr(),Hs())}function uo(){return new Promise((e=>{Ar(),e(Vs(zn(eo,"app.getContext"),"getContext"))})).then((e=>Co(e)))}function fo(){Ar(),Fi(zn(eo,"app.notifyAppLoaded"))}function po(){return Ni(zn(eo,"app.notifySuccess"))}function go(e){Ar(),Mi(zn(eo,"app.notifyFailure"),e)}function mo(e){Ar(),ki(zn(eo,"app.notifyExpectedFailure"),e)}function ho(e){Hi(zn(eo,"app.registerOnThemeChangeHandler"),e)}function vo(e){os(e)}function wo(e){return Vi(zn(eo,"app.openLink"),e)}function Co(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:nn.teams,clientType:e.hostClientType?e.hostClientType:tn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Ur(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:it.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 yo(e){xo(zn(No,"dialog.update.resize"),e)}function bo(){return!(!Ir(Xn)||!Xn.supports.dialog)&&!!Xn.supports.dialog.update}function So(e,t,n){Uo(zn(No,"dialog.url.bot.open"),e,t,n)}function Eo(){return Ir(Xn)&&void 0!==(Xn.supports.dialog&&Xn.supports.dialog.url&&Xn.supports.dialog.url.bot)}function Ao(e){if(Ir(Xn,rn.task),!Po())throw ln;Qs(zn(No,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Io(e){if(Ir(Xn,rn.content,rn.sidePanel,rn.meetingStage),!Po())throw ln;Qs(zn(No,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function To(e){if(Ir(Xn,rn.task),!Po())throw ln;for(Ya("messageForChild"),Xa(zn(No,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),_o.reverse();_o.length>0;){e(_o.pop())}}function Po(){var e,t;return Ir(Xn)&&!!(null===(t=null===(e=Xn.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Oo(e,t,n){Lo(zn(No,"dialog.url.open"),e,t,n)}function Ro(e,t){Do(zn(No,"dialog.url.submit"),e,t)}function Fo(){return Ir(Xn)&&void 0!==(Xn.supports.dialog&&Xn.supports.dialog.url)}function ko(e){return{url:e.url,height:e.size?e.size.height:sn.Small,width:e.size?e.size.width:sn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Mo(e){const t=ko(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(ro||(ro={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(oo||(oo={})),to("teamsjs instance is version %s, starting at %s UTC (%s local)",fr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(On())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?to("teamsjs is being used from %s. %s",t,n):to("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const No="v2";function xo(e,t){if(Ir(Xn,rn.content,rn.sidePanel,rn.task,rn.meetingStage),!bo())throw ln;Qs(e,"tasks.updateTask",[t])}function Lo(e,t,n,r){if(Ir(Xn,rn.content,rn.sidePanel,rn.meetingStage),!Fo())throw ln;r&&Xa(zn(No,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Qs(e,"tasks.startTask",[ko(t)],((e,t)=>{null==n||n({err:e,result:t}),Ya("messageForParent")}))}function Uo(e,t,n,r){if(Ir(Xn,rn.content,rn.sidePanel,rn.meetingStage),!Eo())throw ln;r&&Xa(zn(No,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Qs(e,"tasks.startTask",[Mo(t)],((e,t)=>{null==n||n({err:e,result:t}),Ya("messageForParent")}))}function Do(e,t,n){if(Ir(Xn,rn.task),!Fo())throw ln;Qs(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function Ho(e){return{card:e.card,height:e.size?e.size.height:sn.Small,width:e.size?e.size.width:sn.Small,title:e.title}}function Vo(e){const t=Ho(e);return t.completionBotId=e.completionBotId,t}const _o=[];function Bo(e){it.frameContext&&(it.frameContext===rn.task?_o.push(e):Ya("messageForChild"))}function Wo(e,t){if(Ir(Xn,rn.content,rn.sidePanel,rn.meetingStage),!jo())throw ln;const n=Vo(e);Qs(zn(No,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function jo(){const e=Xn.hostVersionsInfo&&Xn.hostVersionsInfo.adaptiveCardSchemaVersion&&!En(Xn.hostVersionsInfo.adaptiveCardSchemaVersion);return Ir(Xn)&&void 0!==(e&&Xn.supports.dialog&&Xn.supports.dialog.card&&Xn.supports.dialog.card.bot)}function zo(e,t){if(Ir(Xn,rn.content,rn.sidePanel,rn.meetingStage),!$o())throw ln;const n=Ho(e);Qs(zn(No,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function $o(){const e=Xn.hostVersionsInfo&&Xn.hostVersionsInfo.adaptiveCardSchemaVersion&&!En(Xn.hostVersionsInfo.adaptiveCardSchemaVersion);return Ir(Xn)&&void 0!==(e&&Xn.supports.dialog&&Xn.supports.dialog.card)}function qo(){Xa(zn(No,"dialog.registerMessageForChildHandler"),"messageForChild",Bo,!1)}function Go(){return!(!Ir(Xn)||!Xn.supports.dialog)}const Jo="v2";var Ko,Qo;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Ko||(Ko={}));class Zo{constructor(){this.enabled=!0,this.selected=!1}}let Xo,Yo,ei,ti,ni;function ri(){Xa(zn(Jo,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",si,!1),Xa(zn(Jo,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",li,!1),Xa(zn(Jo,"menus.registerSetModuleViewHandler"),"setModuleView",ii,!1)}function oi(e,t){if(Ir(Xn),!ui())throw ln;ei=t,Qs(zn(Jo,"menus.setUpViews"),"setUpViews",[e])}function ii(e){ei&&ei(e)||(Ir(Xn),Qs(zn(Jo,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function ai(e,t){if(Ir(Xn),!ui())throw ln;Xo=t,Qs(zn(Jo,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function si(e){Xo&&Xo(e)||(Ir(Xn),Qs(zn(Jo,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function ci(e,t){if(Ir(Xn),!ui())throw ln;Yo=t,Qs(zn(Jo,"menus.showActionMenu"),"showActionMenu",[e])}function li(e){Yo&&Yo(e)||(Ir(Xn),Qs(zn(Jo,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function ui(){return!(!Ir(Xn)||!Xn.supports.menus)}function di(){Xa(zn(Ta,"pages.config.registerSettingsSaveHandler"),"settings.save",wi,!1),Xa(zn(Ta,"pages.config.registerSettingsRemoveHandler"),"settings.remove",bi,!1)}function fi(e){return La(zn(Ta,"pages.config.setValidityState"),e)}function pi(e){return Da(zn(Ta,"pages.config.setConfig"),e)}function gi(e){mi(zn(Ta,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Dr(e)&&!Ei())throw ln}))}function mi(e,t,n){!Dr(t)&&Ir(Xn,rn.settings),n&&n(),ti=t,!Dr(t)&&Qs(e,"registerHandler",["save"])}function hi(e){vi(zn(Ta,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Dr(e)&&!Ei())throw ln}))}function vi(e,t,n){!Dr(t)&&Ir(Xn,rn.remove,rn.settings),n&&n(),ni=t,!Dr(t)&&Qs(e,"registerHandler",["remove"])}function wi(e){const t=new yi(e);ti?ti(t):vs()?As("settings.save",[e]):t.notifySuccess()}function Ci(e){ts(zn(Ta,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[rn.content],(()=>{if(!Ei())throw ln}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Qo||(Qo={}));class yi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Qs(zn(Ta,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Qs(zn(Ta,"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 bi(){const e=new Si;ni?ni(e):vs()?As("settings.remove",[]):e.notifySuccess()}class Si{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Qs(zn(Ta,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Qs(zn(Ta,"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 Ei(){return!(!Ir(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.config}class Ai{}class Ii extends Ai{validate(e){return!0}deserialize(e){return e}}var Ti=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 Pi=6e4,Oi=jn("app");function Ri(e,t){if(On()){return Oi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return bn((()=>Di(e,t)),Pi,new Error("SDK initialization timed out."))}function Fi(e){Qs(e,no.AppLoaded,[fr])}function ki(e,t){Qs(e,no.ExpectedFailure,[t.reason,t.message])}function Mi(e,t){Qs(e,no.Failure,[t.reason,t.message])}function Ni(e){return Ti(this,void 0,void 0,(function*(){if(it.initializeCompleted)return Li(e);if(!it.initializePromise)throw new Error(tt);return it.initializePromise.then((()=>Li(e)))}))}function xi(){var e;return Ir(Xn)&&!!(null===(e=Xn.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Li(e){return Ti(this,void 0,void 0,(function*(){return xi()?$s(no.Success,[fr],new Ii,e).then((()=>({hasFinishedSuccessfully:!0}))):(Qs(e,no.Success,[fr]),{hasFinishedSuccessfully:"unknown"})}))}const Ui=Oi.extend("initializeHelper");function Di(e,t){return new Promise((n=>{it.initializeCalled||(it.initializeCalled=!0,Ja(),it.initializePromise=Ds(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Ve})=>{it.frameContext=e,it.hostClientType=t,it.clientSupportedSDKVersion=r;try{Ui("Parsing %s",n);const e=JSON.parse(n);if(Ui("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{Ui("Attempting to parse %s as an SDK version",n),isNaN(mn(n,Ve))||(it.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Ui("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(it.clientSupportedSDKVersion,Yn,ir))}}it.initializeCompleted=!0})),ri(),di(),qo()),Array.isArray(t)&&Rr(t),void 0!==it.initializePromise?n(it.initializePromise):Ui("GlobalVars.initializePromise is unexpectedly undefined")}))}function Hi(e,t){!Dr(t)&&Ar(),ns(e,t)}function Vi(e,t){return new Promise((n=>{Ir(Xn,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),n(_s(e,"executeDeepLink",t))}))}var _i=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Bi=[];const Wi=jn("validateOrigin");function ji(){return _i(this,void 0,void 0,(function*(){yield $i()}))}function zi(){return 0===Bi.length}function $i(e=!1){return _i(this,void 0,void 0,(function*(){if(!zi()&&!e)return Bi;if(On())return Bi=Ke,Ke;{Wi("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),Qe);return fetch(Ze,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return Wi("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(qi(JSON.stringify(e)))return Bi=e.validOrigins,Bi;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?Wi(`validOrigins fetch call to CDN failed due to Timeout of ${Qe} ms. Defaulting to fallback list`):Wi("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Bi=Ke,Bi)))}}))}function qi(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 Wi("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function Gi(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 Ji(e,t){return $i(t).then((t=>{if(!An(e))return Wi("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=>Gi(e,n))))return!0;for(const e of it.additionalValidOrigins){if(Gi("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return Wi("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,it.additionalValidOrigins),!1}))}function Ki(e){ts(zn(Ta,"pages.appButton.onClick"),"appButtonClick",e,[rn.content],(()=>{if(!Xi())throw ln}))}function Qi(e){ts(zn(Ta,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[rn.content],(()=>{if(!Xi())throw ln}))}function Zi(e){ts(zn(Ta,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[rn.content],(()=>{if(!Xi())throw ln}))}function Xi(){return!(!Ir(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.appButton}function Yi(){ja()}function ea(){return Oa(zn(Ta,"pages.backStack.navigateBack"))}function ta(e){na(zn(Ta,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Dr(e)&&!ra())throw ln}))}function na(e,t,n){!Dr(t)&&Ir(Xn),n&&n(),Wa(t),!Dr(t)&&Qs(e,"registerHandler",["backButton"])}function ra(){return!(!Ir(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.backStack}function oa(e){return new Promise((t=>{if(Ir(Xn,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!aa())throw ln;t(Ws(zn(Ta,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function ia(){return new Promise((e=>{if(Ir(Xn,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!aa())throw ln;e(Ws(zn(Ta,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function aa(){return!(!Ir(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.currentApp}function sa(){if(Ir(Xn,rn.content),!la())throw ln;Qs(zn(Ta,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function ca(){if(Ir(Xn,rn.content),!la())throw ln;Qs(zn(Ta,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function la(){return!(!Ir(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.fullTrust}function ua(e){return Ra(zn(Ta,"pages.tabs.navigateToTab"),e)}function da(e){return ka(zn(Ta,"pages.tabs.getTabInstances"),e)}function fa(e){return Ma(zn(Ta,"pages.tabs.getMruTabInstances"),e)}function pa(){return!(!Ir(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.tabs}var ga,ma;function ha(e){const t=zn(Ta,"pages.returnFocus");if(Ir(Xn),!Ia())throw ln;if(void 0===e&&Qs(t,"returnFocus",[!1]),"boolean"==typeof e)Qs(t,"returnFocus",[e]);else switch(e){case ma.PreviousLandmark:case ma.GoToActivityFeed:Qs(t,"returnFocus",[!1,e]);break;case ma.NextLandmark:Qs(t,"returnFocus",[!0,e])}}function va(e){ts(zn(Ta,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Ia())throw ln}))}function wa(e){xa(zn(Ta,"pages.setCurrentFrame"),e)}function Ca(e,t,n){ji(),Ri(zn(Ta,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),wa(e)}function ya(){return Ua(zn(Ta,"pages.getConfig."))}function ba(e){return Pa(zn(Ta,"pages.navigateCrossDomain"),e)}function Sa(e){return new Promise((t=>{if(Ir(Xn,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!Ia())throw ln;const n=zn(Ta,"pages.navigateToApp");if(Xn.isLegacyTeams){t(_s(n,"executeDeepLink",Sn(Ha(e)?e:Va(e))))}else{t(_s(n,"pages.navigateToApp",Ha(e)?_a(e):e))}}))}function Ea(e){return Na(zn(Ta,"pages.shareDeepLink"),e)}function Aa(e){ts(zn(Ta,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Dr(e)&&!Ia())throw ln}))}function Ia(){return!(!Ir(Xn)||!Xn.supports.pages)}ji(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(ga||(ga={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(ma||(ma={}));const Ta="v2";function Pa(e,t){return new Promise((n=>{if(Ir(Xn,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage),!Ia())throw ln;n(Bs(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Oa(e){return new Promise((t=>{if(Ir(Xn),!ra())throw ln;t(Bs(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Ra(e,t){return new Promise((n=>{if(Ir(Xn),!pa())throw ln;n(Bs(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Fa(e,t){if(Ir(Xn),!Ia())throw ln;Qs(e,"returnFocus",[t])}function ka(e,t){return new Promise((n=>{if(Ir(Xn),!pa())throw ln;n(Vs(e,"getTabInstances",t))}))}function Ma(e,t){return new Promise((n=>{if(Ir(Xn),!pa())throw ln;n(Vs(e,"getMruTabInstances",t))}))}function Na(e,t){if(Ir(Xn,rn.content,rn.sidePanel,rn.meetingStage),!Ia())throw ln;Qs(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function xa(e,t){if(Ir(Xn,rn.content),!Ia())throw ln;Qs(e,"setFrameContext",[t])}function La(e,t){if(Ir(Xn,rn.settings,rn.remove),!Ei())throw ln;Qs(e,"settings.setValidityState",[t])}function Ua(e){return new Promise((t=>{if(Ir(Xn,rn.content,rn.settings,rn.remove,rn.sidePanel),!Ia())throw ln;t(Vs(e,"settings.getSettings"))}))}function Da(e,t){return new Promise((n=>{if(Ir(Xn,rn.content,rn.settings,rn.sidePanel),!Ei())throw ln;n(_s(e,"settings.setSettings",t))}))}function Ha(e){return e.appId instanceof Ur}function Va(e){return Object.assign(Object.assign({},e),{appId:new Ur(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function _a(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Ba;function Wa(e){Ba=e}function ja(){Xa(zn(Ta,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",za,!1)}function za(){Ba&&Ba()||(vs()?As("backButtonPress",[]):ea())}var $a=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 qa=jn("handlers");class Ga{static initializeHandlers(){Ga.handlers.themeChange=rs,Ga.handlers.load=ss,Ga.handlers.beforeUnload=us,ja()}static uninitializeHandlers(){Ga.handlers={},Ga.themeChangeHandler=null,Ga.loadHandler=null,Ga.beforeUnloadHandler=null,Ga.beforeSuspendOrTerminateHandler=null,Ga.resumeHandler=null}}function Ja(){Ga.initializeHandlers()}function Ka(){Ga.uninitializeHandlers()}Ga.handlers={},Ga.themeChangeHandler=null,Ga.loadHandler=null,Ga.beforeUnloadHandler=null,Ga.beforeSuspendOrTerminateHandler=null,Ga.resumeHandler=null,Ga.hostToAppPerformanceMetricsHandler=null;const Qa=qa.extend("callHandler");function Za(e,t){const n=Ga.handlers[e];if(n){Qa("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return vs()?(As(e,t),[!1,void 0]):(Qa("Handler for action message %s not found.",e),[!1,void 0])}function Xa(e,t,n,r=!0,o=[]){n?(Ga.handlers[t]=n,r&&Qs(e,"registerHandler",[t,...o])):delete Ga.handlers[t]}function Ya(e){delete Ga.handlers[e]}function es(e){return null!=Ga.handlers[e]}function ts(e,t,n,r,o){n&&Ir(Xn,...r),o&&o(),Xa(e,t,n)}function ns(e,t){Ga.themeChangeHandler=t,!Dr(t)&&Qs(e,"registerHandler",["themeChange"])}function rs(e){Ga.themeChangeHandler&&Ga.themeChangeHandler(e),vs()&&As("themeChange",[e])}function os(e){Ga.hostToAppPerformanceMetricsHandler=e}function is(e){Ga.hostToAppPerformanceMetricsHandler&&Ga.hostToAppPerformanceMetricsHandler(e)}function as(e,t){Ga.loadHandler=t,!Dr(t)&&Qs(e,"registerHandler",["load"])}function ss(e){const t=cs(e);Ga.resumeHandler?(Ga.resumeHandler(t),vs()&&As("load",[t])):Ga.loadHandler&&(Ga.loadHandler(e),vs()&&As("load",[e]))}function cs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function ls(e,t){Ga.beforeUnloadHandler=t,!Dr(t)&&Qs(e,"registerHandler",["beforeUnload"])}function us(){return $a(this,void 0,void 0,(function*(){const e=()=>{Qs(zn("v2","handleBeforeUnload"),"readyToUnload",[])};Ga.beforeSuspendOrTerminateHandler?(yield Ga.beforeSuspendOrTerminateHandler(),vs()?As("beforeUnload"):e()):Ga.beforeUnloadHandler&&Ga.beforeUnloadHandler(e)||(vs()?As("beforeUnload"):e())}))}function ds(e){Ga.beforeSuspendOrTerminateHandler=e,!Dr(e)&&Qs(zn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function fs(e){Ga.resumeHandler=e,!Dr(e)&&Qs(zn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var ps=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 gs=jn("childProxyingCommunication");class ms{}function hs(){ms.window=null,ms.origin=null,ms.messageQueue=[]}function vs(){return!!ms.window}function ws(e,t){return ms.window&&!ms.window.closed&&e!==ms.window||(ms.window=e,ms.origin=t),ms.window&&ms.window.closed?(ms.window=null,ms.origin=null,!1):ms.window===e}function Cs(e,t,n,r){return ps(this,void 0,void 0,(function*(){ms.window===t&&(yr(ms.window,ms.origin,ms.messageQueue,"child"),bs(e,n,r))}))}ms.messageQueue=[];const ys=gs.extend("handleIncomingMessageFromChild");function bs(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=mr(e.data),[o,i]=Za(r.func,r.args);if(o&&void 0!==i)return ys("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",wr(r),r.func),void Es(r.id,r.uuid,Array.isArray(i)?i:[i]);ys("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",wr(r),r.func),Ss(r,t,n)}function Ss(e,t,n){n(t(zn("v2","tasks.startTask"),e.func,e.args,!0).uuid,((...t)=>{if(ms.window){const n=t.pop();ys("Message from parent being relayed to child, id: %s",wr(e)),Es(e.id,e.uuid,t,n)}}))}function Es(e,t,n,r){const o=ms.window,i=Is(e,t,n,r),a=vr(i),s=ms.origin;o&&s&&(ys("Sending message %s to %s via postMessage, args = %o",wr(a),"child",a.args),o.postMessage(a,s))}function As(e,t){const n=ms.window,r=Ts(e,t),o=ms.origin;n&&o?n.postMessage(r,o):ms.messageQueue.push(r)}function Is(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Ts(e,t){return{func:e,args:t||[]}}class Ps{static storeCallbackInformation(e,t){Ps.callbackInformation.set(e,t)}static clearMessages(){Ps.callbackInformation.clear()}static deleteMessageInformation(e){Ps.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?is({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=Ps.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(is({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Ps.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Ps.callbackInformation=new Map;const Os=jn("nestedAppAuthUtils"),Rs=Os.extend("tryPolyfillWithNestedAppAuthBridge");function Fs(e,t,n){var r;const o=Rs;if(it.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 ks=Os.extend("createNestedAppAuthBridge");function Ms(e,t){const n=ks;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 Ns=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const xs=jn("communication");class Ls{}class Us{}function Ds(e,t){if(Us.messageListener=e=>oc(e),Ls.currentWindow=Ls.currentWindow||Pn(),Ls.parentWindow=Ls.currentWindow.parent!==Ls.currentWindow.self?Ls.currentWindow.parent:Ls.currentWindow.opener,Ls.topWindow=Ls.currentWindow.top,(Ls.parentWindow||e)&&Ls.currentWindow.addEventListener("message",Us.messageListener,!1),!Ls.parentWindow){const e=Ls.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));it.isFramelessWindow=!0,e.onNativeMessage=gc}try{return Ls.parentOrigin="*",js(t,"initialize",[fr,Jn,e]).then((([e,t,n,r])=>(Fs(r,Ls.currentWindow,{onMessage:ac,sendPostMessage:Xs}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Ls.parentOrigin=null}}function Hs(){Ls.currentWindow&&Ls.currentWindow.removeEventListener("message",Us.messageListener,!1),Ls.currentWindow=null,Ls.parentWindow=null,Ls.parentOrigin=null,Us.parentMessageQueue=[],Us.nextMessageId=0,Us.callbacks.clear(),Us.promiseCallbacks.clear(),Us.portCallbacks.clear(),Us.legacyMessageIdsToUuidMap={},Ps.clearMessages(),hs()}function Vs(e,t,...n){return js(e,t,n).then((([e])=>e))}function _s(e,t,...n){return js(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function Bs(e,t,n,...r){return js(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function Ws(e,t,...n){return js(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function js(e,t,n=void 0){if(!$n(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(Ks(nc(e,t,n).uuid))}))}function zs(e){return e.map((e=>dr(e)?e.serialize():e))}function $s(e,t,n,r,o){var i;return Ns(this,void 0,void 0,(function*(){const a=zs(t),[s]=yield js(r,e,a);if(o&&o(s)||!o&&De(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(`${Re.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function qs(e,t,n,r){var o;return Ns(this,void 0,void 0,(function*(){const i=zs(t),[a]=yield js(n,e,i);if(r&&r(a)||!r&&De(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Re.INTERNAL_ERROR}, message: Invalid response from host`)}))}function Gs(e,t,n=void 0){if(!$n(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 Js(nc(e,t,n).uuid)}function Js(e){return new Promise(((t,n)=>{Us.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 Ks(e){return new Promise((t=>{Us.promiseCallbacks.set(e,t)}))}function Qs(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!$n(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=nc(e,t,o);r&&Us.callbacks.set(i.uuid,r)}Us.parentMessageQueue=[],Us.topMessageQueue=[],Us.nextMessageId=0,Us.callbacks=new Map,Us.promiseCallbacks=new Map,Us.portCallbacks=new Map,Us.legacyMessageIdsToUuidMap={};const Zs=xs.extend("sendNestedAuthRequestToTopWindow");function Xs(e){const t=Zs,n=Ls.topWindow,r=Sc(e);return t("Message %s information: %o",wr(r),{actionName:r.func}),ec(n,r)}const Ys=xs.extend("sendRequestToTargetWindowHelper");function ec(e,t){const n=Ys,r=Cc(e),o=gr(t);if(it.isFramelessWindow)Ls.currentWindow&&Ls.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",wr(o),r),Ls.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=wc(e);e&&i?(n("Sending message %s to %s via postMessage",wr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",wr(o),r),vc(e).push(t))}return t}const tc=xs.extend("sendMessageToParentHelper");function nc(e,t,n,r){const o=tc,i=Ls.parentWindow,a=bc(e,t,n,r);return Ps.storeCallbackInformation(a.uuid,{name:t,calledAt:a.timestamp}),o("Message %s information: %o",wr(a),{actionName:t,args:n}),ec(i,a)}const rc=xs.extend("processIncomingMessage");function oc(e){return Ns(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void rc("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 cc(t,n).then((r=>{r?(lc(t,n),t!==Ls.parentWindow?ws(t,n)&&Cs(e,t,nc,((e,t)=>Us.callbacks.set(e,t))):gc(e)):rc("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const ic=xs.extend("processAuthBridgeMessage");function ac(e,t){var n,r;const o=ic;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),l=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?cc(c,l)?(Ls.topWindow&&!Ls.topWindow.closed&&c!==Ls.topWindow||(Ls.topWindow=c,Ls.topOrigin=l),Ls.topWindow&&Ls.topWindow.closed&&(Ls.topWindow=null,Ls.topOrigin=null),yr(Ls.topWindow,Ls.topOrigin,Us.topMessageQueue,"top"),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const sc=xs.extend("shouldProcessIncomingMessage");function cc(e,t){return Ns(this,void 0,void 0,(function*(){if(Ls.currentWindow&&e===Ls.currentWindow)return sc("Should not process message because it is coming from the current window"),!1;if(Ls.currentWindow&&Ls.currentWindow.location&&t&&t===Ls.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return sc("Message has an invalid origin of %s",t),!1}const n=yield Ji(e);return n||sc("Message has an invalid origin of %s",t),n}}))}function lc(e,t){it.isFramelessWindow||Ls.parentWindow&&!Ls.parentWindow.closed&&e!==Ls.parentWindow||(Ls.parentWindow=e,Ls.parentOrigin=t),Ls.parentWindow&&Ls.parentWindow.closed&&(Ls.parentWindow=null,Ls.parentOrigin=null),yr(Ls.parentWindow,Ls.parentOrigin,Us.parentMessageQueue,"parent")}const uc=xs.extend("handleIncomingMessageFromParent");function dc(e){const t=uc;if(!e.uuid)return Us.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=fc(Us.callbacks,t);if(n)return n;const r=fc(Us.promiseCallbacks,t);if(r)return r;const o=fc(Us.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",wr(e))}function fc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function pc(e,t){const n=fc(t,e.uuid);n&&t.delete(n),e.uuid?Us.legacyMessageIdsToUuidMap={}:delete Us.legacyMessageIdsToUuidMap[e.id]}function gc(e){const t=uc,n=Dn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=hr(r),i=dc(o);if(i){const r=Us.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Ps.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]),mc(e)||(t("Removing registered callback for message %s",i.toString()),pc(o,Us.callbacks)));const a=Us.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()),pc(o,Us.promiseCallbacks));const s=Us.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()),pc(o,Us.portCallbacks)}o.uuid&&(Us.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Ps.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',wr(r),r.func),Za(r.func,r.args)}else t("Received an unknown message: %O",e)}function mc(e){return!0===e.data.isPartialResponse}function hc(){return Ls.topWindow!==Ls.parentWindow}function vc(e){return e===Ls.topWindow&&hc()?Us.topMessageQueue:e===Ls.parentWindow?Us.parentMessageQueue:[]}function wc(e){return e===Ls.topWindow&&hc()?Ls.topOrigin:e===Ls.parentWindow?Ls.parentOrigin:null}function Cc(e){return e===Ls.topWindow&&hc()?"top":e===Ls.parentWindow?"parent":null}function yc(e,t){let n;n=Ls.currentWindow.setInterval((()=>{0===vc(e).length&&(clearInterval(n),t())}),100)}function bc(e,t,n,r){const o=Us.nextMessageId++,i=new Vn;return Us.legacyMessageIdsToUuidMap[o]=i,{id:o,uuid:i,func:t,timestamp:Date.now(),monotonicTimestamp:Dn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r}}function Sc(e){const t=Us.nextMessageId++,n=new Vn;return Us.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Dn(),args:[],data:e}}const Ec="v1";function Ac(e){if(!Dr(e)&&Ir(Xn),!Dr(e)&&!Ic())throw ln;e?Xa(zn(Ec,"log.request"),"log.request",(()=>{const t=e();Qs(zn(Ec,"log.receive"),"log.receive",[t])})):Ya("log.request")}function Ic(){return!(!Ir(Xn)||!Xn.supports.logs)}var Tc,Pc,Oc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Tc||(Tc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Pc||(Pc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Oc||(Oc={}));const Rc="v1";function Fc(e,t){Ir(Xn),Qs(zn(Rc,"uploadCustomApp"),"uploadCustomApp",[e],t||gn())}function kc(e,t,n){Ir(Xn),Qs(zn(Rc,"sendCustomMessage"),e,t,n)}function Mc(e,t){if(Ir(Xn),!vs())throw new Error("The child window has not yet been initialized or is not present");As(e,t)}function Nc(e,t){Ir(Xn),Xa(zn(Rc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function xc(e,t){Ir(Xn),Xa(zn(Rc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Lc(e){Ir(Xn,rn.content,rn.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];Qs(zn(Rc,"openFilePreview"),"openFilePreview",t)}const Uc="v1";function Dc(e){return new Promise((t=>{if(Ir(Xn,rn.content),!_c())throw ln;const n=_s(zn(Uc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Xa(zn(Uc,"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&&Xa(zn(Uc,"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 Hc(){if(Ir(Xn,rn.content),!_c())throw ln;Qs(zn(Uc,"conversations.closeConversation"),"conversations.closeConversation"),Ya("startConversation"),Ya("closeConversation")}function Vc(){return new Promise((e=>{if(Ir(Xn),!_c())throw ln;e(Vs(zn(Uc,"conversations.getChatMember"),"getChatMembers"))}))}function _c(){return!(!Ir(Xn)||!Xn.supports.conversations)}var Bc=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 Wc="v2",jc=jn("copilot");function zc(){var e;return Ir(Xn)&&!!(null===(e=Xn.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function $c(e,t){var n;return void 0===t&&(t=null!==(n=Dn())&&void 0!==n?n:Date.now()),Bc(this,void 0,void 0,(function*(){return Ir(Xn),jc("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),qs("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],zn(Wc,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var qc=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 Gc="v2",Jc=jn("copilot");function Kc(){var e,t;return Ir(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 Qc(){var e,t;return qc(this,void 0,void 0,(function*(){if(Ir(Xn),!Kc())throw new Error(`Error code: ${ln.errorCode}, message: Not supported on platform`);if(null===(e=Xn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return Jc("Eligibility information is already available on runtime."),Xn.hostVersionsInfo.appEligibilityInformation;Jc("Eligibility information is not available on runtime. Requesting from host.");const n=yield Vs(zn(Gc,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(De(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 Xc="v2";class Yc{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function el(e){const t=e;return t.responseType===rl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const tl="Action.Execute";var nl,rl,ol;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(nl||(nl={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(rl||(rl={}));class il extends Ai{validate(e){return el(e)}deserialize(e){return e}}function al(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(ol).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function sl(e){e.requestType===nl.ActionExecuteInvokeRequest?cl(e):e.requestType===nl.QueryMessageExtensionRequest&&ll(e)}function cl(e){if(e.type!==tl){throw{errorCode:ol.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${tl}"`}}if(!Hn(e.data)){throw{errorCode:ol.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function ll(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 ul(e,t,n){if(Ir(Xn,rn.content),!ml())throw ln;const r=new Ur(e);return sl(n),js(zn(Xc,"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 dl(e,t){if(Ir(Xn,rn.content),!ml())throw ln;const n=new Ur(e);return js(zn(Xc,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function fl(e,t,n){if(Ir(Xn,rn.content),!ml())throw ln;const r=new Ur(e);return sl(n),js(zn(Xc,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function pl(e,t,n){if(Ir(Xn,rn.content),!ml())throw ln;return Rn(e,new Error("titleId is Invalid.")),Rn(t,new Error("oauthConfigId is Invalid.")),js(zn(Xc,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function gl(e,t,n){if(Ir(Xn,rn.content),!ml())throw ln;return Rn(e,new Error("titleId is Invalid.")),t&&Fn(t),js(zn(Xc,"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 ml(){return!(!Ir(Xn)||!Xn.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(ol||(ol={}));var hl=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 vl="v2";function wl(e,t,n){return hl(this,void 0,void 0,(function*(){if(Ir(Xn,rn.content),!Sl())throw ln;return El(e,t),qs("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],zn(vl,"externalAppAuthenticationForCEA.authenticateWithSSO"),al)}))}function Cl(e,t,n){return hl(this,void 0,void 0,(function*(){if(Ir(Xn,rn.content),!Sl())throw ln;return El(e,t),qs("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],zn(vl,"externalAppAuthenticationForCEA.authenticateWithOauth"),al)}))}function yl(e,t,n,r){return hl(this,void 0,void 0,(function*(){if(Ir(Xn,rn.content),!Sl())throw ln;return El(e,t),cl(r),$s("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new Yc(r),n.url.href,n.width,n.height,n.isExternal],new il,zn(vl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),al)}))}function bl(e,t,n,r){return hl(this,void 0,void 0,(function*(){if(Ir(Xn,rn.content),!Sl())throw ln;return El(e,t),cl(r),$s("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new Yc(r),n.authId,n.connectionName,n.claims,n.silent],new il,zn(vl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),al)}))}function Sl(){return!(!Ir(Xn)||!Xn.supports.externalAppAuthenticationForCEA)}function El(e,t){Rn(t,new Error("conversation id is not valid.")),Lr(e)}const Al="v2";var Il,Tl;function Pl(e,t){if(Ir(Xn,rn.content),!Rl())throw ln;const n=new Ur(e);return js(zn(Al,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Ol(e,t,n){if(Ir(Xn,rn.content),!Rl())throw ln;const r=new Ur(e);return js(zn(Al,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Rl(){return!(!Ir(Xn)||!Xn.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Il||(Il={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Tl||(Tl={}));var Fl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const kl="v2";function Ml(e,t,n){return Fl(this,void 0,void 0,(function*(){if(Ir(Xn,rn.content),!xl())throw ln;El(e,t);const[r,o]=yield js(zn(kl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Nl(e,t,n){return Fl(this,void 0,void 0,(function*(){if(Ir(Xn,rn.content),!xl())throw ln;El(e,t);const r=yield Vs(zn(kl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function xl(){return!(!Ir(Xn)||!Xn.supports.externalAppCardActionsForCEA)}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(Ir(Xn,rn.content),!Hl())throw ln;const r=new Ur(e),[o,i]=yield js(zn(Ul,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Hl(){return!(!Ir(Xn)||!Xn.supports.externalAppCommands)}const Vl="v1";var _l,Bl,Wl,jl,zl,$l;function ql(e,t){if(Ir(Xn,rn.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");Qs(zn(Vl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Gl(e,t){if(Ir(Xn,rn.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");Qs(zn(Vl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Jl(e,t,n){if(Ir(Xn,rn.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");Qs(zn(Vl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Kl(e,t,n){if(Ir(Xn,rn.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");Qs(zn(Vl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Ql(e,t,n){if(Ir(Xn,rn.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");Qs(zn(Vl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Zl(e=!1,t){if(Ir(Xn,rn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Qs(zn(Vl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Xl(e,t,n,r,o=!1,i){if(Ir(Xn,rn.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");Qs(zn(Vl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Yl(e){if(Ir(Xn,rn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Qs(zn(Vl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function eu(e=void 0,t){if(Ir(Xn,rn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Qs(zn(Vl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function tu(e){if(Ir(Xn,rn.content),!e)throw uu(Re.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Qs(zn(Vl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function nu(e,t){if(Ir(Xn,rn.content),!t)throw uu(Re.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw uu(Re.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Qs(zn(Vl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function ru(e,t){if(Ir(Xn,rn.content),!t)throw uu(Re.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw uu(Re.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Qs(zn(Vl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function ou(e,t){if(Ir(Xn,rn.content),!t)throw uu(Re.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw uu(Re.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Qs(zn(Vl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function iu(e,t){if(Ir(Xn,rn.content),!t)throw uu(Re.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw uu(Re.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Qs(zn(Vl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function au(e,t){if(Ir(Xn,rn.content),!t)throw uu(Re.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw uu(Re.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Qs(zn(Vl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function su(e,t){if(Ir(Xn,rn.content),!t)throw uu(Re.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw uu(Re.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw uu(Re.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Qs(zn(Vl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function cu(e){if(Ir(Xn),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Xa(zn(Vl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function lu(e){if(Ir(Xn),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Xa(zn(Vl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function uu(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"}(_l||(_l={})),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"}(Bl||(Bl={})),function(e){e.ClassMaterials="classMaterials"}(Wl||(Wl={})),function(e){e.Readonly="readonly"}(jl||(jl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(zl||(zl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}($l||($l={}));const du="v1";function fu(){return new Promise((e=>{if(Ir(Xn),!hu())throw ln;e(Ws(zn(du,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function pu(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Ir(Xn),!hu())throw ln;t(Ws(zn(du,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function gu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Ir(Xn),!hu())throw ln;Xa(zn(du,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Ir(Xn),e(t)}))}function mu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Ir(Xn),!hu())throw ln;Xa(zn(du,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Ir(Xn),e(t)}))}function hu(){return!(!Ir(Xn)||!Xn.supports.meetingRoom)}function vu(){return!(!Ir(Xn)||!Xn.supports.messageChannels)}const wu="v1";function Cu(e){if(Ir(Xn,rn.content),!yu())throw ln;Qs(zn(wu,"notifications.showNotification"),"notifications.showNotification",[e])}function yu(){return!(!Ir(Xn)||!Xn.supports.notifications)}const bu="v2";function Su(e){if(!Iu())throw new Error(Re.NOT_SUPPORTED_ON_PLATFORM.toString());if(Dr(e))throw new Error(Re.INVALID_ARGUMENTS.toString());Xa(zn(bu,"otherApp.install"),"otherApp.install",e)}function Eu(){if(!Iu())throw new Error(Re.NOT_SUPPORTED_ON_PLATFORM.toString());Qs(zn(bu,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Ya("otherApp.install")}function Au(e){if(!Iu())throw new Error(Re.NOT_SUPPORTED_ON_PLATFORM.toString());return qs("otherApp.notifyInstallCompleted",[e.toString()],zn(bu,"otherApp.notifyInstallCompleted"))}function Iu(){return!(!Ir(Xn)||!Xn.supports.otherAppStateChange)}const Tu="v1";var Pu,Ou,Ru;function Fu(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Ir(Xn,rn.sidePanel),!Hu())throw ln;Qs(zn(Tu,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function ku(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(Ir(Xn,rn.sidePanel),!Hu())throw ln;Qs(zn(Tu,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Mu(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(Ir(Xn,rn.sidePanel),!Hu())throw ln;Qs(zn(Tu,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Nu(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Ir(Xn,rn.sidePanel),!Hu())throw ln;Qs(zn(Tu,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function xu(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Ir(Xn,rn.sidePanel),!Hu())throw ln;Xa(zn(Tu,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Lu(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Ir(Xn,rn.sidePanel),!Hu())throw ln;Xa(zn(Tu,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Uu(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Ir(Xn,rn.sidePanel),!Hu())throw ln;Xa(zn(Tu,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Du(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Ir(Xn,rn.sidePanel),!Hu())throw ln;Xa(zn(Tu,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Hu(){return!(!Ir(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"}(Pu||(Pu={})),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"}(Ou||(Ou={})),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"}(Ru||(Ru={}));const Vu="v1";function _u(e,t,n,r){if(Ir(Xn,rn.content),!Bu())throw ln;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");Qs(zn(Vu,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Bu(){return!(!Ir(Xn)||!Xn.supports.appEntity)}const Wu="v1";function ju(e){return new Promise((t=>{if(Ir(Xn),!zu())throw ln;if((it.hostClientType===tn.android||it.hostClientType===tn.teamsRoomsAndroid||it.hostClientType===tn.teamsPhones||it.hostClientType===tn.teamsDisplays)&&!Tr(je)){const e={errorCode:Re.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Vs(zn(Wu,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function zu(){return!(!Ir(Xn)||!Xn.supports.teams)&&(!!Xn.supports.teams.fullTrust&&!!Xn.supports.teams.fullTrust.joinedTeams)}const $u="v1";function qu(e){return new Promise((t=>{if(Ir(Xn),!Gu())throw ln;t(Vs(zn($u,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Gu(){return!(!Ir(Xn)||!Xn.supports.teams)&&!!Xn.supports.teams.fullTrust}const Ju="v1";var Ku;function Qu(e,t){if(Ir(Xn,rn.content),!Xu())throw ln;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Qs(zn(Ju,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Zu(e,t){if(Ir(Xn),!Xu())throw ln;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Qs(zn(Ju,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Xu(){return!(!Ir(Xn)||!Xn.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Ku||(Ku={}));class Yu{static setTimeout(e,t){const n=performance.now(),r=hn();return Yu.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Yu.setTimeoutCallbacks[e]}static setInterval(e,t){Yu.setTimeout((function n(){e(),Yu.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Yu.setTimeoutCallbacks){const r=Yu.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Yu.setTimeoutCallbacks[e].callback(),delete Yu.setTimeoutCallbacks[e]}}}Yu.setTimeoutCallbacks={};class ed{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Yu.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&&Yu.clearTimeout(this.timeoutId),this.timeoutId=Yu.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(ed.maxSessionTimeoutInMs,2*t.timeoutInMs):ed.initialSessionTimeoutInMs}}ed.initialSessionTimeoutInMs=1e3,ed.maxSessionTimeoutInMs=3e4;const td="v2";class nd{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new ed(nd.distributionBinSize,(e=>this.reportPerformanceEvent(zn(td,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Yu.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(zn(td,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),nd.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){Yu.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(zn(td,"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(zn(td,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}nd.distributionBinSize=1e3,nd.calculateFPSInterval=1e3;var rd=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())}))},od=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 id="v2",ad=On()?void 0:new nd(Qs);var sd,cd,ld;function ud(e){if(Ir(Xn,rn.sidePanel),!md())throw ln;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Xa(zn(id,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==ad?void 0:ad.setFrameProcessTimeLimit(e.timeLimit)),!1),yd())hd(e.videoFrameHandler,e.config);else{if(!Sd())throw ln;wd(e.videoBufferHandler,e.config)}null==ad||ad.startMonitorSlowFrameProcessing()}function dd(e,t){if(Ir(Xn,rn.sidePanel),!md())throw ln;Qs(zn(id,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function fd(e){if(Ir(Xn,rn.sidePanel),!md())throw ln;Xa(zn(id,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",xd(e,ad),!1),Qs(zn(id,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function pd(e){Qs(zn(id,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function gd(e){Qs(zn(id,"videoEffects.notifyError"),"video.notifyError",[e])}function md(){return Ir(Xn)&&!!Xn.supports.video&&(!!Xn.supports.video.mediaStream||!!Xn.supports.video.sharedFrame)}function hd(e,t){if(Ir(Xn,rn.sidePanel),!md()||!yd())throw ln;Xa(zn(id,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>rd(this,void 0,void 0,(function*(){const{streamId:n}=t,r=vd(e,ad);yield Id(n,r,gd,ad)}))),!1),Qs(zn(id,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function vd(e,t){return n=>rd(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 wd(e,t){if(Ir(Xn,rn.sidePanel),!md()||!Sd())throw ln;Xa(zn(id,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==ad||ad.reportStartFrameProcessing(t.width,t.height),e(Cd(t),(()=>{null==ad||ad.reportFrameProcessed(),pd(n)}),gd)}}),!1),Qs(zn(id,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Cd(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=od(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function yd(){var e;return Ir(Xn,rn.sidePanel)&&bd()&&!!(null===(e=Xn.supports.video)||void 0===e?void 0:e.mediaStream)}function bd(){var e,t,n,r;return!(!(null===(t=null===(e=Pn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Pn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Sd(){var e;return Ir(Xn,rn.sidePanel)&&!!(null===(e=Xn.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(sd||(sd={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(cd||(cd={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(ld||(ld={}));var Ed=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ad="v2";function Id(e,t,n,r){var o,i;return Ed(this,void 0,void 0,(function*(){const a=Od();!On()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Rd(yield Pd(e,n,r),new Fd(n,t),a.writable)}))}function Td(e,t,n,r){var o,i;return Ed(this,void 0,void 0,(function*(){const a=Od();!On()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Rd(yield Pd(e,n,r),new Nd(n,t),a.writable)}))}function Pd(e,t,n){return Ed(this,void 0,void 0,(function*(){if(On())throw ln;const r=Pn().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 Od(){if(On())throw ln;const e=window.MediaStreamTrackGenerator;if(!e)throw ln;return new e({kind:"video"})}function Rd(e,t,n){new(0,Pn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Fd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Ed(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 kd{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 Md{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 Nd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Ed(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=>Ed(this,void 0,void 0,(function*(){if(On())throw ln;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 kd(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 Md(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}}})),Xa(zn(Ad,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function xd(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Qs(zn(Ad,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in ld?e:ld.InitializationFailure;Qs(zn(Ad,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Ld=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 Ud="v2",Dd=2e3,Hd=On()?void 0:new nd(Qs);var Vd;function _d(e){var t,n;if(!Gd())throw ln;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Ir(Xn,rn.sidePanel)){if(Xa(zn(Ud,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Hd?void 0:Hd.setFrameProcessTimeLimit(e)),!1),null===(t=Xn.supports.video)||void 0===t?void 0:t.mediaStream)Xa(zn(Ud,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Ld(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Hd?Wd(e.videoFrameHandler,Hd):e.videoFrameHandler;r?yield Td(n,o,Kd,Hd):yield Id(n,o,Kd,Hd)}))),!1),Qs(zn(Ud,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=Xn.supports.video)||void 0===n?void 0:n.sharedFrame))throw ln;Xa(zn(Ud,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Hd||Hd.reportStartFrameProcessing(t.width,t.height);const n=Bd(),r=t.timestamp;e.videoBufferHandler(jd(t),(()=>{n(),null==Hd||Hd.reportFrameProcessed(),Jd(r)}),Kd)}}),!1),Qs(zn(Ud,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Hd||Hd.startMonitorSlowFrameProcessing()}}function Bd(){const e=setTimeout((()=>{Kd(`Frame not processed in ${Dd}ms`,Vd.Warn)}),Dd);return function(){clearTimeout(e)}}function Wd(e,t){return n=>Ld(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Bd(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function jd(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function zd(e,t,n){if(Ir(Xn,rn.sidePanel),!Gd())throw ln;Qs(zn(Ud,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function $d(e){if(Ir(Xn,rn.sidePanel),!Gd())throw ln;Xa(zn(Ud,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",xd(e,Hd),!1),Qs(zn(Ud,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function qd(e){if(Ir(Xn,rn.sidePanel),!md())throw ln;Qs(zn(Ud,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Gd(){return Ir(Xn),md()}function Jd(e){Qs(zn(Ud,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Kd(e,t=Vd.Warn){Qs(zn(Ud,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Qd(e){if(Ir(Xn),!md())throw ln;Kd(e,Vd.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Vd||(Vd={}));const Zd="v2";class Xd extends Ai{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Yd{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class ef{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class tf extends Ai{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class nf{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class rf extends Ai{validate(e){const t=new tf;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function of(e,t){if(Ir(Xn),!uf())throw new Error(`Error code: ${Re.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(df(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Re.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return $s("hostEntity.tab.addAndConfigure",[new ef(e),t],new tf,zn(Zd,"hostEntity.tab.addAndConfigure"))}function af(e){if(Ir(Xn),!uf())throw new Error(`Error code: ${Re.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return df(e.threadId),$s("hostEntity.tab.getAll",[new ef(e)],new rf,zn(Zd,"hostEntity.tab.getAll"))}function sf(e,t){if(Ir(Xn),!uf())throw new Error(`Error code: ${Re.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return ff(e),df(t.threadId),$s("hostEntity.tab.reconfigure",[new Yd(e),new ef(t)],new Xd,zn(Zd,"hostEntity.tab.reconfigure"))}function cf(e,t){if(Ir(Xn),!uf())throw new Error(`Error code: ${Re.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return ff(e),df(t.threadId),$s("hostEntity.tab.rename",[new Yd(e),new ef(t)],new Xd,zn(Zd,"hostEntity.tab.rename"))}function lf(e,t){if(Ir(Xn),!uf())throw new Error(`Error code: ${Re.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return df(t.threadId),ff(e),$s("hostEntity.tab.remove",[new nf(e),new ef(t)],new Ii,zn(Zd,"hostEntity.tab.remove"))}function uf(){var e;return!!(Ir(Xn)&&gf()&&(null===(e=Xn.supports.hostEntity)||void 0===e?void 0:e.tab))}function df(e){if(!e||0==e.length)throw new Error(`Error code: ${Re.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function ff(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Re.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var pf;function gf(){return!(!Ir(Xn)||!Xn.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(pf||(pf={}));var mf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const hf="v2",vf="Invalid store dialog size",wf="No App Id present, but AppId needed to open AppDetail store",Cf="No Collection Id present, but CollectionId needed to open a store specific to a collection";function yf(e){return mf(this,void 0,void 0,(function*(){If();const{size:t}=null!=e?e:{};return qs("store.openFullStore",[Tf(t)],zn(hf,"store.openFullStore"))}))}function bf(e){return mf(this,void 0,void 0,(function*(){If();const{size:t,appId:n}=e;if(!(n instanceof Ur))throw new Error(wf);return qs("store.openAppDetail",[Tf(t),n],zn(hf,"store.openAppDetail"))}))}function Sf(e){return mf(this,void 0,void 0,(function*(){If();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return qs("store.openInContextStore",[Tf(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],zn(hf,"store.openInContextStore"))}))}function Ef(e){return mf(this,void 0,void 0,(function*(){If();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Cf);return qs("store.openSpecificStore",[Tf(t),n],zn(hf,"store.openSpecificStore"))}))}function Af(){return Ir(Xn)&&!!Xn.supports.store}function If(){if(Ir(Xn,rn.content,rn.sidePanel,rn.meetingStage),!Af())throw ln}function Tf(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(vf);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(vf);return JSON.stringify(e)}var Pf=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 Of="v1",Rf="v2";let Ff;function kf(e){Ff=e}function Mf(e){const t=void 0!==e,n=t?e:Ff;if(!n)throw new Error("No parameters are provided for authentication");Ir(Xn,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);return Nf(n.successCallback||n.failureCallback?zn(Of,"authentication.authenticate"):zn(Rf,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Ff=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Ff=void 0)}}))}function Nf(e,t){return Pf(this,void 0,void 0,(function*(){const n=kn(t.url);return Fn(n),js(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function xf(e){Ar();return Lf(e&&(e.successCallback||e.failureCallback)?zn(Of,"authentication.getAuthToken"):zn(Rf,"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 Lf(e,t){return new Promise((n=>{n(js(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 Uf(e){Ar();return Df(e&&(e.successCallback||e.failureCallback)?zn(Of,"authentication.getUser"):zn(Rf,"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 Df(e){return new Promise((t=>{t(js(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function Hf(e,t){Ir(Xn,rn.authentication);Qs(zn(t?Of:Rf,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),yc(Ls.parentWindow,(()=>setTimeout((()=>Ls.currentWindow.close()),200)))}function Vf(e,t){Ir(Xn,rn.authentication);Qs(zn(t?Of:Rf,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),yc(Ls.parentWindow,(()=>setTimeout((()=>Ls.currentWindow.close()),200)))}var _f;function Bf(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"}(_f||(_f={}));class Wf{constructor(e){this.val=e,Bf(e)}toString(){return this.val}}const jf="/l/app/",zf="/l/meeting/new",$f="attendees",qf="startTime",Gf="endTime",Jf="subject",Kf="content",Qf="/l/call/0/0",Zf="source",Xf="withVideo",Yf="/l/chat/0/0",ep="users",tp="topicName",np="message";function rp(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${ep}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${tp}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${np}=${encodeURIComponent(n)}`;return`${Ye}://${et}${Yf}?${r}${o}${i}`}function op(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${ep}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Xf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Zf}=${encodeURIComponent(n)}`;return`${Ye}://${et}${Qf}?${r}${o}${i}`}function ip(e,t,n,r,o){const i=void 0===e?"":`${$f}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${qf}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Gf}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Jf}=${encodeURIComponent(r)}`,l=void 0===o?"":`&${Kf}=${encodeURIComponent(o)}`;return`${Ye}://${et}${zf}?${i}${a}${s}${c}${l}`}function ap(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${Ye}://${et}${jf}${encodeURIComponent(e)}`}const sp="v1";function cp(e){return new Promise((t=>{if(Ir(Xn,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!lp())throw new Error("Not supported");const n=zn(sp,"appInstallDialog.openAppInstallDialog");Xn.isLegacyTeams?t(_s(n,"executeDeepLink",ap(e.appId))):(Qs(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function lp(){return!(!Ir(Xn)||!Xn.supports.appInstallDialog)}const up="v1",dp=jn("media");var fp,pp,gp,mp,hp,vp,wp;!function(e){e.Base64="base64",e.ID="id"}(fp||(fp={}));class Cp{}function yp(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Ir(Xn,rn.content,rn.task),it.isFramelessWindow)if(Tr(qe))Qs(zn(up,"media.captureImage"),"captureImage",e);else{e({errorCode:Re.OLD_PLATFORM},[])}else{e({errorCode:Re.NOT_SUPPORTED_ON_PLATFORM},[])}}function bp(){if(Ir(Xn,rn.content,rn.task),!Ep())throw ln;const e=Fe.Media;return new Promise((t=>{t(Ws(zn(up,"media.hasPermission"),"permissions.has",e))}))}function Sp(){if(Ir(Xn,rn.content,rn.task),!Ep())throw ln;const e=Fe.Media;return new Promise((t=>{t(Ws(zn(up,"media.requestPermission"),"permissions.request",e))}))}function Ep(){return!(!Ir(Xn)||!Xn.supports.permissions)}class Ap extends Cp{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(Ir(Xn,rn.content,rn.task),Tr(Ge))if(Hp(this.mimeType,this.format,this.content))Tr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:Re.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:Re.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Qs(zn(up,"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=Fp(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=kp(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):dp(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Re.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=hn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Dr(e)&&Qs(zn(up,"media.getMedia"),"getMedia",r),Xa(zn(up,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Ya("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Fp(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Ya("getMedia"+t)}else{const e=kp(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Re.INTERNAL_ERROR,message:"data received is null"},new Blob),Ya("getMedia"+t)}}))}}class Ip{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Ir(Xn,rn.content,rn.task);try{Or(Be)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Qs(zn(up,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(pp.StopRecording,e)}}class Tp extends Ip{getMediaType(){return hp.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case pp.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Pp(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Ir(Xn,rn.content,rn.task),!Tr(Ge)){const e={errorCode:Re.OLD_PLATFORM};return void t(e,[])}try{Mp(e)}catch(e){return void t(e,[])}if(!xp(e)){const e={errorCode:Re.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Qs(zn(up,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Np(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 Ap(e));t(n,s)}))}function Op(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Ir(Xn,rn.content,rn.task),!Tr(Ge)){return void t({errorCode:Re.OLD_PLATFORM})}if(!Vp(e)){return void t({errorCode:Re.INVALID_ARGUMENTS})}const n=[e];Qs(zn(up,"media.viewImages"),"viewImages",n,t)}function Rp(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Ir(Xn,rn.content,rn.task),it.hostClientType!==tn.desktop&&it.hostClientType!==tn.web&&it.hostClientType!==tn.rigel&&it.hostClientType!==tn.teamsRoomsWindows&&it.hostClientType!==tn.teamsRoomsAndroid&&it.hostClientType!==tn.teamsPhones&&it.hostClientType!==tn.teamsDisplays)if(Tr(Je))if(_p(t))Qs(zn(up,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:Re.INVALID_ARGUMENTS},"")}else{e({errorCode:Re.OLD_PLATFORM},"")}else{e({errorCode:Re.NOT_SUPPORTED_ON_PLATFORM},"")}}function Fp(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 kp(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 Mp(e){Up(e)?Or(_e):Dp(e)?Or(Be):Lp(e)&&Or(We)}function Np(e){return!(e.mediaType!=hp.Video||!e.videoProps||!e.videoProps.videoController)}function xp(e){return!(null==e||e.maxMediaCount>10)}function Lp(e){var t;return!((null==e?void 0:e.mediaType)!=hp.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Up(e){return!(!e||e.mediaType!=hp.VideoAndImage&&!e.videoAndImageProps)}function Dp(e){return!(!e||e.mediaType!=hp.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Hp(e,t,n){return null!=e&&null!=t&&t==fp.ID&&null!=n}function Vp(e){return!(null==e||e.length<=0||e.length>10)}function _p(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Bp(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"}(pp||(pp={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(gp||(gp={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(mp||(mp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(hp||(hp={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(vp||(vp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(wp||(wp={}));const Wp="v2";function jp(e){return new Promise((t=>{if(Ir(Xn,rn.content,rn.task),!qp())throw ln;if(!_p(e))throw{errorCode:Re.INVALID_ARGUMENTS};t(Ws(zn(Wp,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function zp(){if(Ir(Xn,rn.content,rn.task),!qp())throw ln;const e=Fe.Media;return new Promise((t=>{t(Ws(zn(Wp,"barCode.hasPermission"),"permissions.has",e))}))}function $p(){if(Ir(Xn,rn.content,rn.task),!qp())throw ln;const e=Fe.Media;return new Promise((t=>{t(Ws(zn(Wp,"barCode.requestPermission"),"permissions.request",e))}))}function qp(){return!!(Ir(Xn)&&Xn.supports.barCode&&Xn.supports.permissions)}const Gp="v2";function Jp(e){return Kp(zn(Gp,"chat.openChat"),e)}function Kp(e,t){return new Promise((n=>{if(Ir(Xn,rn.content,rn.task),!Zp())throw ln;if(Xn.isLegacyTeams)n(_s(e,"executeDeepLink",rp([t.user],void 0,t.message)));else{n(_s(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Qp(e){const t=zn(Gp,"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(Kp(t,r))}else{if(Ir(Xn,rn.content,rn.task),!Zp())throw ln;if(Xn.isLegacyTeams)n(_s(t,"executeDeepLink",rp(e.users,e.topic,e.message)));else{n(_s(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Zp(){return!(!Ir(Xn)||!Xn.supports.chat)}var Xp=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 Yp="v2";function eg(e){return Xp(this,void 0,void 0,(function*(){if(Ir(Xn,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel),!ng())throw ln;if(!e.type||!Object.values(Le).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Le)}`);const t=yield Tn(e),n={mimeType:e.type,content:t};return Ws(zn(Yp,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function tg(){return Xp(this,void 0,void 0,(function*(){Ir(Xn,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel);const e=zn(Yp,"clipboard.read");if(!ng())throw ln;const t=yield Ws(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return In(e.mimeType,e.content)}return t}))}function ng(){return it.isFramelessWindow?!(!Ir(Xn)||!Xn.supports.clipboard):!!(Ir(Xn)&&navigator&&navigator.clipboard&&Xn.supports.clipboard)}function rg(){var e;return null!==(e=Ir(Xn)&&(Xn.isNAAChannelRecommended||og()))&&void 0!==e&&e}function og(){return!!(Ir(Xn)&&ig()&&Xn.isLegacyTeams&&Xn.supports.nestedAppAuth)}function ig(){return it.hostClientType===tn.android||it.hostClientType===tn.ios||it.hostClientType===tn.ipados||it.hostClientType===tn.visionOS}const ag="v2";function sg(){if(Ir(Xn,rn.content,rn.task),!lg())throw ln;return Ws(zn(ag,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function cg(e){if(Ir(Xn,rn.content,rn.task),!lg())throw ln;if(!e)throw{errorCode:Re.INVALID_ARGUMENTS};return Ws(zn(ag,"geoLocation.showLocation"),"location.showLocation",e)}function lg(){return!!(Ir(Xn)&&Xn.supports.geoLocation&&Xn.supports.geoLocation.map&&Xn.supports.permissions)}const ug="v2";function dg(){if(Ir(Xn,rn.content,rn.task),!gg())throw ln;return Ws(zn(ug,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function fg(){if(Ir(Xn,rn.content,rn.task),!gg())throw ln;const e=Fe.GeoLocation;return new Promise((t=>{t(Ws(zn(ug,"geoLocation.hasPermission"),"permissions.has",e))}))}function pg(){if(Ir(Xn,rn.content,rn.task),!gg())throw ln;const e=Fe.GeoLocation;return new Promise((t=>{t(Ws(zn(ug,"geoLocation.requestPermission"),"permissions.request",e))}))}function gg(){return!!(Ir(Xn)&&Xn.supports.geoLocation&&Xn.supports.permissions)}function mg(){return Xn.hostVersionsInfo?Xn.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const hg="v1";class vg{postMessage(e,t){Ir(Xn),Qs(zn(hg,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||gn())}addEventListener(e,t){Ir(Xn),"message"===e&&Xa(zn(hg,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class wg{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Ir(Xn,rn.task),Qs(zn(hg,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||gn())}addEventListener(e,t){Ir(Xn,rn.task),"message"===e&&Xa(zn(hg,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const Cg="v2";function yg(e){if(Ir(Xn,rn.content),!bg())throw ln;if(!e||!An(e))throw{errorCode:Re.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Ws(zn(Cg,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function bg(){return!(!Ir(Xn)||!Xn.supports.secondaryBrowser)}const Sg="v1";function Eg(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Ir(Xn,rn.content,rn.task),!Tr(ze))throw{errorCode:Re.OLD_PLATFORM};if(!e)throw{errorCode:Re.INVALID_ARGUMENTS};if(!Ig())throw ln;Qs(zn(Sg,"location.getLocation"),"location.getLocation",[e],t)}function Ag(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Ir(Xn,rn.content,rn.task),!Tr(ze))throw{errorCode:Re.OLD_PLATFORM};if(!e)throw{errorCode:Re.INVALID_ARGUMENTS};if(!Ig())throw ln;Qs(zn(Sg,"location.showLocation"),"location.showLocation",[e],t)}function Ig(){return!(!Ir(Xn)||!Xn.supports.location)}const Tg="v1";function Pg(e){Ir(Xn,rn.sidePanel),e.contentUrl&&new URL(e.contentUrl),Qs(zn(Tg,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Og=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 Rg="v1";var Fg,kg,Mg,Ng,xg,Lg;function Ug(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Ir(Xn,rn.sidePanel,rn.meetingStage),Qs(zn(Rg,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Dg(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Ir(Xn,rn.sidePanel,rn.meetingStage),Qs(zn(Rg,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Hg(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Ir(Xn,rn.sidePanel,rn.meetingStage,rn.settings,rn.content),Qs(zn(Rg,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Vg(){var e,t,n;return Og(this,void 0,void 0,(function*(){let r;Ir(Xn,rn.sidePanel,rn.meetingStage,rn.settings,rn.content);try{const e=!0;r=yield Ws(zn("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)==Ng.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Ng.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Re.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function _g(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Ir(Xn,rn.sidePanel,rn.meetingStage,rn.task),Qs(zn(Rg,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Bg(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Ir(Xn,rn.sidePanel),Qs(zn(Rg,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Wg(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Ir(Xn,rn.sidePanel),Qs(zn(Rg,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function jg(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Ir(Xn,rn.sidePanel),Qs(zn(Rg,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function zg(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Ir(Xn,rn.sidePanel),Xa(zn(Rg,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function $g(e,t,n={sharingProtocol:xg.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Ir(Xn,rn.sidePanel,rn.meetingStage),Qs(zn(Rg,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function qg(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Ir(Xn,rn.sidePanel,rn.meetingStage),Qs(zn(Rg,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Gg(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Ir(Xn,rn.sidePanel,rn.meetingStage),Qs(zn(Rg,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Jg(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Ir(Xn,rn.sidePanel,rn.meetingStage),Qs(zn(Rg,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Kg(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Ir(Xn,rn.sidePanel,rn.meetingStage),Xa(zn(Rg,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Qg(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Ir(Xn,rn.sidePanel,rn.meetingStage),Xa(zn(Rg,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Zg(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Ir(Xn,rn.sidePanel,rn.meetingStage),Xa(zn(Rg,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Xg(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Ir(Xn);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Lg.Other};return Ws(zn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Yg(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");Ir(Xn,rn.sidePanel,rn.meetingStage),e.isAppHandlingAudio?em(e,t):tm(e,t)}function em(e,t){Qs(zn(Rg,"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");Xa(zn(Rg,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>Og(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);rm(n,n.isMicMuted===t.isMicMuted?Fg.HostInitiated:Fg.AppDeclinedToChange)}catch(e){rm(t,Fg.AppFailedToChange)}}))));Xa(zn(Rg,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function tm(e,t){Qs(zn(Rg,"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");es("meeting.micStateChanged")&&Ya("meeting.micStateChanged"),es("meeting.audioDeviceSelectionChanged")&&Ya("meeting.audioDeviceSelectionChanged"),t(n)}))}function nm(e){rm(e,Fg.AppInitiated)}function rm(e,t){Ir(Xn,rn.sidePanel,rn.meetingStage),Qs(zn(Rg,"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"}(Fg||(Fg={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(kg||(kg={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Mg||(Mg={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Ng||(Ng={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(xg||(xg={})),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"}(Lg||(Lg={}));const om="v1",im="v2";function am(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=zn(om,"monetization.openPurchaseExperience")):(r=e,o=zn(im,"monetization.openPurchaseExperience"));return Ir(Xn,rn.content),yn((()=>new Promise((e=>{if(!sm())throw ln;e(Ws(o,"monetization.openPurchaseExperience",r))}))),n)}function sm(){return!(!Ir(Xn)||!Xn.supports.monetization)}const cm="v2";function lm(e){return new Promise((t=>{if(Ir(Xn,rn.content),!dm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(_s(zn(cm,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function um(e){return new Promise((t=>{if(Ir(Xn,rn.content),!dm())throw new Error("Not supported");const n=zn(cm,"calendar.composeMeeting");Xn.isLegacyTeams?t(_s(n,"executeDeepLink",ip(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(_s(n,"calendar.composeMeeting",e))}))}function dm(){return!(!Ir(Xn)||!Xn.supports.calendar)}const fm="v2";function pm(e){e&&0!==e.length&&e.forEach((e=>{Bf(e)}))}function gm(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===Sm.New&&(pm(t.toRecipients),pm(t.ccRecipients),pm(t.bccRecipients))}function mm(e){if(Ir(Xn,rn.content),!hm())throw new Error("Not supported");return gm(e),qs("mail.handoff.composeMail",[new vm(e)],zn(fm,"mail.handoff.composeMail"))}function hm(){return!!(Ir(Xn)&&Xn.supports.mail&&Xn.supports.mail.handoff)}class vm{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const wm="v2";function Cm(e){return new Promise((t=>{if(Ir(Xn,rn.content),!bm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(_s(zn(wm,"mail.openMailItem"),"mail.openMailItem",e))}))}function ym(e){return new Promise((t=>{if(Ir(Xn,rn.content),!bm())throw new Error("Not supported");t(_s(zn(wm,"mail.composeMail"),"mail.composeMail",e))}))}function bm(){return!(!Ir(Xn)||!Xn.supports.mail)}var Sm;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Sm||(Sm={}));const Em="v2";function Am(){if(!it.printCapabilityEnabled){if(Ir(Xn),!Fm())throw ln;it.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Im(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function Im(){Pn().print()}function Tm(e){Pm(zn(Em,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Dr(e)&&!Fm())throw ln}))}function Pm(e,t,n){!Dr(t)&&Ir(Xn),!Dr(t)&&n&&n(),as(e,t)}function Om(e){Rm(zn(Em,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Dr(e)&&!Fm())throw ln}))}function Rm(e,t,n){!Dr(t)&&Ir(Xn),!Dr(t)&&n&&n(),ls(e,t)}function Fm(){return!(!Ir(Xn)||!Xn.supports.teamsCore)}const km="v1",Mm="v2";function Nm(e,t){let n,r;Ir(Xn,rn.content,rn.task,rn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=zn(km,"people.selectPeople")):(r=e,o=zn(Mm,"people.selectPeople")),wn(xm,n,o,r)}function xm(e,t){return new Promise((n=>{if(!Tr($e))throw{errorCode:Re.OLD_PLATFORM};if(!Bp(t))throw{errorCode:Re.INVALID_ARGUMENTS};if(!Lm())throw ln;n(Ws(e,"people.selectPeople",t))}))}function Lm(){return!(!Ir(Xn)||!Xn.supports.people)}function Um(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?Dm(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Dm(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 Hm="v2";function Vm(e){return Ir(Xn,rn.content),new Promise((t=>{const[n,r]=Um(e);if(!n)throw{errorCode:Re.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(Ws(zn(Hm,"profile.showProfile"),"profile.showProfile",o))}))}function _m(){return!(!Ir(Xn)||!Xn.supports.profile)}const Bm="v2",Wm="search.queryChange",jm="search.queryClose",zm="search.queryExecute";function $m(e,t,n){if(Ir(Xn,rn.content),!Gm())throw ln;Xa(zn(Bm,"search.registerOnClosedHandler"),jm,e),Xa(zn(Bm,"search.registerOnExecutedHandler"),zm,t),n&&Xa(zn(Bm,"search.registerOnChangeHandler"),Wm,n)}function qm(){if(Ir(Xn,rn.content),!Gm())throw ln;Qs(zn(Bm,"search.unregisterHandlers"),"search.unregister"),Ya(Wm),Ya(jm),Ya(zm)}function Gm(){return!(!Ir(Xn)||!Xn.supports.search)}function Jm(){return new Promise((e=>{if(Ir(Xn,rn.content),!Gm())throw new Error("Not supported");e(_s(zn(Bm,"search.closeSearch"),"search.closeSearch"))}))}var Km=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 Qm="v2";function Zm(){return Km(this,void 0,void 0,(function*(){if(Ir(Xn,rn.sidePanel,rn.meetingStage),!Xm())throw ln;return yield Ws(zn(Qm,"sharing.history.getContent"),"sharing.history.getContent")}))}function Xm(){var e;return Ir(Xn)&&void 0!==(null===(e=Xn.supports.sharing)||void 0===e?void 0:e.history)}const Ym="v1",eh="v2",th={shareWebContent:"sharing.shareWebContent"};function nh(e,t){try{oh(e),ih(e),ah(e)}catch(e){return Cn((()=>Promise.reject(e)),t)}Ir(Xn,rn.content,rn.sidePanel,rn.task,rn.stage,rn.meetingStage);return Cn(rh,t,zn(t?Ym:eh,"sharing.shareWebContent"),e)}function rh(e,t){return new Promise((n=>{if(!sh())throw ln;n(Ws(e,th.shareWebContent,t))}))}function oh(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Re.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function ih(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:Re.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:Re.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function ah(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Re.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:Re.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function sh(){return!(!Ir(Xn)||!Xn.supports.sharing)}const ch="v2";function lh(){return new Promise((e=>{if(Ir(Xn,rn.content),!uh())throw ln;e(Ws(zn(ch,"stageView.self.close"),"stageView.self.close"))}))}function uh(){var e;return Ir(Xn)&&void 0!==(null===(e=Xn.supports.stageView)||void 0===e?void 0:e.self)}const dh="v2";var fh;function ph(e){return new Promise((t=>{if(Ir(Xn,rn.content),!gh())throw ln;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Ws(zn(dh,"stageView.open"),"stageView.open",e))}))}function gh(){return!(!Ir(Xn)||!Xn.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(fh||(fh={}));const mh=10;var hh=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 vh="v2";function wh(e){return hh(this,void 0,void 0,(function*(){Ir(Xn,rn.content,rn.task),bh(),Sh(e);const t=yield Ws(zn(vh,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Eh(e.maxVisualMediaCount,t),t}))}function Ch(e){return hh(this,void 0,void 0,(function*(){Ir(Xn,rn.content,rn.task),bh(),Sh(e);const t=yield Ws(zn(vh,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Eh(e.maxVisualMediaCount,t),t}))}function yh(){return!!(Ir(Xn)&&Xn.supports.visualMedia&&Xn.supports.visualMedia.image&&Xn.supports.permissions)}function bh(){if(!yh())throw ln}function Sh(e){if(!e||e.maxVisualMediaCount>mh||e.maxVisualMediaCount<1)throw fn}function Eh(e,t){if(t.length>e)throw pn}const Ah="v2";var Ih,Th;function Ph(){if(Ir(Xn,rn.content,rn.task),!yh())throw ln;const e=Fe.Media;return Ws(zn(Ah,"visualMedia.hasPermission"),"permissions.has",e)}function Oh(){if(Ir(Xn,rn.content,rn.task),!yh())throw ln;const e=Fe.Media;return Ws(zn(Ah,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Ih||(Ih={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Th||(Th={}));var Rh=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 Fh=null;function kh(){return Rh(this,void 0,void 0,(function*(){return null===Fh&&(Fh=(yield uo()).app.host.name),Fh}))}var Mh=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 Nh(){return Mh(this,void 0,void 0,(function*(){if(Ir(Xn),!Lh())throw ln;return!(!Xn.isLegacyTeams||it.hostClientType!==tn.android&&it.hostClientType!==tn.ios&&it.hostClientType!==tn.ipados&&it.hostClientType!==tn.visionOS||(yield xh())!==nn.teams)||(yield Vs(zn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function xh(){return Mh(this,void 0,void 0,(function*(){return kh()}))}function Lh(){return Ir(Xn)&&void 0!==Xn.supports.webStorage}const Uh="v2";var Dh;function Hh(e){const t=zn(Uh,"call.startCall");return new Promise((n=>{var r;if(Ir(Xn,rn.content,rn.task),!Vh())throw ln;if(!Xn.isLegacyTeams)return Qs(t,"call.startCall",[e],n);n(Vs(t,"executeDeepLink",op(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Dh.Video),e.source)).then((e=>{if(!e)throw new Error(ot);return e})))}))}function Vh(){return!(!Ir(Xn)||!Xn.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Dh||(Dh={}));const _h="v1";function Bh(){Fi(zn(_h,"appInitialization.notifyAppLoaded"))}function Wh(){Qs(zn(_h,"appInitialization.notifySuccess"),no.Success,[fr])}function jh(e){Mi(zn(_h,"appInitialization.notifyFailure"),e)}function zh(e){ki(zn(_h,"appInitialization.notifyExpectedFailure"),e)}const $h=jn("thirdPartyCloudStorage"),qh="v2";class Gh{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Jh=[],Kh=null,Qh=!0,Zh=null;function Xh(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Ir(Xn,rn.content,rn.task),!ev())throw ln;if(Zh)throw Zh=null,new Error("getDragAndDropFiles cannot be called twice");Zh=t,Qh=!0,Qs(zn(qh,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],Yh)}else{t([],{errorCode:Re.INVALID_ARGUMENTS})}}function Yh(e){if(Zh)if(e&&e.error)Zh([],e.error),Zh=null;else if(e&&e.fileChunk)try{Qh||0!==e.fileChunk.chunkSequence||($h("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Qh=!0,Zh([],{errorCode:Re.INTERNAL_ERROR,message:"error occurred while receiving data"}),Jh=[],Zh=null);const t=kp(e.fileChunk,e.fileType);if(t?(Kh||(Kh=new Gh(e.fileType,[])),Kh.assembleAttachment.push(t)):($h(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Zh?Zh([],{errorCode:Re.INTERNAL_ERROR,message:"error occurred while receiving data"}):Zh=null,Jh=[],Zh=null,Qh=!0),Qh=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Kh){const t=Fp(Kh.assembleAttachment,Kh.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Jh.push(n)}e.isLastFile&&Zh&&(Zh(Jh,e.error),Jh=[],Zh=null,Qh=!0),Kh=null}}catch(e){Zh&&(Zh([],{errorCode:Re.INTERNAL_ERROR,message:e}),Jh=[],Zh=null,Qh=!0)}else Zh([],{errorCode:Re.INTERNAL_ERROR,message:"data received is null"}),Jh=[],Zh=null,Qh=!0}function ev(){return!(!Ir(Xn)||!Xn.supports.thirdPartyCloudStorage)}const tv="v1";function nv(e,t){Ri(zn(tv,"initialize"),t).then((()=>{e&&e()}))}function rv(){Am()}function ov(){Im()}function iv(e){Ar(),Qs(zn(tv,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=it.frameContext),e(t)}))}function av(e){Hi(zn(tv,"registerOnThemeChangeHandlerHelper"),e)}function sv(e){ts(zn(tv,"registerFullScreenHandler"),"fullScreenChange",e,[])}function cv(e){ts(zn(tv,"registerAppButtonClickHandler"),"appButtonClick",e,[rn.content])}function lv(e){ts(zn(tv,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[rn.content])}function uv(e){ts(zn(tv,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[rn.content])}function dv(e){na(zn(tv,"registerBackButtonHandler"),e)}function fv(e){Pm(zn(tv,"registerOnLoadHandler"),e)}function pv(e){Rm(zn(tv,"registerBeforeUnloadHandler"),e)}function gv(e){ts(zn(tv,"registerFocusEnterHandler"),"focusEnter",e,[])}function mv(e){ts(zn(tv,"registerChangeSettingsHandler"),"changeSettings",e,[rn.content])}function hv(e,t){Ir(Xn),ka(zn(tv,"getTabInstances"),t).then((t=>{e(t)}))}function vv(e,t){Ir(Xn),Ma(zn(tv,"getMruTabInstances"),t).then((t=>{e(t)}))}function wv(e){Na(zn(tv,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Cv(e,t){Ir(Xn,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:gn();Vi(zn(tv,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function yv(e){xa(zn(tv,"setFrameContext"),e)}function bv(e,t,n){Ri(zn(tv,"initializeWithFrameContext"),n).then((()=>t&&t())),xa(zn(tv,"setFrameContext"),e)}const Sv="v1";function Ev(e){Fa(zn(Sv,"navigation.returnFocus"),e)}function Av(e,t){Ir(Xn);const n=null!=t?t:gn();Ra(zn(Sv,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Iv(e,t){Ir(Xn,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:gn();Pa(zn(Sv,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Tv(e){Ir(Xn);const t=null!=e?e:gn();Oa(zn(Sv,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const Pv="v1";function Ov(e){La(zn(Pv,"settings.setValidityState"),e)}function Rv(e){Ir(Xn,rn.content,rn.settings,rn.remove,rn.sidePanel),Ua(zn(Pv,"settings.getSettings")).then((t=>{e(t)}))}function Fv(e,t){Ir(Xn,rn.content,rn.settings,rn.sidePanel);const n=null!=t?t:gn();Da(zn(Pv,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function kv(e){mi(zn(Pv,"settings.registerOnSaveHandler"),e)}function Mv(e){vi(zn(Pv,"settings.registerOnRemoveHandler"),e)}var Nv=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 xv="v1";function Lv(e,t){const n=zn(xv,"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?(Ir(Xn,rn.content,rn.sidePanel,rn.meetingStage),Qs(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Uo(n,Vv(e),r):Lo(n,Hv(e),r),new vg}function Uv(e){e=_v(e);const{width:t,height:n}=e,r=Nv(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");xo(zn(xv,"tasks.updateTask"),e)}function Dv(e,t){Do(zn(xv,"tasks.submitTask"),e,t)}function Hv(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:sn.Small,width:e.width?e.width:sn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Vv(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:sn.Small,width:e.width?e.width:sn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function _v(e){return e.height=e.height?e.height:sn.Small,e.width=e.width?e.width:sn.Small,e}const Bv="v2";var Wv,jv;function zv(){return!(!Ir(Xn,rn.meetingStage,rn.sidePanel,rn.content)||!Xn.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Wv||(Wv={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(jv||(jv={}));class $v{getFluidTenantInfo(){return qv(),new Promise((e=>{e(Ws(zn(Bv,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return qv(),new Promise((t=>{t(Ws(zn(Bv,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return qv(),new Promise((e=>{e(Ws(zn(Bv,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return qv(),new Promise((t=>{t(Ws(zn(Bv,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return qv(),new Promise((e=>{e(Ws(zn(Bv,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return qv(),new Promise((t=>{t(Ws(zn(Bv,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return qv(),new Promise((t=>{t(Ws(zn(Bv,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return qv(),new Promise((t=>{t(Ws(zn(Bv,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return qv(),new $v}}function qv(){if(!zv())throw new Error("LiveShareHost Not supported")}var Gv=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 Jv(e){try{return e.cartItems=Kv(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Kv(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Kv(e.accessories)),e}))}const Qv=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Gv(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Qv(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)Yv(t),Xv(t.accessories)}function Xv(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");Yv(t)}}}function Yv(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");tw(e.price),nw(e.quantity)}function ew(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}}function tw(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 nw(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function rw(e){if(!Object.values(sw).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const ow="v2",iw={majorVersion:1,minorVersion:1};var aw,sw;function cw(){if(Ir(Xn,rn.content,rn.task),!fw())throw ln;return Ws(zn(ow,"marketplace.getCart"),"marketplace.getCart",iw).then(Jv)}function lw(e){if(Ir(Xn,rn.content,rn.task),!fw())throw ln;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return ew(null==e?void 0:e.cartId),Zv(null==e?void 0:e.cartItems),Ws(zn(ow,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Qv(e.cartItems),cartVersion:iw})).then(Jv)}function uw(e){if(Ir(Xn,rn.content,rn.task),!fw())throw ln;if(!e)throw new Error("removeCartItemsParams must be provided");if(ew(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 Ws(zn(ow,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:iw})).then(Jv)}function dw(e){if(Ir(Xn,rn.content,rn.task),!fw())throw ln;if(!e)throw new Error("updateCartStatusParams must be provided");return ew(null==e?void 0:e.cartId),rw(null==e?void 0:e.cartStatus),Ws(zn(ow,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:iw})).then(Jv)}function fw(){return!(!Ir(Xn)||!Xn.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(aw||(aw={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(sw||(sw={}))})(),r})()));
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],u=i[1],l=new o(c(e,a,u)),d=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(l(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?u(e,i,o,"day"):i>=r?u(e,i,r,"hour"):i>=n?u(e,i,n,"minute"):i>=t?u(e,i,t,"second"):e+" ms"}function u(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>Re,AppId:()=>Jr,ChannelType:()=>cn,ChildAppWindow:()=>cm,DialogDimension:()=>sn,EduType:()=>Le,EmailAddress:()=>bp,ErrorCode:()=>ke,FileOpenPreference:()=>Oe,FrameContexts:()=>rn,HostClientType:()=>tn,HostName:()=>nn,LiveShareHost:()=>Lw,NotificationTypes:()=>_c,ParentAppWindow:()=>um,SecondaryM365ContentIdName:()=>Fe,TaskModuleDimension:()=>sn,TeamType:()=>on,UUID:()=>Vn,UserSettingTypes:()=>Wc,UserTeamRole:()=>an,ValidatedSafeString:()=>Gr,ViewerActionTypes:()=>Bc,activateChildProxyingCommunication:()=>vr,app:()=>i,appEntity:()=>V,appInitialization:()=>Ee,appInstallDialog:()=>K,authentication:()=>J,barCode:()=>Z,calendar:()=>ce,call:()=>Se,chat:()=>X,clipboard:()=>Y,conversations:()=>S,copilot:()=>I,dialog:()=>f,enablePrintCapability:()=>Jv,executeDeepLink:()=>lw,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>R,externalAppCardActionsForDA:()=>F,externalAppCommands:()=>k,files:()=>M,geoLocation:()=>ne,getAdaptiveCardSchemaVersion:()=>am,getContext:()=>Qv,getCurrentFeatureFlagsState:()=>yr,getMruTabInstances:()=>cw,getTabInstances:()=>sw,hostEntity:()=>q,initialize:()=>Gv,initializeWithFrameContext:()=>fw,liveShare:()=>Pe,location:()=>oe,logs:()=>b,mail:()=>le,marketplace:()=>He,media:()=>Q,meeting:()=>ae,meetingRoom:()=>N,menus:()=>p,messageChannels:()=>x,monetization:()=>se,navigateBack:()=>vw,navigateCrossDomain:()=>hw,navigateToTab:()=>mw,nestedAppAuth:()=>ee,nestedAppAuthBridge:()=>D,notifications:()=>L,openFilePreview:()=>Kc,otherAppStateChange:()=>U,overwriteFeatureFlagsState:()=>Sr,pages:()=>y,people:()=>fe,print:()=>Kv,profile:()=>pe,registerAppButtonClickHandler:()=>Yv,registerAppButtonHoverEnterHandler:()=>ew,registerAppButtonHoverLeaveHandler:()=>tw,registerBackButtonHandler:()=>nw,registerBeforeUnloadHandler:()=>ow,registerChangeSettingsHandler:()=>aw,registerCustomHandler:()=>Gc,registerFocusEnterHandler:()=>iw,registerFullScreenHandler:()=>Xv,registerOnLoadHandler:()=>rw,registerOnThemeChangeHandler:()=>Zv,registerUserSettingsChangeHandler:()=>Jc,remoteCamera:()=>H,returnFocus:()=>gw,search:()=>ge,secondaryBrowser:()=>re,sendCustomEvent:()=>qc,sendCustomMessage:()=>$c,setFeatureFlagsState:()=>br,setFrameContext:()=>dw,settings:()=>Ie,shareDeepLink:()=>uw,sharing:()=>he,stageView:()=>we,store:()=>G,tasks:()=>Te,teams:()=>W,teamsCore:()=>de,thirdPartyCloudStorage:()=>Ae,uploadCustomApp:()=>zc,version:()=>mr,videoEffects:()=>j,videoEffectsEx:()=>z,visualMedia:()=>ye,webStorage:()=>be});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>no,getTelemetryPort:()=>eo,isSupported:()=>to});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>uo,getDataLayerPort:()=>so,isSupported:()=>co});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>lo,registerOnResumeHandler:()=>fo});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>vo,FailedReason:()=>ho,Messages:()=>mo,_initialize:()=>bo,_uninitialize:()=>So,getContext:()=>Eo,getFrameContext:()=>Co,initialize:()=>yo,isInitialized:()=>wo,lifecycle:()=>o,notifyAppLoaded:()=>Ao,notifyExpectedFailure:()=>Po,notifyFailure:()=>To,notifySuccess:()=>Io,openLink:()=>Fo,registerHostToAppPerformanceMetricsHandler:()=>Ro,registerOnThemeChangeHandler:()=>Oo});var a={};n.r(a),n.d(a,{isSupported:()=>No,resize:()=>Mo});var s={};n.r(s),n.d(s,{isSupported:()=>Do,open:()=>xo});var c={};n.r(c),n.d(c,{isSupported:()=>Vo,registerOnMessageFromParent:()=>Ho,sendMessageToDialog:()=>Uo,sendMessageToParentFromDialog:()=>Lo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>zo,getDialogInfoFromUrlDialogInfo:()=>jo,isSupported:()=>Wo,open:()=>_o,parentCommunication:()=>c,submit:()=>Bo});var l={};n.r(l),n.d(l,{isSupported:()=>ni,open:()=>ti});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>oi,open:()=>ri});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>ii,isSupported:()=>ai,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>ci,MenuItem:()=>li,MenuListType:()=>ui,initialize:()=>hi,isSupported:()=>Ei,setNavBarMenu:()=>Ci,setUpViews:()=>vi,showActionMenu:()=>bi});var g={};n.r(g),n.d(g,{initialize:()=>Ai,isSupported:()=>Li,registerChangeConfigHandler:()=>Mi,registerOnRemoveHandler:()=>Ri,registerOnRemoveHandlerHelper:()=>Fi,registerOnSaveHandler:()=>Pi,registerOnSaveHandlerHelper:()=>Oi,setConfig:()=>Ti,setValidityState:()=>Ii});var m={};n.r(m),n.d(m,{isSupported:()=>da,onClick:()=>ca,onHoverEnter:()=>ua,onHoverLeave:()=>la});var h={};n.r(h),n.d(h,{_initialize:()=>fa,isSupported:()=>ha,navigateBack:()=>pa,registerBackButtonHandler:()=>ga,registerBackButtonHandlerHelper:()=>ma});var v={};n.r(v),n.d(v,{isSupported:()=>Ca,navigateTo:()=>va,navigateToDefaultPage:()=>wa});var w={};n.r(w),n.d(w,{enterFullscreen:()=>ya,exitFullscreen:()=>ba,isSupported:()=>Sa});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Ia,getTabInstances:()=>Aa,isSupported:()=>Ta,navigateToTab:()=>Ea});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Pa,ReturnFocusType:()=>Oa,appButton:()=>m,backStack:()=>h,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Na,initializeWithFrameContext:()=>Ma,isSupported:()=>Ha,navigateCrossDomain:()=>xa,navigateToApp:()=>Da,registerFocusEnterHandler:()=>Fa,registerFullScreenHandler:()=>Ua,returnFocus:()=>Ra,setCurrentFrame:()=>ka,shareDeepLink:()=>La,tabs:()=>C});var b={};n.r(b),n.d(b,{isSupported:()=>Vc,registerGetLogHandler:()=>Hc});var S={};n.r(S),n.d(S,{closeConversation:()=>Xc,getChatMembers:()=>Yc,isSupported:()=>eu,openConversation:()=>Zc});var E={};n.r(E),n.d(E,{isSupported:()=>ou,sendCustomTelemetryData:()=>iu});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>lu,isSupported:()=>uu});var I={};n.r(I),n.d(I,{customTelemetry:()=>E,eligibility:()=>A});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>mu,ActionExecuteResponseHandler:()=>Cu,InvokeErrorCode:()=>wu,InvokeResponseType:()=>vu,OriginalRequestType:()=>hu,SerializableActionExecuteInvokeRequest:()=>pu,authenticateAndResendRequest:()=>Au,authenticateWithOauth2:()=>Pu,authenticateWithPowerPlatformConnectorPlugins:()=>Ou,authenticateWithSSO:()=>Iu,authenticateWithSSOAndResendRequest:()=>Tu,isActionExecuteResponse:()=>gu,isInvokeError:()=>yu,isSupported:()=>Ru,validateActionExecuteInvokeRequest:()=>Su});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>xu,authenticateWithOauth:()=>Nu,authenticateWithSSO:()=>Mu,authenticateWithSSOAndResendRequest:()=>Du,isSupported:()=>Lu,validateInput:()=>Uu});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>_u,ActionOpenUrlType:()=>Vu,isSupported:()=>ju,processActionOpenUrl:()=>Wu,processActionSubmit:()=>Bu});var R={};n.r(R),n.d(R,{isSupported:()=>Ju,processActionOpenUrl:()=>qu,processActionSubmit:()=>Gu});var F={};n.r(F),n.d(F,{SerializableActionOpenUrlDialogInfo:()=>nl,isSupported:()=>el,processActionOpenUrlDialog:()=>Yu});var k={};n.r(k),n.d(k,{isSupported:()=>al,processActionCommand:()=>il});var M={};n.r(M),n.d(M,{CloudStorageProvider:()=>cl,CloudStorageProviderFileAction:()=>pl,CloudStorageProviderType:()=>ul,DocumentLibraryAccessType:()=>dl,FileDownloadStatus:()=>fl,SpecialDocumentLibraryType:()=>ll,addCloudStorageFolder:()=>ml,addCloudStorageProvider:()=>El,addCloudStorageProviderFile:()=>Il,copyMoveFiles:()=>yl,deleteCloudStorageFolder:()=>hl,deleteCloudStorageProviderFile:()=>Pl,downloadCloudStorageProviderFile:()=>Ol,getCloudStorageFolderContents:()=>vl,getCloudStorageFolders:()=>gl,getExternalProviders:()=>Cl,getFileDownloads:()=>bl,openCloudStorageFile:()=>wl,openDownloadFolder:()=>Sl,registerCloudStorageProviderContentChangeHandler:()=>kl,registerCloudStorageProviderListChangeHandler:()=>Fl,removeCloudStorageProvider:()=>Al,renameCloudStorageProviderFile:()=>Tl,uploadCloudStorageProviderFile:()=>Rl});var N={};n.r(N),n.d(N,{getPairedMeetingRoomInfo:()=>xl,isSupported:()=>Hl,registerMeetingRoomCapabilitiesUpdateHandler:()=>Ll,registerMeetingRoomStatesUpdateHandler:()=>Ul,sendCommandToPairedMeetingRoom:()=>Dl});var x={};n.r(x),n.d(x,{dataLayer:()=>t,isSupported:()=>Vl,telemetry:()=>e});var D={};n.r(D),n.d(D,{initialize:()=>zl,version:()=>_l});var L={};n.r(L),n.d(L,{isSupported:()=>Yl,showNotification:()=>Xl});var U={};n.r(U),n.d(U,{isSupported:()=>od,notifyInstallCompleted:()=>rd,registerAppInstallationHandler:()=>td,unregisterAppInstallationHandler:()=>nd});var H={};n.r(H),n.d(H,{ControlCommand:()=>ad,ErrorReason:()=>sd,SessionTerminatedReason:()=>cd,getCapableParticipants:()=>ud,isSupported:()=>vd,registerOnCapableParticipantsChangeHandler:()=>pd,registerOnDeviceStateChangeHandler:()=>md,registerOnErrorHandler:()=>gd,registerOnSessionStatusChangeHandler:()=>hd,requestControl:()=>ld,sendControlCommand:()=>dd,terminateSession:()=>fd});var V={};n.r(V),n.d(V,{isSupported:()=>yd,selectAppEntity:()=>Cd});var _={};n.r(_),n.d(_,{getUserJoinedTeams:()=>Sd,isSupported:()=>Ed});var B={};n.r(B),n.d(B,{getConfigSetting:()=>Id,isSupported:()=>Td,joinedTeams:()=>_});var W={};n.r(W),n.d(W,{ChannelType:()=>Od,fullTrust:()=>B,getTeamChannels:()=>Rd,isSupported:()=>kd,refreshSiteUrl:()=>Fd});var j={};n.r(j),n.d(j,{EffectChangeType:()=>Bd,EffectFailureReason:()=>Wd,VideoFrameFormat:()=>_d,isSupported:()=>Jd,notifySelectedVideoEffectChanged:()=>zd,registerForVideoEffect:()=>$d,registerForVideoFrame:()=>jd});var z={};n.r(z),n.d(z,{ErrorLevel:()=>Cf,frameProcessingTimeoutInMs:()=>vf,isSupported:()=>Pf,notifyFatalError:()=>Ff,notifySelectedVideoEffectChanged:()=>Af,registerForVideoEffect:()=>If,registerForVideoFrame:()=>yf,updatePersonalizedEffects:()=>Tf});var $={};n.r($),n.d($,{addAndConfigure:()=>Hf,getAll:()=>Vf,isSupported:()=>jf,reconfigure:()=>_f,remove:()=>Wf,rename:()=>Bf});var q={};n.r(q),n.d(q,{AppTypes:()=>qf,isSupported:()=>Gf,tab:()=>$});var G={};n.r(G),n.d(G,{isSupported:()=>rp,openAppDetail:()=>ep,openFullStore:()=>Yf,openInContextStore:()=>tp,openSpecificStore:()=>np});var J={};n.r(J),n.d(J,{DataResidency:()=>Cp,authenticate:()=>dp,getAuthToken:()=>pp,getUser:()=>mp,notifyFailure:()=>wp,notifySuccess:()=>vp,registerAuthenticationHandlers:()=>lp});var K={};n.r(K),n.d(K,{isSupported:()=>Wp,openAppInstallDialog:()=>Bp});var Q={};n.r(Q),n.d(Q,{CameraStartMode:()=>Gp,File:()=>Xp,FileFormat:()=>$p,ImageOutputFormats:()=>Zp,ImageUriType:()=>Qp,Media:()=>rg,MediaControllerEvent:()=>qp,MediaType:()=>Kp,Source:()=>Jp,VideoController:()=>ig,captureImage:()=>Yp,hasPermission:()=>eg,requestPermission:()=>tg,scanBarCode:()=>cg,selectMedia:()=>ag,viewImages:()=>sg});var Z={};n.r(Z),n.d(Z,{hasPermission:()=>Eg,isSupported:()=>Ig,requestPermission:()=>Ag,scanBarCode:()=>Sg});var X={};n.r(X),n.d(X,{isSupported:()=>Fg,openChat:()=>Pg,openGroupChat:()=>Rg});var Y={};n.r(Y),n.d(Y,{isSupported:()=>Dg,read:()=>xg,write:()=>Ng});var ee={};n.r(ee),n.d(ee,{addNAATrustedOrigins:()=>qg,canParentManageNAATrustedOrigins:()=>Wg,deleteNAATrustedOrigins:()=>Gg,getParentOrigin:()=>Bg,isDeeplyNestedAuthSupported:()=>jg,isNAAChannelRecommended:()=>_g});var te={};n.r(te),n.d(te,{chooseLocation:()=>Xg,isSupported:()=>em,showLocation:()=>Yg});var ne={};n.r(ne),n.d(ne,{getCurrentLocation:()=>nm,hasPermission:()=>rm,isSupported:()=>im,map:()=>te,requestPermission:()=>om});var re={};n.r(re),n.d(re,{isSupported:()=>fm,open:()=>dm});var oe={};n.r(oe),n.d(oe,{getLocation:()=>gm,isSupported:()=>hm,showLocation:()=>mm});var ie={};n.r(ie),n.d(ie,{setOptions:()=>wm});var ae={};n.r(ae),n.d(ae,{CallType:()=>Am,EventActionSource:()=>Tm,MeetingReactionType:()=>Sm,MeetingType:()=>Em,SharingProtocol:()=>Im,appShareButton:()=>ie,getAppContentStageSharingCapabilities:()=>Um,getAppContentStageSharingState:()=>Vm,getAuthenticationTokenForAnonymousUser:()=>km,getIncomingClientAudioState:()=>Pm,getLiveStreamState:()=>Mm,getMeetingDetails:()=>Rm,getMeetingDetailsVerbose:()=>Fm,joinMeeting:()=>jm,registerLiveStreamChangedHandler:()=>Dm,registerMeetingReactionReceivedHandler:()=>Wm,registerRaiseHandStateChangedHandler:()=>Bm,registerSpeakingStateChangeHandler:()=>_m,requestAppAudioHandling:()=>zm,requestStartLiveStreaming:()=>Nm,requestStopLiveStreaming:()=>xm,shareAppContentToStage:()=>Lm,stopSharingAppContentToStage:()=>Hm,toggleIncomingClientAudio:()=>Om,updateMicState:()=>Gm});var se={};n.r(se),n.d(se,{isSupported:()=>Xm,openPurchaseExperience:()=>Zm});var ce={};n.r(ce),n.d(ce,{composeMeeting:()=>th,isSupported:()=>nh,openCalendarItem:()=>eh});var ue={};n.r(ue),n.d(ue,{composeMailWithHandoff:()=>ah,isSupported:()=>sh});var le={};n.r(le),n.d(le,{ComposeMailType:()=>ph,composeMail:()=>dh,handoff:()=>ue,isSupported:()=>fh,openMailItem:()=>lh});var de={};n.r(de),n.d(de,{enablePrintCapability:()=>mh,isSupported:()=>bh,print:()=>hh,registerBeforeUnloadHandler:()=>Ch,registerBeforeUnloadHandlerHelper:()=>yh,registerOnLoadHandler:()=>vh,registerOnLoadHandlerHelper:()=>wh});var fe={};n.r(fe),n.d(fe,{isSupported:()=>Th,selectPeople:()=>Ah});var pe={};n.r(pe),n.d(pe,{isSupported:()=>kh,showProfile:()=>Fh});var ge={};n.r(ge),n.d(ge,{closeSearch:()=>Vh,isSupported:()=>Hh,registerHandlers:()=>Lh,unregisterHandlers:()=>Uh});var me={};n.r(me),n.d(me,{getContent:()=>Wh,isSupported:()=>jh});var he={};n.r(he),n.d(he,{SharingAPIMessages:()=>qh,history:()=>me,isSupported:()=>Xh,shareWebContent:()=>Gh});var ve={};n.r(ve),n.d(ve,{close:()=>ev,isSupported:()=>tv});var we={};n.r(we),n.d(we,{StageViewOpenMode:()=>rv,isSupported:()=>iv,open:()=>ov,self:()=>ve});var Ce={};n.r(Ce),n.d(Ce,{captureImages:()=>uv,isSupported:()=>dv,retrieveImages:()=>lv});var ye={};n.r(ye),n.d(ye,{CameraRestriction:()=>hv,Source:()=>vv,hasPermission:()=>wv,image:()=>Ce,requestPermission:()=>Cv});var be={};n.r(be),n.d(be,{isSupported:()=>Tv,isWebStorageClearedOnUserLogOut:()=>Av});var Se={};n.r(Se),n.d(Se,{CallModalities:()=>Ov,isSupported:()=>Fv,startCall:()=>Rv});var Ee={};n.r(Ee),n.d(Ee,{ExpectedFailureReason:()=>vo,FailedReason:()=>ho,Messages:()=>mo,notifyAppLoaded:()=>Mv,notifyExpectedFailure:()=>Dv,notifyFailure:()=>xv,notifySuccess:()=>Nv});var Ae={};n.r(Ae),n.d(Ae,{getDragAndDropFiles:()=>jv,isSupported:()=>$v});var Ie={};n.r(Ie),n.d(Ie,{getSettings:()=>yw,registerOnRemoveHandler:()=>Ew,registerOnSaveHandler:()=>Sw,setSettings:()=>bw,setValidityState:()=>Cw});var Te={};n.r(Te),n.d(Te,{getDefaultSizeIfNotProvided:()=>kw,startTask:()=>Tw,submitTask:()=>Ow,updateTask:()=>Pw});var Pe={};n.r(Pe),n.d(Pe,{ContainerState:()=>xw,LiveShareHost:()=>Lw,UserMeetingRole:()=>Nw,isSupported:()=>Dw});var Oe,Re,Fe,ke,Me,Ne,xe,De,Le,Ue,He={};function Ve(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(He),n.d(He,{CartStatus:()=>Xw,Intent:()=>Zw,addOrUpdateCartItems:()=>eC,cartVersion:()=>Qw,getCart:()=>Yw,isSupported:()=>rC,removeCartItems:()=>tC,updateCartStatus:()=>nC}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Oe||(Oe={})),function(e){e.M365Content="m365content"}(Re||(Re={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Fe||(Fe={})),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"}(ke||(ke={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Me||(Me={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ne||(Ne={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(xe||(xe={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(De||(De={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Le||(Le={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Ue||(Ue={}));const _e=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 Be="2.0.1",We="2.0.2",je="2.0.3",ze="2.0.4",$e="2.0.1",qe="1.9.0",Ge="2.0.0",Je="1.7.0",Ke="1.8.0",Qe="1.9.0",Ze=n.t(_e,2).validOrigins,Xe=1500,Ye=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),et=/^https:\/\//,tt="https",nt="teams.microsoft.com",rt="The library has not yet been initialized",ot="The runtime has not yet been initialized",it="The runtime version is not supported",at="The call was not properly started";var st=n(933);const ct=lt,ut=2147483647;function lt(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 ft(e)}return dt(e,t,n)}function dt(e,t,n){if("string"==typeof e)return ht(e,t);if(ArrayBuffer.isView(e))return Et(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(wt(e,ArrayBuffer)||e&&wt(e.buffer,ArrayBuffer))return At(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(wt(e,SharedArrayBuffer)||e&&wt(e.buffer,SharedArrayBuffer)))return At(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 lt.from(r,t,n);const o=$t(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return lt.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 ft(e){return pt(e),gt(e<0?0:0|mt(e))}function pt(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 gt(e){if(e>ut)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,lt.prototype),t}function mt(e){if(e>=ut)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ut.toString(16)+" bytes");return 0|e}function ht(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!lt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|vt(e,t);let r=gt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function vt(e,t){if(lt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||wt(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 Ct(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return yt(e).length;default:if(o)return r?-1:Ct(e).length;t=(""+t).toLowerCase(),o=!0}}function wt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Ct(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 yt(e){return st.toByteArray(St(e))}lt.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}}(),lt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),lt.from=function(e,t,n){return dt(e,t,n)},Object.setPrototypeOf(lt.prototype,Uint8Array.prototype),Object.setPrototypeOf(lt,Uint8Array),lt.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}},lt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==lt.prototype};const bt=/[^+/0-9A-Za-z-_]/g;function St(e){if((e=(e=e.split("=")[0]).trim().replace(bt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Et(e){if(wt(e,Uint8Array)){const t=new Uint8Array(e);return At(t.buffer,t.byteOffset,t.byteLength)}return It(e)}function At(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,lt.prototype),r}function It(e){const t=e.length<0?0:0|mt(e.length),n=gt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Tt(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 Rt(r)}function Pt(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 Ft(this,t,n);case"utf8":case"utf-8":return Tt(this,t,n);case"ascii":return kt(this,t,n);case"latin1":case"binary":return Mt(this,t,n);case"base64":return Nt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}lt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Tt(this,0,e):Pt.apply(this,arguments)};const Ot=4096;function Rt(e){const t=e.length;if(t<=Ot)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ot));return n}function Ft(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+=zt[e[r]];return o}function kt(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 Mt(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 Nt(e,t,n){return 0===t&&n===e.length?st.fromByteArray(e):st.fromByteArray(e.slice(t,n))}function xt(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 Dt(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(jt(r))return a;e[n+a]=r}return a}function Lt(e,t,n,r){return Wt(Ct(t,e.length-n),e,n,r)}function Ut(e,t,n,r){return Wt(_t(t),e,n,r)}function Ht(e,t,n,r){return Wt(yt(t),e,n,r)}function Vt(e,t,n,r){return Wt(Bt(t,e.length-n),e,n,r)}function _t(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Bt(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 Wt(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 jt(e){return e!=e}lt.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 Dt(this,e,t,n);case"utf8":case"utf-8":return Lt(this,e,t,n);case"ascii":case"latin1":case"binary":return Ut(this,e,t,n);case"base64":return Ht(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const zt=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 $t(e){if(lt.isBuffer(e)){const t=0|mt(e.length),n=gt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||jt(e.length)?gt(0):It(e):"Buffer"===e.type&&Array.isArray(e.data)?It(e.data):void 0}const qt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Gt;const Jt=new Uint8Array(16);function Kt(){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(Jt)}const Qt=[];for(let e=0;e<256;++e)Qt.push((e+256).toString(16).slice(1));function Zt(e,t=0){return Qt[e[t+0]]+Qt[e[t+1]]+Qt[e[t+2]]+Qt[e[t+3]]+"-"+Qt[e[t+4]]+Qt[e[t+5]]+"-"+Qt[e[t+6]]+Qt[e[t+7]]+"-"+Qt[e[t+8]]+Qt[e[t+9]]+"-"+Qt[e[t+10]]+Qt[e[t+11]]+Qt[e[t+12]]+Qt[e[t+13]]+Qt[e[t+14]]+Qt[e[t+15]]}const Xt=function(e,t,n){if(qt.randomUUID&&!t&&!e)return qt.randomUUID();const r=(e=e||{}).random||(e.rng||Kt)();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 Zt(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 en=function(e){return"string"==typeof e&&Yt.test(e)};var tn,nn,rn,on,an,sn,cn;!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"}(tn||(tn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(nn||(nn={})),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"}(rn||(rn={})),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"}(on||(on={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(an||(an={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(sn||(sn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(cn||(cn={}));const un={errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},ln={majorVersion:1,minorVersion:5},dn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},fn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),pn=new Error("Invalid response: Received more images than the specified max limit in the response.");function gn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function mn(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 hn(){return Xt()}function vn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&vn(e[t])})),Object.freeze(e)}function wn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Cn(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function yn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function bn(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 Sn(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!(mn(`${e.majorVersion}.${e.minorVersion}`,`${ln.majorVersion}.${ln.minorVersion}`)>=0)}function An(e){return"https:"===e.protocol}function In(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=ct.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Tn(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 Pn(){if(On())throw new Error("window object undefined at SSR check");return window}function On(){return"undefined"==typeof window}function Rn(e,t){if(Mn(e)||!Nn(e)||!xn(e))throw t||new Error("id is not valid.")}function Fn(e,t){const n=e.toString().toLocaleLowerCase();if(Mn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!An(e))throw t||new Error("Url should be a valid https url")}function kn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Mn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Nn(e){return e.length<256&&e.length>4}function xn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Dn(e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}const Ln=!!performance&&"now"in performance;function Un(){return Ln?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=hn()){this.uuid=e,Dn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function _n(e){if(!(e instanceof Vn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Bn{}Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.additionalValidOrigins=[],Bn.initializePromise=void 0,Bn.isFramelessWindow=!1,Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.printCapabilityEnabled=!1,Bn.teamsJsInstanceId=(new Vn).toString();var Wn=n(815);const jn=new Vn,zn=Wn.debug.formatArgs;Wn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${jn.toString()}]`,zn.call(this,e)};const $n=(0,Wn.debug)("teamsJs");function qn(e){return $n.extend(e)}function Gn(e,t){return`${e}_${t}`}function Jn(e){return/^v\d+_[\w.]+$/.test(e)}var Kn=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 Qn=qn("runtime"),Zn=4;function Xn(e){return e.apiVersion===Zn}const Yn={apiVersion:-1,supports:{}};function er(e){if(Xn(e))return!0;throw-1===e.apiVersion?new Error(ot):new Error(it)}let tr=Yn;const nr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:dn,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:{}}}},rr=[tn.desktop,tn.web,tn.rigel,tn.surfaceHub,tn.teamsRoomsWindows,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays],or=[tn.android,tn.ios,tn.ipados,tn.visionOS],ir=[...rr,...or];function ar(e){let t=e;if(t.apiVersion<Zn&&sr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),Xn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const sr=[{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=Kn(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],cr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:rr}],"1.9.0":[{capability:{location:{}},hostClientTypes:ir}],"2.0.0":[{capability:{people:{}},hostClientTypes:ir},{capability:{sharing:{}},hostClientTypes:[tn.desktop,tn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[tn.android,tn.desktop,tn.ios,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays,tn.web]},{capability:{webStorage:{}},hostClientTypes:[tn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[tn.android,tn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[tn.android,tn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[tn.android,tn.ios,tn.ipados,tn.visionOS]}]},ur=Qn.extend("generateBackCompatRuntimeConfig");function lr(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]=lr(e[r]||{},t[r]));return n}function dr(e,t,n){ur("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);ur("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{mn(e,t)>=0&&n[t].forEach((e=>{void 0!==Bn.hostClientType&&e.hostClientTypes.includes(Bn.hostClientType)&&(r=lr(r,e.capability))}))}));const o={apiVersion:Zn,hostVersionsInfo:dn,isLegacyTeams:!0,supports:r};return ur("Runtime config after updating based on highestSupportedVersion: %o",o),o}const fr=Qn.extend("applyRuntimeConfig");function pr(e){"string"==typeof e.apiVersion&&(fr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),fr("Fast-forwarding runtime %o",e);const t=ar(e);fr("Applying runtime %o",t),tr=vn(t)}function gr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const mr="2.37.0-beta.0",hr={childProxyingCommunication:!1};function vr(){hr.childProxyingCommunication=!0}function wr(){return hr.childProxyingCommunication}let Cr={disableEnforceOriginMatchForChildResponses:!1};function yr(){return Cr}function br(e){Cr=e}function Sr(e){return br(Object.assign(Object.assign({},Cr),e)),yr()}var Er=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Ar=e=>{const{uuid:t}=e,n=Er(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Ir=e=>{const{uuidAsString:t}=e,n=Er(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Vn(t):void 0})},Tr=e=>{const{uuidAsString:t}=e,n=Er(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Vn(t):void 0})},Pr=e=>{const{uuid:t}=e,n=Er(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Or(e){return void 0!==e.uuidAsString?`${e.uuidAsString} (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Rr=qn("flushMessageQueue");function Fr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Ar(o);Rr("Flushing message %s from %s message queue via postMessage.",Or(n),r),e.postMessage(n,t)}}}const kr=qn("internal"),Mr=kr.extend("ensureInitializeCalled"),Nr=kr.extend("ensureInitialized");function xr(){if(!Bn.initializeCalled)throw Mr(rt),new Error(rt)}function Dr(e,...t){if(!Bn.initializeCompleted)throw Nr("%s. initializeCalled: %s",rt,Bn.initializeCalled.toString()),new Error(rt);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Bn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Bn.frameContext}".`)}return er(e)}function Lr(e=Be){const t=mn(Bn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Ur(){return Bn.hostClientType==tn.android||Bn.hostClientType==tn.ios||Bn.hostClientType==tn.ipados||Bn.hostClientType==tn.visionOS}function Hr(e=Be){if(!Ur()){throw{errorCode:ke.NOT_SUPPORTED_ON_PLATFORM}}if(!Lr(e)){throw{errorCode:ke.OLD_PLATFORM}}}function Vr(e){let t=Bn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&et.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Bn.additionalValidOrigins=t}function _r(e){if(!zr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Wr}-${jr}).`)}function Br(e){if(Mn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if($r(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Wr=4,jr=256;function zr(e){return e.length<jr&&e.length>Wr}function $r(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function qr(e){if(!(e instanceof Jr))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Gr{constructor(e){this.idAsString=e,Br(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class Jr extends Gr{constructor(e){super(e),_r(e)}toJSON(){return{appIdAsString:this.toString()}}}function Kr(e){return null==e}var Qr=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 Zr;const Xr="v1",Yr=qn("messageChannels.telemetry");function eo(){return Qr(this,void 0,void 0,(function*(){if(Zr)return Yr("Returning telemetry port from cache"),Zr;if(!to())throw un;return Zr=yield sc(Gn(Xr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),Zr}))}function to(){var e;return!(!Dr(tr)||!(null===(e=tr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function no(){Zr=void 0}var ro=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 oo;const io="v1",ao=qn("messageChannels.dataLayer");function so(){return ro(this,void 0,void 0,(function*(){if(oo)return ao("Returning dataLayer port from cache"),oo;if(!co())throw un;return oo=yield sc(Gn(io,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),oo}))}function co(){var e;return!(!Dr(tr)||!(null===(e=tr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function uo(){oo=void 0}function lo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Dr(tr),As(e)}function fo(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Dr(tr),Is(e)}const po="v2",go=qn("app"),mo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var ho,vo;function wo(){return Bn.initializeCompleted}function Co(){return Bn.frameContext}function yo(e){return Wi(Gn(po,"app.initialize"),e)}function bo(e){Ks.currentWindow=e}function So(){Bn.initializeCalled&&(cs(),Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.initializePromise=void 0,Bn.additionalValidOrigins=[],Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.isFramelessWindow=!1,no(),uo(),Xs())}function Eo(){return new Promise((e=>{xr(),e(Ys(Gn(po,"app.getContext"),"getContext"))})).then((e=>ko(e)))}function Ao(){xr(),ji(Gn(po,"app.notifyAppLoaded"))}function Io(){return qi(Gn(po,"app.notifySuccess"))}function To(e){xr(),$i(Gn(po,"app.notifyFailure"),e)}function Po(e){xr(),zi(Gn(po,"app.notifyExpectedFailure"),e)}function Oo(e){Zi(Gn(po,"app.registerOnThemeChangeHandler"),e)}function Ro(e){vs(e)}function Fo(e){return Xi(Gn(po,"app.openLink"),e)}function ko(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:nn.teams,clientType:e.hostClientType?e.hostClientType:tn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Jr(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Bn.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 Mo(e){Go(Gn($o,"dialog.update.resize"),e)}function No(){return!(!Dr(tr)||!tr.supports.dialog)&&!!tr.supports.dialog.update}function xo(e,t,n){Ko(Gn($o,"dialog.url.bot.open"),e,t,n)}function Do(){return Dr(tr)&&void 0!==(tr.supports.dialog&&tr.supports.dialog.url&&tr.supports.dialog.url.bot)}function Lo(e){if(Dr(tr,rn.task),!Vo())throw un;lc(Gn($o,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Uo(e){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Vo())throw un;lc(Gn($o,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Ho(e){if(Dr(tr,rn.task),!Vo())throw un;for(fs("messageForChild"),ds(Gn($o,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),Yo.reverse();Yo.length>0;){e(Yo.pop())}}function Vo(){var e,t;return Dr(tr)&&!!(null===(t=null===(e=tr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function _o(e,t,n){Jo(Gn($o,"dialog.url.open"),e,t,n)}function Bo(e,t){Qo(Gn($o,"dialog.url.submit"),e,t)}function Wo(){return Dr(tr)&&void 0!==(tr.supports.dialog&&tr.supports.dialog.url)}function jo(e){return{url:e.url,height:e.size?e.size.height:sn.Small,width:e.size?e.size.width:sn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function zo(e){const t=jo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(ho||(ho={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(vo||(vo={})),go("teamsjs instance is version %s, starting at %s UTC (%s local)",mr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(On())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?go("teamsjs is being used from %s. %s",t,n):go("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const $o="v2",qo="dialog.submit should not be called from FrameContext.content.\nIf dialog.submit was called from inside the dialog, please disregard this message.\nThis issue occurs due to a bug in Teams mobile where the dialog is incorrectly identified as being in the content FrameContext.\nWe are working to resolve this.";function Go(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.task,rn.meetingStage),!No())throw un;lc(e,"tasks.updateTask",[t])}function Jo(e,t,n,r){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Wo())throw un;r&&ds(Gn($o,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);lc(e,"tasks.startTask",[jo(t)],((e,t)=>{null==n||n({err:e,result:t}),fs("messageForParent")}))}function Ko(e,t,n,r){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Do())throw un;r&&ds(Gn($o,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);lc(e,"tasks.startTask",[zo(t)],((e,t)=>{null==n||n({err:e,result:t}),fs("messageForParent")}))}function Qo(e,t,n){if(Dr(tr,rn.content,rn.task),!Wo())throw un;Bn.frameContext===rn.content&&console.warn(qo),lc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function Zo(e){return{card:e.card,height:e.size?e.size.height:sn.Small,width:e.size?e.size.width:sn.Small,title:e.title}}function Xo(e){const t=Zo(e);return t.completionBotId=e.completionBotId,t}const Yo=[];function ei(e){Bn.frameContext&&(Bn.frameContext===rn.task?Yo.push(e):fs("messageForChild"))}function ti(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!ni())throw un;const n=Xo(e);lc(Gn($o,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ni(){const e=tr.hostVersionsInfo&&tr.hostVersionsInfo.adaptiveCardSchemaVersion&&!En(tr.hostVersionsInfo.adaptiveCardSchemaVersion);return Dr(tr)&&void 0!==(e&&tr.supports.dialog&&tr.supports.dialog.card&&tr.supports.dialog.card.bot)}function ri(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!oi())throw un;const n=Zo(e);lc(Gn($o,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function oi(){const e=tr.hostVersionsInfo&&tr.hostVersionsInfo.adaptiveCardSchemaVersion&&!En(tr.hostVersionsInfo.adaptiveCardSchemaVersion);return Dr(tr)&&void 0!==(e&&tr.supports.dialog&&tr.supports.dialog.card)}function ii(){ds(Gn($o,"dialog.registerMessageForChildHandler"),"messageForChild",ei,!1)}function ai(){return!(!Dr(tr)||!tr.supports.dialog)}const si="v2";var ci,ui;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(ci||(ci={}));class li{constructor(){this.enabled=!0,this.selected=!1}}let di,fi,pi,gi,mi;function hi(){ds(Gn(si,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",yi,!1),ds(Gn(si,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Si,!1),ds(Gn(si,"menus.registerSetModuleViewHandler"),"setModuleView",wi,!1)}function vi(e,t){if(Dr(tr),!Ei())throw un;pi=t,lc(Gn(si,"menus.setUpViews"),"setUpViews",[e])}function wi(e){pi&&pi(e)||(Dr(tr),lc(Gn(si,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ci(e,t){if(Dr(tr),!Ei())throw un;di=t,lc(Gn(si,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function yi(e){di&&di(e)||(Dr(tr),lc(Gn(si,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function bi(e,t){if(Dr(tr),!Ei())throw un;fi=t,lc(Gn(si,"menus.showActionMenu"),"showActionMenu",[e])}function Si(e){fi&&fi(e)||(Dr(tr),lc(Gn(si,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Ei(){return!(!Dr(tr)||!tr.supports.menus)}function Ai(){ds(Gn(Va,"pages.config.registerSettingsSaveHandler"),"settings.save",ki,!1),ds(Gn(Va,"pages.config.registerSettingsRemoveHandler"),"settings.remove",xi,!1)}function Ii(e){return Ja(Gn(Va,"pages.config.setValidityState"),e)}function Ti(e){return Qa(Gn(Va,"pages.config.setConfig"),e)}function Pi(e){Oi(Gn(Va,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Kr(e)&&!Li())throw un}))}function Oi(e,t,n){!Kr(t)&&Dr(tr,rn.settings),n&&n(),gi=t,!Kr(t)&&lc(e,"registerHandler",["save"])}function Ri(e){Fi(Gn(Va,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Kr(e)&&!Li())throw un}))}function Fi(e,t,n){!Kr(t)&&Dr(tr,rn.remove,rn.settings),n&&n(),mi=t,!Kr(t)&&lc(e,"registerHandler",["remove"])}function ki(e){const t=new Ni(e);gi?gi(t):Fs()?Us("settings.save",[e]):t.notifySuccess()}function Mi(e){gs(Gn(Va,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[rn.content],(()=>{if(!Li())throw un}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(ui||(ui={}));class Ni{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),lc(Gn(Va,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),lc(Gn(Va,"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 xi(){const e=new Di;mi?mi(e):Fs()?Us("settings.remove",[]):e.notifySuccess()}class Di{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),lc(Gn(Va,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),lc(Gn(Va,"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 Li(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.config}class Ui{}class Hi extends Ui{validate(e){return!0}deserialize(e){return e}}var Vi=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 _i=6e4,Bi=qn("app");function Wi(e,t){if(On()){return Bi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return bn((()=>Qi(e,t)),_i,new Error("SDK initialization timed out."))}function ji(e){lc(e,mo.AppLoaded,[mr])}function zi(e,t){lc(e,mo.ExpectedFailure,[t.reason,t.message])}function $i(e,t){lc(e,mo.Failure,[t.reason,t.message])}function qi(e){return Vi(this,void 0,void 0,(function*(){if(Bn.initializeCompleted)return Ji(e);if(!Bn.initializePromise)throw new Error(rt);return Bn.initializePromise.then((()=>Ji(e)))}))}function Gi(){var e;return Dr(tr)&&!!(null===(e=tr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Ji(e){return Vi(this,void 0,void 0,(function*(){return Gi()?ic(mo.Success,[mr],new Hi,e).then((()=>({hasFinishedSuccessfully:!0}))):(lc(e,mo.Success,[mr]),{hasFinishedSuccessfully:"unknown"})}))}const Ki=Bi.extend("initializeHelper");function Qi(e,t){return new Promise((n=>{Bn.initializeCalled||(Bn.initializeCalled=!0,ss(),Bn.initializePromise=Zs(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Be})=>{Bn.frameContext=e,Bn.hostClientType=t,Bn.clientSupportedSDKVersion=r;try{Ki("Parsing %s",n);const e=JSON.parse(n);if(Ki("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&pr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Ki("Attempting to parse %s as an SDK version",n),isNaN(mn(n,Be))||(Bn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Ki("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");pr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;pr(dr(Bn.clientSupportedSDKVersion,nr,cr))}}Bn.initializeCompleted=!0})),hi(),Ai(),ii()),Array.isArray(t)&&Vr(t),void 0!==Bn.initializePromise?n(Bn.initializePromise):Ki("GlobalVars.initializePromise is unexpectedly undefined")}))}function Zi(e,t){!Kr(t)&&xr(),ms(e,t)}function Xi(e,t){return new Promise((n=>{Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),n(ec(e,"executeDeepLink",t))}))}var Yi=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 ea=[];const ta=qn("validateOrigin");function na(){return Yi(this,void 0,void 0,(function*(){yield oa()}))}function ra(){return 0===ea.length}function oa(e=!1){return Yi(this,void 0,void 0,(function*(){if(!ra()&&!e)return ea;if(On())return ea=Ze,Ze;{ta("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),Xe);return fetch(Ye,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ta("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(ia(JSON.stringify(e)))return ea=e.validOrigins,ea;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?ta(`validOrigins fetch call to CDN failed due to Timeout of ${Xe} ms. Defaulting to fallback list`):ta("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),ea=Ze,ea)))}}))}function ia(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 ta("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function aa(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 sa(e,t){return oa(t).then((t=>{if(!An(e))return ta("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=>aa(e,n))))return!0;for(const e of Bn.additionalValidOrigins){if(aa("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return ta("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,Bn.additionalValidOrigins),!1}))}function ca(e){gs(Gn(Va,"pages.appButton.onClick"),"appButtonClick",e,[rn.content],(()=>{if(!da())throw un}))}function ua(e){gs(Gn(Va,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[rn.content],(()=>{if(!da())throw un}))}function la(e){gs(Gn(Va,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[rn.content],(()=>{if(!da())throw un}))}function da(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.appButton}function fa(){ns()}function pa(){return Ba(Gn(Va,"pages.backStack.navigateBack"))}function ga(e){ma(Gn(Va,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Kr(e)&&!ha())throw un}))}function ma(e,t,n){!Kr(t)&&Dr(tr),n&&n(),ts(t),!Kr(t)&&lc(e,"registerHandler",["backButton"])}function ha(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.backStack}function va(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!Ca())throw un;t(nc(Gn(Va,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function wa(){return new Promise((e=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!Ca())throw un;e(nc(Gn(Va,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Ca(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.currentApp}function ya(){if(Dr(tr,rn.content),!Sa())throw un;lc(Gn(Va,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function ba(){if(Dr(tr,rn.content),!Sa())throw un;lc(Gn(Va,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Sa(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.fullTrust}function Ea(e){return Wa(Gn(Va,"pages.tabs.navigateToTab"),e)}function Aa(e){return za(Gn(Va,"pages.tabs.getTabInstances"),e)}function Ia(e){return $a(Gn(Va,"pages.tabs.getMruTabInstances"),e)}function Ta(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.tabs}var Pa,Oa;function Ra(e){const t=Gn(Va,"pages.returnFocus");if(Dr(tr),!Ha())throw un;if(void 0===e&&lc(t,"returnFocus",[!1]),"boolean"==typeof e)lc(t,"returnFocus",[e]);else switch(e){case Oa.PreviousLandmark:case Oa.GoToActivityFeed:lc(t,"returnFocus",[!1,e]);break;case Oa.NextLandmark:lc(t,"returnFocus",[!0,e])}}function Fa(e){gs(Gn(Va,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Ha())throw un}))}function ka(e){Ga(Gn(Va,"pages.setCurrentFrame"),e)}function Ma(e,t,n){na(),Wi(Gn(Va,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),ka(e)}function Na(){return Ka(Gn(Va,"pages.getConfig."))}function xa(e){return _a(Gn(Va,"pages.navigateCrossDomain"),e)}function Da(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!Ha())throw un;const n=Gn(Va,"pages.navigateToApp");if(tr.isLegacyTeams){t(ec(n,"executeDeepLink",Sn(Za(e)?e:Xa(e))))}else{t(ec(n,"pages.navigateToApp",Za(e)?Ya(e):e))}}))}function La(e){return qa(Gn(Va,"pages.shareDeepLink"),e)}function Ua(e){gs(Gn(Va,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Kr(e)&&!Ha())throw un}))}function Ha(){return!(!Dr(tr)||!tr.supports.pages)}na(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Pa||(Pa={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Oa||(Oa={}));const Va="v2";function _a(e,t){return new Promise((n=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage),!Ha())throw un;n(tc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Ba(e){return new Promise((t=>{if(Dr(tr),!ha())throw un;t(tc(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Wa(e,t){return new Promise((n=>{if(Dr(tr),!Ta())throw un;n(tc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function ja(e,t){if(Dr(tr),!Ha())throw un;lc(e,"returnFocus",[t])}function za(e,t){return new Promise((n=>{if(Dr(tr),!Ta())throw un;n(Ys(e,"getTabInstances",t))}))}function $a(e,t){return new Promise((n=>{if(Dr(tr),!Ta())throw un;n(Ys(e,"getMruTabInstances",t))}))}function qa(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Ha())throw un;lc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Ga(e,t){if(Dr(tr,rn.content),!Ha())throw un;lc(e,"setFrameContext",[t])}function Ja(e,t){if(Dr(tr,rn.settings,rn.remove),!Li())throw un;lc(e,"settings.setValidityState",[t])}function Ka(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.settings,rn.remove,rn.sidePanel),!Ha())throw un;t(Ys(e,"settings.getSettings"))}))}function Qa(e,t){return new Promise((n=>{if(Dr(tr,rn.content,rn.settings,rn.sidePanel),!Li())throw un;n(ec(e,"settings.setSettings",t))}))}function Za(e){return e.appId instanceof Jr}function Xa(e){return Object.assign(Object.assign({},e),{appId:new Jr(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Ya(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let es;function ts(e){es=e}function ns(){ds(Gn(Va,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",rs,!1)}function rs(){es&&es()||(Fs()?Us("backButtonPress",[]):pa())}var os=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const is=qn("handlers");class as{static initializeHandlers(){as.handlers.themeChange=hs,as.handlers.load=ys,as.handlers.beforeUnload=Es,ns()}static uninitializeHandlers(){as.handlers={},as.themeChangeHandler=null,as.loadHandler=null,as.beforeUnloadHandler=null,as.beforeSuspendOrTerminateHandler=null,as.resumeHandler=null}}function ss(){as.initializeHandlers()}function cs(){as.uninitializeHandlers()}as.handlers={},as.themeChangeHandler=null,as.loadHandler=null,as.beforeUnloadHandler=null,as.beforeSuspendOrTerminateHandler=null,as.resumeHandler=null,as.hostToAppPerformanceMetricsHandler=null;const us=is.extend("callHandler");function ls(e,t){const n=as.handlers[e];if(n){us("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Fs()?(Us(e,t),[!1,void 0]):(us("Handler for action message %s not found.",e),[!1,void 0])}function ds(e,t,n,r=!0,o=[]){n?(as.handlers[t]=n,r&&lc(e,"registerHandler",[t,...o])):delete as.handlers[t]}function fs(e){delete as.handlers[e]}function ps(e){return null!=as.handlers[e]}function gs(e,t,n,r,o){n&&Dr(tr,...r),o&&o(),ds(e,t,n)}function ms(e,t){as.themeChangeHandler=t,!Kr(t)&&lc(e,"registerHandler",["themeChange"])}function hs(e){as.themeChangeHandler&&as.themeChangeHandler(e),Fs()&&Us("themeChange",[e])}function vs(e){as.hostToAppPerformanceMetricsHandler=e}function ws(e){as.hostToAppPerformanceMetricsHandler&&as.hostToAppPerformanceMetricsHandler(e)}function Cs(e,t){as.loadHandler=t,!Kr(t)&&lc(e,"registerHandler",["load"])}function ys(e){const t=bs(e);as.resumeHandler?(as.resumeHandler(t),Fs()&&Us("load",[t])):as.loadHandler&&(as.loadHandler(e),Fs()&&Us("load",[e]))}function bs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Ss(e,t){as.beforeUnloadHandler=t,!Kr(t)&&lc(e,"registerHandler",["beforeUnload"])}function Es(){return os(this,void 0,void 0,(function*(){const e=()=>{lc(Gn("v2","handleBeforeUnload"),"readyToUnload",[])};as.beforeSuspendOrTerminateHandler?(yield as.beforeSuspendOrTerminateHandler(),Fs()?Us("beforeUnload"):e()):as.beforeUnloadHandler&&as.beforeUnloadHandler(e)||(Fs()?Us("beforeUnload"):e())}))}function As(e){as.beforeSuspendOrTerminateHandler=e,!Kr(e)&&lc(Gn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Is(e){as.resumeHandler=e,!Kr(e)&&lc(Gn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Ts=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ps=qn("childProxyingCommunication");class Os{}function Rs(){Os.window=null,Os.origin=null,Os.messageQueue=[]}function Fs(){return!!wr()&&!!Os.window}function ks(e,t){return!!wr()&&(Os.window&&!Os.window.closed&&e!==Os.window||(Os.window=e,Os.origin=t),Os.window&&Os.window.closed?(Os.window=null,Os.origin=null,!1):Os.window===e)}function Ms(e,t,n,r){return Ts(this,void 0,void 0,(function*(){Os.window===t&&(Fr(Os.window,Os.origin,Os.messageQueue,"child"),xs(e,n,r))}))}Os.messageQueue=[];const Ns=Ps.extend("handleIncomingMessageFromChild");function xs(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Ir(e.data),[o,i]=ls(r.func,r.args);if(o&&void 0!==i)return Ns("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Or(r),r.func),void Ls(r.id,r.uuid,Array.isArray(i)?i:[i]);Ns("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Or(r),r.func),Ds(r,t,n)}function Ds(e,t,n){const r=t(Gn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Os.origin;n(r.uuid,((...t)=>{if(!Os.window)return;if(!yr().disableEnforceOriginMatchForChildResponses&&o!==Os.origin)return void Ns("Origin of child window has changed, not sending response back to child window");const n=t.pop();Ns("Message from parent being relayed to child, id: %s",Or(e)),Ls(e.id,e.uuid,t,n)}))}function Ls(e,t,n,r){const o=Os.window,i=Hs(e,t,n,r),a=Pr(i),s=Os.origin;o&&s&&(Ns("Sending message %s to %s via postMessage, args = %o",Or(a),"child",a.args),o.postMessage(a,s))}function Us(e,t){const n=Os.window,r=Vs(e,t),o=Os.origin;n&&o?n.postMessage(r,o):Os.messageQueue.push(r)}function Hs(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Vs(e,t){return{func:e,args:t||[]}}class _s{static storeCallbackInformation(e,t){_s.callbackInformation.set(e,t)}static clearMessages(){_s.callbackInformation.clear()}static deleteMessageInformation(e){_s.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?ws({actionName:e.func,messageDelay:n-r,requestStartedAt:r}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(e,t,n,r){const o=_s.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(ws({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),_s.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}_s.callbackInformation=new Map;const Bs=qn("nestedAppAuthUtils"),Ws=Bs.extend("tryPolyfillWithNestedAppAuthBridge"),js="v2";function zs(e,t,n){var r;const o=Ws;if(Bn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=qs(a,n);s&&(a.nestedAppAuthBridge=s)}const $s=Bs.extend("createNestedAppAuthBridge");function qs(e,t){const n=$s;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=Gn(js,"nestedAppAuth.execute");o(e,r)},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 Js=qn("communication");class Ks{}class Qs{}function Zs(e,t){if(Qs.messageListener=e=>wc(e),Ks.currentWindow=Ks.currentWindow||Pn(),Ks.parentWindow=Ks.currentWindow.parent!==Ks.currentWindow.self?Ks.currentWindow.parent:Ks.currentWindow.opener,Ks.topWindow=Ks.currentWindow.top,(Ks.parentWindow||e)&&Ks.currentWindow.addEventListener("message",Qs.messageListener,!1),!Ks.parentWindow){const e=Ks.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Bn.isFramelessWindow=!0,e.onNativeMessage=Oc}try{return Ks.parentOrigin="*",rc(t,"initialize",[mr,Zn,e]).then((([e,t,n,r])=>(zs(r,Ks.currentWindow,{onMessage:yc,sendPostMessage:fc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Ks.parentOrigin=null}}function Xs(){Ks.currentWindow&&Ks.currentWindow.removeEventListener("message",Qs.messageListener,!1),Ks.currentWindow=null,Ks.parentWindow=null,Ks.parentOrigin=null,Qs.parentMessageQueue=[],Qs.nextMessageId=0,Qs.callbacks.clear(),Qs.promiseCallbacks.clear(),Qs.portCallbacks.clear(),Qs.legacyMessageIdsToUuidMap={},_s.clearMessages(),Rs()}function Ys(e,t,...n){return rc(e,t,n).then((([e])=>e))}function ec(e,t,...n){return rc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function tc(e,t,n,...r){return rc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function nc(e,t,...n){return rc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function rc(e,t,n=void 0){if(!Jn(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(uc(hc(e,t,n).uuid))}))}function oc(e){return e.map((e=>gr(e)?e.serialize():e))}function ic(e,t,n,r,o){var i;return Gs(this,void 0,void 0,(function*(){const a=oc(t),[s]=yield rc(r,e,a);if(o&&o(s)||!o&&Ve(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(`${ke.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function ac(e,t,n,r){var o;return Gs(this,void 0,void 0,(function*(){const i=oc(t),[a]=yield rc(n,e,i);if(r&&r(a)||!r&&Ve(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${ke.INTERNAL_ERROR}, message: Invalid response from host`)}))}function sc(e,t,n=void 0){if(!Jn(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 cc(hc(e,t,n).uuid)}function cc(e){return new Promise(((t,n)=>{Qs.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 uc(e){return new Promise((t=>{Qs.promiseCallbacks.set(e,t)}))}function lc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Jn(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=hc(e,t,o);r&&Qs.callbacks.set(i.uuid,r)}Qs.parentMessageQueue=[],Qs.topMessageQueue=[],Qs.nextMessageId=0,Qs.callbacks=new Map,Qs.promiseCallbacks=new Map,Qs.portCallbacks=new Map,Qs.legacyMessageIdsToUuidMap={};const dc=Js.extend("sendNestedAuthRequestToTopWindow");function fc(e,t){const n=dc,r=Ks.topWindow,o=Lc(e,t);return n("Message %s information: %o",Or(o),{actionName:o.func}),gc(r,o)}const pc=Js.extend("sendRequestToTargetWindowHelper");function gc(e,t){const n=pc,r=Nc(e),o=Ar(t);if(Bn.isFramelessWindow)Ks.currentWindow&&Ks.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Or(o),r),Ks.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Mc(e);e&&i?(n("Sending message %s to %s via postMessage",Or(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Or(o),r),kc(e).push(t))}return t}const mc=Js.extend("sendMessageToParentHelper");function hc(e,t,n,r,o){const i=mc,a=Ks.parentWindow,s=Dc(e,t,n,r,o);return _s.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Or(s),{actionName:t,args:n}),gc(a,s)}const vc=Js.extend("processIncomingMessage");function wc(e){return Gs(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void vc("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 Sc(t,n).then((r=>{r?(Ec(t,n),t!==Ks.parentWindow?ks(t,n)&&Ms(e,t,hc,((e,t)=>Qs.callbacks.set(e,t))):Oc(e)):vc("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 Cc=Js.extend("processAuthBridgeMessage");function yc(e,t){var n,r;const o=Cc;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),u=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Sc(c,u)?(Ks.topWindow&&!Ks.topWindow.closed&&c!==Ks.topWindow||(Ks.topWindow=c,Ks.topOrigin=u),Ks.topWindow&&Ks.topWindow.closed&&(Ks.topWindow=null,Ks.topOrigin=null),Fr(Ks.topWindow,Ks.topOrigin,Qs.topMessageQueue,"top"),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const bc=Js.extend("shouldProcessIncomingMessage");function Sc(e,t){return Gs(this,void 0,void 0,(function*(){if(Ks.currentWindow&&e===Ks.currentWindow)return bc("Should not process message because it is coming from the current window"),!1;if(Ks.currentWindow&&Ks.currentWindow.location&&t&&t===Ks.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return bc("Message has an invalid origin of %s",t),!1}const n=yield sa(e);return n||bc("Message has an invalid origin of %s",t),n}}))}function Ec(e,t){Bn.isFramelessWindow||Ks.parentWindow&&!Ks.parentWindow.closed&&e!==Ks.parentWindow||(Ks.parentWindow=e,Ks.parentOrigin=t),Ks.parentWindow&&Ks.parentWindow.closed&&(Ks.parentWindow=null,Ks.parentOrigin=null),Fr(Ks.parentWindow,Ks.parentOrigin,Qs.parentMessageQueue,"parent")}const Ac=Js.extend("handleIncomingMessageFromParent");function Ic(e){const t=Ac;if(!e.uuid)return Qs.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Tc(Qs.callbacks,t);if(n)return n;const r=Tc(Qs.promiseCallbacks,t);if(r)return r;const o=Tc(Qs.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Or(e))}function Tc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Pc(e,t){const n=Tc(t,e.uuid);n&&t.delete(n),e.uuid?Qs.legacyMessageIdsToUuidMap={}:delete Qs.legacyMessageIdsToUuidMap[e.id]}function Oc(e){const t=Ac,n=Un();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Tr(r),i=Ic(o);if(i){const r=Qs.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),_s.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]),Rc(e)||(t("Removing registered callback for message %s",i.toString()),Pc(o,Qs.callbacks)));const a=Qs.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()),Pc(o,Qs.promiseCallbacks));const s=Qs.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()),Pc(o,Qs.portCallbacks)}o.uuid&&(Qs.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;_s.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Or(r),r.func),ls(r.func,r.args)}else t("Received an unknown message: %O",e)}function Rc(e){return!0===e.data.isPartialResponse}function Fc(){return Ks.topWindow!==Ks.parentWindow}function kc(e){return e===Ks.topWindow&&Fc()?Qs.topMessageQueue:e===Ks.parentWindow?Qs.parentMessageQueue:[]}function Mc(e){return e===Ks.topWindow&&Fc()?Ks.topOrigin:e===Ks.parentWindow?Ks.parentOrigin:null}function Nc(e){return e===Ks.topWindow&&Fc()?"top":e===Ks.parentWindow?"parent":null}function xc(e,t){let n;n=Ks.currentWindow.setInterval((()=>{0===kc(e).length&&(clearInterval(n),t())}),100)}function Dc(e,t,n,r,o){const i=Qs.nextMessageId++,a=new Vn;Qs.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Bn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Un(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function Lc(e,t){const n=Qs.nextMessageId++,r=new Vn;return Qs.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Un(),apiVersionTag:t,args:[],data:e}}const Uc="v1";function Hc(e){if(!Kr(e)&&Dr(tr),!Kr(e)&&!Vc())throw un;e?ds(Gn(Uc,"log.request"),"log.request",(()=>{const t=e();lc(Gn(Uc,"log.receive"),"log.receive",[t])})):fs("log.request")}function Vc(){return!(!Dr(tr)||!tr.supports.logs)}var _c,Bc,Wc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(_c||(_c={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Bc||(Bc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Wc||(Wc={}));const jc="v1";function zc(e,t){Dr(tr),lc(Gn(jc,"uploadCustomApp"),"uploadCustomApp",[e],t||gn())}function $c(e,t,n){Dr(tr),lc(Gn(jc,"sendCustomMessage"),e,t,n)}function qc(e,t){if(Dr(tr),!Fs())throw new Error("The child window has not yet been initialized or is not present");Us(e,t)}function Gc(e,t){Dr(tr),ds(Gn(jc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Jc(e,t){Dr(tr),ds(Gn(jc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Kc(e){Dr(tr,rn.content,rn.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];lc(Gn(jc,"openFilePreview"),"openFilePreview",t)}const Qc="v1";function Zc(e){return new Promise((t=>{if(Dr(tr,rn.content),!eu())throw un;const n=ec(Gn(Qc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ds(Gn(Qc,"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&&ds(Gn(Qc,"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 Xc(){if(Dr(tr,rn.content),!eu())throw un;lc(Gn(Qc,"conversations.closeConversation"),"conversations.closeConversation"),fs("startConversation"),fs("closeConversation")}function Yc(){return new Promise((e=>{if(Dr(tr),!eu())throw un;e(Ys(Gn(Qc,"conversations.getChatMember"),"getChatMembers"))}))}function eu(){return!(!Dr(tr)||!tr.supports.conversations)}var tu=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 nu="v2",ru=qn("copilot");function ou(){var e;return Dr(tr)&&!!(null===(e=tr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function iu(e,t){var n;return void 0===t&&(t=null!==(n=Un())&&void 0!==n?n:Date.now()),tu(this,void 0,void 0,(function*(){return Dr(tr),ru("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),ac("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Gn(nu,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var au=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 su="v2",cu=qn("copilot");function uu(){var e,t;return Dr(tr)&&(!!(null===(e=tr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=tr.supports.copilot)||void 0===t?void 0:t.eligibility))}function lu(e){var t,n;return au(this,void 0,void 0,(function*(){if(Dr(tr),!uu())throw new Error(`Error code: ${un.errorCode}, message: Not supported on platform`);if((null===(t=tr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return cu("Eligibility information is already available on runtime."),tr.hostVersionsInfo.appEligibilityInformation;cu("Eligibility information is not available on runtime. Requesting from host.");const r=yield Ys(Gn(su,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Ve(r))throw new Error(`Error code: ${r.errorCode}, message: ${null!==(n=r.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!du(r))throw new Error("Error deserializing eligibility information");return r}))}function du(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 fu="v2";class pu{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function gu(e){const t=e;return t.responseType===vu.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const mu="Action.Execute";var hu,vu,wu;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(hu||(hu={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(vu||(vu={}));class Cu extends Ui{validate(e){return gu(e)}deserialize(e){return e}}function yu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(wu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function bu(e){e.requestType===hu.ActionExecuteInvokeRequest?Su(e):e.requestType===hu.QueryMessageExtensionRequest&&Eu(e)}function Su(e){if(e.type!==mu){throw{errorCode:wu.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${mu}"`}}if(!Hn(e.data)){throw{errorCode:wu.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Eu(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 Au(e,t,n){if(Dr(tr,rn.content),!Ru())throw un;const r=new Jr(e);return bu(n),rc(Gn(fu,"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 Iu(e,t){if(Dr(tr,rn.content),!Ru())throw un;const n=new Jr(e);return rc(Gn(fu,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function Tu(e,t,n){if(Dr(tr,rn.content),!Ru())throw un;const r=new Jr(e);return bu(n),rc(Gn(fu,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Pu(e,t,n){if(Dr(tr,rn.content),!Ru())throw un;return Rn(e,new Error("titleId is Invalid.")),Rn(t,new Error("oauthConfigId is Invalid.")),rc(Gn(fu,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Ou(e,t,n){if(Dr(tr,rn.content),!Ru())throw un;return Rn(e,new Error("titleId is Invalid.")),t&&Fn(t),rc(Gn(fu,"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 Ru(){return!(!Dr(tr)||!tr.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(wu||(wu={}));var Fu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ku="v2";function Mu(e,t,n){return Fu(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Lu())throw un;return Uu(e,t),ac("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Gn(ku,"externalAppAuthenticationForCEA.authenticateWithSSO"),yu)}))}function Nu(e,t,n){return Fu(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Lu())throw un;return Uu(e,t),ac("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Gn(ku,"externalAppAuthenticationForCEA.authenticateWithOauth"),yu)}))}function xu(e,t,n,r){return Fu(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Lu())throw un;return Uu(e,t),Su(r),ic("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new pu(r),n.url.href,n.width,n.height,n.isExternal],new Cu,Gn(ku,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),yu)}))}function Du(e,t,n,r){return Fu(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Lu())throw un;return Uu(e,t),Su(r),ic("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new pu(r),n.authId,n.connectionName,n.claims,n.silent],new Cu,Gn(ku,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),yu)}))}function Lu(){return!(!Dr(tr)||!tr.supports.externalAppAuthenticationForCEA)}function Uu(e,t){Rn(t,new Error("conversation id is not valid.")),qr(e)}const Hu="v2";var Vu,_u;function Bu(e,t){if(Dr(tr,rn.content),!ju())throw un;const n=new Jr(e);return rc(Gn(Hu,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Wu(e,t,n){if(Dr(tr,rn.content),!ju())throw un;const r=new Jr(e);return rc(Gn(Hu,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function ju(){return!(!Dr(tr)||!tr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Vu||(Vu={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(_u||(_u={}));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())}))};const $u="v2";function qu(e,t,n){return zu(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Ju())throw un;Uu(e,t);const[r,o]=yield rc(Gn($u,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Gu(e,t,n){return zu(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Ju())throw un;Uu(e,t);const r=yield Ys(Gn($u,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Ju(){return!(!Dr(tr)||!tr.supports.externalAppCardActionsForCEA)}var Ku;function Qu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Ku).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Ku||(Ku={}));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())}))};const Xu="v2";function Yu(e,t,n){return Zu(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!el())throw un;return tl(e,n),ac("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new nl(t),n],Gn(Xu,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Qu)}))}function el(){return!(!Dr(tr)||!tr.supports.externalAppCardActionsForDA)}function tl(e,t){qr(e),_n(t)}class nl{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var rl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ol="v2";function il(e,t,n){return rl(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!al())throw un;const r=new Jr(e),[o,i]=yield rc(Gn(ol,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function al(){return!(!Dr(tr)||!tr.supports.externalAppCommands)}const sl="v1";var cl,ul,ll,dl,fl,pl;function gl(e,t){if(Dr(tr,rn.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");lc(Gn(sl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function ml(e,t){if(Dr(tr,rn.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");lc(Gn(sl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function hl(e,t,n){if(Dr(tr,rn.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");lc(Gn(sl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function vl(e,t,n){if(Dr(tr,rn.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");lc(Gn(sl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function wl(e,t,n){if(Dr(tr,rn.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");lc(Gn(sl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Cl(e=!1,t){if(Dr(tr,rn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");lc(Gn(sl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function yl(e,t,n,r,o=!1,i){if(Dr(tr,rn.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");lc(Gn(sl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function bl(e){if(Dr(tr,rn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");lc(Gn(sl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Sl(e=void 0,t){if(Dr(tr,rn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");lc(Gn(sl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function El(e){if(Dr(tr,rn.content),!e)throw Ml(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");lc(Gn(sl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Al(e,t){if(Dr(tr,rn.content),!t)throw Ml(ke.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Ml(ke.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");lc(Gn(sl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Il(e,t){if(Dr(tr,rn.content),!t)throw Ml(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Ml(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");lc(Gn(sl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Tl(e,t){if(Dr(tr,rn.content),!t)throw Ml(ke.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Ml(ke.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");lc(Gn(sl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Pl(e,t){if(Dr(tr,rn.content),!t)throw Ml(ke.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Ml(ke.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");lc(Gn(sl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Ol(e,t){if(Dr(tr,rn.content),!t)throw Ml(ke.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Ml(ke.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");lc(Gn(sl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Rl(e,t){if(Dr(tr,rn.content),!t)throw Ml(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Ml(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Ml(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");lc(Gn(sl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Fl(e){if(Dr(tr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ds(Gn(sl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function kl(e){if(Dr(tr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ds(Gn(sl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Ml(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"}(cl||(cl={})),function(e){e[e.Sharepoint=0]="Sharepoint",e[e.WopiIntegration=1]="WopiIntegration",e[e.Google=2]="Google",e[e.OneDrive=3]="OneDrive",e[e.Recent=4]="Recent",e[e.Aggregate=5]="Aggregate",e[e.FileSystem=6]="FileSystem",e[e.Search=7]="Search",e[e.AllFiles=8]="AllFiles",e[e.SharedWithMe=9]="SharedWithMe"}(ul||(ul={})),function(e){e.ClassMaterials="classMaterials"}(ll||(ll={})),function(e){e.Readonly="readonly"}(dl||(dl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(fl||(fl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(pl||(pl={}));const Nl="v1";function xl(){return new Promise((e=>{if(Dr(tr),!Hl())throw un;e(nc(Gn(Nl,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function Dl(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Dr(tr),!Hl())throw un;t(nc(Gn(Nl,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function Ll(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Dr(tr),!Hl())throw un;ds(Gn(Nl,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Dr(tr),e(t)}))}function Ul(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Dr(tr),!Hl())throw un;ds(Gn(Nl,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Dr(tr),e(t)}))}function Hl(){return!(!Dr(tr)||!tr.supports.meetingRoom)}function Vl(){return!(!Dr(tr)||!tr.supports.messageChannels)}const _l="1.0.0",Bl={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Kl("Invalid message format, ignoring. Message: %o",e);if(!ql(e.source,e.origin))return void Kl("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Ql("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Kl("Invalid response format, ignoring. Message: %o",e);t(r)}};let Wl=null,jl=!1;function zl(e,t,n=!1){if(jl=n,!e)throw new Error("Cannot polyfill nestedAppAuthBridge as the current window does not exist");if(!t)throw new Error("Top origin is required to initialize the Nested App Auth Bridge");try{const e=new URL(t);if("https:"!==e.protocol)throw new Error(`Invalid top origin: ${t}. Only HTTPS origins are allowed.`);Wl=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Kl("Nested App Auth Bridge is already present");const o=$l(r);o&&(r.nestedAppAuthBridge=o)}function $l(e){const t=new WeakMap,{onMessage:n}=Bl,r=e=>t=>n(t,e);return{addEventListener:(n,o)=>{if("message"===n){const i=r(o);t.set(o,i),e.addEventListener(n,i)}else Kl(`Event ${n} is not supported by nestedAppAuthBridge`)},postMessage:t=>{if(!e.top)throw new Error("window.top is not available for posting messages");try{const n=JSON.parse(t);if("object"==typeof n&&"NestedAppAuthRequest"===n.messageType){const n=Gl(t);if(e===e.top||!Wl)return void Ql("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Wl)}}catch(e){return void Ql("Failed to parse message:",e,"Original message:",t)}},removeEventListener:(n,r)=>{const o=t.get(r);o&&(e.removeEventListener(n,o),t.delete(r))}}}function ql(e,t){if(e&&e!==window.top)return Kl("Should not process message because it is not coming from the top window"),!1;if(t===Wl)try{return"https:"===new URL(t).protocol}catch(e){return Ql("Invalid message origin URL:",e),!1}return!1}function Gl(e){const t=Date.now();return{id:Jl(),uuid:Xt(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Jl(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Kl(...e){jl&&console.log(...e)}function Ql(...e){jl&&console.error(...e)}const Zl="v1";function Xl(e){if(Dr(tr,rn.content),!Yl())throw un;lc(Gn(Zl,"notifications.showNotification"),"notifications.showNotification",[e])}function Yl(){return!(!Dr(tr)||!tr.supports.notifications)}const ed="v2";function td(e){if(!od())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());if(Kr(e))throw new Error(ke.INVALID_ARGUMENTS.toString());ds(Gn(ed,"otherApp.install"),"otherApp.install",e)}function nd(){if(!od())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());lc(Gn(ed,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),fs("otherApp.install")}function rd(e){if(!od())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());return ac("otherApp.notifyInstallCompleted",[e.toString()],Gn(ed,"otherApp.notifyInstallCompleted"))}function od(){return!(!Dr(tr)||!tr.supports.otherAppStateChange)}const id="v1";var ad,sd,cd;function ud(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Dr(tr,rn.sidePanel),!vd())throw un;lc(Gn(id,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function ld(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(Dr(tr,rn.sidePanel),!vd())throw un;lc(Gn(id,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function dd(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(Dr(tr,rn.sidePanel),!vd())throw un;lc(Gn(id,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function fd(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Dr(tr,rn.sidePanel),!vd())throw un;lc(Gn(id,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function pd(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!vd())throw un;ds(Gn(id,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function gd(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!vd())throw un;ds(Gn(id,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function md(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!vd())throw un;ds(Gn(id,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function hd(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!vd())throw un;ds(Gn(id,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function vd(){return!(!Dr(tr)||!tr.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"}(ad||(ad={})),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"}(sd||(sd={})),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"}(cd||(cd={}));const wd="v1";function Cd(e,t,n,r){if(Dr(tr,rn.content),!yd())throw un;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");lc(Gn(wd,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function yd(){return!(!Dr(tr)||!tr.supports.appEntity)}const bd="v1";function Sd(e){return new Promise((t=>{if(Dr(tr),!Ed())throw un;if((Bn.hostClientType===tn.android||Bn.hostClientType===tn.teamsRoomsAndroid||Bn.hostClientType===tn.teamsPhones||Bn.hostClientType===tn.teamsDisplays)&&!Lr($e)){const e={errorCode:ke.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Ys(Gn(bd,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Ed(){return!(!Dr(tr)||!tr.supports.teams)&&(!!tr.supports.teams.fullTrust&&!!tr.supports.teams.fullTrust.joinedTeams)}const Ad="v1";function Id(e){return new Promise((t=>{if(Dr(tr),!Td())throw un;t(Ys(Gn(Ad,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Td(){return!(!Dr(tr)||!tr.supports.teams)&&!!tr.supports.teams.fullTrust}const Pd="v1";var Od;function Rd(e,t){if(Dr(tr,rn.content),!kd())throw un;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");lc(Gn(Pd,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Fd(e,t){if(Dr(tr),!kd())throw un;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");lc(Gn(Pd,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function kd(){return!(!Dr(tr)||!tr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Od||(Od={}));class Md{static setTimeout(e,t){const n=performance.now(),r=hn();return Md.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Md.setTimeoutCallbacks[e]}static setInterval(e,t){Md.setTimeout((function n(){e(),Md.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Md.setTimeoutCallbacks){const r=Md.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Md.setTimeoutCallbacks[e].callback(),delete Md.setTimeoutCallbacks[e]}}}Md.setTimeoutCallbacks={};class Nd{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Md.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&&Md.clearTimeout(this.timeoutId),this.timeoutId=Md.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(Nd.maxSessionTimeoutInMs,2*t.timeoutInMs):Nd.initialSessionTimeoutInMs}}Nd.initialSessionTimeoutInMs=1e3,Nd.maxSessionTimeoutInMs=3e4;const xd="v2";class Dd{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Nd(Dd.distributionBinSize,(e=>this.reportPerformanceEvent(Gn(xd,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Md.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Gn(xd,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),Dd.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){Md.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(Gn(xd,"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(Gn(xd,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Dd.distributionBinSize=1e3,Dd.calculateFPSInterval=1e3;var Ld=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())}))},Ud=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 Hd="v2",Vd=On()?void 0:new Dd(lc);var _d,Bd,Wd;function jd(e){if(Dr(tr,rn.sidePanel),!Jd())throw un;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ds(Gn(Hd,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Vd?void 0:Vd.setFrameProcessTimeLimit(e.timeLimit)),!1),Yd())Kd(e.videoFrameHandler,e.config);else{if(!tf())throw un;Zd(e.videoBufferHandler,e.config)}null==Vd||Vd.startMonitorSlowFrameProcessing()}function zd(e,t){if(Dr(tr,rn.sidePanel),!Jd())throw un;lc(Gn(Hd,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function $d(e){if(Dr(tr,rn.sidePanel),!Jd())throw un;ds(Gn(Hd,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",gf(e,Vd),!1),lc(Gn(Hd,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function qd(e){lc(Gn(Hd,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Gd(e){lc(Gn(Hd,"videoEffects.notifyError"),"video.notifyError",[e])}function Jd(){return Dr(tr)&&!!tr.supports.video&&(!!tr.supports.video.mediaStream||!!tr.supports.video.sharedFrame)}function Kd(e,t){if(Dr(tr,rn.sidePanel),!Jd()||!Yd())throw un;ds(Gn(Hd,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Ld(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Qd(e,Vd);yield of(n,r,Gd,Vd)}))),!1),lc(Gn(Hd,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Qd(e,t){return n=>Ld(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 Zd(e,t){if(Dr(tr,rn.sidePanel),!Jd()||!tf())throw un;ds(Gn(Hd,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Vd||Vd.reportStartFrameProcessing(t.width,t.height),e(Xd(t),(()=>{null==Vd||Vd.reportFrameProcessed(),qd(n)}),Gd)}}),!1),lc(Gn(Hd,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Xd(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Ud(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Yd(){var e;return Dr(tr,rn.sidePanel)&&ef()&&!!(null===(e=tr.supports.video)||void 0===e?void 0:e.mediaStream)}function ef(){var e,t,n,r;return!(!(null===(t=null===(e=Pn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Pn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function tf(){var e;return Dr(tr,rn.sidePanel)&&!!(null===(e=tr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(_d||(_d={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Bd||(Bd={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Wd||(Wd={}));var nf=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 rf="v2";function of(e,t,n,r){var o,i;return nf(this,void 0,void 0,(function*(){const a=cf();!On()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),uf(yield sf(e,n,r),new lf(n,t),a.writable)}))}function af(e,t,n,r){var o,i;return nf(this,void 0,void 0,(function*(){const a=cf();!On()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),uf(yield sf(e,n,r),new pf(n,t),a.writable)}))}function sf(e,t,n){return nf(this,void 0,void 0,(function*(){if(On())throw un;const r=Pn().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 cf(){if(On())throw un;const e=window.MediaStreamTrackGenerator;if(!e)throw un;return new e({kind:"video"})}function uf(e,t,n){new(0,Pn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class lf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>nf(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 df{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 ff{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 pf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>nf(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=>nf(this,void 0,void 0,(function*(){if(On())throw un;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 df(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 ff(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}}})),ds(Gn(rf,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function gf(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),lc(Gn(rf,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Wd?e:Wd.InitializationFailure;lc(Gn(rf,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var mf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const hf="v2",vf=2e3,wf=On()?void 0:new Dd(lc);var Cf;function yf(e){var t,n;if(!Pf())throw un;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Dr(tr,rn.sidePanel)){if(ds(Gn(hf,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==wf?void 0:wf.setFrameProcessTimeLimit(e)),!1),null===(t=tr.supports.video)||void 0===t?void 0:t.mediaStream)ds(Gn(hf,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>mf(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=wf?Sf(e.videoFrameHandler,wf):e.videoFrameHandler;r?yield af(n,o,Rf,wf):yield of(n,o,Rf,wf)}))),!1),lc(Gn(hf,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=tr.supports.video)||void 0===n?void 0:n.sharedFrame))throw un;ds(Gn(hf,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==wf||wf.reportStartFrameProcessing(t.width,t.height);const n=bf(),r=t.timestamp;e.videoBufferHandler(Ef(t),(()=>{n(),null==wf||wf.reportFrameProcessed(),Of(r)}),Rf)}}),!1),lc(Gn(hf,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==wf||wf.startMonitorSlowFrameProcessing()}}function bf(){const e=setTimeout((()=>{Rf(`Frame not processed in ${vf}ms`,Cf.Warn)}),vf);return function(){clearTimeout(e)}}function Sf(e,t){return n=>mf(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=bf(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function Ef(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Af(e,t,n){if(Dr(tr,rn.sidePanel),!Pf())throw un;lc(Gn(hf,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function If(e){if(Dr(tr,rn.sidePanel),!Pf())throw un;ds(Gn(hf,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",gf(e,wf),!1),lc(Gn(hf,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Tf(e){if(Dr(tr,rn.sidePanel),!Jd())throw un;lc(Gn(hf,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Pf(){return Dr(tr),Jd()}function Of(e){lc(Gn(hf,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Rf(e,t=Cf.Warn){lc(Gn(hf,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Ff(e){if(Dr(tr),!Jd())throw un;Rf(e,Cf.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Cf||(Cf={}));const kf="v2";class Mf extends Ui{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Nf{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class xf{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Df extends Ui{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Lf{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Uf extends Ui{validate(e){const t=new Df;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Hf(e,t){if(Dr(tr),!jf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(zf(e.threadId),t&&0===t.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return ic("hostEntity.tab.addAndConfigure",[new xf(e),t],new Df,Gn(kf,"hostEntity.tab.addAndConfigure"))}function Vf(e){if(Dr(tr),!jf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zf(e.threadId),ic("hostEntity.tab.getAll",[new xf(e)],new Uf,Gn(kf,"hostEntity.tab.getAll"))}function _f(e,t){if(Dr(tr),!jf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return $f(e),zf(t.threadId),ic("hostEntity.tab.reconfigure",[new Nf(e),new xf(t)],new Mf,Gn(kf,"hostEntity.tab.reconfigure"))}function Bf(e,t){if(Dr(tr),!jf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return $f(e),zf(t.threadId),ic("hostEntity.tab.rename",[new Nf(e),new xf(t)],new Mf,Gn(kf,"hostEntity.tab.rename"))}function Wf(e,t){if(Dr(tr),!jf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zf(t.threadId),$f(e),ic("hostEntity.tab.remove",[new Lf(e),new xf(t)],new Hi,Gn(kf,"hostEntity.tab.remove"))}function jf(){var e;return!!(Dr(tr)&&Gf()&&(null===(e=tr.supports.hostEntity)||void 0===e?void 0:e.tab))}function zf(e){if(!e||0==e.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function $f(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var qf;function Gf(){return!(!Dr(tr)||!tr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(qf||(qf={}));var Jf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Kf="v2",Qf="Invalid store dialog size",Zf="No App Id present, but AppId needed to open AppDetail store",Xf="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Yf(e){return Jf(this,void 0,void 0,(function*(){op();const{size:t}=null!=e?e:{};return ac("store.openFullStore",[ip(t)],Gn(Kf,"store.openFullStore"))}))}function ep(e){return Jf(this,void 0,void 0,(function*(){op();const{size:t,appId:n}=e;if(!(n instanceof Jr))throw new Error(Zf);return ac("store.openAppDetail",[ip(t),n],Gn(Kf,"store.openAppDetail"))}))}function tp(e){return Jf(this,void 0,void 0,(function*(){op();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return ac("store.openInContextStore",[ip(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Gn(Kf,"store.openInContextStore"))}))}function np(e){return Jf(this,void 0,void 0,(function*(){op();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Xf);return ac("store.openSpecificStore",[ip(t),n],Gn(Kf,"store.openSpecificStore"))}))}function rp(){return Dr(tr)&&!!tr.supports.store}function op(){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!rp())throw un}function ip(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(Qf);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(Qf);return JSON.stringify(e)}var ap=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 sp="v1",cp="v2";let up;function lp(e){up=e}function dp(e){const t=void 0!==e,n=t?e:up;if(!n)throw new Error("No parameters are provided for authentication");Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);return fp(n.successCallback||n.failureCallback?Gn(sp,"authentication.authenticate"):Gn(cp,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(up=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(up=void 0)}}))}function fp(e,t){return ap(this,void 0,void 0,(function*(){const n=kn(t.url);return Fn(n),rc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function pp(e){xr();return gp(e&&(e.successCallback||e.failureCallback)?Gn(sp,"authentication.getAuthToken"):Gn(cp,"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 gp(e,t){return new Promise((n=>{n(rc(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 mp(e){xr();return hp(e&&(e.successCallback||e.failureCallback)?Gn(sp,"authentication.getUser"):Gn(cp,"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 hp(e){return new Promise((t=>{t(rc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function vp(e,t){Dr(tr,rn.authentication);lc(Gn(t?sp:cp,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),xc(Ks.parentWindow,(()=>setTimeout((()=>Ks.currentWindow.close()),200)))}function wp(e,t){Dr(tr,rn.authentication);lc(Gn(t?sp:cp,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),xc(Ks.parentWindow,(()=>setTimeout((()=>Ks.currentWindow.close()),200)))}var Cp;function yp(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"}(Cp||(Cp={}));class bp{constructor(e){this.val=e,yp(e)}toString(){return this.val}}const Sp="/l/app/",Ep="/l/meeting/new",Ap="attendees",Ip="startTime",Tp="endTime",Pp="subject",Op="content",Rp="/l/call/0/0",Fp="source",kp="withVideo",Mp="/l/chat/0/0",Np="users",xp="topicName",Dp="message";function Lp(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Np}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${xp}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Dp}=${encodeURIComponent(n)}`;return`${tt}://${nt}${Mp}?${r}${o}${i}`}function Up(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Np}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${kp}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Fp}=${encodeURIComponent(n)}`;return`${tt}://${nt}${Rp}?${r}${o}${i}`}function Hp(e,t,n,r,o){const i=void 0===e?"":`${Ap}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Ip}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Tp}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Pp}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${Op}=${encodeURIComponent(o)}`;return`${tt}://${nt}${Ep}?${i}${a}${s}${c}${u}`}function Vp(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${tt}://${nt}${Sp}${encodeURIComponent(e)}`}const _p="v1";function Bp(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!Wp())throw new Error("Not supported");const n=Gn(_p,"appInstallDialog.openAppInstallDialog");tr.isLegacyTeams?t(ec(n,"executeDeepLink",Vp(e.appId))):(lc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function Wp(){return!(!Dr(tr)||!tr.supports.appInstallDialog)}const jp="v1",zp=qn("media");var $p,qp,Gp,Jp,Kp,Qp,Zp;!function(e){e.Base64="base64",e.ID="id"}($p||($p={}));class Xp{}function Yp(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Dr(tr,rn.content,rn.task),Bn.isFramelessWindow)if(Lr(Je))lc(Gn(jp,"media.captureImage"),"captureImage",e);else{e({errorCode:ke.OLD_PLATFORM},[])}else{e({errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},[])}}function eg(){if(Dr(tr,rn.content,rn.task),!ng())throw un;const e=Me.Media;return new Promise((t=>{t(nc(Gn(jp,"media.hasPermission"),"permissions.has",e))}))}function tg(){if(Dr(tr,rn.content,rn.task),!ng())throw un;const e=Me.Media;return new Promise((t=>{t(nc(Gn(jp,"media.requestPermission"),"permissions.request",e))}))}function ng(){return!(!Dr(tr)||!tr.supports.permissions)}class rg extends Xp{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(Dr(tr,rn.content,rn.task),Lr(Ke))if(vg(this.mimeType,this.format,this.content))Lr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:ke.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:ke.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];lc(Gn(jp,"media.getMedia"),"getMedia",n,(function(n){if(e)if(n&&n.error)e(n.error,new Blob);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){const r=ug(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=lg(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):zp(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:ke.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=hn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Kr(e)&&lc(Gn(jp,"media.getMedia"),"getMedia",r),ds(Gn(jp,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),fs("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=ug(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),fs("getMedia"+t)}else{const e=lg(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:ke.INTERNAL_ERROR,message:"data received is null"},new Blob),fs("getMedia"+t)}}))}}class og{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Dr(tr,rn.content,rn.task);try{Hr(je)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};lc(Gn(jp,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(qp.StopRecording,e)}}class ig extends og{getMediaType(){return Kp.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case qp.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function ag(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(Ke)){const e={errorCode:ke.OLD_PLATFORM};return void t(e,[])}try{dg(e)}catch(e){return void t(e,[])}if(!pg(e)){const e={errorCode:ke.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];lc(Gn(jp,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(fg(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 rg(e));t(n,s)}))}function sg(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(Ke)){return void t({errorCode:ke.OLD_PLATFORM})}if(!wg(e)){return void t({errorCode:ke.INVALID_ARGUMENTS})}const n=[e];lc(Gn(jp,"media.viewImages"),"viewImages",n,t)}function cg(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Dr(tr,rn.content,rn.task),Bn.hostClientType!==tn.desktop&&Bn.hostClientType!==tn.web&&Bn.hostClientType!==tn.rigel&&Bn.hostClientType!==tn.teamsRoomsWindows&&Bn.hostClientType!==tn.teamsRoomsAndroid&&Bn.hostClientType!==tn.teamsPhones&&Bn.hostClientType!==tn.teamsDisplays)if(Lr(Qe))if(Cg(t))lc(Gn(jp,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:ke.INVALID_ARGUMENTS},"")}else{e({errorCode:ke.OLD_PLATFORM},"")}else{e({errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},"")}}function ug(e,t){if(null==e||null==t||e.length<=0)return null;let n=null,r=1;return e.sort(((e,t)=>e.sequence>t.sequence?1:-1)),e.forEach((e=>{e.sequence==r&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),r++)})),n}function lg(e,t){if(null==e||null==t)return null;const n=atob(e.chunk),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const o=new Uint8Array(r),i=new Blob([o],{type:t});return{sequence:e.chunkSequence,file:i}}function dg(e){mg(e)?Hr(We):hg(e)?Hr(je):gg(e)&&Hr(ze)}function fg(e){return!(e.mediaType!=Kp.Video||!e.videoProps||!e.videoProps.videoController)}function pg(e){return!(null==e||e.maxMediaCount>10)}function gg(e){var t;return!((null==e?void 0:e.mediaType)!=Kp.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function mg(e){return!(!e||e.mediaType!=Kp.VideoAndImage&&!e.videoAndImageProps)}function hg(e){return!(!e||e.mediaType!=Kp.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function vg(e,t,n){return null!=e&&null!=t&&t==$p.ID&&null!=n}function wg(e){return!(null==e||e.length<=0||e.length>10)}function Cg(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function yg(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"}(qp||(qp={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Gp||(Gp={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Jp||(Jp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Kp||(Kp={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Qp||(Qp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Zp||(Zp={}));const bg="v2";function Sg(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.task),!Ig())throw un;if(!Cg(e))throw{errorCode:ke.INVALID_ARGUMENTS};t(nc(Gn(bg,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Eg(){if(Dr(tr,rn.content,rn.task),!Ig())throw un;const e=Me.Media;return new Promise((t=>{t(nc(Gn(bg,"barCode.hasPermission"),"permissions.has",e))}))}function Ag(){if(Dr(tr,rn.content,rn.task),!Ig())throw un;const e=Me.Media;return new Promise((t=>{t(nc(Gn(bg,"barCode.requestPermission"),"permissions.request",e))}))}function Ig(){return!!(Dr(tr)&&tr.supports.barCode&&tr.supports.permissions)}const Tg="v2";function Pg(e){return Og(Gn(Tg,"chat.openChat"),e)}function Og(e,t){return new Promise((n=>{if(Dr(tr,rn.content,rn.task),!Fg())throw un;if(tr.isLegacyTeams)n(ec(e,"executeDeepLink",Lp([t.user],void 0,t.message)));else{n(ec(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Rg(e){const t=Gn(Tg,"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(Og(t,r))}else{if(Dr(tr,rn.content,rn.task),!Fg())throw un;if(tr.isLegacyTeams)n(ec(t,"executeDeepLink",Lp(e.users,e.topic,e.message)));else{n(ec(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Fg(){return!(!Dr(tr)||!tr.supports.chat)}var kg=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 Mg="v2";function Ng(e){return kg(this,void 0,void 0,(function*(){if(Dr(tr,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel),!Dg())throw un;if(!e.type||!Object.values(Ue).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Ue)}`);const t=yield Tn(e),n={mimeType:e.type,content:t};return nc(Gn(Mg,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function xg(){return kg(this,void 0,void 0,(function*(){Dr(tr,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel);const e=Gn(Mg,"clipboard.read");if(!Dg())throw un;const t=yield nc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return In(e.mimeType,e.content)}return t}))}function Dg(){return Bn.isFramelessWindow?!(!Dr(tr)||!tr.supports.clipboard):!!(Dr(tr)&&navigator&&navigator.clipboard&&tr.supports.clipboard)}var Lg=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 Ug="v2",Hg={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var Vg;function _g(){var e;return null!==(e=Dr(tr)&&(tr.isNAAChannelRecommended||zg()))&&void 0!==e&&e}function Bg(){return Dr(tr),Ks.parentOrigin}function Wg(){var e;return null!==(e=Dr(tr)&&tr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function jg(){var e;return null!==(e=Dr(tr)&&tr.isDeeplyNestedAuthSupported)&&void 0!==e&&e}function zg(){return!!(Dr(tr)&&$g()&&tr.isLegacyTeams&&tr.supports.nestedAppAuth)}function $g(){return Bn.hostClientType===tn.android||Bn.hostClientType===tn.ios||Bn.hostClientType===tn.ipados||Bn.hostClientType===tn.visionOS}function qg(e){return Lg(this,void 0,void 0,(function*(){if(!Wg())throw un;const t=e.map(Kg);return Jg(Vg.ADD,t)}))}function Gg(e){return Lg(this,void 0,void 0,(function*(){if(!Wg())throw un;const t=e.map(Kg);return Jg(Vg.DELETE,t)}))}function Jg(e,t){return Lg(this,void 0,void 0,(function*(){if(window.parent!==window.top)throw new Error("This API is only available in the top-level parent.");if(!Array.isArray(t)||0===t.length)throw new Error(`The '${t}' parameter is required and must be a non-empty array.`);return ic("nestedAppAuth.manageNAATrustedOrigins",[new Qg(e,t)],Hg,Gn(Ug,"nestedAppAuth.manageNAATrustedOrigins"))}))}function Kg(e){try{return new URL(e).origin.toLowerCase()}catch(t){throw new Error(`Invalid origin provided: ${e}`)}}!function(e){e.ADD="ADD",e.DELETE="DELETE"}(Vg||(Vg={}));class Qg{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Zg="v2";function Xg(){if(Dr(tr,rn.content,rn.task),!em())throw un;return nc(Gn(Zg,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Yg(e){if(Dr(tr,rn.content,rn.task),!em())throw un;if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};return nc(Gn(Zg,"geoLocation.showLocation"),"location.showLocation",e)}function em(){return!!(Dr(tr)&&tr.supports.geoLocation&&tr.supports.geoLocation.map&&tr.supports.permissions)}const tm="v2";function nm(){if(Dr(tr,rn.content,rn.task),!im())throw un;return nc(Gn(tm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function rm(){if(Dr(tr,rn.content,rn.task),!im())throw un;const e=Me.GeoLocation;return new Promise((t=>{t(nc(Gn(tm,"geoLocation.hasPermission"),"permissions.has",e))}))}function om(){if(Dr(tr,rn.content,rn.task),!im())throw un;const e=Me.GeoLocation;return new Promise((t=>{t(nc(Gn(tm,"geoLocation.requestPermission"),"permissions.request",e))}))}function im(){return!!(Dr(tr)&&tr.supports.geoLocation&&tr.supports.permissions)}function am(){return tr.hostVersionsInfo?tr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const sm="v1";class cm{postMessage(e,t){Dr(tr),lc(Gn(sm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||gn())}addEventListener(e,t){Dr(tr),"message"===e&&ds(Gn(sm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class um{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Dr(tr,rn.task),lc(Gn(sm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||gn())}addEventListener(e,t){Dr(tr,rn.task),"message"===e&&ds(Gn(sm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const lm="v2";function dm(e){if(Dr(tr,rn.content),!fm())throw un;if(!e||!An(e))throw{errorCode:ke.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return nc(Gn(lm,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function fm(){return!(!Dr(tr)||!tr.supports.secondaryBrowser)}const pm="v1";function gm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(qe))throw{errorCode:ke.OLD_PLATFORM};if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};if(!hm())throw un;lc(Gn(pm,"location.getLocation"),"location.getLocation",[e],t)}function mm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(qe))throw{errorCode:ke.OLD_PLATFORM};if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};if(!hm())throw un;lc(Gn(pm,"location.showLocation"),"location.showLocation",[e],t)}function hm(){return!(!Dr(tr)||!tr.supports.location)}const vm="v1";function wm(e){Dr(tr,rn.sidePanel),e.contentUrl&&new URL(e.contentUrl),lc(Gn(vm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Cm=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 ym="v1";var bm,Sm,Em,Am,Im,Tm;function Pm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),lc(Gn(ym,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Om(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),lc(Gn(ym,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Rm(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage,rn.settings,rn.content),lc(Gn(ym,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Fm(){var e,t,n;return Cm(this,void 0,void 0,(function*(){let r;Dr(tr,rn.sidePanel,rn.meetingStage,rn.settings,rn.content);try{const e=!0;r=yield nc(Gn("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)==Am.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Am.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function km(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage,rn.task),lc(Gn(ym,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Mm(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Dr(tr,rn.sidePanel),lc(Gn(ym,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Nm(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Dr(tr,rn.sidePanel),lc(Gn(ym,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function xm(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Dr(tr,rn.sidePanel),lc(Gn(ym,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Dm(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Dr(tr,rn.sidePanel),ds(Gn(ym,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Lm(e,t,n={sharingProtocol:Im.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),lc(Gn(ym,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Um(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),lc(Gn(ym,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Hm(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),lc(Gn(ym,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Vm(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),lc(Gn(ym,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function _m(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),ds(Gn(ym,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Bm(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),ds(Gn(ym,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Wm(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),ds(Gn(ym,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function jm(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Dr(tr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Tm.Other};return nc(Gn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function zm(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");Dr(tr,rn.sidePanel,rn.meetingStage),e.isAppHandlingAudio?$m(e,t):qm(e,t)}function $m(e,t){lc(Gn(ym,"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");ds(Gn(ym,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>Cm(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);Jm(n,n.isMicMuted===t.isMicMuted?bm.HostInitiated:bm.AppDeclinedToChange)}catch(e){Jm(t,bm.AppFailedToChange)}}))));ds(Gn(ym,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function qm(e,t){lc(Gn(ym,"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");ps("meeting.micStateChanged")&&fs("meeting.micStateChanged"),ps("meeting.audioDeviceSelectionChanged")&&fs("meeting.audioDeviceSelectionChanged"),t(n)}))}function Gm(e){Jm(e,bm.AppInitiated)}function Jm(e,t){Dr(tr,rn.sidePanel,rn.meetingStage),lc(Gn(ym,"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"}(bm||(bm={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Sm||(Sm={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Em||(Em={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Am||(Am={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Im||(Im={})),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"}(Tm||(Tm={}));const Km="v1",Qm="v2";function Zm(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Gn(Km,"monetization.openPurchaseExperience")):(r=e,o=Gn(Qm,"monetization.openPurchaseExperience"));return Dr(tr,rn.content),yn((()=>new Promise((e=>{if(!Xm())throw un;e(nc(o,"monetization.openPurchaseExperience",r))}))),n)}function Xm(){return!(!Dr(tr)||!tr.supports.monetization)}const Ym="v2";function eh(e){return new Promise((t=>{if(Dr(tr,rn.content),!nh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(ec(Gn(Ym,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function th(e){return new Promise((t=>{if(Dr(tr,rn.content),!nh())throw new Error("Not supported");const n=Gn(Ym,"calendar.composeMeeting");tr.isLegacyTeams?t(ec(n,"executeDeepLink",Hp(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(ec(n,"calendar.composeMeeting",e))}))}function nh(){return!(!Dr(tr)||!tr.supports.calendar)}const rh="v2";function oh(e){e&&0!==e.length&&e.forEach((e=>{yp(e)}))}function ih(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===ph.New&&(oh(t.toRecipients),oh(t.ccRecipients),oh(t.bccRecipients))}function ah(e){if(Dr(tr,rn.content),!sh())throw new Error("Not supported");return ih(e),ac("mail.handoff.composeMail",[new ch(e)],Gn(rh,"mail.handoff.composeMail"))}function sh(){return!!(Dr(tr)&&tr.supports.mail&&tr.supports.mail.handoff)}class ch{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const uh="v2";function lh(e){return new Promise((t=>{if(Dr(tr,rn.content),!fh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(ec(Gn(uh,"mail.openMailItem"),"mail.openMailItem",e))}))}function dh(e){return new Promise((t=>{if(Dr(tr,rn.content),!fh())throw new Error("Not supported");t(ec(Gn(uh,"mail.composeMail"),"mail.composeMail",e))}))}function fh(){return!(!Dr(tr)||!tr.supports.mail)}var ph;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(ph||(ph={}));const gh="v2";function mh(){if(!Bn.printCapabilityEnabled){if(Dr(tr),!bh())throw un;Bn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(hh(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function hh(){Pn().print()}function vh(e){wh(Gn(gh,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Kr(e)&&!bh())throw un}))}function wh(e,t,n){!Kr(t)&&Dr(tr),!Kr(t)&&n&&n(),Cs(e,t)}function Ch(e){yh(Gn(gh,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Kr(e)&&!bh())throw un}))}function yh(e,t,n){!Kr(t)&&Dr(tr),!Kr(t)&&n&&n(),Ss(e,t)}function bh(){return!(!Dr(tr)||!tr.supports.teamsCore)}const Sh="v1",Eh="v2";function Ah(e,t){let n,r;Dr(tr,rn.content,rn.task,rn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Gn(Sh,"people.selectPeople")):(r=e,o=Gn(Eh,"people.selectPeople")),wn(Ih,n,o,r)}function Ih(e,t){return new Promise((n=>{if(!Lr(Ge))throw{errorCode:ke.OLD_PLATFORM};if(!yg(t))throw{errorCode:ke.INVALID_ARGUMENTS};if(!Th())throw un;n(nc(e,"people.selectPeople",t))}))}function Th(){return!(!Dr(tr)||!tr.supports.people)}function Ph(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?Oh(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Oh(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 Rh="v2";function Fh(e){return Dr(tr,rn.content),new Promise((t=>{const[n,r]=Ph(e);if(!n)throw{errorCode:ke.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(nc(Gn(Rh,"profile.showProfile"),"profile.showProfile",o))}))}function kh(){return!(!Dr(tr)||!tr.supports.profile)}const Mh="v2",Nh="search.queryChange",xh="search.queryClose",Dh="search.queryExecute";function Lh(e,t,n){if(Dr(tr,rn.content),!Hh())throw un;ds(Gn(Mh,"search.registerOnClosedHandler"),xh,e),ds(Gn(Mh,"search.registerOnExecutedHandler"),Dh,t),n&&ds(Gn(Mh,"search.registerOnChangeHandler"),Nh,n)}function Uh(){if(Dr(tr,rn.content),!Hh())throw un;lc(Gn(Mh,"search.unregisterHandlers"),"search.unregister"),fs(Nh),fs(xh),fs(Dh)}function Hh(){return!(!Dr(tr)||!tr.supports.search)}function Vh(){return new Promise((e=>{if(Dr(tr,rn.content),!Hh())throw new Error("Not supported");e(ec(Gn(Mh,"search.closeSearch"),"search.closeSearch"))}))}var _h=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 Bh="v2";function Wh(){return _h(this,void 0,void 0,(function*(){if(Dr(tr,rn.sidePanel,rn.meetingStage),!jh())throw un;return yield nc(Gn(Bh,"sharing.history.getContent"),"sharing.history.getContent")}))}function jh(){var e;return Dr(tr)&&void 0!==(null===(e=tr.supports.sharing)||void 0===e?void 0:e.history)}const zh="v1",$h="v2",qh={shareWebContent:"sharing.shareWebContent"};function Gh(e,t){try{Kh(e),Qh(e),Zh(e)}catch(e){return Cn((()=>Promise.reject(e)),t)}Dr(tr,rn.content,rn.sidePanel,rn.task,rn.stage,rn.meetingStage);return Cn(Jh,t,Gn(t?zh:$h,"sharing.shareWebContent"),e)}function Jh(e,t){return new Promise((n=>{if(!Xh())throw un;n(nc(e,qh.shareWebContent,t))}))}function Kh(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:ke.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Qh(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Zh(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Xh(){return!(!Dr(tr)||!tr.supports.sharing)}const Yh="v2";function ev(){return new Promise((e=>{if(Dr(tr,rn.content),!tv())throw un;e(nc(Gn(Yh,"stageView.self.close"),"stageView.self.close"))}))}function tv(){var e;return Dr(tr)&&void 0!==(null===(e=tr.supports.stageView)||void 0===e?void 0:e.self)}const nv="v2";var rv;function ov(e){return new Promise((t=>{if(Dr(tr,rn.content),!iv())throw un;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(nc(Gn(nv,"stageView.open"),"stageView.open",e))}))}function iv(){return!(!Dr(tr)||!tr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(rv||(rv={}));const av=10;var sv=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 cv="v2";function uv(e){return sv(this,void 0,void 0,(function*(){Dr(tr,rn.content,rn.task),fv(),pv(e);const t=yield nc(Gn(cv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return gv(e.maxVisualMediaCount,t),t}))}function lv(e){return sv(this,void 0,void 0,(function*(){Dr(tr,rn.content,rn.task),fv(),pv(e);const t=yield nc(Gn(cv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return gv(e.maxVisualMediaCount,t),t}))}function dv(){return!!(Dr(tr)&&tr.supports.visualMedia&&tr.supports.visualMedia.image&&tr.supports.permissions)}function fv(){if(!dv())throw un}function pv(e){if(!e||e.maxVisualMediaCount>av||e.maxVisualMediaCount<1)throw fn}function gv(e,t){if(t.length>e)throw pn}const mv="v2";var hv,vv;function wv(){if(Dr(tr,rn.content,rn.task),!dv())throw un;const e=Me.Media;return nc(Gn(mv,"visualMedia.hasPermission"),"permissions.has",e)}function Cv(){if(Dr(tr,rn.content,rn.task),!dv())throw un;const e=Me.Media;return nc(Gn(mv,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(hv||(hv={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(vv||(vv={}));var yv=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 bv=null;function Sv(){return yv(this,void 0,void 0,(function*(){return null===bv&&(bv=(yield Eo()).app.host.name),bv}))}var Ev=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 Av(){return Ev(this,void 0,void 0,(function*(){if(Dr(tr),!Tv())throw un;return!(!tr.isLegacyTeams||Bn.hostClientType!==tn.android&&Bn.hostClientType!==tn.ios&&Bn.hostClientType!==tn.ipados&&Bn.hostClientType!==tn.visionOS||(yield Iv())!==nn.teams)||(yield Ys(Gn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Iv(){return Ev(this,void 0,void 0,(function*(){return Sv()}))}function Tv(){return Dr(tr)&&void 0!==tr.supports.webStorage}const Pv="v2";var Ov;function Rv(e){const t=Gn(Pv,"call.startCall");return new Promise((n=>{var r;if(Dr(tr,rn.content,rn.task),!Fv())throw un;if(!tr.isLegacyTeams)return lc(t,"call.startCall",[e],n);n(Ys(t,"executeDeepLink",Up(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Ov.Video),e.source)).then((e=>{if(!e)throw new Error(at);return e})))}))}function Fv(){return!(!Dr(tr)||!tr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Ov||(Ov={}));const kv="v1";function Mv(){ji(Gn(kv,"appInitialization.notifyAppLoaded"))}function Nv(){lc(Gn(kv,"appInitialization.notifySuccess"),mo.Success,[mr])}function xv(e){$i(Gn(kv,"appInitialization.notifyFailure"),e)}function Dv(e){zi(Gn(kv,"appInitialization.notifyExpectedFailure"),e)}const Lv=qn("thirdPartyCloudStorage"),Uv="v2";class Hv{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Vv=[],_v=null,Bv=!0,Wv=null;function jv(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Dr(tr,rn.content,rn.task),!$v())throw un;if(Wv)throw Wv=null,new Error("getDragAndDropFiles cannot be called twice");Wv=t,Bv=!0,lc(Gn(Uv,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],zv)}else{t([],{errorCode:ke.INVALID_ARGUMENTS})}}function zv(e){if(Wv)if(e&&e.error)Wv([],e.error),Wv=null;else if(e&&e.fileChunk)try{Bv||0!==e.fileChunk.chunkSequence||(Lv("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Bv=!0,Wv([],{errorCode:ke.INTERNAL_ERROR,message:"error occurred while receiving data"}),Vv=[],Wv=null);const t=lg(e.fileChunk,e.fileType);if(t?(_v||(_v=new Hv(e.fileType,[])),_v.assembleAttachment.push(t)):(Lv(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Wv?Wv([],{errorCode:ke.INTERNAL_ERROR,message:"error occurred while receiving data"}):Wv=null,Vv=[],Wv=null,Bv=!0),Bv=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&_v){const t=ug(_v.assembleAttachment,_v.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Vv.push(n)}e.isLastFile&&Wv&&(Wv(Vv,e.error),Vv=[],Wv=null,Bv=!0),_v=null}}catch(e){Wv&&(Wv([],{errorCode:ke.INTERNAL_ERROR,message:e}),Vv=[],Wv=null,Bv=!0)}else Wv([],{errorCode:ke.INTERNAL_ERROR,message:"data received is null"}),Vv=[],Wv=null,Bv=!0}function $v(){return!(!Dr(tr)||!tr.supports.thirdPartyCloudStorage)}const qv="v1";function Gv(e,t){Wi(Gn(qv,"initialize"),t).then((()=>{e&&e()}))}function Jv(){mh()}function Kv(){hh()}function Qv(e){xr(),lc(Gn(qv,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Bn.frameContext),e(t)}))}function Zv(e){Zi(Gn(qv,"registerOnThemeChangeHandlerHelper"),e)}function Xv(e){gs(Gn(qv,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Yv(e){gs(Gn(qv,"registerAppButtonClickHandler"),"appButtonClick",e,[rn.content])}function ew(e){gs(Gn(qv,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[rn.content])}function tw(e){gs(Gn(qv,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[rn.content])}function nw(e){ma(Gn(qv,"registerBackButtonHandler"),e)}function rw(e){wh(Gn(qv,"registerOnLoadHandler"),e)}function ow(e){yh(Gn(qv,"registerBeforeUnloadHandler"),e)}function iw(e){gs(Gn(qv,"registerFocusEnterHandler"),"focusEnter",e,[])}function aw(e){gs(Gn(qv,"registerChangeSettingsHandler"),"changeSettings",e,[rn.content])}function sw(e,t){Dr(tr),za(Gn(qv,"getTabInstances"),t).then((t=>{e(t)}))}function cw(e,t){Dr(tr),$a(Gn(qv,"getMruTabInstances"),t).then((t=>{e(t)}))}function uw(e){qa(Gn(qv,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function lw(e,t){Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:gn();Xi(Gn(qv,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function dw(e){Ga(Gn(qv,"setFrameContext"),e)}function fw(e,t,n){Wi(Gn(qv,"initializeWithFrameContext"),n).then((()=>t&&t())),Ga(Gn(qv,"setFrameContext"),e)}const pw="v1";function gw(e){ja(Gn(pw,"navigation.returnFocus"),e)}function mw(e,t){Dr(tr);const n=null!=t?t:gn();Wa(Gn(pw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function hw(e,t){Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:gn();_a(Gn(pw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function vw(e){Dr(tr);const t=null!=e?e:gn();Ba(Gn(pw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const ww="v1";function Cw(e){Ja(Gn(ww,"settings.setValidityState"),e)}function yw(e){Dr(tr,rn.content,rn.settings,rn.remove,rn.sidePanel),Ka(Gn(ww,"settings.getSettings")).then((t=>{e(t)}))}function bw(e,t){Dr(tr,rn.content,rn.settings,rn.sidePanel);const n=null!=t?t:gn();Qa(Gn(ww,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Sw(e){Oi(Gn(ww,"settings.registerOnSaveHandler"),e)}function Ew(e){Fi(Gn(ww,"settings.registerOnRemoveHandler"),e)}var Aw=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 Iw="v1";function Tw(e,t){const n=Gn(Iw,"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?(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),lc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Ko(n,Fw(e),r):Jo(n,Rw(e),r),new cm}function Pw(e){e=kw(e);const{width:t,height:n}=e,r=Aw(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Go(Gn(Iw,"tasks.updateTask"),e)}function Ow(e,t){Qo(Gn(Iw,"tasks.submitTask"),e,t)}function Rw(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:sn.Small,width:e.width?e.width:sn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Fw(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:sn.Small,width:e.width?e.width:sn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function kw(e){return e.height=e.height?e.height:sn.Small,e.width=e.width?e.width:sn.Small,e}const Mw="v2";var Nw,xw;function Dw(){return!(!Dr(tr,rn.meetingStage,rn.sidePanel,rn.content)||!tr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Nw||(Nw={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(xw||(xw={}));class Lw{getFluidTenantInfo(){return Uw(),new Promise((e=>{e(nc(Gn(Mw,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Uw(),new Promise((t=>{t(nc(Gn(Mw,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Uw(),new Promise((e=>{e(nc(Gn(Mw,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Uw(),new Promise((t=>{t(nc(Gn(Mw,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Uw(),new Promise((e=>{e(nc(Gn(Mw,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Uw(),new Promise((t=>{t(nc(Gn(Mw,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Uw(),new Promise((t=>{t(nc(Gn(Mw,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Uw(),new Promise((t=>{t(nc(Gn(Mw,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Uw(),new Lw}}function Uw(){if(!Dw())throw new Error("LiveShareHost Not supported")}var Hw=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 Vw(e){try{return e.cartItems=_w(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function _w(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=_w(e.accessories)),e}))}const Bw=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Hw(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Bw(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function Ww(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)zw(t),jw(t.accessories)}function jw(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");zw(t)}}}function zw(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");qw(e.price),Gw(e.quantity)}function $w(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}}function qw(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 Gw(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Jw(e){if(!Object.values(Xw).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Kw="v2",Qw={majorVersion:1,minorVersion:1};var Zw,Xw;function Yw(){if(Dr(tr,rn.content,rn.task),!rC())throw un;return nc(Gn(Kw,"marketplace.getCart"),"marketplace.getCart",Qw).then(Vw)}function eC(e){if(Dr(tr,rn.content,rn.task),!rC())throw un;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return $w(null==e?void 0:e.cartId),Ww(null==e?void 0:e.cartItems),nc(Gn(Kw,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Bw(e.cartItems),cartVersion:Qw})).then(Vw)}function tC(e){if(Dr(tr,rn.content,rn.task),!rC())throw un;if(!e)throw new Error("removeCartItemsParams must be provided");if($w(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 nc(Gn(Kw,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Qw})).then(Vw)}function nC(e){if(Dr(tr,rn.content,rn.task),!rC())throw un;if(!e)throw new Error("updateCartStatusParams must be provided");return $w(null==e?void 0:e.cartId),Jw(null==e?void 0:e.cartStatus),nc(Gn(Kw,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Qw})).then(Vw)}function rC(){return!(!Dr(tr)||!tr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(Zw||(Zw={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Xw||(Xw={}))})(),r})()));
|
2
2
|
//# sourceMappingURL=MicrosoftTeams.min.js.map
|