@microsoft/teams-js 2.23.0-beta.2 → 2.23.0-beta.3
Sign up to get free protection for your applications and to get access to all the features.
package/dist/MicrosoftTeams.js
CHANGED
@@ -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],c=i[1],u=new o(l(e,a,c)),d=0,f=c>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===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===c&&(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,l=r-o;s<l;s+=a)i.push(u(e,s,s+a>l?l: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 l(e,t,n){return 3*(t+n)/4-n}function c(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(c(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},46:(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(601)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},601:(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 l(e){var i=Math.abs(e);return i>=o?c(e,i,o,"day"):i>=r?c(e,i,r,"hour"):i>=n?c(e,i,n,"minute"):i>=t?c(e,i,t,"second"):e+" ms"}function c(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?l(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>me,ChannelType:()=>Ie,ChildAppWindow:()=>Mo,DialogDimension:()=>Ae,ErrorCode:()=>we,FileOpenPreference:()=>ge,FrameContexts:()=>be,HostClientType:()=>ye,HostName:()=>Se,LiveShareHost:()=>sa,NotificationTypes:()=>Br,ParentAppWindow:()=>Lo,SecondaryM365ContentIdName:()=>he,TaskModuleDimension:()=>Te,TeamType:()=>Ee,UserSettingTypes:()=>zr,UserTeamRole:()=>Pe,ViewerActionTypes:()=>jr,app:()=>fn,appEntity:()=>Ha,appInitialization:()=>Ai,appInstallDialog:()=>io,authentication:()=>zt,barCode:()=>Eo,calendar:()=>_o,call:()=>Ei,chat:()=>Po,clipboard:()=>Io,conversations:()=>Yr,dialog:()=>Zt,enablePrintCapability:()=>Oi,executeDeepLink:()=>Gi,externalAppAuthentication:()=>Ea,externalAppCardActions:()=>Pa,externalAppCommands:()=>Ia,files:()=>Fa,geoLocation:()=>Ro,getAdaptiveCardSchemaVersion:()=>Oo,getContext:()=>Mi,getMruTabInstances:()=>zi,getTabInstances:()=>ji,initialize:()=>Ri,initializeWithFrameContext:()=>Ji,liveShare:()=>aa,location:()=>Uo,logs:()=>Wr,mail:()=>Wo,marketplace:()=>Sa,media:()=>lo,meeting:()=>xo,meetingRoom:()=>Oa,menus:()=>Xt,messageChannels:()=>ka,monetization:()=>Vo,navigateBack:()=>Yi,navigateCrossDomain:()=>Xi,navigateToTab:()=>Qi,nestedAppAuth:()=>To,notifications:()=>La,openFilePreview:()=>Qr,otherAppStateChange:()=>Da,pages:()=>In,people:()=>jo,print:()=>ki,profile:()=>Go,registerAppButtonClickHandler:()=>Ui,registerAppButtonHoverEnterHandler:()=>Ni,registerAppButtonHoverLeaveHandler:()=>Hi,registerBackButtonHandler:()=>xi,registerBeforeUnloadHandler:()=>_i,registerChangeSettingsHandler:()=>Bi,registerCustomHandler:()=>Kr,registerFocusEnterHandler:()=>Wi,registerFullScreenHandler:()=>Di,registerOnLoadHandler:()=>Vi,registerOnThemeChangeHandler:()=>Li,registerUserSettingsChangeHandler:()=>Zr,remoteCamera:()=>Na,returnFocus:()=>Zi,search:()=>gi,secondaryBrowser:()=>Do,sendCustomEvent:()=>Jr,sendCustomMessage:()=>$r,setFrameContext:()=>$i,settings:()=>ta,shareDeepLink:()=>qi,sharing:()=>hi,stageView:()=>wi,tasks:()=>oa,teams:()=>Va,teamsCore:()=>Bo,thirdPartyCloudStorage:()=>Ti,uploadCustomApp:()=>Gr,version:()=>bt,videoEffects:()=>fi,videoEffectsEx:()=>Ba,visualMedia:()=>yi,webStorage:()=>Si});const e=(0,n(46).debug)("teamsJs");function t(t){return e.extend(t)}function o(e,t){return`${e}_${t}`}function i(e){return/^v\d+_[\w.]+$/.test(e)}const a=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","www.bing.com","www.staging-bing-int.com","teams.cloud.microsoft","outlook.cloud.microsoft","m365.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net"]}');const s="2.0.1",l="2.0.3",c="1.9.0",u="1.8.0",d=n.t(a,2).validOrigins,f=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),p=/^https:\/\//,g="https",m="teams.microsoft.com",h="The library has not yet been initialized",w="The runtime has not yet been initialized",v="The runtime version is not supported";class C{}C.initializeCalled=!1,C.initializeCompleted=!1,C.additionalValidOrigins=[],C.initializePromise=void 0,C.isFramelessWindow=!1,C.frameContext=void 0,C.hostClientType=void 0,C.printCapabilityEnabled=!1;var y=n(933);const S=E,b=2147483647;function E(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 A(e)}return P(e,t,n)}function P(e,t,n){if("string"==typeof e)return R(e,t);if(ArrayBuffer.isView(e))return N(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(k(e,ArrayBuffer)||e&&k(e.buffer,ArrayBuffer))return H(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(k(e,SharedArrayBuffer)||e&&k(e.buffer,SharedArrayBuffer)))return H(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 E.from(r,t,n);const o=oe(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return E.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 A(e){return I(e),T(e<0?0:0|F(e))}function I(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 T(e){if(e>b)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,E.prototype),t}function F(e){if(e>=b)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+b.toString(16)+" bytes");return 0|e}function R(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!E.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|O(e,t);let r=T(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function O(e,t){if(E.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||k(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 M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(o)return r?-1:M(e).length;t=(""+t).toLowerCase(),o=!0}}function k(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function M(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 L(e){return y.toByteArray(U(e))}E.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}}(),E.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),E.from=function(e,t,n){return P(e,t,n)},Object.setPrototypeOf(E.prototype,Uint8Array.prototype),Object.setPrototypeOf(E,Uint8Array),E.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}},E.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==E.prototype};const D=/[^+/0-9A-Za-z-_]/g;function U(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function N(e){if(k(e,Uint8Array)){const t=new Uint8Array(e);return H(t.buffer,t.byteOffset,t.byteLength)}return x(e)}function H(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,E.prototype),r}function x(e){const t=e.length<0?0:0|F(e.length),n=T(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function V(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,l;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(i=l));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(i=l));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,l>65535&&l<1114112&&(i=l))}}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 B(r)}function _(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 j(this,t,n);case"utf8":case"utf-8":return V(this,t,n);case"ascii":return z(this,t,n);case"latin1":case"binary":return q(this,t,n);case"base64":return G(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}E.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?V(this,0,e):_.apply(this,arguments)};const W=4096;function B(e){const t=e.length;if(t<=W)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=W));return n}function j(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+=re[e[r]];return o}function z(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 q(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 G(e,t,n){return 0===t&&n===e.length?y.fromByteArray(e):y.fromByteArray(e.slice(t,n))}function $(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 J(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(ne(r))return a;e[n+a]=r}return a}function K(e,t,n,r){return te(M(t,e.length-n),e,n,r)}function Z(e,t,n,r){return te(Y(t),e,n,r)}function Q(e,t,n,r){return te(L(t),e,n,r)}function X(e,t,n,r){return te(ee(t,e.length-n),e,n,r)}function Y(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function ee(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 te(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 ne(e){return e!=e}E.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 J(this,e,t,n);case"utf8":case"utf-8":return K(this,e,t,n);case"ascii":case"latin1":case"binary":return Z(this,e,t,n);case"base64":return Q(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const re=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 oe(e){if(E.isBuffer(e)){const t=0|F(e.length),n=T(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ne(e.length)?T(0):x(e):"Buffer"===e.type&&Array.isArray(e.data)?x(e.data):void 0}const ie={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ae;const se=new Uint8Array(16);function le(){if(!ae&&(ae="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ae))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ae(se)}const ce=[];for(let e=0;e<256;++e)ce.push((e+256).toString(16).slice(1));function ue(e,t=0){return ce[e[t+0]]+ce[e[t+1]]+ce[e[t+2]]+ce[e[t+3]]+"-"+ce[e[t+4]]+ce[e[t+5]]+"-"+ce[e[t+6]]+ce[e[t+7]]+"-"+ce[e[t+8]]+ce[e[t+9]]+"-"+ce[e[t+10]]+ce[e[t+11]]+ce[e[t+12]]+ce[e[t+13]]+ce[e[t+14]]+ce[e[t+15]]}const de=function(e,t,n){if(ie.randomUUID&&!t&&!e)return ie.randomUUID();const r=(e=e||{}).random||(e.rng||le)();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 ue(r)},fe=/^(?:[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 pe=function(e){return"string"==typeof e&&fe.test(e)};var ge,me,he,we,ve,Ce,ye,Se,be,Ee,Pe,Ae;!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(ge||(ge={})),function(e){e.M365Content="m365content"}(me||(me={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(he||(he={})),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"}(we||(we={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(ve||(ve={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Ce||(Ce={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(ye||(ye={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(Se||(Se={})),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"}(be||(be={})),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"}(Ee||(Ee={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(Pe||(Pe={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Ae||(Ae={}));var Ie,Te=Ae;!function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Ie||(Ie={}));const Fe={errorCode:we.NOT_SUPPORTED_ON_PLATFORM},Re=1,Oe=5,ke={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Me=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),Le=new Error("Invalid response: Received more images than the specified max limit in the response.");function De(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Ue(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 Ne(){return de()}function He(e){return Object.keys(e).forEach((t=>{"object"==typeof e[t]&&He(e[t])})),Object.freeze(e)}function xe(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Ve(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function _e(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function We(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 Be(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId)+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl),(e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function je(e){return!(Ue(`${e.majorVersion}.${e.minorVersion}`,`${Re}.${Oe}`)>=0)}function ze(e){return"https:"===e.protocol}function qe(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=S.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Ge(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 $e(){if(Je())throw new Error("window object undefined at SSR check");return window}function Je(){return"undefined"==typeof window}function Ke(e,t){if(Xe(e)||!et(e)||!tt(e))throw t||new Error("id is not valid.")}function Ze(e,t){const n=e.toString().toLocaleLowerCase();if(Xe(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!ze(e))throw t||new Error("Url should be a valid https url")}function Qe(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Xe(e){let t;try{const n=Ye(e);t=decodeURIComponent(n)}catch(n){t=e}return/<script[^>]*>[\s\S]*?<\/script[^>]*>/gi.test(t)}function Ye(e){return new Map([["<","<"],[">",">"],["&","&"],[""",'"'],["'","'"],["/","/"]]).forEach(((t,n)=>{e=e.replace(new RegExp(n,"gi"),t)})),e}function et(e){return e.length<256&&e.length>4}function tt(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function nt(e){if(!e)throw new Error("id must not be empty");if(!1===pe(e))throw new Error("id must be a valid UUID")}var rt=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 ot=t("runtime"),it=4;function at(e){return e.apiVersion===it}const st={apiVersion:-1,supports:{}};function lt(e){if(at(e))return!0;throw-1===e.apiVersion?new Error(w):new Error(v)}let ct=st;const ut={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:ke,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:{}}}},dt=[ye.desktop,ye.web,ye.rigel,ye.surfaceHub,ye.teamsRoomsWindows,ye.teamsRoomsAndroid,ye.teamsPhones,ye.teamsDisplays],ft=[ye.android,ye.ios,ye.ipados],pt=[...dt,...ft];function gt(e){let t=e;if(t.apiVersion<it&&mt.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),at(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const mt=[{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=rt(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})}}}],ht={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:dt}],"1.9.0":[{capability:{location:{}},hostClientTypes:pt}],"2.0.0":[{capability:{people:{}},hostClientTypes:pt},{capability:{sharing:{}},hostClientTypes:[ye.desktop,ye.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[ye.android,ye.desktop,ye.ios,ye.teamsRoomsAndroid,ye.teamsPhones,ye.teamsDisplays,ye.web]},{capability:{webStorage:{}},hostClientTypes:[ye.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[ye.android,ye.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[ye.android,ye.ios]}]},wt=ot.extend("generateBackCompatRuntimeConfig");function vt(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]=vt(e[r]||{},t[r]));return n}function Ct(e,t,n){wt("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);wt("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{Ue(e,t)>=0&&n[t].forEach((e=>{void 0!==C.hostClientType&&e.hostClientTypes.includes(C.hostClientType)&&(r=vt(r,e.capability))}))}));const o={apiVersion:it,hostVersionsInfo:ke,isLegacyTeams:!0,supports:r};return wt("Runtime config after updating based on highestSupportedVersion: %o",o),o}const yt=ot.extend("applyRuntimeConfig");function St(e){"string"==typeof e.apiVersion&&(yt("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),yt("Fast-forwarding runtime %o",e);const t=gt(e);yt("Applying runtime %o",t),ct=He(t)}const bt="2.23.0-beta.2",Et=t("internal"),Pt=Et.extend("ensureInitializeCalled"),At=Et.extend("ensureInitialized");function It(){if(!C.initializeCalled)throw Pt(h),new Error(h)}function Tt(e,...t){if(!C.initializeCompleted)throw At("%s. initializeCalled: %s",h,C.initializeCalled.toString()),new Error(h);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===C.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${C.frameContext}".`)}return lt(e)}function Ft(e=s){const t=Ue(C.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Rt(){return C.hostClientType==ye.android||C.hostClientType==ye.ios||C.hostClientType==ye.ipados}function Ot(e=s){if(!Rt()){throw{errorCode:we.NOT_SUPPORTED_ON_PLATFORM}}if(!Ft(e)){throw{errorCode:we.OLD_PLATFORM}}}function kt(e){let t=C.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&p.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),C.additionalValidOrigins=t}function Mt(e){return null==e}var Lt=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};let Dt=[];const Ut=t("validateOrigin");function Nt(){return Lt(this,void 0,void 0,(function*(){yield xt()}))}function Ht(){return 0!==Dt.length}function xt(){return Lt(this,void 0,void 0,(function*(){return Ht()?Dt:Je()?(Dt=d,d):fetch(f).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(Vt(JSON.stringify(e)))return Dt=e.validOrigins,Dt;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(Ut("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Dt=d,Dt)))}))}function Vt(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 Ut("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function _t(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 Wt(e){return xt().then((t=>{if(!ze(e))return Ut("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=>_t(e,n))))return!0;for(const e of C.additionalValidOrigins){if(_t("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return Ut("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,C.additionalValidOrigins),!1}))}const Bt="v1",jt="v2";var zt;!function(e){let t,n,r,i;function a(e,n){return new Promise(((r,o)=>{if(C.hostClientType!==ye.web){const t=Qe(n.url);Ze(t),r(ar(e,"authentication.authenticate",[t.href,n.width,n.height,n.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else t={success:r,fail:o},u(n)}))}function s(e,t){return new Promise((n=>{n(ar(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 l(e){return new Promise((t=>{t(ar(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function c(){d();try{Xn.childWindow&&Xn.childWindow.close()}finally{Xn.childWindow=null,Xn.childOrigin=null}}function u(e){c();let t=e.width||600,n=e.height||400;t=Math.min(t,Xn.currentWindow.outerWidth-400),n=Math.min(n,Xn.currentWindow.outerHeight-200);const r=Qe(e.url.replace("{oauthRedirectMethod}","web"));Ze(r);let o=void 0!==Xn.currentWindow.screenLeft?Xn.currentWindow.screenLeft:Xn.currentWindow.screenX,i=void 0!==Xn.currentWindow.screenTop?Xn.currentWindow.screenTop:Xn.currentWindow.screenY;o+=Xn.currentWindow.outerWidth/2-t/2,i+=Xn.currentWindow.outerHeight/2-n/2,Xn.childWindow=Xn.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),Xn.childWindow?f():g("FailedToOpenWindow")}function d(){n&&(clearInterval(n),n=0),Dn("initialize"),Dn("navigateCrossDomain")}function f(){d(),n=Xn.currentWindow.setInterval((()=>{if(!Xn.childWindow||Xn.childWindow.closed)g("CancelledByUser");else{const e=Xn.childOrigin;try{Xn.childOrigin="*",Nr("ping")}finally{Xn.childOrigin=e}}}),100),Ln(o(Bt,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[be.authentication,C.hostClientType])),Ln(o(Bt,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function p(e){try{t&&t.success(e)}finally{t=void 0,c()}}function g(e){try{t&&t.fail(new Error(e))}finally{t=void 0,c()}}e.initialize=function(){Ln(o(Bt,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",p,!1),Ln(o(Bt,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",g,!1)},e.registerAuthenticationHandlers=function(e){r=e},e.authenticate=function(e){const t=void 0!==e,n=t?e:r;if(!n)throw new Error("No parameters are provided for authentication");return Tt(ct,be.content,be.sidePanel,be.settings,be.remove,be.task,be.stage,be.meetingStage),a(n.successCallback||n.failureCallback?o(Bt,"authentication.authenticate"):o(jt,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(r=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(r=void 0)}}))},e.getAuthToken=function(e){return It(),s(e&&(e.successCallback||e.failureCallback)?o(Bt,"authentication.getAuthToken"):o(jt,"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}))},e.getUser=function(e){return It(),l(e&&(e.successCallback||e.failureCallback)?o(Bt,"authentication.getUser"):o(jt,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),null;throw t}))},e.notifySuccess=function(e,t){Tt(ct,be.authentication),ur(o(t?Bt:jt,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Dr(Xn.parentWindow,(()=>setTimeout((()=>Xn.currentWindow.close()),200)))},e.notifyFailure=function(e,t){Tt(ct,be.authentication),ur(o(t?Bt:jt,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Dr(Xn.parentWindow,(()=>setTimeout((()=>Xn.currentWindow.close()),200)))},function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(i=e.DataResidency||(e.DataResidency={}))}(zt||(zt={}));const qt="v2";function Gt(e,t){if(Tt(ct,be.content,be.sidePanel,be.task,be.meetingStage),!Zt.update.isSupported())throw Fe;ur(e,"tasks.updateTask",[t])}function $t(e,t,n,r){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!Zt.url.isSupported())throw Fe;r&&Ln(o(qt,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);ur(e,"tasks.startTask",[Zt.url.getDialogInfoFromUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Dn("messageForParent")}))}function Jt(e,t,n,r){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!Zt.url.bot.isSupported())throw Fe;r&&Ln(o(qt,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);ur(e,"tasks.startTask",[Zt.url.getDialogInfoFromBotUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Dn("messageForParent")}))}function Kt(e,t,n){if(Tt(ct,be.content,be.task),!Zt.url.isSupported())throw Fe;ur(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}var Zt;!function(e){const t=[];function n(e){C.frameContext&&(C.frameContext===be.task?t.push(e):Dn("messageForChild"))}let r,i,a;e.initialize=function(){Ln(o(qt,"dialog.registerMessageForChildHandler"),"messageForChild",n,!1)},function(e){let n,r;function i(e){return{url:e.url,height:e.size?e.size.height:Ae.Small,width:e.size?e.size.width:Ae.Small,title:e.title,fallbackUrl:e.fallbackUrl}}e.open=function(e,t,n){$t(o(qt,"dialog.url.open"),e,t,n)},e.submit=function(e,t){Kt(o(qt,"dialog.url.submit"),e,t)},function(e){function n(){var e,t;return Tt(ct)&&!!(null===(t=null===(e=ct.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}e.sendMessageToParentFromDialog=function(e){if(Tt(ct,be.task),!n())throw Fe;ur(o(qt,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])},e.sendMessageToDialog=function(e){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!n())throw Fe;ur(o(qt,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])},e.registerOnMessageFromParent=function(e){if(Tt(ct,be.task),!n())throw Fe;for(Dn("messageForChild"),Ln(o(qt,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),t.reverse();t.length>0;){e(t.pop())}},e.isSupported=n}(n=e.parentCommunication||(e.parentCommunication={})),e.isSupported=function(){return Tt(ct)&&void 0!==(ct.supports.dialog&&ct.supports.dialog.url)},function(e){e.open=function(e,t,n){Jt(o(qt,"dialog.url.bot.open"),e,t,n)},e.isSupported=function(){return Tt(ct)&&void 0!==(ct.supports.dialog&&ct.supports.dialog.url&&ct.supports.dialog.url.bot)}}(r=e.bot||(e.bot={})),e.getDialogInfoFromUrlDialogInfo=i,e.getDialogInfoFromBotUrlDialogInfo=function(e){const t=i(e);return t.completionBotId=e.completionBotId,t}}(r=e.url||(e.url={})),e.isSupported=function(){return!(!Tt(ct)||!ct.supports.dialog)},function(e){e.resize=function(e){Gt(o(qt,"dialog.update.resize"),e)},e.isSupported=function(){return!(!Tt(ct)||!ct.supports.dialog)&&!!ct.supports.dialog.update}}(i=e.update||(e.update={})),function(e){function t(){const e=ct.hostVersionsInfo&&ct.hostVersionsInfo.adaptiveCardSchemaVersion&&!je(ct.hostVersionsInfo.adaptiveCardSchemaVersion);return Tt(ct)&&void 0!==(e&&ct.supports.dialog&&ct.supports.dialog.card)}let n;function r(e){return{card:e.card,height:e.size?e.size.height:Ae.Small,width:e.size?e.size.width:Ae.Small,title:e.title}}function i(e){const t=r(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,n){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!t())throw Fe;const i=r(e);ur(o(qt,"dialog.adaptiveCard.open"),"tasks.startTask",[i],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t,function(e){function t(){const e=ct.hostVersionsInfo&&ct.hostVersionsInfo.adaptiveCardSchemaVersion&&!je(ct.hostVersionsInfo.adaptiveCardSchemaVersion);return Tt(ct)&&void 0!==(e&&ct.supports.dialog&&ct.supports.dialog.card&&ct.supports.dialog.card.bot)}e.open=function(e,n){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!t())throw Fe;const r=i(e);ur(o(qt,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[r],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t}(n=e.bot||(e.bot={}))}(a=e.adaptiveCard||(e.adaptiveCard={}))}(Zt||(Zt={}));const Qt="v2";var Xt;!function(e){let t,n,r,i,a;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(t=e.DisplayMode||(e.DisplayMode={}));function s(e){a&&a(e)||(Tt(ct),ur(o(Qt,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function l(e){r&&r(e)||(Tt(ct),ur(o(Qt,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function c(e){i&&i(e)||(Tt(ct),ur(o(Qt,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function u(){return!(!Tt(ct)||!ct.supports.menus)}e.MenuItem=class{constructor(){this.enabled=!0,this.selected=!1}},function(e){e.dropDown="dropDown",e.popOver="popOver"}(n=e.MenuListType||(e.MenuListType={})),e.initialize=function(){Ln(o(Qt,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",l,!1),Ln(o(Qt,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",c,!1),Ln(o(Qt,"menus.registerSetModuleViewHandler"),"setModuleView",s,!1)},e.setUpViews=function(e,t){if(Tt(ct),!u())throw Fe;a=t,ur(o(Qt,"menus.setUpViews"),"setUpViews",[e])},e.setNavBarMenu=function(e,t){if(Tt(ct),!u())throw Fe;r=t,ur(o(Qt,"menus.setNavBarMenu"),"setNavBarMenu",[e])},e.showActionMenu=function(e,t){if(Tt(ct),!u())throw Fe;i=t,ur(o(Qt,"menus.showActionMenu"),"showActionMenu",[e])},e.isSupported=u}(Xt||(Xt={}));const Yt="v2",en=5e3,tn=t("app");function nn(e,t){if(Je()){return tn.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return We((()=>cn(e,t)),en,new Error("SDK initialization timed out."))}function rn(e){ur(e,fn.Messages.AppLoaded,[bt])}function on(e,t){ur(e,fn.Messages.ExpectedFailure,[t.reason,t.message])}function an(e,t){ur(e,fn.Messages.Failure,[t.reason,t.message])}function sn(e){ur(e,fn.Messages.Success,[bt])}const ln=tn.extend("initializeHelper");function cn(e,t){return new Promise((n=>{C.initializeCalled||(C.initializeCalled=!0,Rn(),C.initializePromise=er(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=s})=>{C.frameContext=e,C.hostClientType=t,C.clientSupportedSDKVersion=r;try{ln("Parsing %s",n);const e=JSON.parse(n);if(ln("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&St(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ln("Attempting to parse %s as an SDK version",n),isNaN(Ue(n,s))||(C.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(ln("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");St(e)}catch(e){if(!(e instanceof SyntaxError))throw e;St(Ct(C.clientSupportedSDKVersion,ut,ht))}}C.initializeCompleted=!0})),zt.initialize(),Xt.initialize(),In.config.initialize(),Zt.initialize()),Array.isArray(t)&&kt(t),void 0!==C.initializePromise?n(C.initializePromise):ln("GlobalVars.initializePromise is unexpectedly undefined")}))}function un(e,t){!Mt(t)&&It(),Hn(e,t)}function dn(e,t){return new Promise((n=>{Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),n(rr(e,"executeDeepLink",t))}))}var fn;function pn(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,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:Se.teams,clientType:e.hostClientType?e.hostClientType:ye.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:C.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,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(e){const n=t("app");let r,i,a;e.Messages={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"},function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(r=e.FailedReason||(e.FailedReason={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(i=e.ExpectedFailureReason||(e.ExpectedFailureReason={})),e.isInitialized=function(){return C.initializeCompleted},e.getFrameContext=function(){return C.frameContext},function(){if(Je())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,r="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?n("teamsjs is being used from %s. %s",t,r):n("teamsjs is being used from a script tag embedded directly in your html. %s",r)}(),e.initialize=function(e){return Nt(),nn(o(Yt,"app.initialize"),e)},e._initialize=function(e){Xn.currentWindow=e},e._uninitialize=function(){C.initializeCalled&&(On(),C.initializeCalled=!1,C.initializeCompleted=!1,C.initializePromise=void 0,C.additionalValidOrigins=[],C.frameContext=void 0,C.hostClientType=void 0,C.isFramelessWindow=!1,tr())},e.getContext=function(){return new Promise((e=>{It(),e(nr(o(Yt,"app.getContext"),"getContext"))})).then((e=>pn(e)))},e.notifyAppLoaded=function(){It(),rn(o(Yt,"app.notifyAppLoaded"))},e.notifySuccess=function(){It(),sn(o(Yt,"app.notifySuccess"))},e.notifyFailure=function(e){It(),an(o(Yt,"app.notifyFailure"),e)},e.notifyExpectedFailure=function(e){It(),on(o(Yt,"app.notifyExpectedFailure"),e)},e.registerOnThemeChangeHandler=function(e){un(o(Yt,"app.registerOnThemeChangeHandler"),e)},e.openLink=function(e){return dn(o(Yt,"app.openLink"),e)},function(e){e.registerBeforeSuspendOrTerminateHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Tt(ct),jn(e)},e.registerOnResumeHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Tt(ct),zn(e)}}(a=e.lifecycle||(e.lifecycle={}))}(fn||(fn={}));const gn="v2";function mn(e,t){return new Promise((n=>{if(Tt(ct,be.content,be.sidePanel,be.settings,be.remove,be.task,be.stage,be.meetingStage),!In.isSupported())throw Fe;n(or(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function hn(e){return new Promise((t=>{if(Tt(ct),!In.backStack.isSupported())throw Fe;t(or(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function wn(e,t){return new Promise((n=>{if(Tt(ct),!In.tabs.isSupported())throw Fe;n(or(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function vn(e,t){if(Tt(ct),!In.isSupported())throw Fe;ur(e,"returnFocus",[t])}function Cn(e,t){return new Promise((n=>{if(Tt(ct),!In.tabs.isSupported())throw Fe;n(nr(e,"getTabInstances",t))}))}function yn(e,t){return new Promise((n=>{if(Tt(ct),!In.tabs.isSupported())throw Fe;n(nr(e,"getMruTabInstances",t))}))}function Sn(e,t){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!In.isSupported())throw Fe;ur(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function bn(e,t){if(Tt(ct,be.content),!In.isSupported())throw Fe;ur(e,"setFrameContext",[t])}function En(e,t){if(Tt(ct,be.settings,be.remove),!In.config.isSupported())throw Fe;ur(e,"settings.setValidityState",[t])}function Pn(e){return new Promise((t=>{if(Tt(ct,be.content,be.settings,be.remove,be.sidePanel),!In.isSupported())throw Fe;t(nr(e,"settings.getSettings"))}))}function An(e,t){return new Promise((n=>{if(Tt(ct,be.content,be.settings,be.sidePanel),!In.config.isSupported())throw Fe;n(rr(e,"settings.setSettings",t))}))}var In;!function(e){function t(e){bn(o(gn,"pages.setCurrentFrame"),e)}function n(){return!(!Tt(ct)||!ct.supports.pages)}let r,i,a,s,l,c;e.returnFocus=function(e){vn(o(gn,"pages.returnFocus"),e)},e.registerFocusEnterHandler=function(e){Nn(o(gn,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!n())throw Fe}))},e.setCurrentFrame=t,e.initializeWithFrameContext=function(e,n,r){Nt(),nn(o(gn,"pages.initializeWithFrameContext"),r).then((()=>n&&n())),t(e)},e.getConfig=function(){return Pn(o(gn,"pages.getConfig."))},e.navigateCrossDomain=function(e){return mn(o(gn,"pages.navigateCrossDomain"),e)},e.navigateToApp=function(e){return new Promise((t=>{if(Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!n())throw Fe;const r=o(gn,"pages.navigateToApp");ct.isLegacyTeams?t(rr(r,"executeDeepLink",Be(e))):t(rr(r,"pages.navigateToApp",e))}))},e.shareDeepLink=function(e){return Sn(o(gn,"pages.shareDeepLink"),e)},e.registerFullScreenHandler=function(e){Nn(o(gn,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Mt(e)&&!n())throw Fe}))},e.isSupported=n,function(e){e.navigateToTab=function(e){return wn(o(gn,"pages.tabs.navigateToTab"),e)},e.getTabInstances=function(e){return Cn(o(gn,"pages.tabs.getTabInstances"),e)},e.getMruTabInstances=function(e){return yn(o(gn,"pages.tabs.getMruTabInstances"),e)},e.isSupported=function(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.tabs}}(r=e.tabs||(e.tabs={})),function(e){let t,n;function r(e,n,r){!Mt(n)&&Tt(ct,be.settings),r&&r(),t=n,!Mt(n)&&ur(e,"registerHandler",["save"])}function i(e,t,r){!Mt(t)&&Tt(ct,be.remove,be.settings),r&&r(),n=t,!Mt(t)&&ur(e,"registerHandler",["remove"])}function a(e){const n=new s(e);t?t(n):Xn.childWindow?Nr("settings.save",[e]):n.notifySuccess()}e.initialize=function(){Ln(o(gn,"pages.config.registerSettingsSaveHandler"),"settings.save",a,!1),Ln(o(gn,"pages.config.registerSettingsRemoveHandler"),"settings.remove",l,!1)},e.setValidityState=function(e){return En(o(gn,"pages.config.setValidityState"),e)},e.setConfig=function(e){return An(o(gn,"pages.config.setConfig"),e)},e.registerOnSaveHandler=function(e){r(o(gn,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Mt(e)&&!u())throw Fe}))},e.registerOnSaveHandlerHelper=r,e.registerOnRemoveHandler=function(e){i(o(gn,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Mt(e)&&!u())throw Fe}))},e.registerOnRemoveHandlerHelper=i,e.registerChangeConfigHandler=function(e){Nn(o(gn,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[be.content],(()=>{if(!u())throw Fe}))};class s{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),ur(o(gn,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),ur(o(gn,"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 l(){const e=new c;n?n(e):Xn.childWindow?Nr("settings.remove",[]):e.notifySuccess()}class c{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),ur(o(gn,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),ur(o(gn,"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 u(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.config}e.isSupported=u}(i=e.config||(e.config={})),function(e){let t;function n(){return hn(o(gn,"pages.backStack.navigateBack"))}function r(e,n,r){!Mt(n)&&Tt(ct),r&&r(),t=n,!Mt(n)&&ur(e,"registerHandler",["backButton"])}function i(){t&&t()||(Xn.childWindow?Nr("backButtonPress",[]):n())}function a(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.backStack}e._initialize=function(){Ln(o(gn,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",i,!1)},e.navigateBack=n,e.registerBackButtonHandler=function(e){r(o(gn,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Mt(e)&&!a())throw Fe}))},e.registerBackButtonHandlerHelper=r,e.isSupported=a}(a=e.backStack||(e.backStack={})),function(e){function t(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.fullTrust}e.enterFullscreen=function(){if(Tt(ct,be.content),!t())throw Fe;ur(o(gn,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])},e.exitFullscreen=function(){if(Tt(ct,be.content),!t())throw Fe;ur(o(gn,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])},e.isSupported=t}(s=e.fullTrust||(e.fullTrust={})),function(e){function t(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.appButton}e.onClick=function(e){Nn(o(gn,"pages.appButton.onClick"),"appButtonClick",e,[be.content],(()=>{if(!t())throw Fe}))},e.onHoverEnter=function(e){Nn(o(gn,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[be.content],(()=>{if(!t())throw Fe}))},e.onHoverLeave=function(e){Nn(o(gn,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[be.content],(()=>{if(!t())throw Fe}))},e.isSupported=t}(l=e.appButton||(e.appButton={})),function(e){function t(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.currentApp}e.navigateTo=function(e){return new Promise((n=>{if(Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!t())throw Fe;n(ir(o(gn,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))},e.navigateToDefaultPage=function(){return new Promise((e=>{if(Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!t())throw Fe;e(ir(o(gn,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))},e.isSupported=t}(c=e.currentApp||(e.currentApp={}))}(In||(In={}));const Tn=t("handlers");class Fn{static initializeHandlers(){Fn.handlers.themeChange=xn,Fn.handlers.load=_n,Fn.handlers.beforeUnload=Bn,In.backStack._initialize()}static uninitializeHandlers(){Fn.handlers={},Fn.themeChangeHandler=null,Fn.loadHandler=null,Fn.beforeUnloadHandler=null,Fn.beforeSuspendOrTerminateHandler=null,Fn.resumeHandler=null}}function Rn(){Fn.initializeHandlers()}function On(){Fn.uninitializeHandlers()}Fn.handlers={},Fn.themeChangeHandler=null,Fn.loadHandler=null,Fn.beforeUnloadHandler=null,Fn.beforeSuspendOrTerminateHandler=null,Fn.resumeHandler=null;const kn=Tn.extend("callHandler");function Mn(e,t){const n=Fn.handlers[e];if(n){kn("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Xn.childWindow?(Nr(e,t),[!1,void 0]):(kn("Handler for action message %s not found.",e),[!1,void 0])}function Ln(e,t,n,r=!0,o=[]){n?(Fn.handlers[t]=n,r&&ur(e,"registerHandler",[t,...o])):delete Fn.handlers[t]}function Dn(e){delete Fn.handlers[e]}function Un(e){return null!=Fn.handlers[e]}function Nn(e,t,n,r,o){n&&Tt(ct,...r),o&&o(),Ln(e,t,n)}function Hn(e,t){Fn.themeChangeHandler=t,!Mt(t)&&ur(e,"registerHandler",["themeChange"])}function xn(e){Fn.themeChangeHandler&&Fn.themeChangeHandler(e),Xn.childWindow&&Nr("themeChange",[e])}function Vn(e,t){Fn.loadHandler=t,!Mt(t)&&ur(e,"registerHandler",["load"])}function _n(e){Fn.resumeHandler?Fn.resumeHandler(e):Fn.loadHandler&&Fn.loadHandler(e),Xn.childWindow&&Nr("load",[e])}function Wn(e,t){Fn.beforeUnloadHandler=t,!Mt(t)&&ur(e,"registerHandler",["beforeUnload"])}function Bn(){const e=()=>{ur(o("v2","handleBeforeUnload"),"readyToUnload",[])};Fn.beforeSuspendOrTerminateHandler?(Fn.beforeSuspendOrTerminateHandler(),Xn.childWindow?Nr("beforeUnload"):e()):Fn.beforeUnloadHandler&&Fn.beforeUnloadHandler(e)||(Xn.childWindow?Nr("beforeUnload"):e())}function jn(e){Fn.beforeSuspendOrTerminateHandler=e,!Mt(e)&&ur(o("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function zn(e){Fn.resumeHandler=e,!Mt(e)&&ur(o("v2","registerOnResumeHandler"),"registerHandler",["load"])}const qn=t("nestedAppAuthUtils"),Gn=qn.extend("tryPolyfillWithNestedAppAuthBridge");function $n(e,t,n){var r;const o=Gn;if(C.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=Kn(a,n);s&&(a.nestedAppAuthBridge=s)}const Jn=qn.extend("createNestedAppAuthBridge");function Kn(e,t){const n=Jn;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 Zn=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Qn=t("communication");class Xn{}class Yn{}function er(e,t){if(Yn.messageListener=e=>Zn(this,void 0,void 0,(function*(){return yield vr(e)})),Xn.currentWindow=Xn.currentWindow||$e(),Xn.parentWindow=Xn.currentWindow.parent!==Xn.currentWindow.self?Xn.currentWindow.parent:Xn.currentWindow.opener,Xn.topWindow=Xn.currentWindow.top,(Xn.parentWindow||e)&&Xn.currentWindow.addEventListener("message",Yn.messageListener,!1),!Xn.parentWindow){const e=Xn.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));C.isFramelessWindow=!0,e.onNativeMessage=Ar}try{return Xn.parentOrigin="*",ar(t,"initialize",[bt,it,e]).then((([e,t,n,r])=>($n(r,Xn.currentWindow,{onMessage:yr,sendPostMessage:fr}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Xn.parentOrigin=null}}function tr(){Xn.currentWindow&&Xn.currentWindow.removeEventListener("message",Yn.messageListener,!1),Xn.currentWindow=null,Xn.parentWindow=null,Xn.parentOrigin=null,Xn.childWindow=null,Xn.childOrigin=null,Yn.parentMessageQueue=[],Yn.childMessageQueue=[],Yn.nextMessageId=0,Yn.callbacks={},Yn.promiseCallbacks={},Yn.portCallbacks={}}function nr(e,t,...n){return ar(e,t,n).then((([e])=>e))}function rr(e,t,...n){return ar(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function or(e,t,n,...r){return ar(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function ir(e,t,...n){return ar(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function ar(e,t,n=void 0){if(!i(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(cr(hr(e,t,n).id))}))}function sr(e,t,n=void 0){if(!i(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 lr(hr(e,t,n).id)}function lr(e){return new Promise(((t,n)=>{Yn.portCallbacks[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 cr(e){return new Promise((t=>{Yn.promiseCallbacks[e]=t}))}function ur(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!i(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 a=hr(e,t,o);r&&(Yn.callbacks[a.id]=r)}Yn.parentMessageQueue=[],Yn.childMessageQueue=[],Yn.topMessageQueue=[],Yn.nextMessageId=0,Yn.callbacks={},Yn.promiseCallbacks={},Yn.portCallbacks={};const dr=Qn.extend("sendNestedAuthRequestToTopWindow");function fr(e){const t=dr,n=Xn.topWindow,r=xr(e);return t("Message %i information: %o",r.id,{actionName:r.func}),gr(n,r)}const pr=Qn.extend("sendRequestToTargetWindowHelper");function gr(e,t){const n=pr,r=kr(e);if(C.isFramelessWindow)Xn.currentWindow&&Xn.currentWindow.nativeInterface&&(n(`Sending message %i to ${r} via framelessPostMessage interface`,t.id),Xn.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(t)));else{const o=Or(e);e&&o?(n(`Sending message %i to ${r} via postMessage`,t.id),e.postMessage(t,o)):(n(`Adding message %i to ${r} message queue`,t.id),Rr(e).push(t))}return t}const mr=Qn.extend("sendMessageToParentHelper");function hr(e,t,n){const r=mr,o=Xn.parentWindow,i=Hr(e,t,n);return r("Message %i information: %o",i.id,{actionName:t,args:n}),gr(o,i)}const wr=Qn.extend("processMessage");function vr(e){return Zn(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void wr("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 br(t,n).then((r=>{r?(Er(t,n),t===Xn.parentWindow?Ar(e):t===Xn.childWindow&&Tr(e)):wr("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin")}))}))}const Cr=Qn.extend("processAuthBridgeMessage");function yr(e,t){var n,r;const o=Cr;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 l=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),c=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);l?br(l,c)?(Xn.topWindow&&!Xn.topWindow.closed&&l!==Xn.topWindow||(Xn.topWindow=l,Xn.topOrigin=c),Xn.topWindow&&Xn.topWindow.closed&&(Xn.topWindow=null,Xn.topOrigin=null),Lr(Xn.topWindow),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const Sr=Qn.extend("shouldProcessMessage");function br(e,t){return Zn(this,void 0,void 0,(function*(){if(Xn.currentWindow&&e===Xn.currentWindow)return Sr("Should not process message because it is coming from the current window"),!1;if(Xn.currentWindow&&Xn.currentWindow.location&&t&&t===Xn.currentWindow.location.origin)return!0;{const e=yield Wt(new URL(t));return e||Sr("Message has an invalid origin of %s",t),e}}))}function Er(e,t){C.isFramelessWindow||Xn.parentWindow&&!Xn.parentWindow.closed&&e!==Xn.parentWindow?Xn.childWindow&&!Xn.childWindow.closed&&e!==Xn.childWindow||(Xn.childWindow=e,Xn.childOrigin=t):(Xn.parentWindow=e,Xn.parentOrigin=t),Xn.parentWindow&&Xn.parentWindow.closed&&(Xn.parentWindow=null,Xn.parentOrigin=null),Xn.childWindow&&Xn.childWindow.closed&&(Xn.childWindow=null,Xn.childOrigin=null),Lr(Xn.parentWindow),Lr(Xn.childWindow)}const Pr=Qn.extend("handleParentMessage");function Ar(e){const t=Pr;if("id"in e.data&&"number"==typeof e.data.id){const n=e.data,r=Yn.callbacks[n.id];t("Received a response from parent for message %i",n.id),r&&(t("Invoking the registered callback for message %i with arguments %o",n.id,n.args),r.apply(null,[...n.args,n.isPartialResponse]),Ir(e)||(t("Removing registered callback for message %i",n.id),delete Yn.callbacks[n.id]));const o=Yn.promiseCallbacks[n.id];o&&(t("Invoking the registered promise callback for message %i with arguments %o",n.id,n.args),o(n.args),t("Removing registered promise callback for message %i",n.id),delete Yn.promiseCallbacks[n.id]);const i=Yn.portCallbacks[n.id];if(i){let r;t("Invoking the registered port callback for message %i with arguments %o",n.id,n.args),e.ports&&e.ports[0]instanceof MessagePort&&(r=e.ports[0]),i(r,n.args),t("Removing registered port callback for message %i",n.id),delete Yn.portCallbacks[n.id]}}else if("func"in e.data&&"string"==typeof e.data.func){const n=e.data;t("Received an action message %s from parent",n.func),Mn(n.func,n.args)}else t("Received an unknown message: %O",e)}function Ir(e){return!0===e.data.isPartialResponse}function Tr(e){if("id"in e.data&&"func"in e.data){const t=e.data,[n,r]=Mn(t.func,t.args);n&&void 0!==r?Ur(t.id,Array.isArray(r)?r:[r]):ur(o("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(Xn.childWindow){const n=e.pop();Ur(t.id,e,n)}}))}}function Fr(){return Xn.topWindow!==Xn.parentWindow}function Rr(e){return e===Xn.topWindow&&Fr()?Yn.topMessageQueue:e===Xn.parentWindow?Yn.parentMessageQueue:e===Xn.childWindow?Yn.childMessageQueue:[]}function Or(e){return e===Xn.topWindow&&Fr()?Xn.topOrigin:e===Xn.parentWindow?Xn.parentOrigin:e===Xn.childWindow?Xn.childOrigin:null}function kr(e){return e===Xn.topWindow&&Fr()?"top":e===Xn.parentWindow?"parent":e===Xn.childWindow?"child":null}const Mr=Qn.extend("flushMessageQueue");function Lr(e){const t=Or(e),n=Rr(e),r=kr(e);for(;e&&t&&n.length>0;){const o=n.shift();Mr("Flushing message %i from "+r+" message queue via postMessage.",null==o?void 0:o.id),e.postMessage(o,t)}}function Dr(e,t){let n;n=Xn.currentWindow.setInterval((()=>{0===Rr(e).length&&(clearInterval(n),t())}),100)}function Ur(e,t,n){const r=Xn.childWindow,o=Vr(e,t,n),i=Or(r);r&&i&&r.postMessage(o,i)}function Nr(e,t){const n=Xn.childWindow,r=_r(e,t),o=Or(n);n&&o?n.postMessage(r,o):Rr(n).push(r)}function Hr(e,t,n){return{id:Yn.nextMessageId++,func:t,timestamp:Date.now(),args:n||[],apiVersionTag:e}}function xr(e){return{id:Yn.nextMessageId++,func:"nestedAppAuth.execute",timestamp:Date.now(),args:[],data:e}}function Vr(e,t,n){return{id:e,args:t||[],isPartialResponse:n}}function _r(e,t){return{func:e,args:t||[]}}var Wr,Br,jr,zr;!function(e){function t(){return!(!Tt(ct)||!ct.supports.logs)}e.registerGetLogHandler=function(e){if(!Mt(e)&&Tt(ct),!Mt(e)&&!t())throw Fe;e?Ln(o("v1","log.request"),"log.request",(()=>{const t=e();ur(o("v1","log.receive"),"log.receive",[t])})):Dn("log.request")},e.isSupported=t}(Wr||(Wr={})),function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Br||(Br={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(jr||(jr={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(zr||(zr={}));const qr="v1";function Gr(e,t){Tt(ct),ur(o(qr,"uploadCustomApp"),"uploadCustomApp",[e],t||De())}function $r(e,t,n){Tt(ct),ur(o(qr,"sendCustomMessage"),e,t,n)}function Jr(e,t){if(Tt(ct),!Xn.childWindow)throw new Error("The child window has not yet been initialized or is not present");Nr(e,t)}function Kr(e,t){Tt(ct),Ln(o(qr,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Zr(e,t){Tt(ct),Ln(o(qr,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Qr(e){Tt(ct,be.content,be.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];ur(o(qr,"openFilePreview"),"openFilePreview",t)}const Xr="v1";var Yr;!function(e){function t(){return!(!Tt(ct)||!ct.supports.conversations)}e.openConversation=function(e){return new Promise((n=>{if(Tt(ct,be.content),!t())throw Fe;const r=rr(o(Xr,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Ln(o(Xr,"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&&Ln(o(Xr,"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})})),n(r)}))},e.closeConversation=function(){if(Tt(ct,be.content),!t())throw Fe;ur(o(Xr,"conversations.closeConversation"),"conversations.closeConversation"),Dn("startConversation"),Dn("closeConversation")},e.getChatMembers=function(){return new Promise((e=>{if(Tt(ct),!t())throw Fe;e(nr(o(Xr,"conversations.getChatMember"),"getChatMembers"))}))},e.isSupported=t}(Yr||(Yr={}));const eo="users";function to(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${eo}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&topicName=${encodeURIComponent(t)}`,i=void 0===n?"":`&message=${encodeURIComponent(n)}`;return`${g}://${m}/l/chat/0/0?${r}${o}${i}`}function no(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${eo}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&withVideo=${encodeURIComponent(t)}`,i=void 0===n?"":`&source=${encodeURIComponent(n)}`;return`${g}://${m}/l/call/0/0?${r}${o}${i}`}function ro(e,t,n,r,o){const i=void 0===e?"":"attendees="+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&startTime=${encodeURIComponent(t)}`,s=void 0===n?"":`&endTime=${encodeURIComponent(n)}`,l=void 0===r?"":`&subject=${encodeURIComponent(r)}`,c=void 0===o?"":`&content=${encodeURIComponent(o)}`;return`${g}://${m}/l/meeting/new?${i}${a}${s}${l}${c}`}function oo(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${g}://${m}/l/app/${encodeURIComponent(e)}`}var io;!function(e){function t(){return!(!Tt(ct)||!ct.supports.appInstallDialog)}e.openAppInstallDialog=function(e){return new Promise((n=>{if(Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!t())throw new Error("Not supported");const r=o("v1","appInstallDialog.openAppInstallDialog");ct.isLegacyTeams?n(rr(r,"executeDeepLink",oo(e.appId))):(ur(r,"appInstallDialog.openAppInstallDialog",[e]),n())}))},e.isSupported=t}(io||(io={}));const ao="v1",so=t("media");var lo;function co(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 uo(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 fo(e){ho(e)?Ot("2.0.2"):wo(e)?Ot(l):mo(e)&&Ot("2.0.4")}function po(e){return!(e.mediaType!=lo.MediaType.Video||!e.videoProps||!e.videoProps.videoController)}function go(e){return!(null==e||e.maxMediaCount>10)}function mo(e){var t;return!((null==e?void 0:e.mediaType)!=lo.MediaType.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function ho(e){return!(!e||e.mediaType!=lo.MediaType.VideoAndImage&&!e.videoAndImageProps)}function wo(e){return!(!e||e.mediaType!=lo.MediaType.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function vo(e,t,n){return null!=e&&null!=t&&t==lo.FileFormat.ID&&null!=n}function Co(e){return!(null==e||e.length<=0||e.length>10)}function yo(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function So(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){let t,n,r,i,a,s,c;!function(e){e.Base64="base64",e.ID="id"}(t=e.FileFormat||(e.FileFormat={}));class d{}function f(){return!(!Tt(ct)||!ct.supports.permissions)}e.File=d,e.captureImage=function(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Tt(ct,be.content,be.task),C.isFramelessWindow)if(Ft("1.7.0"))ur(o(ao,"media.captureImage"),"captureImage",e);else{e({errorCode:we.OLD_PLATFORM},[])}else{e({errorCode:we.NOT_SUPPORTED_ON_PLATFORM},[])}},e.hasPermission=function(){if(Tt(ct,be.content,be.task),!f())throw Fe;const e=ve.Media;return new Promise((t=>{t(ir(o(ao,"media.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Tt(ct,be.content,be.task),!f())throw Fe;const e=ve.Media;return new Promise((t=>{t(ir(o(ao,"media.requestPermission"),"permissions.request",e))}))};class p extends d{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(Tt(ct,be.content,be.task),Ft(u))if(vo(this.mimeType,this.format,this.content))Ft("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:we.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:we.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];ur(o(ao,"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=co(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=uo(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):so(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:we.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Ne(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Mt(e)&&ur(o(ao,"media.getMedia"),"getMedia",r),Ln(o(ao,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Dn("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=co(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Dn("getMedia"+t)}else{const e=uo(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:we.INTERNAL_ERROR,message:"data received is null"},new Blob),Dn("getMedia"+t)}}))}}e.Media=p;class g{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Tt(ct,be.content,be.task);try{Ot(l)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};ur(o(ao,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(n.StopRecording,e)}}e.VideoController=class extends g{getMediaType(){return a.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case n.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}},function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(n=e.MediaControllerEvent||(e.MediaControllerEvent={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(r=e.CameraStartMode||(e.CameraStartMode={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(i=e.Source||(e.Source={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(a=e.MediaType||(e.MediaType={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(s=e.ImageUriType||(e.ImageUriType={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(c=e.ImageOutputFormats||(e.ImageOutputFormats={})),e.selectMedia=function(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Tt(ct,be.content,be.task),!Ft(u)){const e={errorCode:we.OLD_PLATFORM};return void t(e,[])}try{fo(e)}catch(e){return void t(e,[])}if(!go(e)){const e={errorCode:we.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];ur(o(ao,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(po(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 p(e));t(n,s)}))},e.viewImages=function(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Tt(ct,be.content,be.task),!Ft(u)){return void t({errorCode:we.OLD_PLATFORM})}if(!Co(e)){return void t({errorCode:we.INVALID_ARGUMENTS})}const n=[e];ur(o(ao,"media.viewImages"),"viewImages",n,t)},e.scanBarCode=function(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Tt(ct,be.content,be.task),C.hostClientType!==ye.desktop&&C.hostClientType!==ye.web&&C.hostClientType!==ye.rigel&&C.hostClientType!==ye.teamsRoomsWindows&&C.hostClientType!==ye.teamsRoomsAndroid&&C.hostClientType!==ye.teamsPhones&&C.hostClientType!==ye.teamsDisplays)if(Ft("1.9.0"))if(yo(t))ur(o(ao,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:we.INVALID_ARGUMENTS},"")}else{e({errorCode:we.OLD_PLATFORM},"")}else{e({errorCode:we.NOT_SUPPORTED_ON_PLATFORM},"")}}}(lo||(lo={}));const bo="v2";var Eo;!function(e){function t(){return!!(Tt(ct)&&ct.supports.barCode&&ct.supports.permissions)}e.scanBarCode=function(e){return new Promise((n=>{if(Tt(ct,be.content,be.task),!t())throw Fe;if(!yo(e))throw{errorCode:we.INVALID_ARGUMENTS};n(ir(o(bo,"barCode.scanBarCode"),"media.scanBarCode",e))}))},e.hasPermission=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;const e=ve.Media;return new Promise((t=>{t(ir(o(bo,"barCode.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;const e=ve.Media;return new Promise((t=>{t(ir(o(bo,"barCode.requestPermission"),"permissions.request",e))}))},e.isSupported=t}(Eo||(Eo={}));var Po;!function(e){function t(e,t){return new Promise((r=>{if(Tt(ct,be.content,be.task),!n())throw Fe;if(ct.isLegacyTeams)r(rr(e,"executeDeepLink",to([t.user],void 0,t.message)));else{r(rr(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function n(){return!(!Tt(ct)||!ct.supports.chat)}e.openChat=function(e){return t(o("v2","chat.openChat"),e)},e.openGroupChat=function(e){const r=o("v2","chat.openGroupChat");return new Promise((o=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const n={user:e.users[0],message:e.message};o(t(r,n))}else{if(Tt(ct,be.content,be.task),!n())throw Fe;if(ct.isLegacyTeams)o(rr(r,"executeDeepLink",to(e.users,e.topic,e.message)));else{o(rr(r,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))},e.isSupported=n}(Po||(Po={}));var Ao=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};var Io,To;!function(e){function t(){return!!(Tt(ct)&&navigator&&navigator.clipboard&&ct.supports.clipboard)}e.write=function(e){return Ao(this,void 0,void 0,(function*(){if(Tt(ct,be.content,be.meetingStage,be.task,be.settings,be.stage,be.sidePanel),!t())throw Fe;if(!e.type||!Object.values(Ce).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Ce)}`);const n=yield Ge(e),r={mimeType:e.type,content:n};return ir(o("v2","clipboard.write"),"clipboard.writeToClipboard",r)}))},e.read=function(){return Ao(this,void 0,void 0,(function*(){Tt(ct,be.content,be.meetingStage,be.task,be.settings,be.stage,be.sidePanel);const e=o("v2","clipboard.read");if(!t())throw Fe;const n=yield ir(e,"clipboard.readFromClipboard");if("string"==typeof n){const e=JSON.parse(n);return qe(e.mimeType,e.content)}return n}))},e.isSupported=t}(Io||(Io={})),function(e){e.isNAAChannelRecommended=function(){var e;return null!==(e=Tt(ct)&&ct.isNAAChannelRecommended)&&void 0!==e&&e}}(To||(To={}));const Fo="v2";var Ro;function Oo(){return ct.hostVersionsInfo?ct.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}!function(e){function t(){return!!(Tt(ct)&&ct.supports.geoLocation&&ct.supports.permissions)}let n;e.getCurrentLocation=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;return ir(o(Fo,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})},e.hasPermission=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;const e=ve.GeoLocation;return new Promise((t=>{t(ir(o(Fo,"geoLocation.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;const e=ve.GeoLocation;return new Promise((t=>{t(ir(o(Fo,"geoLocation.requestPermission"),"permissions.request",e))}))},e.isSupported=t,function(e){function t(){return!!(Tt(ct)&&ct.supports.geoLocation&&ct.supports.geoLocation.map&&ct.supports.permissions)}e.chooseLocation=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;return ir(o(Fo,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})},e.showLocation=function(e){if(Tt(ct,be.content,be.task),!t())throw Fe;if(!e)throw{errorCode:we.INVALID_ARGUMENTS};return ir(o(Fo,"geoLocation.showLocation"),"location.showLocation",e)},e.isSupported=t}(n=e.map||(e.map={}))}(Ro||(Ro={}));const ko="v1";class Mo{postMessage(e,t){Tt(ct),ur(o(ko,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||De())}addEventListener(e,t){Tt(ct),"message"===e&&Ln(o(ko,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Lo{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Tt(ct,be.task),ur(o(ko,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||De())}addEventListener(e,t){Tt(ct,be.task),"message"===e&&Ln(o(ko,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}var Do;!function(e){function t(){return!(!Tt(ct)||!ct.supports.secondaryBrowser)}e.open=function(e){if(Tt(ct,be.content),!t())throw Fe;if(!e||!ze(e))throw{errorCode:we.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return ir(o("v2","secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())},e.isSupported=t}(Do||(Do={}));var Uo;!function(e){function t(){return!(!Tt(ct)||!ct.supports.location)}e.getLocation=function(e,n){if(!n)throw new Error("[location.getLocation] Callback cannot be null");if(Tt(ct,be.content,be.task),!Ft(c))throw{errorCode:we.OLD_PLATFORM};if(!e)throw{errorCode:we.INVALID_ARGUMENTS};if(!t())throw Fe;ur(o("v1","location.getLocation"),"location.getLocation",[e],n)},e.showLocation=function(e,n){if(!n)throw new Error("[location.showLocation] Callback cannot be null");if(Tt(ct,be.content,be.task),!Ft(c))throw{errorCode:we.OLD_PLATFORM};if(!e)throw{errorCode:we.INVALID_ARGUMENTS};if(!t())throw Fe;ur(o("v1","location.showLocation"),"location.showLocation",[e],n)},e.isSupported=t}(Uo||(Uo={}));var No=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Ho="v1";var xo;!function(e){let t,n,r,i,a,s,l;function c(e,n){ur(o(Ho,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((r,i)=>{if(r&&null!=i)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(r)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${r.errorCode} ${r.message}`);if("boolean"!=typeof i)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Ln(o(Ho,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(n=>No(this,void 0,void 0,(function*(){try{const r=yield e.micMuteStateChangedCallback(n);d(r,r.isMicMuted===n.isMicMuted?t.HostInitiated:t.AppDeclinedToChange)}catch(e){d(n,t.AppFailedToChange)}}))));Ln(o(Ho,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),n(i)}))}function u(e,t){ur(o(Ho,"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");Un("meeting.micStateChanged")&&Dn("meeting.micStateChanged"),Un("meeting.audioDeviceSelectionChanged")&&Dn("meeting.audioDeviceSelectionChanged"),t(n)}))}function d(e,t){Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"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"}(t||(t={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(n=e.MeetingReactionType||(e.MeetingReactionType={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(r=e.MeetingType||(e.MeetingType={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(i=e.CallType||(e.CallType={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(a=e.SharingProtocol||(e.SharingProtocol={})),e.getIncomingClientAudioState=function(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)},e.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)},e.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage,be.settings,be.content),ur(o(Ho,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)},e.getMeetingDetailsVerbose=function(){var e,t,n;return No(this,void 0,void 0,(function*(){let r;Tt(ct,be.sidePanel,be.meetingStage,be.settings,be.content);try{const e=!0;r=yield ir(o("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)==i.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==i.OneOnOneCall)&&!r.details.originalCaller)throw new Error(we.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))},e.getAuthenticationTokenForAnonymousUser=function(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage,be.task),ur(o(Ho,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)},e.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Tt(ct,be.sidePanel),ur(o(Ho,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)},e.requestStartLiveStreaming=function(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Tt(ct,be.sidePanel),ur(o(Ho,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)},e.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Tt(ct,be.sidePanel),ur(o(Ho,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)},e.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Tt(ct,be.sidePanel),Ln(o(Ho,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)},e.shareAppContentToStage=function(e,t,n={sharingProtocol:a.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)},e.getAppContentStageSharingCapabilities=function(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)},e.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)},e.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)},e.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Tt(ct,be.sidePanel,be.meetingStage),Ln(o(Ho,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)},e.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Tt(ct,be.sidePanel,be.meetingStage),Ln(o(Ho,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)},e.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Tt(ct,be.sidePanel,be.meetingStage),Ln(o(Ho,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)},e.joinMeeting=function(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Tt(ct);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||s.Other};return ir(o("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)},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"}(s=e.EventActionSource||(e.EventActionSource={})),function(e){e.setOptions=function(e){Tt(ct,be.sidePanel),e.contentUrl&&new URL(e.contentUrl),ur(o(Ho,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}}(l=e.appShareButton||(e.appShareButton={})),e.requestAppAudioHandling=function(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");Tt(ct,be.sidePanel,be.meetingStage),e.isAppHandlingAudio?c(e,t):u(e,t)},e.updateMicState=function(e){d(e,t.AppInitiated)}}(xo||(xo={}));var Vo;!function(e){function t(){return!(!Tt(ct)||!ct.supports.monetization)}e.openPurchaseExperience=function(e,n){let r,i,a="";return"function"==typeof e?(r=e,i=n,a=o("v1","monetization.openPurchaseExperience")):(i=e,a=o("v2","monetization.openPurchaseExperience")),Tt(ct,be.content),_e((()=>new Promise((e=>{if(!t())throw Fe;e(ir(a,"monetization.openPurchaseExperience",i))}))),r)},e.isSupported=t}(Vo||(Vo={}));var _o;!function(e){function t(){return!(!Tt(ct)||!ct.supports.calendar)}e.openCalendarItem=function(e){return new Promise((n=>{if(Tt(ct,be.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");n(rr(o("v2","calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))},e.composeMeeting=function(e){return new Promise((n=>{if(Tt(ct,be.content),!t())throw new Error("Not supported");const r=o("v2","calendar.composeMeeting");ct.isLegacyTeams?n(rr(r,"executeDeepLink",ro(e.attendees,e.startTime,e.endTime,e.subject,e.content))):n(rr(r,"calendar.composeMeeting",e))}))},e.isSupported=t}(_o||(_o={}));var Wo;!function(e){function t(){return!(!Tt(ct)||!ct.supports.mail)}let n;e.openMailItem=function(e){return new Promise((n=>{if(Tt(ct,be.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");n(rr(o("v2","mail.openMailItem"),"mail.openMailItem",e))}))},e.composeMail=function(e){return new Promise((n=>{if(Tt(ct,be.content),!t())throw new Error("Not supported");n(rr(o("v2","mail.composeMail"),"mail.composeMail",e))}))},e.isSupported=t,function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(n=e.ComposeMailType||(e.ComposeMailType={}))}(Wo||(Wo={}));var Bo;!function(e){function t(){$e().print()}function n(e,t,n){!Mt(t)&&Tt(ct),!Mt(t)&&n&&n(),Vn(e,t)}function r(e,t,n){!Mt(t)&&Tt(ct),!Mt(t)&&n&&n(),Wn(e,t)}function i(){return!(!Tt(ct)||!ct.supports.teamsCore)}e.enablePrintCapability=function(){if(!C.printCapabilityEnabled){if(Tt(ct),!i())throw Fe;C.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(t(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}},e.print=t,e.registerOnLoadHandler=function(e){n(o("v2","teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Mt(e)&&!i())throw Fe}))},e.registerOnLoadHandlerHelper=n,e.registerBeforeUnloadHandler=function(e){r(o("v2","teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Mt(e)&&!i())throw Fe}))},e.registerBeforeUnloadHandlerHelper=r,e.isSupported=i}(Bo||(Bo={}));var jo;function zo(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?qo(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function qo(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"]}!function(e){function t(e,t){return new Promise((r=>{if(!Ft("2.0.0"))throw{errorCode:we.OLD_PLATFORM};if(!So(t))throw{errorCode:we.INVALID_ARGUMENTS};if(!n())throw Fe;r(ir(e,"people.selectPeople",t))}))}function n(){return!(!Tt(ct)||!ct.supports.people)}e.selectPeople=function(e,n){let r,i;Tt(ct,be.content,be.task,be.settings);let a="";return"function"==typeof e?([r,i]=[e,n],a=o("v1","people.selectPeople")):(i=e,a=o("v2","people.selectPeople")),xe(t,r,a,i)},e.isSupported=n}(jo||(jo={}));var Go;!function(e){e.showProfile=function(e){return Tt(ct,be.content),new Promise((t=>{const[n,r]=zo(e);if(!n)throw{errorCode:we.INVALID_ARGUMENTS,message:r};const i={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(ir(o("v2","profile.showProfile"),"profile.showProfile",i))}))},e.isSupported=function(){return!(!Tt(ct)||!ct.supports.profile)}}(Go||(Go={}));var $o=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Jo="v2";function Ko(e,t,n,r){var o,i;return $o(this,void 0,void 0,(function*(){const a=Xo();!Je()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Yo(yield Qo(e,n,r),new ei(n,t),a.writable)}))}function Zo(e,t,n,r){var o,i;return $o(this,void 0,void 0,(function*(){const a=Xo();!Je()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Yo(yield Qo(e,n,r),new ri(n,t),a.writable)}))}function Qo(e,t,n){return $o(this,void 0,void 0,(function*(){if(Je())throw Fe;const r=$e().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 Xo(){if(Je())throw Fe;const e=window.MediaStreamTrackGenerator;if(!e)throw Fe;return new e({kind:"video"})}function Yo(e,t,n){new(0,$e().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class ei{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>$o(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 ti{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 ni{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161;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)}}class ri{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>$o(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o}={}}=yield this.extractVideoFrameAndMetadata(e),i=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o}),a=new VideoFrame(i,{timestamp:n});t.enqueue(a),r.close(),e.close(),i.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>$o(this,void 0,void 0,(function*(){if(Je())throw Fe;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 ti(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 ni(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}}})),Ln(o(Jo,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function oi(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),ur(o(Jo,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in fi.EffectFailureReason?e:fi.EffectFailureReason.InitializationFailure;ur(o(Jo,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}class ii{static setTimeout(e,t){const n=performance.now(),r=Ne();return ii.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete ii.setTimeoutCallbacks[e]}static setInterval(e,t){ii.setTimeout((function n(){e(),ii.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in ii.setTimeoutCallbacks){const r=ii.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){ii.setTimeoutCallbacks[e].callback(),delete ii.setTimeoutCallbacks[e]}}}ii.setTimeoutCallbacks={};class ai{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){ii.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&&ii.clearTimeout(this.timeoutId),this.timeoutId=ii.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(ai.maxSessionTimeoutInMs,2*t.timeoutInMs):ai.initialSessionTimeoutInMs}}ai.initialSessionTimeoutInMs=1e3,ai.maxSessionTimeoutInMs=3e4;const si="v2";class li{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new ai(li.distributionBinSize,(e=>this.reportPerformanceEvent(o(si,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){ii.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(o(si,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),li.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){ii.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(o(si,"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(o(si,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}li.distributionBinSize=1e3,li.calculateFPSInterval=1e3;var ci=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))},ui=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 di="v2";var fi;!function(e){const t=Je()?void 0:new li(ur);let n,r,i;function a(e){ur(o(di,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function s(e){ur(o(di,"videoEffects.notifyError"),"video.notifyError",[e])}function l(){return Tt(ct)&&!!ct.supports.video&&(!!ct.supports.video.mediaStream||!!ct.supports.video.sharedFrame)}function c(e,n){if(Tt(ct,be.sidePanel),!l()||!p())throw Fe;Ln(o(di,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>ci(this,void 0,void 0,(function*(){const{streamId:r}=n,o=u(e,t);yield Ko(r,o,s,t)}))),!1),ur(o(di,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n])}function u(e,t){return n=>ci(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 d(e,n){if(Tt(ct,be.sidePanel),!l()||!m())throw Fe;Ln(o(di,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(n=>{if(n){const r=n.timestamp;null==t||t.reportStartFrameProcessing(n.width,n.height),e(f(n),(()=>{null==t||t.reportFrameProcessed(),a(r)}),s)}}),!1),ur(o(di,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[n])}function f(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=ui(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function p(){var e;return Tt(ct,be.sidePanel)&&g()&&!!(null===(e=ct.supports.video)||void 0===e?void 0:e.mediaStream)}function g(){var e,t,n,r;return!(!(null===(t=null===(e=$e().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=$e().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function m(){var e;return Tt(ct,be.sidePanel)&&!!(null===(e=ct.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(n=e.VideoFrameFormat||(e.VideoFrameFormat={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(r=e.EffectChangeType||(e.EffectChangeType={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(i=e.EffectFailureReason||(e.EffectFailureReason={})),e.registerForVideoFrame=function(e){if(Tt(ct,be.sidePanel),!l())throw Fe;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Ln(o(di,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e.timeLimit)),!1),p())c(e.videoFrameHandler,e.config);else{if(!m())throw Fe;d(e.videoBufferHandler,e.config)}null==t||t.startMonitorSlowFrameProcessing()},e.notifySelectedVideoEffectChanged=function(e,t){if(Tt(ct,be.sidePanel),!l())throw Fe;ur(o(di,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])},e.registerForVideoEffect=function(e){if(Tt(ct,be.sidePanel),!l())throw Fe;Ln(o(di,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",oi(e,t),!1),ur(o(di,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")},e.isSupported=l}(fi||(fi={}));const pi="v2";var gi;!function(e){const t="search.queryChange",n="search.queryClose",r="search.queryExecute";function i(){return!(!Tt(ct)||!ct.supports.search)}e.registerHandlers=function(e,a,s){if(Tt(ct,be.content),!i())throw Fe;Ln(o(pi,"search.registerOnClosedHandler"),n,e),Ln(o(pi,"search.registerOnExecutedHandler"),r,a),s&&Ln(o(pi,"search.registerOnChangeHandler"),t,s)},e.unregisterHandlers=function(){if(Tt(ct,be.content),!i())throw Fe;ur(o(pi,"search.unregisterHandlers"),"search.unregister"),Dn(t),Dn(n),Dn(r)},e.isSupported=i,e.closeSearch=function(){return new Promise((e=>{if(Tt(ct,be.content),!i())throw new Error("Not supported");e(rr(o(pi,"search.closeSearch"),"search.closeSearch"))}))}}(gi||(gi={}));var mi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};var hi;!function(e){function t(t,n){return new Promise((r=>{if(!a())throw Fe;r(ir(t,e.SharingAPIMessages.shareWebContent,n))}))}function n(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:we.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function r(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:we.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:we.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function i(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:we.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:we.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function a(){return!(!Tt(ct)||!ct.supports.sharing)}let s;e.SharingAPIMessages={shareWebContent:"sharing.shareWebContent"},e.shareWebContent=function(e,a){try{n(e),r(e),i(e)}catch(e){return Ve((()=>Promise.reject(e)),a)}return Tt(ct,be.content,be.sidePanel,be.task,be.stage,be.meetingStage),Ve(t,a,o(a?"v1":"v2","sharing.shareWebContent"),e)},e.isSupported=a,function(e){function t(){var e;return Tt(ct)&&void 0!==(null===(e=ct.supports.sharing)||void 0===e?void 0:e.history)}e.getContent=function(){return mi(this,void 0,void 0,(function*(){if(Tt(ct,be.sidePanel,be.meetingStage),!t())throw Fe;const e=yield ir(o("v2","sharing.history.getContent"),"sharing.history.getContent");return e.map((e=>{nt(e.author),nt(e.threadId)})),e}))},e.isSupported=t}(s=e.history||(e.history={}))}(hi||(hi={}));var wi;!function(e){let t;function n(){return!(!Tt(ct)||!ct.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(t=e.StageViewOpenMode||(e.StageViewOpenMode={})),e.open=function(e){return new Promise((t=>{if(Tt(ct,be.content),!n())throw Fe;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(ir(o("v2","stageView.open"),"stageView.open",e))}))},e.isSupported=n}(wi||(wi={}));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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Ci="v2";var yi;!function(e){let t,n,r;!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(t=e.CameraRestriction||(e.CameraRestriction={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(n=e.Source||(e.Source={})),e.hasPermission=function(){if(Tt(ct,be.content,be.task),!r.isSupported())throw Fe;const e=ve.Media;return ir(o(Ci,"visualMedia.hasPermission"),"permissions.has",e)},e.requestPermission=function(){if(Tt(ct,be.content,be.task),!r.isSupported())throw Fe;const e=ve.Media;return ir(o(Ci,"visualMedia.requestPermission"),"permissions.request",e)},function(e){function t(){return!!(Tt(ct)&&ct.supports.visualMedia&&ct.supports.visualMedia.image&&ct.supports.permissions)}function n(){if(!t())throw Fe}function r(e){if(!e||e.maxVisualMediaCount>10||e.maxVisualMediaCount<1)throw Me}function i(e,t){if(t.length>e)throw Le}e.captureImages=function(e){return vi(this,void 0,void 0,(function*(){Tt(ct,be.content,be.task),n(),r(e);const t=yield ir(o(Ci,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return i(e.maxVisualMediaCount,t),t}))},e.retrieveImages=function(e){return vi(this,void 0,void 0,(function*(){Tt(ct,be.content,be.task),n(),r(e);const t=yield ir(o(Ci,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return i(e.maxVisualMediaCount,t),t}))},e.isSupported=t}(r=e.image||(e.image={}))}(yi||(yi={}));var Si,bi=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};!function(e){function t(){return Tt(ct)&&void 0!==ct.supports.webStorage}e.isWebStorageClearedOnUserLogOut=function(){return bi(this,void 0,void 0,(function*(){if(Tt(ct),!t())throw Fe;return yield nr(o("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut")}))},e.isSupported=t}(Si||(Si={}));var Ei;!function(e){let t;function n(){return!(!Tt(ct)||!ct.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(t=e.CallModalities||(e.CallModalities={})),e.startCall=function(e){const r=o("v2","call.startCall");return new Promise((o=>{var i;if(Tt(ct,be.content,be.task),!n())throw Fe;if(!ct.isLegacyTeams)return ur(r,"call.startCall",[e],o);o(nr(r,"executeDeepLink",no(e.targets,null===(i=e.requestedModalities)||void 0===i?void 0:i.includes(t.Video),e.source)).then((e=>{if(!e)throw new Error("The call was not properly started");return e})))}))},e.isSupported=n}(Ei||(Ei={}));const Pi="v1";var Ai;!function(e){e.Messages=fn.Messages,e.FailedReason=fn.FailedReason,e.ExpectedFailureReason=fn.ExpectedFailureReason,e.notifyAppLoaded=function(){rn(o(Pi,"appInitialization.notifyAppLoaded"))},e.notifySuccess=function(){sn(o(Pi,"appInitialization.notifySuccess"))},e.notifyFailure=function(e){an(o(Pi,"appInitialization.notifyFailure"),e)},e.notifyExpectedFailure=function(e){on(o(Pi,"appInitialization.notifyExpectedFailure"),e)}}(Ai||(Ai={}));const Ii=t("thirdPartyCloudStorage");var Ti;!function(e){class t{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let n=[],r=null,i=!0,a=null;function s(e){if(a)if(e&&e.error)a([],e.error),a=null;else if(e&&e.fileChunk)try{i||0!==e.fileChunk.chunkSequence||(Ii("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),i=!0,a([],{errorCode:we.INTERNAL_ERROR,message:"error occurred while receiving data"}),n=[],a=null);const o=uo(e.fileChunk,e.fileType);if(o?(r||(r=new t(e.fileType,[])),r.assembleAttachment.push(o)):(Ii(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),a?a([],{errorCode:we.INTERNAL_ERROR,message:"error occurred while receiving data"}):a=null,n=[],a=null,i=!0),i=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&r){const t=co(r.assembleAttachment,r.fileType);if(t){const r=new File([t],e.fileName,{type:t.type});n.push(r)}e.isLastFile&&a&&(a(n,e.error),n=[],a=null,i=!0),r=null}}catch(e){a&&(a([],{errorCode:we.INTERNAL_ERROR,message:e}),n=[],a=null,i=!0)}else a([],{errorCode:we.INTERNAL_ERROR,message:"data received is null"}),n=[],a=null,i=!0}function l(){return!(!Tt(ct)||!ct.supports.thirdPartyCloudStorage)}e.getDragAndDropFiles=function(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Tt(ct,be.content,be.task),!l())throw Fe;if(a)throw a=null,new Error("getDragAndDropFiles cannot be called twice");a=t,i=!0,ur(o("v2","thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],s)}else{t([],{errorCode:we.INVALID_ARGUMENTS})}},e.isSupported=l}(Ti||(Ti={}));const Fi="v1";function Ri(e,t){nn(o(Fi,"initialize"),t).then((()=>{e&&e()}))}function Oi(){Bo.enablePrintCapability()}function ki(){Bo.print()}function Mi(e){It(),ur(o(Fi,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=C.frameContext),e(t)}))}function Li(e){un(o(Fi,"registerOnThemeChangeHandlerHelper"),e)}function Di(e){Nn(o(Fi,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Ui(e){Nn(o(Fi,"registerAppButtonClickHandler"),"appButtonClick",e,[be.content])}function Ni(e){Nn(o(Fi,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[be.content])}function Hi(e){Nn(o(Fi,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[be.content])}function xi(e){In.backStack.registerBackButtonHandlerHelper(o(Fi,"registerBackButtonHandler"),e)}function Vi(e){Bo.registerOnLoadHandlerHelper(o(Fi,"registerOnLoadHandler"),e)}function _i(e){Bo.registerBeforeUnloadHandlerHelper(o(Fi,"registerBeforeUnloadHandler"),e)}function Wi(e){Nn(o(Fi,"registerFocusEnterHandler"),"focusEnter",e,[])}function Bi(e){Nn(o(Fi,"registerChangeSettingsHandler"),"changeSettings",e,[be.content])}function ji(e,t){Tt(ct),Cn(o(Fi,"getTabInstances"),t).then((t=>{e(t)}))}function zi(e,t){Tt(ct),yn(o(Fi,"getMruTabInstances"),t).then((t=>{e(t)}))}function qi(e){Sn(o(Fi,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Gi(e,t){Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage);const n=null!=t?t:De();dn(o(Fi,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function $i(e){bn(o(Fi,"setFrameContext"),e)}function Ji(e,t,n){nn(o(Fi,"initializeWithFrameContext"),n).then((()=>t&&t())),bn(o(Fi,"setFrameContext"),e)}const Ki="v1";function Zi(e){vn(o(Ki,"navigation.returnFocus"),e)}function Qi(e,t){Tt(ct);const n=null!=t?t:De();wn(o(Ki,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Xi(e,t){Tt(ct,be.content,be.sidePanel,be.settings,be.remove,be.task,be.stage,be.meetingStage);const n=null!=t?t:De();mn(o(Ki,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Yi(e){Tt(ct);const t=null!=e?e:De();hn(o(Ki,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const ea="v1";var ta;!function(e){e.setValidityState=function(e){En(o(ea,"settings.setValidityState"),e)},e.getSettings=function(e){Tt(ct,be.content,be.settings,be.remove,be.sidePanel),Pn(o(ea,"settings.getSettings")).then((t=>{e(t)}))},e.setSettings=function(e,t){Tt(ct,be.content,be.settings,be.sidePanel);const n=null!=t?t:De();An(o(ea,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))},e.registerOnSaveHandler=function(e){In.config.registerOnSaveHandlerHelper(o(ea,"settings.registerOnSaveHandler"),e)},e.registerOnRemoveHandler=function(e){In.config.registerOnRemoveHandlerHelper(o(ea,"settings.registerOnRemoveHandler"),e)}}(ta||(ta={}));var na=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 ra="v1";var oa;!function(e){function t(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:Te.Small,width:e.width?e.width:Te.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function n(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:Te.Small,width:e.width?e.width:Te.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function r(e){return e.height=e.height?e.height:Te.Small,e.width=e.width?e.width:Te.Small,e}e.startTask=function(e,r){const i=o(ra,"tasks.startTask"),a=r?e=>{var t,n;return r(null!==(t=e.err)&&void 0!==t?t:"",null!==(n=e.result)&&void 0!==n?n:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(Tt(ct,be.content,be.sidePanel,be.meetingStage),ur(i,"tasks.startTask",[e],r)):void 0!==e.completionBotId?Jt(i,n(e),a):$t(i,t(e),a),new Mo},e.updateTask=function(e){e=r(e);const{width:t,height:n}=e,i=na(e,["width","height"]);if(Object.keys(i).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Gt(o(ra,"tasks.updateTask"),e)},e.submitTask=function(e,t){Kt(o(ra,"tasks.submitTask"),e,t)},e.getDefaultSizeIfNotProvided=r}(oa||(oa={}));const ia="v2";var aa;!function(e){let t,n;!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(t=e.UserMeetingRole||(e.UserMeetingRole={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(n=e.ContainerState||(e.ContainerState={})),e.isSupported=function(){return!(!Tt(ct,be.meetingStage,be.sidePanel,be.content)||!ct.supports.interactive)}}(aa||(aa={}));class sa{getFluidTenantInfo(){return la(),new Promise((e=>{e(ir(o(ia,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return la(),new Promise((t=>{t(ir(o(ia,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return la(),new Promise((e=>{e(ir(o(ia,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return la(),new Promise((t=>{t(ir(o(ia,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return la(),new Promise((e=>{e(ir(o(ia,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return la(),new Promise((t=>{t(ir(o(ia,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return la(),new Promise((t=>{t(ir(o(ia,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return la(),new Promise((t=>{t(ir(o(ia,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return la(),new sa}}function la(){if(!aa.isSupported())throw new Error("LiveShareHost Not supported")}var ca=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 ua(e){try{return e.cartItems=da(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function da(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=da(e.accessories)),e}))}const fa=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=ca(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=fa(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function pa(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)ma(t),ga(t.accessories)}function ga(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");ma(t)}}}function ma(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");wa(e.price),va(e.quantity)}function ha(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===pe(e))throw new Error("id must be a valid UUID")}}function wa(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 va(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Ca(e){if(!Object.values(Sa.CartStatus).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const ya="v2";var Sa;!function(e){let t,n;function r(){return!(!Tt(ct)||!ct.supports.marketplace)}e.cartVersion={majorVersion:1,minorVersion:1},function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(t=e.Intent||(e.Intent={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(n=e.CartStatus||(e.CartStatus={})),e.getCart=function(){if(Tt(ct,be.content,be.task),!r())throw Fe;return ir(o(ya,"marketplace.getCart"),"marketplace.getCart",e.cartVersion).then(ua)},e.addOrUpdateCartItems=function(t){if(Tt(ct,be.content,be.task),!r())throw Fe;if(!t)throw new Error("addOrUpdateCartItemsParams must be provided");return ha(null==t?void 0:t.cartId),pa(null==t?void 0:t.cartItems),ir(o(ya,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},t),{cartItems:fa(t.cartItems),cartVersion:e.cartVersion})).then(ua)},e.removeCartItems=function(t){if(Tt(ct,be.content,be.task),!r())throw Fe;if(!t)throw new Error("removeCartItemsParams must be provided");if(ha(null==t?void 0:t.cartId),!Array.isArray(null==t?void 0:t.cartItemIds)||0===(null==t?void 0:t.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return ir(o(ya,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(ua)},e.updateCartStatus=function(t){if(Tt(ct,be.content,be.task),!r())throw Fe;if(!t)throw new Error("updateCartStatusParams must be provided");return ha(null==t?void 0:t.cartId),Ca(null==t?void 0:t.cartStatus),ir(o(ya,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(ua)},e.isSupported=r}(Sa||(Sa={}));const ba="v2";var Ea;!function(e){const t="Action.Execute";let n,r,i;function a(e){if(e.requestType===n.ActionExecuteInvokeRequest){const n=e;if(n.type!==t){throw{errorCode:i.INTERNAL_ERROR,message:`Invalid action type ${n.type}. Action type must be "${t}"`}}}else if(e.requestType===n.QueryMessageExtensionRequest){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 s(){return!(!Tt(ct)||!ct.supports.externalAppAuthentication)}!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(n=e.OriginalRequestType||(e.OriginalRequestType={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(r=e.InvokeResponseType||(e.InvokeResponseType={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(i=e.InvokeErrorCode||(e.InvokeErrorCode={})),e.authenticateAndResendRequest=function(e,t,n){if(Tt(ct,be.content),!s())throw Fe;return Ke(e,new Error("App id is not valid.")),a(n),ar(o(ba,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[e,n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},e.authenticateWithSSO=function(e,t){if(Tt(ct,be.content),!s())throw Fe;return Ke(e,new Error("App id is not valid.")),ar(o(ba,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[e,t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithSSOAndResendRequest=function(e,t,n){if(Tt(ct,be.content),!s())throw Fe;return Ke(e,new Error("App id is not valid.")),a(n),ar(o(ba,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[e,n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},e.authenticateWithOauth2=function(e,t,n){if(Tt(ct,be.content),!s())throw Fe;return Ke(e,new Error("titleId is Invalid.")),Ke(t,new Error("oauthConfigId is Invalid.")),ar(o(ba,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithPowerPlatformConnectorPlugins=function(e,t,n){if(Tt(ct,be.content),!s())throw Fe;return Ke(e,new Error("titleId is Invalid.")),t&&Ze(t),ar(o(ba,"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}))},e.isSupported=s}(Ea||(Ea={}));var Pa;!function(e){let t,n;function r(){return!(!Tt(ct)||!ct.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(t=e.ActionOpenUrlType||(e.ActionOpenUrlType={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(n=e.ActionOpenUrlErrorCode||(e.ActionOpenUrlErrorCode={})),e.processActionSubmit=function(e,t){if(Tt(ct,be.content),!r())throw Fe;return Ke(e,new Error("App id is not valid.")),ar(o("v2","externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[e,t]).then((([e,t])=>{if(!e)throw t}))},e.processActionOpenUrl=function(e,t,n){if(Tt(ct,be.content),!r())throw Fe;return Ke(e,new Error("App id is not valid.")),ar(o("v2","externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[e,t.href,n]).then((([e,t])=>{if(e)throw e;return t}))},e.isSupported=r}(Pa||(Pa={}));var Aa=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};var Ia;!function(e){function t(){return!(!Tt(ct)||!ct.supports.externalAppCommands)}e.processActionCommand=function(e,n,r){return Aa(this,void 0,void 0,(function*(){if(Tt(ct,be.content),!t())throw Fe;Ke(e,new Error("App id is not valid."));const[i,a]=yield ar(o("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[e,n,r]);if(i)throw i;return a}))},e.isSupported=t}(Ia||(Ia={}));const Ta="v1";var Fa;!function(e){let t,n,r,i,a,s;function l(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"}(t=e.CloudStorageProvider||(e.CloudStorageProvider={})),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"}(n=e.CloudStorageProviderType||(e.CloudStorageProviderType={})),function(e){e.ClassMaterials="classMaterials"}(r=e.SpecialDocumentLibraryType||(e.SpecialDocumentLibraryType={})),function(e){e.Readonly="readonly"}(i=e.DocumentLibraryAccessType||(e.DocumentLibraryAccessType={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(a=e.FileDownloadStatus||(e.FileDownloadStatus={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(s=e.CloudStorageProviderFileAction||(e.CloudStorageProviderFileAction={})),e.getCloudStorageFolders=function(e,t){if(Tt(ct,be.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");ur(o(Ta,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)},e.addCloudStorageFolder=function(e,t){if(Tt(ct,be.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");ur(o(Ta,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)},e.deleteCloudStorageFolder=function(e,t,n){if(Tt(ct,be.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");ur(o(Ta,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)},e.getCloudStorageFolderContents=function(e,t,n){if(Tt(ct,be.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");ur(o(Ta,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)},e.openCloudStorageFile=function(e,t,n){if(Tt(ct,be.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");ur(o(Ta,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])},e.getExternalProviders=function(e=!1,t){if(Tt(ct,be.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");ur(o(Ta,"files.getExternalProviders"),"files.getExternalProviders",[e],t)},e.copyMoveFiles=function(e,t,n,r,i=!1,a){if(Tt(ct,be.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(!a)throw new Error("[files.copyMoveFiles] callback cannot be null");ur(o(Ta,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,i],a)},e.getFileDownloads=function(e){if(Tt(ct,be.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");ur(o(Ta,"files.getFileDownloads"),"files.getFileDownloads",[],e)},e.openDownloadFolder=function(e=void 0,t){if(Tt(ct,be.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");ur(o(Ta,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)},e.addCloudStorageProvider=function(e){if(Tt(ct,be.content),!e)throw l(we.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");ur(o(Ta,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)},e.removeCloudStorageProvider=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw l(we.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");ur(o(Ta,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)},e.addCloudStorageProviderFile=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw l(we.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");ur(o(Ta,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)},e.renameCloudStorageProviderFile=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw l(we.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");ur(o(Ta,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)},e.deleteCloudStorageProviderFile=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw l(we.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");ur(o(Ta,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)},e.downloadCloudStorageProviderFile=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw l(we.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");ur(o(Ta,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)},e.uploadCloudStorageProviderFile=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw l(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw l(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");ur(o(Ta,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)},e.registerCloudStorageProviderListChangeHandler=function(e){if(Tt(ct),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Ln(o(Ta,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)},e.registerCloudStorageProviderContentChangeHandler=function(e){if(Tt(ct),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Ln(o(Ta,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}}(Fa||(Fa={}));const Ra="v1";var Oa;!function(e){function t(){return!(!Tt(ct)||!ct.supports.meetingRoom)}e.getPairedMeetingRoomInfo=function(){return new Promise((e=>{if(Tt(ct),!t())throw Fe;e(ir(o(Ra,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))},e.sendCommandToPairedMeetingRoom=function(e){return new Promise((n=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Tt(ct),!t())throw Fe;n(ir(o(Ra,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))},e.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Tt(ct),!t())throw Fe;Ln(o(Ra,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Tt(ct),e(t)}))},e.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Tt(ct),!t())throw Fe;Ln(o(Ra,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Tt(ct),e(t)}))},e.isSupported=t}(Oa||(Oa={}));var ka,Ma=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};!function(e){let n,r;!function(e){let n;const r=t("messageChannels.telemetry");function i(){var e;return!(!Tt(ct)||!(null===(e=ct.supports.messageChannels)||void 0===e?void 0:e.telemetry))}e.getTelemetryPort=function(){return Ma(this,void 0,void 0,(function*(){if(n)return r("Returning telemetry port from cache"),n;if(!i())throw Fe;return n=yield sr(o("v1","messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),n}))},e.isSupported=i,e._clearTelemetryPort=function(){n=void 0}}(n=e.telemetry||(e.telemetry={})),function(e){let n;const r=t("messageChannels.dataLayer");function i(){var e;return!(!Tt(ct)||!(null===(e=ct.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}e.getDataLayerPort=function(){return Ma(this,void 0,void 0,(function*(){if(n)return r("Returning dataLayer port from cache"),n;if(!i())throw Fe;return n=yield sr(o("v1","messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),n}))},e.isSupported=i,e._clearDataLayerPort=function(){n=void 0}}(r=e.dataLayer||(e.dataLayer={})),e.isSupported=function(){return!(!Tt(ct)||!ct.supports.messageChannels)}}(ka||(ka={}));var La,Da;!function(e){function t(){return!(!Tt(ct)||!ct.supports.notifications)}e.showNotification=function(e){if(Tt(ct,be.content),!t())throw Fe;ur(o("v1","notifications.showNotification"),"notifications.showNotification",[e])},e.isSupported=t}(La||(La={})),function(e){function t(){return!(!Tt(ct)||!ct.supports.otherAppStateChange)}e.registerAppInstallationHandler=function(e){if(!t())throw new Error(we.NOT_SUPPORTED_ON_PLATFORM.toString());if(Mt(e))throw new Error(we.INVALID_ARGUMENTS.toString());Ln(o("v2","otherApp.install"),"otherApp.install",e)},e.unregisterAppInstallationHandler=function(){if(!t())throw new Error(we.NOT_SUPPORTED_ON_PLATFORM.toString());ur(o("v2","otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Dn("otherApp.install")},e.isSupported=t}(Da||(Da={}));const Ua="v1";var Na;!function(e){let t,n,r;function i(){return!(!Tt(ct)||!ct.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"}(t=e.ControlCommand||(e.ControlCommand={})),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"}(n=e.ErrorReason||(e.ErrorReason={})),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"}(r=e.SessionTerminatedReason||(e.SessionTerminatedReason={})),e.getCapableParticipants=function(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;ur(o(Ua,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)},e.requestControl=function(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(Tt(ct,be.sidePanel),!i())throw Fe;ur(o(Ua,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)},e.sendControlCommand=function(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(Tt(ct,be.sidePanel),!i())throw Fe;ur(o(Ua,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)},e.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;ur(o(Ua,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)},e.registerOnCapableParticipantsChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;Ln(o(Ua,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)},e.registerOnErrorHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;Ln(o(Ua,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)},e.registerOnDeviceStateChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;Ln(o(Ua,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)},e.registerOnSessionStatusChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;Ln(o(Ua,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)},e.isSupported=i}(Na||(Na={}));var Ha;!function(e){function t(){return!(!Tt(ct)||!ct.supports.appEntity)}e.selectAppEntity=function(e,n,r,i){if(Tt(ct,be.content),!t())throw Fe;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!i)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");ur(o("v1","appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,n,r],i)},e.isSupported=t}(Ha||(Ha={}));const xa="v1";var Va;!function(e){let t,n;function r(){return!(!Tt(ct)||!ct.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(t=e.ChannelType||(e.ChannelType={})),e.getTeamChannels=function(e,t){if(Tt(ct,be.content),!r())throw Fe;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");ur(o(xa,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)},e.refreshSiteUrl=function(e,t){if(Tt(ct),!r())throw Fe;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");ur(o(xa,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)},e.isSupported=r,function(e){let t;function n(){return!(!Tt(ct)||!ct.supports.teams)&&!!ct.supports.teams.fullTrust}!function(e){function t(){return!(!Tt(ct)||!ct.supports.teams)&&(!!ct.supports.teams.fullTrust&&!!ct.supports.teams.fullTrust.joinedTeams)}e.getUserJoinedTeams=function(e){return new Promise((n=>{if(Tt(ct),!t())throw Fe;if((C.hostClientType===ye.android||C.hostClientType===ye.teamsRoomsAndroid||C.hostClientType===ye.teamsPhones||C.hostClientType===ye.teamsDisplays)&&!Ft("2.0.1")){const e={errorCode:we.OLD_PLATFORM};throw new Error(JSON.stringify(e))}n(nr(o(xa,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))},e.isSupported=t}(t=e.joinedTeams||(e.joinedTeams={})),e.getConfigSetting=function(e){return new Promise((t=>{if(Tt(ct),!n())throw Fe;t(nr(o(xa,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))},e.isSupported=n}(n=e.fullTrust||(e.fullTrust={}))}(Va||(Va={}));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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Wa="v2";var Ba;!function(e){e.frameProcessingTimeoutInMs=2e3;const t=Je()?void 0:new li(ur);let n;function r(){const t=setTimeout((()=>{c(`Frame not processed in ${e.frameProcessingTimeoutInMs}ms`,n.Warn)}),e.frameProcessingTimeoutInMs);return function(){clearTimeout(t)}}function i(e,t){return n=>_a(this,void 0,void 0,(function*(){const o=n.videoFrame;t.reportStartFrameProcessing(o.codedWidth,o.codedHeight);const i=r(),a=yield e(n);return i(),t.reportFrameProcessed(),a}))}function a(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function s(){return Tt(ct),fi.isSupported()}function l(e){ur(o(Wa,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function c(e,t=n.Warn){ur(o(Wa,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}!function(e){e.Fatal="fatal",e.Warn="warn"}(n=e.ErrorLevel||(e.ErrorLevel={})),e.registerForVideoFrame=function(e){var n,u;if(!s())throw Fe;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Tt(ct,be.sidePanel)){if(Ln(o(Wa,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e)),!1),null===(n=ct.supports.video)||void 0===n?void 0:n.mediaStream)Ln(o(Wa,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>_a(this,void 0,void 0,(function*(){const{streamId:r,metadataInTexture:o}=n,a=t?i(e.videoFrameHandler,t):e.videoFrameHandler;o?yield Zo(r,a,c,t):yield Ko(r,a,c,t)}))),!1),ur(o(Wa,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(u=ct.supports.video)||void 0===u?void 0:u.sharedFrame))throw Fe;Ln(o(Wa,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(n=>{if(n){null==t||t.reportStartFrameProcessing(n.width,n.height);const o=r(),i=n.timestamp;e.videoBufferHandler(a(n),(()=>{o(),null==t||t.reportFrameProcessed(),l(i)}),c)}}),!1),ur(o(Wa,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==t||t.startMonitorSlowFrameProcessing()}},e.notifySelectedVideoEffectChanged=function(e,t,n){if(Tt(ct,be.sidePanel),!s())throw Fe;ur(o(Wa,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])},e.registerForVideoEffect=function(e){if(Tt(ct,be.sidePanel),!s())throw Fe;Ln(o(Wa,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",oi(e,t),!1),ur(o(Wa,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")},e.updatePersonalizedEffects=function(e){if(Tt(ct,be.sidePanel),!fi.isSupported())throw Fe;ur(o(Wa,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])},e.isSupported=s,e.notifyFatalError=function(e){if(Tt(ct),!fi.isSupported())throw Fe;c(e,n.Fatal)}}(Ba||(Ba={}))})(),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],c=i[1],u=new o(l(e,a,c)),d=0,f=c>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===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===c&&(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,l=r-o;s<l;s+=a)i.push(u(e,s,s+a>l?l: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 l(e,t,n){return 3*(t+n)/4-n}function c(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(c(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},46:(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(601)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},601:(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 l(e){var i=Math.abs(e);return i>=o?c(e,i,o,"day"):i>=r?c(e,i,r,"hour"):i>=n?c(e,i,n,"minute"):i>=t?c(e,i,t,"second"):e+" ms"}function c(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?l(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>me,ChannelType:()=>Ie,ChildAppWindow:()=>Mo,DialogDimension:()=>Ae,ErrorCode:()=>we,FileOpenPreference:()=>ge,FrameContexts:()=>be,HostClientType:()=>ye,HostName:()=>Se,LiveShareHost:()=>sa,NotificationTypes:()=>Br,ParentAppWindow:()=>Lo,SecondaryM365ContentIdName:()=>he,TaskModuleDimension:()=>Te,TeamType:()=>Ee,UserSettingTypes:()=>zr,UserTeamRole:()=>Pe,ViewerActionTypes:()=>jr,app:()=>fn,appEntity:()=>Ha,appInitialization:()=>Ai,appInstallDialog:()=>io,authentication:()=>zt,barCode:()=>Eo,calendar:()=>_o,call:()=>Ei,chat:()=>Po,clipboard:()=>Io,conversations:()=>Yr,dialog:()=>Zt,enablePrintCapability:()=>Oi,executeDeepLink:()=>Gi,externalAppAuthentication:()=>Ea,externalAppCardActions:()=>Pa,externalAppCommands:()=>Ia,files:()=>Fa,geoLocation:()=>Ro,getAdaptiveCardSchemaVersion:()=>Oo,getContext:()=>Mi,getMruTabInstances:()=>zi,getTabInstances:()=>ji,initialize:()=>Ri,initializeWithFrameContext:()=>Ji,liveShare:()=>aa,location:()=>Uo,logs:()=>Wr,mail:()=>Wo,marketplace:()=>Sa,media:()=>lo,meeting:()=>xo,meetingRoom:()=>Oa,menus:()=>Xt,messageChannels:()=>ka,monetization:()=>Vo,navigateBack:()=>Yi,navigateCrossDomain:()=>Xi,navigateToTab:()=>Qi,nestedAppAuth:()=>To,notifications:()=>La,openFilePreview:()=>Qr,otherAppStateChange:()=>Da,pages:()=>In,people:()=>jo,print:()=>ki,profile:()=>Go,registerAppButtonClickHandler:()=>Ui,registerAppButtonHoverEnterHandler:()=>Ni,registerAppButtonHoverLeaveHandler:()=>Hi,registerBackButtonHandler:()=>xi,registerBeforeUnloadHandler:()=>_i,registerChangeSettingsHandler:()=>Bi,registerCustomHandler:()=>Kr,registerFocusEnterHandler:()=>Wi,registerFullScreenHandler:()=>Di,registerOnLoadHandler:()=>Vi,registerOnThemeChangeHandler:()=>Li,registerUserSettingsChangeHandler:()=>Zr,remoteCamera:()=>Na,returnFocus:()=>Zi,search:()=>gi,secondaryBrowser:()=>Do,sendCustomEvent:()=>Jr,sendCustomMessage:()=>$r,setFrameContext:()=>$i,settings:()=>ta,shareDeepLink:()=>qi,sharing:()=>hi,stageView:()=>wi,tasks:()=>oa,teams:()=>Va,teamsCore:()=>Bo,thirdPartyCloudStorage:()=>Ti,uploadCustomApp:()=>Gr,version:()=>bt,videoEffects:()=>fi,videoEffectsEx:()=>Ba,visualMedia:()=>yi,webStorage:()=>Si});const e=(0,n(46).debug)("teamsJs");function t(t){return e.extend(t)}function o(e,t){return`${e}_${t}`}function i(e){return/^v\d+_[\w.]+$/.test(e)}const a=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","www.bing.com","www.staging-bing-int.com","teams.cloud.microsoft","outlook.cloud.microsoft","m365.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net"]}');const s="2.0.1",l="2.0.3",c="1.9.0",u="1.8.0",d=n.t(a,2).validOrigins,f=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),p=/^https:\/\//,g="https",m="teams.microsoft.com",h="The library has not yet been initialized",w="The runtime has not yet been initialized",v="The runtime version is not supported";class C{}C.initializeCalled=!1,C.initializeCompleted=!1,C.additionalValidOrigins=[],C.initializePromise=void 0,C.isFramelessWindow=!1,C.frameContext=void 0,C.hostClientType=void 0,C.printCapabilityEnabled=!1;var y=n(933);const S=E,b=2147483647;function E(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 A(e)}return P(e,t,n)}function P(e,t,n){if("string"==typeof e)return R(e,t);if(ArrayBuffer.isView(e))return N(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(k(e,ArrayBuffer)||e&&k(e.buffer,ArrayBuffer))return H(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(k(e,SharedArrayBuffer)||e&&k(e.buffer,SharedArrayBuffer)))return H(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 E.from(r,t,n);const o=oe(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return E.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 A(e){return I(e),T(e<0?0:0|F(e))}function I(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 T(e){if(e>b)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,E.prototype),t}function F(e){if(e>=b)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+b.toString(16)+" bytes");return 0|e}function R(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!E.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|O(e,t);let r=T(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function O(e,t){if(E.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||k(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 M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(o)return r?-1:M(e).length;t=(""+t).toLowerCase(),o=!0}}function k(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function M(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 L(e){return y.toByteArray(U(e))}E.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}}(),E.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),E.from=function(e,t,n){return P(e,t,n)},Object.setPrototypeOf(E.prototype,Uint8Array.prototype),Object.setPrototypeOf(E,Uint8Array),E.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}},E.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==E.prototype};const D=/[^+/0-9A-Za-z-_]/g;function U(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function N(e){if(k(e,Uint8Array)){const t=new Uint8Array(e);return H(t.buffer,t.byteOffset,t.byteLength)}return x(e)}function H(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,E.prototype),r}function x(e){const t=e.length<0?0:0|F(e.length),n=T(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function V(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,l;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(i=l));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(i=l));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,l>65535&&l<1114112&&(i=l))}}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 B(r)}function _(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 j(this,t,n);case"utf8":case"utf-8":return V(this,t,n);case"ascii":return z(this,t,n);case"latin1":case"binary":return q(this,t,n);case"base64":return G(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}E.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?V(this,0,e):_.apply(this,arguments)};const W=4096;function B(e){const t=e.length;if(t<=W)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=W));return n}function j(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+=re[e[r]];return o}function z(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 q(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 G(e,t,n){return 0===t&&n===e.length?y.fromByteArray(e):y.fromByteArray(e.slice(t,n))}function $(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 J(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(ne(r))return a;e[n+a]=r}return a}function K(e,t,n,r){return te(M(t,e.length-n),e,n,r)}function Z(e,t,n,r){return te(Y(t),e,n,r)}function Q(e,t,n,r){return te(L(t),e,n,r)}function X(e,t,n,r){return te(ee(t,e.length-n),e,n,r)}function Y(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function ee(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 te(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 ne(e){return e!=e}E.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 J(this,e,t,n);case"utf8":case"utf-8":return K(this,e,t,n);case"ascii":case"latin1":case"binary":return Z(this,e,t,n);case"base64":return Q(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const re=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 oe(e){if(E.isBuffer(e)){const t=0|F(e.length),n=T(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ne(e.length)?T(0):x(e):"Buffer"===e.type&&Array.isArray(e.data)?x(e.data):void 0}const ie={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ae;const se=new Uint8Array(16);function le(){if(!ae&&(ae="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ae))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ae(se)}const ce=[];for(let e=0;e<256;++e)ce.push((e+256).toString(16).slice(1));function ue(e,t=0){return ce[e[t+0]]+ce[e[t+1]]+ce[e[t+2]]+ce[e[t+3]]+"-"+ce[e[t+4]]+ce[e[t+5]]+"-"+ce[e[t+6]]+ce[e[t+7]]+"-"+ce[e[t+8]]+ce[e[t+9]]+"-"+ce[e[t+10]]+ce[e[t+11]]+ce[e[t+12]]+ce[e[t+13]]+ce[e[t+14]]+ce[e[t+15]]}const de=function(e,t,n){if(ie.randomUUID&&!t&&!e)return ie.randomUUID();const r=(e=e||{}).random||(e.rng||le)();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 ue(r)},fe=/^(?:[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 pe=function(e){return"string"==typeof e&&fe.test(e)};var ge,me,he,we,ve,Ce,ye,Se,be,Ee,Pe,Ae;!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(ge||(ge={})),function(e){e.M365Content="m365content"}(me||(me={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(he||(he={})),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"}(we||(we={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(ve||(ve={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Ce||(Ce={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(ye||(ye={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(Se||(Se={})),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"}(be||(be={})),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"}(Ee||(Ee={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(Pe||(Pe={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Ae||(Ae={}));var Ie,Te=Ae;!function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Ie||(Ie={}));const Fe={errorCode:we.NOT_SUPPORTED_ON_PLATFORM},Re=1,Oe=5,ke={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Me=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),Le=new Error("Invalid response: Received more images than the specified max limit in the response.");function De(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Ue(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 Ne(){return de()}function He(e){return Object.keys(e).forEach((t=>{"object"==typeof e[t]&&He(e[t])})),Object.freeze(e)}function xe(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Ve(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function _e(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function We(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 Be(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId)+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl),(e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function je(e){return!(Ue(`${e.majorVersion}.${e.minorVersion}`,`${Re}.${Oe}`)>=0)}function ze(e){return"https:"===e.protocol}function qe(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=S.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Ge(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 $e(){if(Je())throw new Error("window object undefined at SSR check");return window}function Je(){return"undefined"==typeof window}function Ke(e,t){if(Xe(e)||!et(e)||!tt(e))throw t||new Error("id is not valid.")}function Ze(e,t){const n=e.toString().toLocaleLowerCase();if(Xe(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!ze(e))throw t||new Error("Url should be a valid https url")}function Qe(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Xe(e){let t;try{const n=Ye(e);t=decodeURIComponent(n)}catch(n){t=e}return/<script[^>]*>[\s\S]*?<\/script[^>]*>/gi.test(t)}function Ye(e){return new Map([["<","<"],[">",">"],["&","&"],[""",'"'],["'","'"],["/","/"]]).forEach(((t,n)=>{e=e.replace(new RegExp(n,"gi"),t)})),e}function et(e){return e.length<256&&e.length>4}function tt(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function nt(e){if(!e)throw new Error("id must not be empty");if(!1===pe(e))throw new Error("id must be a valid UUID")}var rt=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 ot=t("runtime"),it=4;function at(e){return e.apiVersion===it}const st={apiVersion:-1,supports:{}};function lt(e){if(at(e))return!0;throw-1===e.apiVersion?new Error(w):new Error(v)}let ct=st;const ut={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:ke,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:{}}}},dt=[ye.desktop,ye.web,ye.rigel,ye.surfaceHub,ye.teamsRoomsWindows,ye.teamsRoomsAndroid,ye.teamsPhones,ye.teamsDisplays],ft=[ye.android,ye.ios,ye.ipados],pt=[...dt,...ft];function gt(e){let t=e;if(t.apiVersion<it&&mt.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),at(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const mt=[{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=rt(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})}}}],ht={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:dt}],"1.9.0":[{capability:{location:{}},hostClientTypes:pt}],"2.0.0":[{capability:{people:{}},hostClientTypes:pt},{capability:{sharing:{}},hostClientTypes:[ye.desktop,ye.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[ye.android,ye.desktop,ye.ios,ye.teamsRoomsAndroid,ye.teamsPhones,ye.teamsDisplays,ye.web]},{capability:{webStorage:{}},hostClientTypes:[ye.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[ye.android,ye.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[ye.android,ye.ios]}]},wt=ot.extend("generateBackCompatRuntimeConfig");function vt(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]=vt(e[r]||{},t[r]));return n}function Ct(e,t,n){wt("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);wt("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{Ue(e,t)>=0&&n[t].forEach((e=>{void 0!==C.hostClientType&&e.hostClientTypes.includes(C.hostClientType)&&(r=vt(r,e.capability))}))}));const o={apiVersion:it,hostVersionsInfo:ke,isLegacyTeams:!0,supports:r};return wt("Runtime config after updating based on highestSupportedVersion: %o",o),o}const yt=ot.extend("applyRuntimeConfig");function St(e){"string"==typeof e.apiVersion&&(yt("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),yt("Fast-forwarding runtime %o",e);const t=gt(e);yt("Applying runtime %o",t),ct=He(t)}const bt="2.23.0-beta.3",Et=t("internal"),Pt=Et.extend("ensureInitializeCalled"),At=Et.extend("ensureInitialized");function It(){if(!C.initializeCalled)throw Pt(h),new Error(h)}function Tt(e,...t){if(!C.initializeCompleted)throw At("%s. initializeCalled: %s",h,C.initializeCalled.toString()),new Error(h);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===C.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${C.frameContext}".`)}return lt(e)}function Ft(e=s){const t=Ue(C.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Rt(){return C.hostClientType==ye.android||C.hostClientType==ye.ios||C.hostClientType==ye.ipados}function Ot(e=s){if(!Rt()){throw{errorCode:we.NOT_SUPPORTED_ON_PLATFORM}}if(!Ft(e)){throw{errorCode:we.OLD_PLATFORM}}}function kt(e){let t=C.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&p.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),C.additionalValidOrigins=t}function Mt(e){return null==e}var Lt=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};let Dt=[];const Ut=t("validateOrigin");function Nt(){return Lt(this,void 0,void 0,(function*(){yield xt()}))}function Ht(){return 0!==Dt.length}function xt(){return Lt(this,void 0,void 0,(function*(){return Ht()?Dt:Je()?(Dt=d,d):fetch(f).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(Vt(JSON.stringify(e)))return Dt=e.validOrigins,Dt;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(Ut("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Dt=d,Dt)))}))}function Vt(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 Ut("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function _t(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 Wt(e){return xt().then((t=>{if(!ze(e))return Ut("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=>_t(e,n))))return!0;for(const e of C.additionalValidOrigins){if(_t("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return Ut("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,C.additionalValidOrigins),!1}))}const Bt="v1",jt="v2";var zt;!function(e){let t,n,r,i;function a(e,n){return new Promise(((r,o)=>{if(C.hostClientType!==ye.web){const t=Qe(n.url);Ze(t),r(ar(e,"authentication.authenticate",[t.href,n.width,n.height,n.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else t={success:r,fail:o},u(n)}))}function s(e,t){return new Promise((n=>{n(ar(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 l(e){return new Promise((t=>{t(ar(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function c(){d();try{Xn.childWindow&&Xn.childWindow.close()}finally{Xn.childWindow=null,Xn.childOrigin=null}}function u(e){c();let t=e.width||600,n=e.height||400;t=Math.min(t,Xn.currentWindow.outerWidth-400),n=Math.min(n,Xn.currentWindow.outerHeight-200);const r=Qe(e.url.replace("{oauthRedirectMethod}","web"));Ze(r);let o=void 0!==Xn.currentWindow.screenLeft?Xn.currentWindow.screenLeft:Xn.currentWindow.screenX,i=void 0!==Xn.currentWindow.screenTop?Xn.currentWindow.screenTop:Xn.currentWindow.screenY;o+=Xn.currentWindow.outerWidth/2-t/2,i+=Xn.currentWindow.outerHeight/2-n/2,Xn.childWindow=Xn.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),Xn.childWindow?f():g("FailedToOpenWindow")}function d(){n&&(clearInterval(n),n=0),Dn("initialize"),Dn("navigateCrossDomain")}function f(){d(),n=Xn.currentWindow.setInterval((()=>{if(!Xn.childWindow||Xn.childWindow.closed)g("CancelledByUser");else{const e=Xn.childOrigin;try{Xn.childOrigin="*",Nr("ping")}finally{Xn.childOrigin=e}}}),100),Ln(o(Bt,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[be.authentication,C.hostClientType])),Ln(o(Bt,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function p(e){try{t&&t.success(e)}finally{t=void 0,c()}}function g(e){try{t&&t.fail(new Error(e))}finally{t=void 0,c()}}e.initialize=function(){Ln(o(Bt,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",p,!1),Ln(o(Bt,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",g,!1)},e.registerAuthenticationHandlers=function(e){r=e},e.authenticate=function(e){const t=void 0!==e,n=t?e:r;if(!n)throw new Error("No parameters are provided for authentication");return Tt(ct,be.content,be.sidePanel,be.settings,be.remove,be.task,be.stage,be.meetingStage),a(n.successCallback||n.failureCallback?o(Bt,"authentication.authenticate"):o(jt,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(r=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(r=void 0)}}))},e.getAuthToken=function(e){return It(),s(e&&(e.successCallback||e.failureCallback)?o(Bt,"authentication.getAuthToken"):o(jt,"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}))},e.getUser=function(e){return It(),l(e&&(e.successCallback||e.failureCallback)?o(Bt,"authentication.getUser"):o(jt,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),null;throw t}))},e.notifySuccess=function(e,t){Tt(ct,be.authentication),ur(o(t?Bt:jt,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Dr(Xn.parentWindow,(()=>setTimeout((()=>Xn.currentWindow.close()),200)))},e.notifyFailure=function(e,t){Tt(ct,be.authentication),ur(o(t?Bt:jt,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Dr(Xn.parentWindow,(()=>setTimeout((()=>Xn.currentWindow.close()),200)))},function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(i=e.DataResidency||(e.DataResidency={}))}(zt||(zt={}));const qt="v2";function Gt(e,t){if(Tt(ct,be.content,be.sidePanel,be.task,be.meetingStage),!Zt.update.isSupported())throw Fe;ur(e,"tasks.updateTask",[t])}function $t(e,t,n,r){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!Zt.url.isSupported())throw Fe;r&&Ln(o(qt,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);ur(e,"tasks.startTask",[Zt.url.getDialogInfoFromUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Dn("messageForParent")}))}function Jt(e,t,n,r){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!Zt.url.bot.isSupported())throw Fe;r&&Ln(o(qt,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);ur(e,"tasks.startTask",[Zt.url.getDialogInfoFromBotUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Dn("messageForParent")}))}function Kt(e,t,n){if(Tt(ct,be.content,be.task),!Zt.url.isSupported())throw Fe;ur(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}var Zt;!function(e){const t=[];function n(e){C.frameContext&&(C.frameContext===be.task?t.push(e):Dn("messageForChild"))}let r,i,a;e.initialize=function(){Ln(o(qt,"dialog.registerMessageForChildHandler"),"messageForChild",n,!1)},function(e){let n,r;function i(e){return{url:e.url,height:e.size?e.size.height:Ae.Small,width:e.size?e.size.width:Ae.Small,title:e.title,fallbackUrl:e.fallbackUrl}}e.open=function(e,t,n){$t(o(qt,"dialog.url.open"),e,t,n)},e.submit=function(e,t){Kt(o(qt,"dialog.url.submit"),e,t)},function(e){function n(){var e,t;return Tt(ct)&&!!(null===(t=null===(e=ct.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}e.sendMessageToParentFromDialog=function(e){if(Tt(ct,be.task),!n())throw Fe;ur(o(qt,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])},e.sendMessageToDialog=function(e){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!n())throw Fe;ur(o(qt,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])},e.registerOnMessageFromParent=function(e){if(Tt(ct,be.task),!n())throw Fe;for(Dn("messageForChild"),Ln(o(qt,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),t.reverse();t.length>0;){e(t.pop())}},e.isSupported=n}(n=e.parentCommunication||(e.parentCommunication={})),e.isSupported=function(){return Tt(ct)&&void 0!==(ct.supports.dialog&&ct.supports.dialog.url)},function(e){e.open=function(e,t,n){Jt(o(qt,"dialog.url.bot.open"),e,t,n)},e.isSupported=function(){return Tt(ct)&&void 0!==(ct.supports.dialog&&ct.supports.dialog.url&&ct.supports.dialog.url.bot)}}(r=e.bot||(e.bot={})),e.getDialogInfoFromUrlDialogInfo=i,e.getDialogInfoFromBotUrlDialogInfo=function(e){const t=i(e);return t.completionBotId=e.completionBotId,t}}(r=e.url||(e.url={})),e.isSupported=function(){return!(!Tt(ct)||!ct.supports.dialog)},function(e){e.resize=function(e){Gt(o(qt,"dialog.update.resize"),e)},e.isSupported=function(){return!(!Tt(ct)||!ct.supports.dialog)&&!!ct.supports.dialog.update}}(i=e.update||(e.update={})),function(e){function t(){const e=ct.hostVersionsInfo&&ct.hostVersionsInfo.adaptiveCardSchemaVersion&&!je(ct.hostVersionsInfo.adaptiveCardSchemaVersion);return Tt(ct)&&void 0!==(e&&ct.supports.dialog&&ct.supports.dialog.card)}let n;function r(e){return{card:e.card,height:e.size?e.size.height:Ae.Small,width:e.size?e.size.width:Ae.Small,title:e.title}}function i(e){const t=r(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,n){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!t())throw Fe;const i=r(e);ur(o(qt,"dialog.adaptiveCard.open"),"tasks.startTask",[i],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t,function(e){function t(){const e=ct.hostVersionsInfo&&ct.hostVersionsInfo.adaptiveCardSchemaVersion&&!je(ct.hostVersionsInfo.adaptiveCardSchemaVersion);return Tt(ct)&&void 0!==(e&&ct.supports.dialog&&ct.supports.dialog.card&&ct.supports.dialog.card.bot)}e.open=function(e,n){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!t())throw Fe;const r=i(e);ur(o(qt,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[r],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t}(n=e.bot||(e.bot={}))}(a=e.adaptiveCard||(e.adaptiveCard={}))}(Zt||(Zt={}));const Qt="v2";var Xt;!function(e){let t,n,r,i,a;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(t=e.DisplayMode||(e.DisplayMode={}));function s(e){a&&a(e)||(Tt(ct),ur(o(Qt,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function l(e){r&&r(e)||(Tt(ct),ur(o(Qt,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function c(e){i&&i(e)||(Tt(ct),ur(o(Qt,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function u(){return!(!Tt(ct)||!ct.supports.menus)}e.MenuItem=class{constructor(){this.enabled=!0,this.selected=!1}},function(e){e.dropDown="dropDown",e.popOver="popOver"}(n=e.MenuListType||(e.MenuListType={})),e.initialize=function(){Ln(o(Qt,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",l,!1),Ln(o(Qt,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",c,!1),Ln(o(Qt,"menus.registerSetModuleViewHandler"),"setModuleView",s,!1)},e.setUpViews=function(e,t){if(Tt(ct),!u())throw Fe;a=t,ur(o(Qt,"menus.setUpViews"),"setUpViews",[e])},e.setNavBarMenu=function(e,t){if(Tt(ct),!u())throw Fe;r=t,ur(o(Qt,"menus.setNavBarMenu"),"setNavBarMenu",[e])},e.showActionMenu=function(e,t){if(Tt(ct),!u())throw Fe;i=t,ur(o(Qt,"menus.showActionMenu"),"showActionMenu",[e])},e.isSupported=u}(Xt||(Xt={}));const Yt="v2",en=5e3,tn=t("app");function nn(e,t){if(Je()){return tn.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return We((()=>cn(e,t)),en,new Error("SDK initialization timed out."))}function rn(e){ur(e,fn.Messages.AppLoaded,[bt])}function on(e,t){ur(e,fn.Messages.ExpectedFailure,[t.reason,t.message])}function an(e,t){ur(e,fn.Messages.Failure,[t.reason,t.message])}function sn(e){ur(e,fn.Messages.Success,[bt])}const ln=tn.extend("initializeHelper");function cn(e,t){return new Promise((n=>{C.initializeCalled||(C.initializeCalled=!0,Rn(),C.initializePromise=er(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=s})=>{C.frameContext=e,C.hostClientType=t,C.clientSupportedSDKVersion=r;try{ln("Parsing %s",n);const e=JSON.parse(n);if(ln("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&St(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ln("Attempting to parse %s as an SDK version",n),isNaN(Ue(n,s))||(C.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(ln("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");St(e)}catch(e){if(!(e instanceof SyntaxError))throw e;St(Ct(C.clientSupportedSDKVersion,ut,ht))}}C.initializeCompleted=!0})),zt.initialize(),Xt.initialize(),In.config.initialize(),Zt.initialize()),Array.isArray(t)&&kt(t),void 0!==C.initializePromise?n(C.initializePromise):ln("GlobalVars.initializePromise is unexpectedly undefined")}))}function un(e,t){!Mt(t)&&It(),Hn(e,t)}function dn(e,t){return new Promise((n=>{Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),n(rr(e,"executeDeepLink",t))}))}var fn;function pn(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,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:Se.teams,clientType:e.hostClientType?e.hostClientType:ye.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:C.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,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(e){const n=t("app");let r,i,a;e.Messages={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"},function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(r=e.FailedReason||(e.FailedReason={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(i=e.ExpectedFailureReason||(e.ExpectedFailureReason={})),e.isInitialized=function(){return C.initializeCompleted},e.getFrameContext=function(){return C.frameContext},function(){if(Je())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,r="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?n("teamsjs is being used from %s. %s",t,r):n("teamsjs is being used from a script tag embedded directly in your html. %s",r)}(),e.initialize=function(e){return Nt(),nn(o(Yt,"app.initialize"),e)},e._initialize=function(e){Xn.currentWindow=e},e._uninitialize=function(){C.initializeCalled&&(On(),C.initializeCalled=!1,C.initializeCompleted=!1,C.initializePromise=void 0,C.additionalValidOrigins=[],C.frameContext=void 0,C.hostClientType=void 0,C.isFramelessWindow=!1,tr())},e.getContext=function(){return new Promise((e=>{It(),e(nr(o(Yt,"app.getContext"),"getContext"))})).then((e=>pn(e)))},e.notifyAppLoaded=function(){It(),rn(o(Yt,"app.notifyAppLoaded"))},e.notifySuccess=function(){It(),sn(o(Yt,"app.notifySuccess"))},e.notifyFailure=function(e){It(),an(o(Yt,"app.notifyFailure"),e)},e.notifyExpectedFailure=function(e){It(),on(o(Yt,"app.notifyExpectedFailure"),e)},e.registerOnThemeChangeHandler=function(e){un(o(Yt,"app.registerOnThemeChangeHandler"),e)},e.openLink=function(e){return dn(o(Yt,"app.openLink"),e)},function(e){e.registerBeforeSuspendOrTerminateHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Tt(ct),jn(e)},e.registerOnResumeHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Tt(ct),zn(e)}}(a=e.lifecycle||(e.lifecycle={}))}(fn||(fn={}));const gn="v2";function mn(e,t){return new Promise((n=>{if(Tt(ct,be.content,be.sidePanel,be.settings,be.remove,be.task,be.stage,be.meetingStage),!In.isSupported())throw Fe;n(or(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function hn(e){return new Promise((t=>{if(Tt(ct),!In.backStack.isSupported())throw Fe;t(or(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function wn(e,t){return new Promise((n=>{if(Tt(ct),!In.tabs.isSupported())throw Fe;n(or(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function vn(e,t){if(Tt(ct),!In.isSupported())throw Fe;ur(e,"returnFocus",[t])}function Cn(e,t){return new Promise((n=>{if(Tt(ct),!In.tabs.isSupported())throw Fe;n(nr(e,"getTabInstances",t))}))}function yn(e,t){return new Promise((n=>{if(Tt(ct),!In.tabs.isSupported())throw Fe;n(nr(e,"getMruTabInstances",t))}))}function Sn(e,t){if(Tt(ct,be.content,be.sidePanel,be.meetingStage),!In.isSupported())throw Fe;ur(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function bn(e,t){if(Tt(ct,be.content),!In.isSupported())throw Fe;ur(e,"setFrameContext",[t])}function En(e,t){if(Tt(ct,be.settings,be.remove),!In.config.isSupported())throw Fe;ur(e,"settings.setValidityState",[t])}function Pn(e){return new Promise((t=>{if(Tt(ct,be.content,be.settings,be.remove,be.sidePanel),!In.isSupported())throw Fe;t(nr(e,"settings.getSettings"))}))}function An(e,t){return new Promise((n=>{if(Tt(ct,be.content,be.settings,be.sidePanel),!In.config.isSupported())throw Fe;n(rr(e,"settings.setSettings",t))}))}var In;!function(e){function t(e){bn(o(gn,"pages.setCurrentFrame"),e)}function n(){return!(!Tt(ct)||!ct.supports.pages)}let r,i,a,s,l,c;e.returnFocus=function(e){vn(o(gn,"pages.returnFocus"),e)},e.registerFocusEnterHandler=function(e){Nn(o(gn,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!n())throw Fe}))},e.setCurrentFrame=t,e.initializeWithFrameContext=function(e,n,r){Nt(),nn(o(gn,"pages.initializeWithFrameContext"),r).then((()=>n&&n())),t(e)},e.getConfig=function(){return Pn(o(gn,"pages.getConfig."))},e.navigateCrossDomain=function(e){return mn(o(gn,"pages.navigateCrossDomain"),e)},e.navigateToApp=function(e){return new Promise((t=>{if(Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!n())throw Fe;const r=o(gn,"pages.navigateToApp");ct.isLegacyTeams?t(rr(r,"executeDeepLink",Be(e))):t(rr(r,"pages.navigateToApp",e))}))},e.shareDeepLink=function(e){return Sn(o(gn,"pages.shareDeepLink"),e)},e.registerFullScreenHandler=function(e){Nn(o(gn,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Mt(e)&&!n())throw Fe}))},e.isSupported=n,function(e){e.navigateToTab=function(e){return wn(o(gn,"pages.tabs.navigateToTab"),e)},e.getTabInstances=function(e){return Cn(o(gn,"pages.tabs.getTabInstances"),e)},e.getMruTabInstances=function(e){return yn(o(gn,"pages.tabs.getMruTabInstances"),e)},e.isSupported=function(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.tabs}}(r=e.tabs||(e.tabs={})),function(e){let t,n;function r(e,n,r){!Mt(n)&&Tt(ct,be.settings),r&&r(),t=n,!Mt(n)&&ur(e,"registerHandler",["save"])}function i(e,t,r){!Mt(t)&&Tt(ct,be.remove,be.settings),r&&r(),n=t,!Mt(t)&&ur(e,"registerHandler",["remove"])}function a(e){const n=new s(e);t?t(n):Xn.childWindow?Nr("settings.save",[e]):n.notifySuccess()}e.initialize=function(){Ln(o(gn,"pages.config.registerSettingsSaveHandler"),"settings.save",a,!1),Ln(o(gn,"pages.config.registerSettingsRemoveHandler"),"settings.remove",l,!1)},e.setValidityState=function(e){return En(o(gn,"pages.config.setValidityState"),e)},e.setConfig=function(e){return An(o(gn,"pages.config.setConfig"),e)},e.registerOnSaveHandler=function(e){r(o(gn,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Mt(e)&&!u())throw Fe}))},e.registerOnSaveHandlerHelper=r,e.registerOnRemoveHandler=function(e){i(o(gn,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Mt(e)&&!u())throw Fe}))},e.registerOnRemoveHandlerHelper=i,e.registerChangeConfigHandler=function(e){Nn(o(gn,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[be.content],(()=>{if(!u())throw Fe}))};class s{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),ur(o(gn,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),ur(o(gn,"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 l(){const e=new c;n?n(e):Xn.childWindow?Nr("settings.remove",[]):e.notifySuccess()}class c{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),ur(o(gn,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),ur(o(gn,"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 u(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.config}e.isSupported=u}(i=e.config||(e.config={})),function(e){let t;function n(){return hn(o(gn,"pages.backStack.navigateBack"))}function r(e,n,r){!Mt(n)&&Tt(ct),r&&r(),t=n,!Mt(n)&&ur(e,"registerHandler",["backButton"])}function i(){t&&t()||(Xn.childWindow?Nr("backButtonPress",[]):n())}function a(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.backStack}e._initialize=function(){Ln(o(gn,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",i,!1)},e.navigateBack=n,e.registerBackButtonHandler=function(e){r(o(gn,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Mt(e)&&!a())throw Fe}))},e.registerBackButtonHandlerHelper=r,e.isSupported=a}(a=e.backStack||(e.backStack={})),function(e){function t(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.fullTrust}e.enterFullscreen=function(){if(Tt(ct,be.content),!t())throw Fe;ur(o(gn,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])},e.exitFullscreen=function(){if(Tt(ct,be.content),!t())throw Fe;ur(o(gn,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])},e.isSupported=t}(s=e.fullTrust||(e.fullTrust={})),function(e){function t(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.appButton}e.onClick=function(e){Nn(o(gn,"pages.appButton.onClick"),"appButtonClick",e,[be.content],(()=>{if(!t())throw Fe}))},e.onHoverEnter=function(e){Nn(o(gn,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[be.content],(()=>{if(!t())throw Fe}))},e.onHoverLeave=function(e){Nn(o(gn,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[be.content],(()=>{if(!t())throw Fe}))},e.isSupported=t}(l=e.appButton||(e.appButton={})),function(e){function t(){return!(!Tt(ct)||!ct.supports.pages)&&!!ct.supports.pages.currentApp}e.navigateTo=function(e){return new Promise((n=>{if(Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!t())throw Fe;n(ir(o(gn,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))},e.navigateToDefaultPage=function(){return new Promise((e=>{if(Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!t())throw Fe;e(ir(o(gn,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))},e.isSupported=t}(c=e.currentApp||(e.currentApp={}))}(In||(In={}));const Tn=t("handlers");class Fn{static initializeHandlers(){Fn.handlers.themeChange=xn,Fn.handlers.load=_n,Fn.handlers.beforeUnload=Bn,In.backStack._initialize()}static uninitializeHandlers(){Fn.handlers={},Fn.themeChangeHandler=null,Fn.loadHandler=null,Fn.beforeUnloadHandler=null,Fn.beforeSuspendOrTerminateHandler=null,Fn.resumeHandler=null}}function Rn(){Fn.initializeHandlers()}function On(){Fn.uninitializeHandlers()}Fn.handlers={},Fn.themeChangeHandler=null,Fn.loadHandler=null,Fn.beforeUnloadHandler=null,Fn.beforeSuspendOrTerminateHandler=null,Fn.resumeHandler=null;const kn=Tn.extend("callHandler");function Mn(e,t){const n=Fn.handlers[e];if(n){kn("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Xn.childWindow?(Nr(e,t),[!1,void 0]):(kn("Handler for action message %s not found.",e),[!1,void 0])}function Ln(e,t,n,r=!0,o=[]){n?(Fn.handlers[t]=n,r&&ur(e,"registerHandler",[t,...o])):delete Fn.handlers[t]}function Dn(e){delete Fn.handlers[e]}function Un(e){return null!=Fn.handlers[e]}function Nn(e,t,n,r,o){n&&Tt(ct,...r),o&&o(),Ln(e,t,n)}function Hn(e,t){Fn.themeChangeHandler=t,!Mt(t)&&ur(e,"registerHandler",["themeChange"])}function xn(e){Fn.themeChangeHandler&&Fn.themeChangeHandler(e),Xn.childWindow&&Nr("themeChange",[e])}function Vn(e,t){Fn.loadHandler=t,!Mt(t)&&ur(e,"registerHandler",["load"])}function _n(e){Fn.resumeHandler?Fn.resumeHandler(e):Fn.loadHandler&&Fn.loadHandler(e),Xn.childWindow&&Nr("load",[e])}function Wn(e,t){Fn.beforeUnloadHandler=t,!Mt(t)&&ur(e,"registerHandler",["beforeUnload"])}function Bn(){const e=()=>{ur(o("v2","handleBeforeUnload"),"readyToUnload",[])};Fn.beforeSuspendOrTerminateHandler?(Fn.beforeSuspendOrTerminateHandler(),Xn.childWindow?Nr("beforeUnload"):e()):Fn.beforeUnloadHandler&&Fn.beforeUnloadHandler(e)||(Xn.childWindow?Nr("beforeUnload"):e())}function jn(e){Fn.beforeSuspendOrTerminateHandler=e,!Mt(e)&&ur(o("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function zn(e){Fn.resumeHandler=e,!Mt(e)&&ur(o("v2","registerOnResumeHandler"),"registerHandler",["load"])}const qn=t("nestedAppAuthUtils"),Gn=qn.extend("tryPolyfillWithNestedAppAuthBridge");function $n(e,t,n){var r;const o=Gn;if(C.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=Kn(a,n);s&&(a.nestedAppAuthBridge=s)}const Jn=qn.extend("createNestedAppAuthBridge");function Kn(e,t){const n=Jn;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 Zn=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Qn=t("communication");class Xn{}class Yn{}function er(e,t){if(Yn.messageListener=e=>Zn(this,void 0,void 0,(function*(){return yield vr(e)})),Xn.currentWindow=Xn.currentWindow||$e(),Xn.parentWindow=Xn.currentWindow.parent!==Xn.currentWindow.self?Xn.currentWindow.parent:Xn.currentWindow.opener,Xn.topWindow=Xn.currentWindow.top,(Xn.parentWindow||e)&&Xn.currentWindow.addEventListener("message",Yn.messageListener,!1),!Xn.parentWindow){const e=Xn.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));C.isFramelessWindow=!0,e.onNativeMessage=Ar}try{return Xn.parentOrigin="*",ar(t,"initialize",[bt,it,e]).then((([e,t,n,r])=>($n(r,Xn.currentWindow,{onMessage:yr,sendPostMessage:fr}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Xn.parentOrigin=null}}function tr(){Xn.currentWindow&&Xn.currentWindow.removeEventListener("message",Yn.messageListener,!1),Xn.currentWindow=null,Xn.parentWindow=null,Xn.parentOrigin=null,Xn.childWindow=null,Xn.childOrigin=null,Yn.parentMessageQueue=[],Yn.childMessageQueue=[],Yn.nextMessageId=0,Yn.callbacks={},Yn.promiseCallbacks={},Yn.portCallbacks={}}function nr(e,t,...n){return ar(e,t,n).then((([e])=>e))}function rr(e,t,...n){return ar(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function or(e,t,n,...r){return ar(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function ir(e,t,...n){return ar(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function ar(e,t,n=void 0){if(!i(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(cr(hr(e,t,n).id))}))}function sr(e,t,n=void 0){if(!i(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 lr(hr(e,t,n).id)}function lr(e){return new Promise(((t,n)=>{Yn.portCallbacks[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 cr(e){return new Promise((t=>{Yn.promiseCallbacks[e]=t}))}function ur(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!i(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 a=hr(e,t,o);r&&(Yn.callbacks[a.id]=r)}Yn.parentMessageQueue=[],Yn.childMessageQueue=[],Yn.topMessageQueue=[],Yn.nextMessageId=0,Yn.callbacks={},Yn.promiseCallbacks={},Yn.portCallbacks={};const dr=Qn.extend("sendNestedAuthRequestToTopWindow");function fr(e){const t=dr,n=Xn.topWindow,r=xr(e);return t("Message %i information: %o",r.id,{actionName:r.func}),gr(n,r)}const pr=Qn.extend("sendRequestToTargetWindowHelper");function gr(e,t){const n=pr,r=kr(e);if(C.isFramelessWindow)Xn.currentWindow&&Xn.currentWindow.nativeInterface&&(n(`Sending message %i to ${r} via framelessPostMessage interface`,t.id),Xn.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(t)));else{const o=Or(e);e&&o?(n(`Sending message %i to ${r} via postMessage`,t.id),e.postMessage(t,o)):(n(`Adding message %i to ${r} message queue`,t.id),Rr(e).push(t))}return t}const mr=Qn.extend("sendMessageToParentHelper");function hr(e,t,n){const r=mr,o=Xn.parentWindow,i=Hr(e,t,n);return r("Message %i information: %o",i.id,{actionName:t,args:n}),gr(o,i)}const wr=Qn.extend("processMessage");function vr(e){return Zn(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void wr("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 br(t,n).then((r=>{r?(Er(t,n),t===Xn.parentWindow?Ar(e):t===Xn.childWindow&&Tr(e)):wr("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin")}))}))}const Cr=Qn.extend("processAuthBridgeMessage");function yr(e,t){var n,r;const o=Cr;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 l=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),c=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);l?br(l,c)?(Xn.topWindow&&!Xn.topWindow.closed&&l!==Xn.topWindow||(Xn.topWindow=l,Xn.topOrigin=c),Xn.topWindow&&Xn.topWindow.closed&&(Xn.topWindow=null,Xn.topOrigin=null),Lr(Xn.topWindow),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const Sr=Qn.extend("shouldProcessMessage");function br(e,t){return Zn(this,void 0,void 0,(function*(){if(Xn.currentWindow&&e===Xn.currentWindow)return Sr("Should not process message because it is coming from the current window"),!1;if(Xn.currentWindow&&Xn.currentWindow.location&&t&&t===Xn.currentWindow.location.origin)return!0;{const e=yield Wt(new URL(t));return e||Sr("Message has an invalid origin of %s",t),e}}))}function Er(e,t){C.isFramelessWindow||Xn.parentWindow&&!Xn.parentWindow.closed&&e!==Xn.parentWindow?Xn.childWindow&&!Xn.childWindow.closed&&e!==Xn.childWindow||(Xn.childWindow=e,Xn.childOrigin=t):(Xn.parentWindow=e,Xn.parentOrigin=t),Xn.parentWindow&&Xn.parentWindow.closed&&(Xn.parentWindow=null,Xn.parentOrigin=null),Xn.childWindow&&Xn.childWindow.closed&&(Xn.childWindow=null,Xn.childOrigin=null),Lr(Xn.parentWindow),Lr(Xn.childWindow)}const Pr=Qn.extend("handleParentMessage");function Ar(e){const t=Pr;if("id"in e.data&&"number"==typeof e.data.id){const n=e.data,r=Yn.callbacks[n.id];t("Received a response from parent for message %i",n.id),r&&(t("Invoking the registered callback for message %i with arguments %o",n.id,n.args),r.apply(null,[...n.args,n.isPartialResponse]),Ir(e)||(t("Removing registered callback for message %i",n.id),delete Yn.callbacks[n.id]));const o=Yn.promiseCallbacks[n.id];o&&(t("Invoking the registered promise callback for message %i with arguments %o",n.id,n.args),o(n.args),t("Removing registered promise callback for message %i",n.id),delete Yn.promiseCallbacks[n.id]);const i=Yn.portCallbacks[n.id];if(i){let r;t("Invoking the registered port callback for message %i with arguments %o",n.id,n.args),e.ports&&e.ports[0]instanceof MessagePort&&(r=e.ports[0]),i(r,n.args),t("Removing registered port callback for message %i",n.id),delete Yn.portCallbacks[n.id]}}else if("func"in e.data&&"string"==typeof e.data.func){const n=e.data;t("Received an action message %s from parent",n.func),Mn(n.func,n.args)}else t("Received an unknown message: %O",e)}function Ir(e){return!0===e.data.isPartialResponse}function Tr(e){if("id"in e.data&&"func"in e.data){const t=e.data,[n,r]=Mn(t.func,t.args);n&&void 0!==r?Ur(t.id,Array.isArray(r)?r:[r]):ur(o("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(Xn.childWindow){const n=e.pop();Ur(t.id,e,n)}}))}}function Fr(){return Xn.topWindow!==Xn.parentWindow}function Rr(e){return e===Xn.topWindow&&Fr()?Yn.topMessageQueue:e===Xn.parentWindow?Yn.parentMessageQueue:e===Xn.childWindow?Yn.childMessageQueue:[]}function Or(e){return e===Xn.topWindow&&Fr()?Xn.topOrigin:e===Xn.parentWindow?Xn.parentOrigin:e===Xn.childWindow?Xn.childOrigin:null}function kr(e){return e===Xn.topWindow&&Fr()?"top":e===Xn.parentWindow?"parent":e===Xn.childWindow?"child":null}const Mr=Qn.extend("flushMessageQueue");function Lr(e){const t=Or(e),n=Rr(e),r=kr(e);for(;e&&t&&n.length>0;){const o=n.shift();Mr("Flushing message %i from "+r+" message queue via postMessage.",null==o?void 0:o.id),e.postMessage(o,t)}}function Dr(e,t){let n;n=Xn.currentWindow.setInterval((()=>{0===Rr(e).length&&(clearInterval(n),t())}),100)}function Ur(e,t,n){const r=Xn.childWindow,o=Vr(e,t,n),i=Or(r);r&&i&&r.postMessage(o,i)}function Nr(e,t){const n=Xn.childWindow,r=_r(e,t),o=Or(n);n&&o?n.postMessage(r,o):Rr(n).push(r)}function Hr(e,t,n){return{id:Yn.nextMessageId++,func:t,timestamp:Date.now(),args:n||[],apiVersionTag:e}}function xr(e){return{id:Yn.nextMessageId++,func:"nestedAppAuth.execute",timestamp:Date.now(),args:[],data:e}}function Vr(e,t,n){return{id:e,args:t||[],isPartialResponse:n}}function _r(e,t){return{func:e,args:t||[]}}var Wr,Br,jr,zr;!function(e){function t(){return!(!Tt(ct)||!ct.supports.logs)}e.registerGetLogHandler=function(e){if(!Mt(e)&&Tt(ct),!Mt(e)&&!t())throw Fe;e?Ln(o("v1","log.request"),"log.request",(()=>{const t=e();ur(o("v1","log.receive"),"log.receive",[t])})):Dn("log.request")},e.isSupported=t}(Wr||(Wr={})),function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Br||(Br={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(jr||(jr={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(zr||(zr={}));const qr="v1";function Gr(e,t){Tt(ct),ur(o(qr,"uploadCustomApp"),"uploadCustomApp",[e],t||De())}function $r(e,t,n){Tt(ct),ur(o(qr,"sendCustomMessage"),e,t,n)}function Jr(e,t){if(Tt(ct),!Xn.childWindow)throw new Error("The child window has not yet been initialized or is not present");Nr(e,t)}function Kr(e,t){Tt(ct),Ln(o(qr,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Zr(e,t){Tt(ct),Ln(o(qr,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Qr(e){Tt(ct,be.content,be.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];ur(o(qr,"openFilePreview"),"openFilePreview",t)}const Xr="v1";var Yr;!function(e){function t(){return!(!Tt(ct)||!ct.supports.conversations)}e.openConversation=function(e){return new Promise((n=>{if(Tt(ct,be.content),!t())throw Fe;const r=rr(o(Xr,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Ln(o(Xr,"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&&Ln(o(Xr,"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})})),n(r)}))},e.closeConversation=function(){if(Tt(ct,be.content),!t())throw Fe;ur(o(Xr,"conversations.closeConversation"),"conversations.closeConversation"),Dn("startConversation"),Dn("closeConversation")},e.getChatMembers=function(){return new Promise((e=>{if(Tt(ct),!t())throw Fe;e(nr(o(Xr,"conversations.getChatMember"),"getChatMembers"))}))},e.isSupported=t}(Yr||(Yr={}));const eo="users";function to(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${eo}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&topicName=${encodeURIComponent(t)}`,i=void 0===n?"":`&message=${encodeURIComponent(n)}`;return`${g}://${m}/l/chat/0/0?${r}${o}${i}`}function no(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${eo}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&withVideo=${encodeURIComponent(t)}`,i=void 0===n?"":`&source=${encodeURIComponent(n)}`;return`${g}://${m}/l/call/0/0?${r}${o}${i}`}function ro(e,t,n,r,o){const i=void 0===e?"":"attendees="+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&startTime=${encodeURIComponent(t)}`,s=void 0===n?"":`&endTime=${encodeURIComponent(n)}`,l=void 0===r?"":`&subject=${encodeURIComponent(r)}`,c=void 0===o?"":`&content=${encodeURIComponent(o)}`;return`${g}://${m}/l/meeting/new?${i}${a}${s}${l}${c}`}function oo(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${g}://${m}/l/app/${encodeURIComponent(e)}`}var io;!function(e){function t(){return!(!Tt(ct)||!ct.supports.appInstallDialog)}e.openAppInstallDialog=function(e){return new Promise((n=>{if(Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!t())throw new Error("Not supported");const r=o("v1","appInstallDialog.openAppInstallDialog");ct.isLegacyTeams?n(rr(r,"executeDeepLink",oo(e.appId))):(ur(r,"appInstallDialog.openAppInstallDialog",[e]),n())}))},e.isSupported=t}(io||(io={}));const ao="v1",so=t("media");var lo;function co(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 uo(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 fo(e){ho(e)?Ot("2.0.2"):wo(e)?Ot(l):mo(e)&&Ot("2.0.4")}function po(e){return!(e.mediaType!=lo.MediaType.Video||!e.videoProps||!e.videoProps.videoController)}function go(e){return!(null==e||e.maxMediaCount>10)}function mo(e){var t;return!((null==e?void 0:e.mediaType)!=lo.MediaType.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function ho(e){return!(!e||e.mediaType!=lo.MediaType.VideoAndImage&&!e.videoAndImageProps)}function wo(e){return!(!e||e.mediaType!=lo.MediaType.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function vo(e,t,n){return null!=e&&null!=t&&t==lo.FileFormat.ID&&null!=n}function Co(e){return!(null==e||e.length<=0||e.length>10)}function yo(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function So(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){let t,n,r,i,a,s,c;!function(e){e.Base64="base64",e.ID="id"}(t=e.FileFormat||(e.FileFormat={}));class d{}function f(){return!(!Tt(ct)||!ct.supports.permissions)}e.File=d,e.captureImage=function(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Tt(ct,be.content,be.task),C.isFramelessWindow)if(Ft("1.7.0"))ur(o(ao,"media.captureImage"),"captureImage",e);else{e({errorCode:we.OLD_PLATFORM},[])}else{e({errorCode:we.NOT_SUPPORTED_ON_PLATFORM},[])}},e.hasPermission=function(){if(Tt(ct,be.content,be.task),!f())throw Fe;const e=ve.Media;return new Promise((t=>{t(ir(o(ao,"media.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Tt(ct,be.content,be.task),!f())throw Fe;const e=ve.Media;return new Promise((t=>{t(ir(o(ao,"media.requestPermission"),"permissions.request",e))}))};class p extends d{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(Tt(ct,be.content,be.task),Ft(u))if(vo(this.mimeType,this.format,this.content))Ft("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:we.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:we.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];ur(o(ao,"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=co(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=uo(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):so(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:we.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Ne(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Mt(e)&&ur(o(ao,"media.getMedia"),"getMedia",r),Ln(o(ao,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Dn("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=co(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Dn("getMedia"+t)}else{const e=uo(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:we.INTERNAL_ERROR,message:"data received is null"},new Blob),Dn("getMedia"+t)}}))}}e.Media=p;class g{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Tt(ct,be.content,be.task);try{Ot(l)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};ur(o(ao,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(n.StopRecording,e)}}e.VideoController=class extends g{getMediaType(){return a.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case n.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}},function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(n=e.MediaControllerEvent||(e.MediaControllerEvent={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(r=e.CameraStartMode||(e.CameraStartMode={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(i=e.Source||(e.Source={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(a=e.MediaType||(e.MediaType={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(s=e.ImageUriType||(e.ImageUriType={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(c=e.ImageOutputFormats||(e.ImageOutputFormats={})),e.selectMedia=function(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Tt(ct,be.content,be.task),!Ft(u)){const e={errorCode:we.OLD_PLATFORM};return void t(e,[])}try{fo(e)}catch(e){return void t(e,[])}if(!go(e)){const e={errorCode:we.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];ur(o(ao,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(po(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 p(e));t(n,s)}))},e.viewImages=function(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Tt(ct,be.content,be.task),!Ft(u)){return void t({errorCode:we.OLD_PLATFORM})}if(!Co(e)){return void t({errorCode:we.INVALID_ARGUMENTS})}const n=[e];ur(o(ao,"media.viewImages"),"viewImages",n,t)},e.scanBarCode=function(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Tt(ct,be.content,be.task),C.hostClientType!==ye.desktop&&C.hostClientType!==ye.web&&C.hostClientType!==ye.rigel&&C.hostClientType!==ye.teamsRoomsWindows&&C.hostClientType!==ye.teamsRoomsAndroid&&C.hostClientType!==ye.teamsPhones&&C.hostClientType!==ye.teamsDisplays)if(Ft("1.9.0"))if(yo(t))ur(o(ao,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:we.INVALID_ARGUMENTS},"")}else{e({errorCode:we.OLD_PLATFORM},"")}else{e({errorCode:we.NOT_SUPPORTED_ON_PLATFORM},"")}}}(lo||(lo={}));const bo="v2";var Eo;!function(e){function t(){return!!(Tt(ct)&&ct.supports.barCode&&ct.supports.permissions)}e.scanBarCode=function(e){return new Promise((n=>{if(Tt(ct,be.content,be.task),!t())throw Fe;if(!yo(e))throw{errorCode:we.INVALID_ARGUMENTS};n(ir(o(bo,"barCode.scanBarCode"),"media.scanBarCode",e))}))},e.hasPermission=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;const e=ve.Media;return new Promise((t=>{t(ir(o(bo,"barCode.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;const e=ve.Media;return new Promise((t=>{t(ir(o(bo,"barCode.requestPermission"),"permissions.request",e))}))},e.isSupported=t}(Eo||(Eo={}));var Po;!function(e){function t(e,t){return new Promise((r=>{if(Tt(ct,be.content,be.task),!n())throw Fe;if(ct.isLegacyTeams)r(rr(e,"executeDeepLink",to([t.user],void 0,t.message)));else{r(rr(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function n(){return!(!Tt(ct)||!ct.supports.chat)}e.openChat=function(e){return t(o("v2","chat.openChat"),e)},e.openGroupChat=function(e){const r=o("v2","chat.openGroupChat");return new Promise((o=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const n={user:e.users[0],message:e.message};o(t(r,n))}else{if(Tt(ct,be.content,be.task),!n())throw Fe;if(ct.isLegacyTeams)o(rr(r,"executeDeepLink",to(e.users,e.topic,e.message)));else{o(rr(r,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))},e.isSupported=n}(Po||(Po={}));var Ao=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};var Io,To;!function(e){function t(){return!!(Tt(ct)&&navigator&&navigator.clipboard&&ct.supports.clipboard)}e.write=function(e){return Ao(this,void 0,void 0,(function*(){if(Tt(ct,be.content,be.meetingStage,be.task,be.settings,be.stage,be.sidePanel),!t())throw Fe;if(!e.type||!Object.values(Ce).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Ce)}`);const n=yield Ge(e),r={mimeType:e.type,content:n};return ir(o("v2","clipboard.write"),"clipboard.writeToClipboard",r)}))},e.read=function(){return Ao(this,void 0,void 0,(function*(){Tt(ct,be.content,be.meetingStage,be.task,be.settings,be.stage,be.sidePanel);const e=o("v2","clipboard.read");if(!t())throw Fe;const n=yield ir(e,"clipboard.readFromClipboard");if("string"==typeof n){const e=JSON.parse(n);return qe(e.mimeType,e.content)}return n}))},e.isSupported=t}(Io||(Io={})),function(e){e.isNAAChannelRecommended=function(){var e;return null!==(e=Tt(ct)&&ct.isNAAChannelRecommended)&&void 0!==e&&e}}(To||(To={}));const Fo="v2";var Ro;function Oo(){return ct.hostVersionsInfo?ct.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}!function(e){function t(){return!!(Tt(ct)&&ct.supports.geoLocation&&ct.supports.permissions)}let n;e.getCurrentLocation=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;return ir(o(Fo,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})},e.hasPermission=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;const e=ve.GeoLocation;return new Promise((t=>{t(ir(o(Fo,"geoLocation.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;const e=ve.GeoLocation;return new Promise((t=>{t(ir(o(Fo,"geoLocation.requestPermission"),"permissions.request",e))}))},e.isSupported=t,function(e){function t(){return!!(Tt(ct)&&ct.supports.geoLocation&&ct.supports.geoLocation.map&&ct.supports.permissions)}e.chooseLocation=function(){if(Tt(ct,be.content,be.task),!t())throw Fe;return ir(o(Fo,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})},e.showLocation=function(e){if(Tt(ct,be.content,be.task),!t())throw Fe;if(!e)throw{errorCode:we.INVALID_ARGUMENTS};return ir(o(Fo,"geoLocation.showLocation"),"location.showLocation",e)},e.isSupported=t}(n=e.map||(e.map={}))}(Ro||(Ro={}));const ko="v1";class Mo{postMessage(e,t){Tt(ct),ur(o(ko,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||De())}addEventListener(e,t){Tt(ct),"message"===e&&Ln(o(ko,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Lo{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Tt(ct,be.task),ur(o(ko,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||De())}addEventListener(e,t){Tt(ct,be.task),"message"===e&&Ln(o(ko,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}var Do;!function(e){function t(){return!(!Tt(ct)||!ct.supports.secondaryBrowser)}e.open=function(e){if(Tt(ct,be.content),!t())throw Fe;if(!e||!ze(e))throw{errorCode:we.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return ir(o("v2","secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())},e.isSupported=t}(Do||(Do={}));var Uo;!function(e){function t(){return!(!Tt(ct)||!ct.supports.location)}e.getLocation=function(e,n){if(!n)throw new Error("[location.getLocation] Callback cannot be null");if(Tt(ct,be.content,be.task),!Ft(c))throw{errorCode:we.OLD_PLATFORM};if(!e)throw{errorCode:we.INVALID_ARGUMENTS};if(!t())throw Fe;ur(o("v1","location.getLocation"),"location.getLocation",[e],n)},e.showLocation=function(e,n){if(!n)throw new Error("[location.showLocation] Callback cannot be null");if(Tt(ct,be.content,be.task),!Ft(c))throw{errorCode:we.OLD_PLATFORM};if(!e)throw{errorCode:we.INVALID_ARGUMENTS};if(!t())throw Fe;ur(o("v1","location.showLocation"),"location.showLocation",[e],n)},e.isSupported=t}(Uo||(Uo={}));var No=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Ho="v1";var xo;!function(e){let t,n,r,i,a,s,l;function c(e,n){ur(o(Ho,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((r,i)=>{if(r&&null!=i)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(r)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${r.errorCode} ${r.message}`);if("boolean"!=typeof i)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Ln(o(Ho,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(n=>No(this,void 0,void 0,(function*(){try{const r=yield e.micMuteStateChangedCallback(n);d(r,r.isMicMuted===n.isMicMuted?t.HostInitiated:t.AppDeclinedToChange)}catch(e){d(n,t.AppFailedToChange)}}))));Ln(o(Ho,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),n(i)}))}function u(e,t){ur(o(Ho,"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");Un("meeting.micStateChanged")&&Dn("meeting.micStateChanged"),Un("meeting.audioDeviceSelectionChanged")&&Dn("meeting.audioDeviceSelectionChanged"),t(n)}))}function d(e,t){Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"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"}(t||(t={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(n=e.MeetingReactionType||(e.MeetingReactionType={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(r=e.MeetingType||(e.MeetingType={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(i=e.CallType||(e.CallType={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(a=e.SharingProtocol||(e.SharingProtocol={})),e.getIncomingClientAudioState=function(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)},e.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)},e.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage,be.settings,be.content),ur(o(Ho,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)},e.getMeetingDetailsVerbose=function(){var e,t,n;return No(this,void 0,void 0,(function*(){let r;Tt(ct,be.sidePanel,be.meetingStage,be.settings,be.content);try{const e=!0;r=yield ir(o("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)==i.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==i.OneOnOneCall)&&!r.details.originalCaller)throw new Error(we.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))},e.getAuthenticationTokenForAnonymousUser=function(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage,be.task),ur(o(Ho,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)},e.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Tt(ct,be.sidePanel),ur(o(Ho,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)},e.requestStartLiveStreaming=function(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Tt(ct,be.sidePanel),ur(o(Ho,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)},e.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Tt(ct,be.sidePanel),ur(o(Ho,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)},e.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Tt(ct,be.sidePanel),Ln(o(Ho,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)},e.shareAppContentToStage=function(e,t,n={sharingProtocol:a.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)},e.getAppContentStageSharingCapabilities=function(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)},e.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)},e.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Tt(ct,be.sidePanel,be.meetingStage),ur(o(Ho,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)},e.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Tt(ct,be.sidePanel,be.meetingStage),Ln(o(Ho,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)},e.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Tt(ct,be.sidePanel,be.meetingStage),Ln(o(Ho,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)},e.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Tt(ct,be.sidePanel,be.meetingStage),Ln(o(Ho,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)},e.joinMeeting=function(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Tt(ct);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||s.Other};return ir(o("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)},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"}(s=e.EventActionSource||(e.EventActionSource={})),function(e){e.setOptions=function(e){Tt(ct,be.sidePanel),e.contentUrl&&new URL(e.contentUrl),ur(o(Ho,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}}(l=e.appShareButton||(e.appShareButton={})),e.requestAppAudioHandling=function(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");Tt(ct,be.sidePanel,be.meetingStage),e.isAppHandlingAudio?c(e,t):u(e,t)},e.updateMicState=function(e){d(e,t.AppInitiated)}}(xo||(xo={}));var Vo;!function(e){function t(){return!(!Tt(ct)||!ct.supports.monetization)}e.openPurchaseExperience=function(e,n){let r,i,a="";return"function"==typeof e?(r=e,i=n,a=o("v1","monetization.openPurchaseExperience")):(i=e,a=o("v2","monetization.openPurchaseExperience")),Tt(ct,be.content),_e((()=>new Promise((e=>{if(!t())throw Fe;e(ir(a,"monetization.openPurchaseExperience",i))}))),r)},e.isSupported=t}(Vo||(Vo={}));var _o;!function(e){function t(){return!(!Tt(ct)||!ct.supports.calendar)}e.openCalendarItem=function(e){return new Promise((n=>{if(Tt(ct,be.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");n(rr(o("v2","calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))},e.composeMeeting=function(e){return new Promise((n=>{if(Tt(ct,be.content),!t())throw new Error("Not supported");const r=o("v2","calendar.composeMeeting");ct.isLegacyTeams?n(rr(r,"executeDeepLink",ro(e.attendees,e.startTime,e.endTime,e.subject,e.content))):n(rr(r,"calendar.composeMeeting",e))}))},e.isSupported=t}(_o||(_o={}));var Wo;!function(e){function t(){return!(!Tt(ct)||!ct.supports.mail)}let n;e.openMailItem=function(e){return new Promise((n=>{if(Tt(ct,be.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");n(rr(o("v2","mail.openMailItem"),"mail.openMailItem",e))}))},e.composeMail=function(e){return new Promise((n=>{if(Tt(ct,be.content),!t())throw new Error("Not supported");n(rr(o("v2","mail.composeMail"),"mail.composeMail",e))}))},e.isSupported=t,function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(n=e.ComposeMailType||(e.ComposeMailType={}))}(Wo||(Wo={}));var Bo;!function(e){function t(){$e().print()}function n(e,t,n){!Mt(t)&&Tt(ct),!Mt(t)&&n&&n(),Vn(e,t)}function r(e,t,n){!Mt(t)&&Tt(ct),!Mt(t)&&n&&n(),Wn(e,t)}function i(){return!(!Tt(ct)||!ct.supports.teamsCore)}e.enablePrintCapability=function(){if(!C.printCapabilityEnabled){if(Tt(ct),!i())throw Fe;C.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(t(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}},e.print=t,e.registerOnLoadHandler=function(e){n(o("v2","teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Mt(e)&&!i())throw Fe}))},e.registerOnLoadHandlerHelper=n,e.registerBeforeUnloadHandler=function(e){r(o("v2","teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Mt(e)&&!i())throw Fe}))},e.registerBeforeUnloadHandlerHelper=r,e.isSupported=i}(Bo||(Bo={}));var jo;function zo(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?qo(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function qo(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"]}!function(e){function t(e,t){return new Promise((r=>{if(!Ft("2.0.0"))throw{errorCode:we.OLD_PLATFORM};if(!So(t))throw{errorCode:we.INVALID_ARGUMENTS};if(!n())throw Fe;r(ir(e,"people.selectPeople",t))}))}function n(){return!(!Tt(ct)||!ct.supports.people)}e.selectPeople=function(e,n){let r,i;Tt(ct,be.content,be.task,be.settings);let a="";return"function"==typeof e?([r,i]=[e,n],a=o("v1","people.selectPeople")):(i=e,a=o("v2","people.selectPeople")),xe(t,r,a,i)},e.isSupported=n}(jo||(jo={}));var Go;!function(e){e.showProfile=function(e){return Tt(ct,be.content),new Promise((t=>{const[n,r]=zo(e);if(!n)throw{errorCode:we.INVALID_ARGUMENTS,message:r};const i={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(ir(o("v2","profile.showProfile"),"profile.showProfile",i))}))},e.isSupported=function(){return!(!Tt(ct)||!ct.supports.profile)}}(Go||(Go={}));var $o=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Jo="v2";function Ko(e,t,n,r){var o,i;return $o(this,void 0,void 0,(function*(){const a=Xo();!Je()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Yo(yield Qo(e,n,r),new ei(n,t),a.writable)}))}function Zo(e,t,n,r){var o,i;return $o(this,void 0,void 0,(function*(){const a=Xo();!Je()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Yo(yield Qo(e,n,r),new ri(n,t),a.writable)}))}function Qo(e,t,n){return $o(this,void 0,void 0,(function*(){if(Je())throw Fe;const r=$e().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 Xo(){if(Je())throw Fe;const e=window.MediaStreamTrackGenerator;if(!e)throw Fe;return new e({kind:"video"})}function Yo(e,t,n){new(0,$e().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class ei{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>$o(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 ti{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 ni{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161;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)}}class ri{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>$o(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o}={}}=yield this.extractVideoFrameAndMetadata(e),i=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o}),a=new VideoFrame(i,{timestamp:n});t.enqueue(a),r.close(),e.close(),i.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>$o(this,void 0,void 0,(function*(){if(Je())throw Fe;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 ti(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 ni(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}}})),Ln(o(Jo,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function oi(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),ur(o(Jo,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in fi.EffectFailureReason?e:fi.EffectFailureReason.InitializationFailure;ur(o(Jo,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}class ii{static setTimeout(e,t){const n=performance.now(),r=Ne();return ii.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete ii.setTimeoutCallbacks[e]}static setInterval(e,t){ii.setTimeout((function n(){e(),ii.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in ii.setTimeoutCallbacks){const r=ii.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){ii.setTimeoutCallbacks[e].callback(),delete ii.setTimeoutCallbacks[e]}}}ii.setTimeoutCallbacks={};class ai{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){ii.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&&ii.clearTimeout(this.timeoutId),this.timeoutId=ii.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(ai.maxSessionTimeoutInMs,2*t.timeoutInMs):ai.initialSessionTimeoutInMs}}ai.initialSessionTimeoutInMs=1e3,ai.maxSessionTimeoutInMs=3e4;const si="v2";class li{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new ai(li.distributionBinSize,(e=>this.reportPerformanceEvent(o(si,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){ii.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(o(si,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),li.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){ii.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(o(si,"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(o(si,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}li.distributionBinSize=1e3,li.calculateFPSInterval=1e3;var ci=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))},ui=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 di="v2";var fi;!function(e){const t=Je()?void 0:new li(ur);let n,r,i;function a(e){ur(o(di,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function s(e){ur(o(di,"videoEffects.notifyError"),"video.notifyError",[e])}function l(){return Tt(ct)&&!!ct.supports.video&&(!!ct.supports.video.mediaStream||!!ct.supports.video.sharedFrame)}function c(e,n){if(Tt(ct,be.sidePanel),!l()||!p())throw Fe;Ln(o(di,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>ci(this,void 0,void 0,(function*(){const{streamId:r}=n,o=u(e,t);yield Ko(r,o,s,t)}))),!1),ur(o(di,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n])}function u(e,t){return n=>ci(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 d(e,n){if(Tt(ct,be.sidePanel),!l()||!m())throw Fe;Ln(o(di,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(n=>{if(n){const r=n.timestamp;null==t||t.reportStartFrameProcessing(n.width,n.height),e(f(n),(()=>{null==t||t.reportFrameProcessed(),a(r)}),s)}}),!1),ur(o(di,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[n])}function f(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=ui(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function p(){var e;return Tt(ct,be.sidePanel)&&g()&&!!(null===(e=ct.supports.video)||void 0===e?void 0:e.mediaStream)}function g(){var e,t,n,r;return!(!(null===(t=null===(e=$e().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=$e().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function m(){var e;return Tt(ct,be.sidePanel)&&!!(null===(e=ct.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(n=e.VideoFrameFormat||(e.VideoFrameFormat={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(r=e.EffectChangeType||(e.EffectChangeType={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(i=e.EffectFailureReason||(e.EffectFailureReason={})),e.registerForVideoFrame=function(e){if(Tt(ct,be.sidePanel),!l())throw Fe;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Ln(o(di,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e.timeLimit)),!1),p())c(e.videoFrameHandler,e.config);else{if(!m())throw Fe;d(e.videoBufferHandler,e.config)}null==t||t.startMonitorSlowFrameProcessing()},e.notifySelectedVideoEffectChanged=function(e,t){if(Tt(ct,be.sidePanel),!l())throw Fe;ur(o(di,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])},e.registerForVideoEffect=function(e){if(Tt(ct,be.sidePanel),!l())throw Fe;Ln(o(di,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",oi(e,t),!1),ur(o(di,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")},e.isSupported=l}(fi||(fi={}));const pi="v2";var gi;!function(e){const t="search.queryChange",n="search.queryClose",r="search.queryExecute";function i(){return!(!Tt(ct)||!ct.supports.search)}e.registerHandlers=function(e,a,s){if(Tt(ct,be.content),!i())throw Fe;Ln(o(pi,"search.registerOnClosedHandler"),n,e),Ln(o(pi,"search.registerOnExecutedHandler"),r,a),s&&Ln(o(pi,"search.registerOnChangeHandler"),t,s)},e.unregisterHandlers=function(){if(Tt(ct,be.content),!i())throw Fe;ur(o(pi,"search.unregisterHandlers"),"search.unregister"),Dn(t),Dn(n),Dn(r)},e.isSupported=i,e.closeSearch=function(){return new Promise((e=>{if(Tt(ct,be.content),!i())throw new Error("Not supported");e(rr(o(pi,"search.closeSearch"),"search.closeSearch"))}))}}(gi||(gi={}));var mi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};var hi;!function(e){function t(t,n){return new Promise((r=>{if(!a())throw Fe;r(ir(t,e.SharingAPIMessages.shareWebContent,n))}))}function n(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:we.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function r(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:we.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:we.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function i(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:we.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:we.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function a(){return!(!Tt(ct)||!ct.supports.sharing)}let s;e.SharingAPIMessages={shareWebContent:"sharing.shareWebContent"},e.shareWebContent=function(e,a){try{n(e),r(e),i(e)}catch(e){return Ve((()=>Promise.reject(e)),a)}return Tt(ct,be.content,be.sidePanel,be.task,be.stage,be.meetingStage),Ve(t,a,o(a?"v1":"v2","sharing.shareWebContent"),e)},e.isSupported=a,function(e){function t(){var e;return Tt(ct)&&void 0!==(null===(e=ct.supports.sharing)||void 0===e?void 0:e.history)}e.getContent=function(){return mi(this,void 0,void 0,(function*(){if(Tt(ct,be.sidePanel,be.meetingStage),!t())throw Fe;const e=yield ir(o("v2","sharing.history.getContent"),"sharing.history.getContent");return e.map((e=>{nt(e.author),nt(e.threadId)})),e}))},e.isSupported=t}(s=e.history||(e.history={}))}(hi||(hi={}));var wi;!function(e){let t;function n(){return!(!Tt(ct)||!ct.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(t=e.StageViewOpenMode||(e.StageViewOpenMode={})),e.open=function(e){return new Promise((t=>{if(Tt(ct,be.content),!n())throw Fe;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(ir(o("v2","stageView.open"),"stageView.open",e))}))},e.isSupported=n}(wi||(wi={}));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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Ci="v2";var yi;!function(e){let t,n,r;!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(t=e.CameraRestriction||(e.CameraRestriction={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(n=e.Source||(e.Source={})),e.hasPermission=function(){if(Tt(ct,be.content,be.task),!r.isSupported())throw Fe;const e=ve.Media;return ir(o(Ci,"visualMedia.hasPermission"),"permissions.has",e)},e.requestPermission=function(){if(Tt(ct,be.content,be.task),!r.isSupported())throw Fe;const e=ve.Media;return ir(o(Ci,"visualMedia.requestPermission"),"permissions.request",e)},function(e){function t(){return!!(Tt(ct)&&ct.supports.visualMedia&&ct.supports.visualMedia.image&&ct.supports.permissions)}function n(){if(!t())throw Fe}function r(e){if(!e||e.maxVisualMediaCount>10||e.maxVisualMediaCount<1)throw Me}function i(e,t){if(t.length>e)throw Le}e.captureImages=function(e){return vi(this,void 0,void 0,(function*(){Tt(ct,be.content,be.task),n(),r(e);const t=yield ir(o(Ci,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return i(e.maxVisualMediaCount,t),t}))},e.retrieveImages=function(e){return vi(this,void 0,void 0,(function*(){Tt(ct,be.content,be.task),n(),r(e);const t=yield ir(o(Ci,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return i(e.maxVisualMediaCount,t),t}))},e.isSupported=t}(r=e.image||(e.image={}))}(yi||(yi={}));var Si,bi=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};!function(e){function t(){return Tt(ct)&&void 0!==ct.supports.webStorage}e.isWebStorageClearedOnUserLogOut=function(){return bi(this,void 0,void 0,(function*(){if(Tt(ct),!t())throw Fe;return yield nr(o("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut")}))},e.isSupported=t}(Si||(Si={}));var Ei;!function(e){let t;function n(){return!(!Tt(ct)||!ct.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(t=e.CallModalities||(e.CallModalities={})),e.startCall=function(e){const r=o("v2","call.startCall");return new Promise((o=>{var i;if(Tt(ct,be.content,be.task),!n())throw Fe;if(!ct.isLegacyTeams)return ur(r,"call.startCall",[e],o);o(nr(r,"executeDeepLink",no(e.targets,null===(i=e.requestedModalities)||void 0===i?void 0:i.includes(t.Video),e.source)).then((e=>{if(!e)throw new Error("The call was not properly started");return e})))}))},e.isSupported=n}(Ei||(Ei={}));const Pi="v1";var Ai;!function(e){e.Messages=fn.Messages,e.FailedReason=fn.FailedReason,e.ExpectedFailureReason=fn.ExpectedFailureReason,e.notifyAppLoaded=function(){rn(o(Pi,"appInitialization.notifyAppLoaded"))},e.notifySuccess=function(){sn(o(Pi,"appInitialization.notifySuccess"))},e.notifyFailure=function(e){an(o(Pi,"appInitialization.notifyFailure"),e)},e.notifyExpectedFailure=function(e){on(o(Pi,"appInitialization.notifyExpectedFailure"),e)}}(Ai||(Ai={}));const Ii=t("thirdPartyCloudStorage");var Ti;!function(e){class t{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let n=[],r=null,i=!0,a=null;function s(e){if(a)if(e&&e.error)a([],e.error),a=null;else if(e&&e.fileChunk)try{i||0!==e.fileChunk.chunkSequence||(Ii("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),i=!0,a([],{errorCode:we.INTERNAL_ERROR,message:"error occurred while receiving data"}),n=[],a=null);const o=uo(e.fileChunk,e.fileType);if(o?(r||(r=new t(e.fileType,[])),r.assembleAttachment.push(o)):(Ii(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),a?a([],{errorCode:we.INTERNAL_ERROR,message:"error occurred while receiving data"}):a=null,n=[],a=null,i=!0),i=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&r){const t=co(r.assembleAttachment,r.fileType);if(t){const r=new File([t],e.fileName,{type:t.type});n.push(r)}e.isLastFile&&a&&(a(n,e.error),n=[],a=null,i=!0),r=null}}catch(e){a&&(a([],{errorCode:we.INTERNAL_ERROR,message:e}),n=[],a=null,i=!0)}else a([],{errorCode:we.INTERNAL_ERROR,message:"data received is null"}),n=[],a=null,i=!0}function l(){return!(!Tt(ct)||!ct.supports.thirdPartyCloudStorage)}e.getDragAndDropFiles=function(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Tt(ct,be.content,be.task),!l())throw Fe;if(a)throw a=null,new Error("getDragAndDropFiles cannot be called twice");a=t,i=!0,ur(o("v2","thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],s)}else{t([],{errorCode:we.INVALID_ARGUMENTS})}},e.isSupported=l}(Ti||(Ti={}));const Fi="v1";function Ri(e,t){nn(o(Fi,"initialize"),t).then((()=>{e&&e()}))}function Oi(){Bo.enablePrintCapability()}function ki(){Bo.print()}function Mi(e){It(),ur(o(Fi,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=C.frameContext),e(t)}))}function Li(e){un(o(Fi,"registerOnThemeChangeHandlerHelper"),e)}function Di(e){Nn(o(Fi,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Ui(e){Nn(o(Fi,"registerAppButtonClickHandler"),"appButtonClick",e,[be.content])}function Ni(e){Nn(o(Fi,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[be.content])}function Hi(e){Nn(o(Fi,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[be.content])}function xi(e){In.backStack.registerBackButtonHandlerHelper(o(Fi,"registerBackButtonHandler"),e)}function Vi(e){Bo.registerOnLoadHandlerHelper(o(Fi,"registerOnLoadHandler"),e)}function _i(e){Bo.registerBeforeUnloadHandlerHelper(o(Fi,"registerBeforeUnloadHandler"),e)}function Wi(e){Nn(o(Fi,"registerFocusEnterHandler"),"focusEnter",e,[])}function Bi(e){Nn(o(Fi,"registerChangeSettingsHandler"),"changeSettings",e,[be.content])}function ji(e,t){Tt(ct),Cn(o(Fi,"getTabInstances"),t).then((t=>{e(t)}))}function zi(e,t){Tt(ct),yn(o(Fi,"getMruTabInstances"),t).then((t=>{e(t)}))}function qi(e){Sn(o(Fi,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Gi(e,t){Tt(ct,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage);const n=null!=t?t:De();dn(o(Fi,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function $i(e){bn(o(Fi,"setFrameContext"),e)}function Ji(e,t,n){nn(o(Fi,"initializeWithFrameContext"),n).then((()=>t&&t())),bn(o(Fi,"setFrameContext"),e)}const Ki="v1";function Zi(e){vn(o(Ki,"navigation.returnFocus"),e)}function Qi(e,t){Tt(ct);const n=null!=t?t:De();wn(o(Ki,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Xi(e,t){Tt(ct,be.content,be.sidePanel,be.settings,be.remove,be.task,be.stage,be.meetingStage);const n=null!=t?t:De();mn(o(Ki,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Yi(e){Tt(ct);const t=null!=e?e:De();hn(o(Ki,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const ea="v1";var ta;!function(e){e.setValidityState=function(e){En(o(ea,"settings.setValidityState"),e)},e.getSettings=function(e){Tt(ct,be.content,be.settings,be.remove,be.sidePanel),Pn(o(ea,"settings.getSettings")).then((t=>{e(t)}))},e.setSettings=function(e,t){Tt(ct,be.content,be.settings,be.sidePanel);const n=null!=t?t:De();An(o(ea,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))},e.registerOnSaveHandler=function(e){In.config.registerOnSaveHandlerHelper(o(ea,"settings.registerOnSaveHandler"),e)},e.registerOnRemoveHandler=function(e){In.config.registerOnRemoveHandlerHelper(o(ea,"settings.registerOnRemoveHandler"),e)}}(ta||(ta={}));var na=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 ra="v1";var oa;!function(e){function t(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:Te.Small,width:e.width?e.width:Te.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function n(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:Te.Small,width:e.width?e.width:Te.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function r(e){return e.height=e.height?e.height:Te.Small,e.width=e.width?e.width:Te.Small,e}e.startTask=function(e,r){const i=o(ra,"tasks.startTask"),a=r?e=>{var t,n;return r(null!==(t=e.err)&&void 0!==t?t:"",null!==(n=e.result)&&void 0!==n?n:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(Tt(ct,be.content,be.sidePanel,be.meetingStage),ur(i,"tasks.startTask",[e],r)):void 0!==e.completionBotId?Jt(i,n(e),a):$t(i,t(e),a),new Mo},e.updateTask=function(e){e=r(e);const{width:t,height:n}=e,i=na(e,["width","height"]);if(Object.keys(i).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Gt(o(ra,"tasks.updateTask"),e)},e.submitTask=function(e,t){Kt(o(ra,"tasks.submitTask"),e,t)},e.getDefaultSizeIfNotProvided=r}(oa||(oa={}));const ia="v2";var aa;!function(e){let t,n;!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(t=e.UserMeetingRole||(e.UserMeetingRole={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(n=e.ContainerState||(e.ContainerState={})),e.isSupported=function(){return!(!Tt(ct,be.meetingStage,be.sidePanel,be.content)||!ct.supports.interactive)}}(aa||(aa={}));class sa{getFluidTenantInfo(){return la(),new Promise((e=>{e(ir(o(ia,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return la(),new Promise((t=>{t(ir(o(ia,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return la(),new Promise((e=>{e(ir(o(ia,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return la(),new Promise((t=>{t(ir(o(ia,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return la(),new Promise((e=>{e(ir(o(ia,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return la(),new Promise((t=>{t(ir(o(ia,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return la(),new Promise((t=>{t(ir(o(ia,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return la(),new Promise((t=>{t(ir(o(ia,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return la(),new sa}}function la(){if(!aa.isSupported())throw new Error("LiveShareHost Not supported")}var ca=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 ua(e){try{return e.cartItems=da(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function da(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=da(e.accessories)),e}))}const fa=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=ca(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=fa(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function pa(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)ma(t),ga(t.accessories)}function ga(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");ma(t)}}}function ma(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");wa(e.price),va(e.quantity)}function ha(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===pe(e))throw new Error("id must be a valid UUID")}}function wa(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 va(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Ca(e){if(!Object.values(Sa.CartStatus).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const ya="v2";var Sa;!function(e){let t,n;function r(){return!(!Tt(ct)||!ct.supports.marketplace)}e.cartVersion={majorVersion:1,minorVersion:1},function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(t=e.Intent||(e.Intent={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(n=e.CartStatus||(e.CartStatus={})),e.getCart=function(){if(Tt(ct,be.content,be.task),!r())throw Fe;return ir(o(ya,"marketplace.getCart"),"marketplace.getCart",e.cartVersion).then(ua)},e.addOrUpdateCartItems=function(t){if(Tt(ct,be.content,be.task),!r())throw Fe;if(!t)throw new Error("addOrUpdateCartItemsParams must be provided");return ha(null==t?void 0:t.cartId),pa(null==t?void 0:t.cartItems),ir(o(ya,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},t),{cartItems:fa(t.cartItems),cartVersion:e.cartVersion})).then(ua)},e.removeCartItems=function(t){if(Tt(ct,be.content,be.task),!r())throw Fe;if(!t)throw new Error("removeCartItemsParams must be provided");if(ha(null==t?void 0:t.cartId),!Array.isArray(null==t?void 0:t.cartItemIds)||0===(null==t?void 0:t.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return ir(o(ya,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(ua)},e.updateCartStatus=function(t){if(Tt(ct,be.content,be.task),!r())throw Fe;if(!t)throw new Error("updateCartStatusParams must be provided");return ha(null==t?void 0:t.cartId),Ca(null==t?void 0:t.cartStatus),ir(o(ya,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(ua)},e.isSupported=r}(Sa||(Sa={}));const ba="v2";var Ea;!function(e){const t="Action.Execute";let n,r,i;function a(e){if(e.requestType===n.ActionExecuteInvokeRequest){const n=e;if(n.type!==t){throw{errorCode:i.INTERNAL_ERROR,message:`Invalid action type ${n.type}. Action type must be "${t}"`}}}else if(e.requestType===n.QueryMessageExtensionRequest){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 s(){return!(!Tt(ct)||!ct.supports.externalAppAuthentication)}!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(n=e.OriginalRequestType||(e.OriginalRequestType={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(r=e.InvokeResponseType||(e.InvokeResponseType={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(i=e.InvokeErrorCode||(e.InvokeErrorCode={})),e.authenticateAndResendRequest=function(e,t,n){if(Tt(ct,be.content),!s())throw Fe;return Ke(e,new Error("App id is not valid.")),a(n),ar(o(ba,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[e,n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},e.authenticateWithSSO=function(e,t){if(Tt(ct,be.content),!s())throw Fe;return Ke(e,new Error("App id is not valid.")),ar(o(ba,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[e,t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithSSOAndResendRequest=function(e,t,n){if(Tt(ct,be.content),!s())throw Fe;return Ke(e,new Error("App id is not valid.")),a(n),ar(o(ba,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[e,n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},e.authenticateWithOauth2=function(e,t,n){if(Tt(ct,be.content),!s())throw Fe;return Ke(e,new Error("titleId is Invalid.")),Ke(t,new Error("oauthConfigId is Invalid.")),ar(o(ba,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithPowerPlatformConnectorPlugins=function(e,t,n){if(Tt(ct,be.content),!s())throw Fe;return Ke(e,new Error("titleId is Invalid.")),t&&Ze(t),ar(o(ba,"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}))},e.isSupported=s}(Ea||(Ea={}));var Pa;!function(e){let t,n;function r(){return!(!Tt(ct)||!ct.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(t=e.ActionOpenUrlType||(e.ActionOpenUrlType={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(n=e.ActionOpenUrlErrorCode||(e.ActionOpenUrlErrorCode={})),e.processActionSubmit=function(e,t){if(Tt(ct,be.content),!r())throw Fe;return Ke(e,new Error("App id is not valid.")),ar(o("v2","externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[e,t]).then((([e,t])=>{if(!e)throw t}))},e.processActionOpenUrl=function(e,t,n){if(Tt(ct,be.content),!r())throw Fe;return Ke(e,new Error("App id is not valid.")),ar(o("v2","externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[e,t.href,n]).then((([e,t])=>{if(e)throw e;return t}))},e.isSupported=r}(Pa||(Pa={}));var Aa=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};var Ia;!function(e){function t(){return!(!Tt(ct)||!ct.supports.externalAppCommands)}e.processActionCommand=function(e,n,r){return Aa(this,void 0,void 0,(function*(){if(Tt(ct,be.content),!t())throw Fe;Ke(e,new Error("App id is not valid."));const[i,a]=yield ar(o("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[e,n,r]);if(i)throw i;return a}))},e.isSupported=t}(Ia||(Ia={}));const Ta="v1";var Fa;!function(e){let t,n,r,i,a,s;function l(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"}(t=e.CloudStorageProvider||(e.CloudStorageProvider={})),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"}(n=e.CloudStorageProviderType||(e.CloudStorageProviderType={})),function(e){e.ClassMaterials="classMaterials"}(r=e.SpecialDocumentLibraryType||(e.SpecialDocumentLibraryType={})),function(e){e.Readonly="readonly"}(i=e.DocumentLibraryAccessType||(e.DocumentLibraryAccessType={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(a=e.FileDownloadStatus||(e.FileDownloadStatus={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(s=e.CloudStorageProviderFileAction||(e.CloudStorageProviderFileAction={})),e.getCloudStorageFolders=function(e,t){if(Tt(ct,be.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");ur(o(Ta,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)},e.addCloudStorageFolder=function(e,t){if(Tt(ct,be.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");ur(o(Ta,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)},e.deleteCloudStorageFolder=function(e,t,n){if(Tt(ct,be.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");ur(o(Ta,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)},e.getCloudStorageFolderContents=function(e,t,n){if(Tt(ct,be.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");ur(o(Ta,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)},e.openCloudStorageFile=function(e,t,n){if(Tt(ct,be.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");ur(o(Ta,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])},e.getExternalProviders=function(e=!1,t){if(Tt(ct,be.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");ur(o(Ta,"files.getExternalProviders"),"files.getExternalProviders",[e],t)},e.copyMoveFiles=function(e,t,n,r,i=!1,a){if(Tt(ct,be.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(!a)throw new Error("[files.copyMoveFiles] callback cannot be null");ur(o(Ta,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,i],a)},e.getFileDownloads=function(e){if(Tt(ct,be.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");ur(o(Ta,"files.getFileDownloads"),"files.getFileDownloads",[],e)},e.openDownloadFolder=function(e=void 0,t){if(Tt(ct,be.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");ur(o(Ta,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)},e.addCloudStorageProvider=function(e){if(Tt(ct,be.content),!e)throw l(we.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");ur(o(Ta,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)},e.removeCloudStorageProvider=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw l(we.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");ur(o(Ta,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)},e.addCloudStorageProviderFile=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw l(we.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");ur(o(Ta,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)},e.renameCloudStorageProviderFile=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw l(we.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");ur(o(Ta,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)},e.deleteCloudStorageProviderFile=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw l(we.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");ur(o(Ta,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)},e.downloadCloudStorageProviderFile=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw l(we.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");ur(o(Ta,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)},e.uploadCloudStorageProviderFile=function(e,t){if(Tt(ct,be.content),!t)throw l(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw l(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw l(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");ur(o(Ta,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)},e.registerCloudStorageProviderListChangeHandler=function(e){if(Tt(ct),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Ln(o(Ta,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)},e.registerCloudStorageProviderContentChangeHandler=function(e){if(Tt(ct),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Ln(o(Ta,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}}(Fa||(Fa={}));const Ra="v1";var Oa;!function(e){function t(){return!(!Tt(ct)||!ct.supports.meetingRoom)}e.getPairedMeetingRoomInfo=function(){return new Promise((e=>{if(Tt(ct),!t())throw Fe;e(ir(o(Ra,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))},e.sendCommandToPairedMeetingRoom=function(e){return new Promise((n=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Tt(ct),!t())throw Fe;n(ir(o(Ra,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))},e.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Tt(ct),!t())throw Fe;Ln(o(Ra,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Tt(ct),e(t)}))},e.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Tt(ct),!t())throw Fe;Ln(o(Ra,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Tt(ct),e(t)}))},e.isSupported=t}(Oa||(Oa={}));var ka,Ma=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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};!function(e){let n,r;!function(e){let n;const r=t("messageChannels.telemetry");function i(){var e;return!(!Tt(ct)||!(null===(e=ct.supports.messageChannels)||void 0===e?void 0:e.telemetry))}e.getTelemetryPort=function(){return Ma(this,void 0,void 0,(function*(){if(n)return r("Returning telemetry port from cache"),n;if(!i())throw Fe;return n=yield sr(o("v1","messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),n}))},e.isSupported=i,e._clearTelemetryPort=function(){n=void 0}}(n=e.telemetry||(e.telemetry={})),function(e){let n;const r=t("messageChannels.dataLayer");function i(){var e;return!(!Tt(ct)||!(null===(e=ct.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}e.getDataLayerPort=function(){return Ma(this,void 0,void 0,(function*(){if(n)return r("Returning dataLayer port from cache"),n;if(!i())throw Fe;return n=yield sr(o("v1","messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),n}))},e.isSupported=i,e._clearDataLayerPort=function(){n=void 0}}(r=e.dataLayer||(e.dataLayer={})),e.isSupported=function(){return!(!Tt(ct)||!ct.supports.messageChannels)}}(ka||(ka={}));var La,Da;!function(e){function t(){return!(!Tt(ct)||!ct.supports.notifications)}e.showNotification=function(e){if(Tt(ct,be.content),!t())throw Fe;ur(o("v1","notifications.showNotification"),"notifications.showNotification",[e])},e.isSupported=t}(La||(La={})),function(e){function t(){return!(!Tt(ct)||!ct.supports.otherAppStateChange)}e.registerAppInstallationHandler=function(e){if(!t())throw new Error(we.NOT_SUPPORTED_ON_PLATFORM.toString());if(Mt(e))throw new Error(we.INVALID_ARGUMENTS.toString());Ln(o("v2","otherApp.install"),"otherApp.install",e)},e.unregisterAppInstallationHandler=function(){if(!t())throw new Error(we.NOT_SUPPORTED_ON_PLATFORM.toString());ur(o("v2","otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Dn("otherApp.install")},e.isSupported=t}(Da||(Da={}));const Ua="v1";var Na;!function(e){let t,n,r;function i(){return!(!Tt(ct)||!ct.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"}(t=e.ControlCommand||(e.ControlCommand={})),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"}(n=e.ErrorReason||(e.ErrorReason={})),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"}(r=e.SessionTerminatedReason||(e.SessionTerminatedReason={})),e.getCapableParticipants=function(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;ur(o(Ua,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)},e.requestControl=function(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(Tt(ct,be.sidePanel),!i())throw Fe;ur(o(Ua,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)},e.sendControlCommand=function(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(Tt(ct,be.sidePanel),!i())throw Fe;ur(o(Ua,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)},e.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;ur(o(Ua,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)},e.registerOnCapableParticipantsChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;Ln(o(Ua,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)},e.registerOnErrorHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;Ln(o(Ua,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)},e.registerOnDeviceStateChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;Ln(o(Ua,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)},e.registerOnSessionStatusChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Tt(ct,be.sidePanel),!i())throw Fe;Ln(o(Ua,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)},e.isSupported=i}(Na||(Na={}));var Ha;!function(e){function t(){return!(!Tt(ct)||!ct.supports.appEntity)}e.selectAppEntity=function(e,n,r,i){if(Tt(ct,be.content),!t())throw Fe;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!i)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");ur(o("v1","appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,n,r],i)},e.isSupported=t}(Ha||(Ha={}));const xa="v1";var Va;!function(e){let t,n;function r(){return!(!Tt(ct)||!ct.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(t=e.ChannelType||(e.ChannelType={})),e.getTeamChannels=function(e,t){if(Tt(ct,be.content),!r())throw Fe;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");ur(o(xa,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)},e.refreshSiteUrl=function(e,t){if(Tt(ct),!r())throw Fe;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");ur(o(xa,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)},e.isSupported=r,function(e){let t;function n(){return!(!Tt(ct)||!ct.supports.teams)&&!!ct.supports.teams.fullTrust}!function(e){function t(){return!(!Tt(ct)||!ct.supports.teams)&&(!!ct.supports.teams.fullTrust&&!!ct.supports.teams.fullTrust.joinedTeams)}e.getUserJoinedTeams=function(e){return new Promise((n=>{if(Tt(ct),!t())throw Fe;if((C.hostClientType===ye.android||C.hostClientType===ye.teamsRoomsAndroid||C.hostClientType===ye.teamsPhones||C.hostClientType===ye.teamsDisplays)&&!Ft("2.0.1")){const e={errorCode:we.OLD_PLATFORM};throw new Error(JSON.stringify(e))}n(nr(o(xa,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))},e.isSupported=t}(t=e.joinedTeams||(e.joinedTeams={})),e.getConfigSetting=function(e){return new Promise((t=>{if(Tt(ct),!n())throw Fe;t(nr(o(xa,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))},e.isSupported=n}(n=e.fullTrust||(e.fullTrust={}))}(Va||(Va={}));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{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Wa="v2";var Ba;!function(e){e.frameProcessingTimeoutInMs=2e3;const t=Je()?void 0:new li(ur);let n;function r(){const t=setTimeout((()=>{c(`Frame not processed in ${e.frameProcessingTimeoutInMs}ms`,n.Warn)}),e.frameProcessingTimeoutInMs);return function(){clearTimeout(t)}}function i(e,t){return n=>_a(this,void 0,void 0,(function*(){const o=n.videoFrame;t.reportStartFrameProcessing(o.codedWidth,o.codedHeight);const i=r(),a=yield e(n);return i(),t.reportFrameProcessed(),a}))}function a(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function s(){return Tt(ct),fi.isSupported()}function l(e){ur(o(Wa,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function c(e,t=n.Warn){ur(o(Wa,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}!function(e){e.Fatal="fatal",e.Warn="warn"}(n=e.ErrorLevel||(e.ErrorLevel={})),e.registerForVideoFrame=function(e){var n,u;if(!s())throw Fe;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Tt(ct,be.sidePanel)){if(Ln(o(Wa,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e)),!1),null===(n=ct.supports.video)||void 0===n?void 0:n.mediaStream)Ln(o(Wa,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>_a(this,void 0,void 0,(function*(){const{streamId:r,metadataInTexture:o}=n,a=t?i(e.videoFrameHandler,t):e.videoFrameHandler;o?yield Zo(r,a,c,t):yield Ko(r,a,c,t)}))),!1),ur(o(Wa,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(u=ct.supports.video)||void 0===u?void 0:u.sharedFrame))throw Fe;Ln(o(Wa,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(n=>{if(n){null==t||t.reportStartFrameProcessing(n.width,n.height);const o=r(),i=n.timestamp;e.videoBufferHandler(a(n),(()=>{o(),null==t||t.reportFrameProcessed(),l(i)}),c)}}),!1),ur(o(Wa,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==t||t.startMonitorSlowFrameProcessing()}},e.notifySelectedVideoEffectChanged=function(e,t,n){if(Tt(ct,be.sidePanel),!s())throw Fe;ur(o(Wa,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])},e.registerForVideoEffect=function(e){if(Tt(ct,be.sidePanel),!s())throw Fe;Ln(o(Wa,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",oi(e,t),!1),ur(o(Wa,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")},e.updatePersonalizedEffects=function(e){if(Tt(ct,be.sidePanel),!fi.isSupported())throw Fe;ur(o(Wa,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])},e.isSupported=s,e.notifyFatalError=function(e){if(Tt(ct),!fi.isSupported())throw Fe;c(e,n.Fatal)}}(Ba||(Ba={}))})(),r})()));
|
2
2
|
//# sourceMappingURL=MicrosoftTeams.min.js.map
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"@microsoft/teams-js","author":"Microsoft Teams","version":"2.23.0-beta.
|
1
|
+
{"name":"@microsoft/teams-js","author":"Microsoft Teams","version":"2.23.0-beta.3","description":"Microsoft Client SDK for building app for Microsoft hosts","repository":{"directory":"packages/teams-js","type":"git","url":"https://github.com/OfficeDev/microsoft-teams-library-js"},"main":"./dist/MicrosoftTeams.min.js","typings":"./dist/MicrosoftTeams.d.ts","scripts":{"build":"pnpm lint && webpack && pnpm docs:validate","clean":"rimraf ./dist","docs":"pnpm typedoc","docs:validate":"pnpm typedoc --emit none","lint":"pnpm eslint ./src ./test --max-warnings 0 --fix --ext .ts","prettier":"prettier --write '**/*.{ts,js,css,html}'","test":"jest","test:verbose":"pnpm test -- --verbose false --silent false"},"dependencies":{"base64-js":"^1.3.1","debug":"^4.3.3"},"devDependencies":{"@types/debug":"^4.1.7"},"license":"MIT","files":["dist/**","LICENSE","README.md"]}
|