@microsoft/teams-js 2.26.0-beta.2 → 2.27.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],l=i[1],u=new o(c(e,a,l)),d=0,f=l>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(l(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?l(e,i,o,"day"):i>=r?l(e,i,r,"hour"):i>=n?l(e,i,n,"minute"):i>=t?l(e,i,t,"second"):e+" ms"}function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>me,ChannelType:()=>Ae,ChildAppWindow:()=>Oi,DialogDimension:()=>Te,ErrorCode:()=>we,FileOpenPreference:()=>ge,FrameContexts:()=>be,HostClientType:()=>ye,HostName:()=>Se,LiveShareHost:()=>Va,NotificationTypes:()=>to,ParentAppWindow:()=>ki,SecondaryM365ContentIdName:()=>he,TaskModuleDimension:()=>Pe,TeamType:()=>Ee,UserSettingTypes:()=>ro,UserTeamRole:()=>Ie,ViewerActionTypes:()=>no,app:()=>gn,appEntity:()=>Po,appInitialization:()=>ra,appInstallDialog:()=>oi,authentication:()=>Gt,barCode:()=>Si,calendar:()=>xi,call:()=>ta,chat:()=>bi,clipboard:()=>Ii,conversations:()=>po,dialog:()=>Xt,enablePrintCapability:()=>ca,executeDeepLink:()=>Ia,externalAppAuthentication:()=>mo,externalAppCardActions:()=>ho,externalAppCommands:()=>vo,files:()=>yo,geoLocation:()=>Pi,getAdaptiveCardSchemaVersion:()=>Fi,getContext:()=>ua,getMruTabInstances:()=>ba,getTabInstances:()=>Sa,initialize:()=>sa,initializeWithFrameContext:()=>Aa,liveShare:()=>xa,location:()=>Ui,logs:()=>eo,mail:()=>Vi,marketplace:()=>Ya,media:()=>si,meeting:()=>Ni,meetingRoom:()=>bo,menus:()=>en,messageChannels:()=>Bt,monetization:()=>Hi,navigateBack:()=>ka,navigateCrossDomain:()=>Oa,navigateToTab:()=>Ra,nestedAppAuth:()=>Ti,notifications:()=>Eo,openFilePreview:()=>uo,otherAppStateChange:()=>Io,pages:()=>Fn,people:()=>Wi,print:()=>la,profile:()=>zi,registerAppButtonClickHandler:()=>pa,registerAppButtonHoverEnterHandler:()=>ga,registerAppButtonHoverLeaveHandler:()=>ma,registerBackButtonHandler:()=>ha,registerBeforeUnloadHandler:()=>va,registerChangeSettingsHandler:()=>ya,registerCustomHandler:()=>co,registerFocusEnterHandler:()=>Ca,registerFullScreenHandler:()=>fa,registerOnLoadHandler:()=>wa,registerOnThemeChangeHandler:()=>da,registerUserSettingsChangeHandler:()=>lo,remoteCamera:()=>Ao,returnFocus:()=>Fa,search:()=>Gi,secondaryBrowser:()=>Mi,sendCustomEvent:()=>so,sendCustomMessage:()=>ao,setFrameContext:()=>Ta,settings:()=>Ua,shareDeepLink:()=>Ea,sharing:()=>Ji,stageView:()=>Ki,tasks:()=>Na,teams:()=>Ro,teamsCore:()=>_i,thirdPartyCloudStorage:()=>ia,uploadCustomApp:()=>io,version:()=>bt,videoEffects:()=>Ho,videoEffectsEx:()=>Xo,visualMedia:()=>Xi,webStorage:()=>Yi});const e=(0,n(815).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","*.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const s="2.0.1",c="2.0.3",l="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 T(e)}return I(e,t,n)}function I(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 T(e){return A(e),P(e<0?0:0|F(e))}function A(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 P(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=P(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 U(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 U(e){return y.toByteArray(L(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 I(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 L(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=P(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,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return 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(U(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=P(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ne(e.length)?P(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 ce(){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 le=[];for(let e=0;e<256;++e)le.push((e+256).toString(16).slice(1));function ue(e,t=0){return le[e[t+0]]+le[e[t+1]]+le[e[t+2]]+le[e[t+3]]+"-"+le[e[t+4]]+le[e[t+5]]+"-"+le[e[t+6]]+le[e[t+7]]+"-"+le[e[t+8]]+le[e[t+9]]+"-"+le[e[t+10]]+le[e[t+11]]+le[e[t+12]]+le[e[t+13]]+le[e[t+14]]+le[e[t+15]]}const de=function(e,t,n){if(ie.randomUUID&&!t&&!e)return ie.randomUUID();const r=(e=e||{}).random||(e.rng||ce)();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,Ie,Te;!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"}(Ie||(Ie={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Te||(Te={}));var Ae,Pe=Te;!function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Ae||(Ae={}));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)."),Ue=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 Le(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.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function je(e){return!(Le(`${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([["&lt;","<"],["&gt;",">"],["&amp;","&"],["&quot;",'"'],["&#39;","'"],["&#x2F;","/"]]).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 ct(e){if(at(e))return!0;throw-1===e.apiVersion?new Error(w):new Error(v)}let lt=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=>{Le(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),lt=He(t)}const bt="2.26.0-beta.2",Et=t("internal"),It=Et.extend("ensureInitializeCalled"),Tt=Et.extend("ensureInitialized");function At(){if(!C.initializeCalled)throw It(h),new Error(h)}function Pt(e,...t){if(!C.initializeCompleted)throw Tt("%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 ct(e)}function Ft(e=s){const t=Le(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 Ut=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Dt=[];const Lt=t("validateOrigin");function Nt(){return Ut(this,void 0,void 0,(function*(){yield xt()}))}function Ht(){return 0===Dt.length}function xt(){return Ut(this,void 0,void 0,(function*(){return Ht()?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=>(Lt("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Dt=d,Dt))):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 Lt("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 Lt("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 Lt("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}))}var Bt,jt=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};!function(e){let n,r;!function(e){let n;const r=t("messageChannels.telemetry");function i(){var e;return!(!Pt(lt)||!(null===(e=lt.supports.messageChannels)||void 0===e?void 0:e.telemetry))}e.getTelemetryPort=function(){return jt(this,void 0,void 0,(function*(){if(n)return r("Returning telemetry port from cache"),n;if(!i())throw Fe;return n=yield wr(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!(!Pt(lt)||!(null===(e=lt.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}e.getDataLayerPort=function(){return jt(this,void 0,void 0,(function*(){if(n)return r("Returning dataLayer port from cache"),n;if(!i())throw Fe;return n=yield wr(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!(!Pt(lt)||!lt.supports.messageChannels)}}(Bt||(Bt={}));const zt="v1",qt="v2";var Gt;!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(hr(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(hr(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 c(e){return new Promise((t=>{t(hr(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function l(){d();try{cr.childWindow&&cr.childWindow.close()}finally{cr.childWindow=null,cr.childOrigin=null}}function u(e){l();let t=e.width||600,n=e.height||400;t=Math.min(t,cr.currentWindow.outerWidth-400),n=Math.min(n,cr.currentWindow.outerHeight-200);const r=Qe(e.url.replace("{oauthRedirectMethod}","web"));Ze(r);let o=void 0!==cr.currentWindow.screenLeft?cr.currentWindow.screenLeft:cr.currentWindow.screenX,i=void 0!==cr.currentWindow.screenTop?cr.currentWindow.screenTop:cr.currentWindow.screenY;o+=cr.currentWindow.outerWidth/2-t/2,i+=cr.currentWindow.outerHeight/2-n/2,cr.childWindow=cr.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),cr.childWindow?f():g("FailedToOpenWindow")}function d(){n&&(clearInterval(n),n=0),Hn("initialize"),Hn("navigateCrossDomain")}function f(){d(),n=cr.currentWindow.setInterval((()=>{if(!cr.childWindow||cr.childWindow.closed)g("CancelledByUser");else{const e=cr.childOrigin;try{cr.childOrigin="*",Kr("ping")}finally{cr.childOrigin=e}}}),100),Nn(o(zt,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[be.authentication,C.hostClientType])),Nn(o(zt,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function p(e){try{t&&t.success(e)}finally{t=void 0,l()}}function g(e){try{t&&t.fail(new Error(e))}finally{t=void 0,l()}}e.initialize=function(){Nn(o(zt,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",p,!1),Nn(o(zt,"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 Pt(lt,be.content,be.sidePanel,be.settings,be.remove,be.task,be.stage,be.meetingStage),a(n.successCallback||n.failureCallback?o(zt,"authentication.authenticate"):o(qt,"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 At(),s(e&&(e.successCallback||e.failureCallback)?o(zt,"authentication.getAuthToken"):o(qt,"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 At(),c(e&&(e.successCallback||e.failureCallback)?o(zt,"authentication.getUser"):o(qt,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)}))},e.notifySuccess=function(e,t){Pt(lt,be.authentication),yr(o(t?zt:qt,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),$r(cr.parentWindow,(()=>setTimeout((()=>cr.currentWindow.close()),200)))},e.notifyFailure=function(e,t){Pt(lt,be.authentication),yr(o(t?zt:qt,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),$r(cr.parentWindow,(()=>setTimeout((()=>cr.currentWindow.close()),200)))},function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(i=e.DataResidency||(e.DataResidency={}))}(Gt||(Gt={}));const $t="v2";function Jt(e,t){if(Pt(lt,be.content,be.sidePanel,be.task,be.meetingStage),!Xt.update.isSupported())throw Fe;yr(e,"tasks.updateTask",[t])}function Kt(e,t,n,r){if(Pt(lt,be.content,be.sidePanel,be.meetingStage),!Xt.url.isSupported())throw Fe;r&&Nn(o($t,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);yr(e,"tasks.startTask",[Xt.url.getDialogInfoFromUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Hn("messageForParent")}))}function Zt(e,t,n,r){if(Pt(lt,be.content,be.sidePanel,be.meetingStage),!Xt.url.bot.isSupported())throw Fe;r&&Nn(o($t,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);yr(e,"tasks.startTask",[Xt.url.getDialogInfoFromBotUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Hn("messageForParent")}))}function Qt(e,t,n){if(Pt(lt,be.task),!Xt.url.isSupported())throw Fe;yr(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}var Xt;!function(e){const t=[];function n(e){C.frameContext&&(C.frameContext===be.task?t.push(e):Hn("messageForChild"))}let r,i,a;e.initialize=function(){Nn(o($t,"dialog.registerMessageForChildHandler"),"messageForChild",n,!1)},function(e){let n,r;function i(e){return{url:e.url,height:e.size?e.size.height:Te.Small,width:e.size?e.size.width:Te.Small,title:e.title,fallbackUrl:e.fallbackUrl}}e.open=function(e,t,n){Kt(o($t,"dialog.url.open"),e,t,n)},e.submit=function(e,t){Qt(o($t,"dialog.url.submit"),e,t)},function(e){function n(){var e,t;return Pt(lt)&&!!(null===(t=null===(e=lt.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}e.sendMessageToParentFromDialog=function(e){if(Pt(lt,be.task),!n())throw Fe;yr(o($t,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])},e.sendMessageToDialog=function(e){if(Pt(lt,be.content,be.sidePanel,be.meetingStage),!n())throw Fe;yr(o($t,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])},e.registerOnMessageFromParent=function(e){if(Pt(lt,be.task),!n())throw Fe;for(Hn("messageForChild"),Nn(o($t,"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 Pt(lt)&&void 0!==(lt.supports.dialog&&lt.supports.dialog.url)},function(e){e.open=function(e,t,n){Zt(o($t,"dialog.url.bot.open"),e,t,n)},e.isSupported=function(){return Pt(lt)&&void 0!==(lt.supports.dialog&&lt.supports.dialog.url&&lt.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!(!Pt(lt)||!lt.supports.dialog)},function(e){e.resize=function(e){Jt(o($t,"dialog.update.resize"),e)},e.isSupported=function(){return!(!Pt(lt)||!lt.supports.dialog)&&!!lt.supports.dialog.update}}(i=e.update||(e.update={})),function(e){function t(){const e=lt.hostVersionsInfo&&lt.hostVersionsInfo.adaptiveCardSchemaVersion&&!je(lt.hostVersionsInfo.adaptiveCardSchemaVersion);return Pt(lt)&&void 0!==(e&&lt.supports.dialog&&lt.supports.dialog.card)}let n;function r(e){return{card:e.card,height:e.size?e.size.height:Te.Small,width:e.size?e.size.width:Te.Small,title:e.title}}function i(e){const t=r(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,n){if(Pt(lt,be.content,be.sidePanel,be.meetingStage),!t())throw Fe;const i=r(e);yr(o($t,"dialog.adaptiveCard.open"),"tasks.startTask",[i],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t,function(e){function t(){const e=lt.hostVersionsInfo&&lt.hostVersionsInfo.adaptiveCardSchemaVersion&&!je(lt.hostVersionsInfo.adaptiveCardSchemaVersion);return Pt(lt)&&void 0!==(e&&lt.supports.dialog&&lt.supports.dialog.card&&lt.supports.dialog.card.bot)}e.open=function(e,n){if(Pt(lt,be.content,be.sidePanel,be.meetingStage),!t())throw Fe;const r=i(e);yr(o($t,"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={}))}(Xt||(Xt={}));const Yt="v2";var en;!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)||(Pt(lt),yr(o(Yt,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function c(e){r&&r(e)||(Pt(lt),yr(o(Yt,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function l(e){i&&i(e)||(Pt(lt),yr(o(Yt,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function u(){return!(!Pt(lt)||!lt.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(){Nn(o(Yt,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",c,!1),Nn(o(Yt,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",l,!1),Nn(o(Yt,"menus.registerSetModuleViewHandler"),"setModuleView",s,!1)},e.setUpViews=function(e,t){if(Pt(lt),!u())throw Fe;a=t,yr(o(Yt,"menus.setUpViews"),"setUpViews",[e])},e.setNavBarMenu=function(e,t){if(Pt(lt),!u())throw Fe;r=t,yr(o(Yt,"menus.setNavBarMenu"),"setNavBarMenu",[e])},e.showActionMenu=function(e,t){if(Pt(lt),!u())throw Fe;i=t,yr(o(Yt,"menus.showActionMenu"),"showActionMenu",[e])},e.isSupported=u}(en||(en={}));const tn="v2",nn=5e3,rn=t("app");function on(e,t){if(Je()){return rn.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return We((()=>dn(e,t)),nn,new Error("SDK initialization timed out."))}function an(e){yr(e,gn.Messages.AppLoaded,[bt])}function sn(e,t){yr(e,gn.Messages.ExpectedFailure,[t.reason,t.message])}function cn(e,t){yr(e,gn.Messages.Failure,[t.reason,t.message])}function ln(e){yr(e,gn.Messages.Success,[bt])}const un=rn.extend("initializeHelper");function dn(e,t){return new Promise((n=>{C.initializeCalled||(C.initializeCalled=!0,Mn(),C.initializePromise=ur(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=s})=>{C.frameContext=e,C.hostClientType=t,C.clientSupportedSDKVersion=r;try{un("Parsing %s",n);const e=JSON.parse(n);if(un("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{un("Attempting to parse %s as an SDK version",n),isNaN(Le(n,s))||(C.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(un("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})),Gt.initialize(),en.initialize(),Fn.config.initialize(),Xt.initialize()),Array.isArray(t)&&kt(t),void 0!==C.initializePromise?n(C.initializePromise):un("GlobalVars.initializePromise is unexpectedly undefined")}))}function fn(e,t){!Mt(t)&&At(),_n(e,t)}function pn(e,t){return new Promise((n=>{Pt(lt,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),n(pr(e,"executeDeepLink",t))}))}var gn;function mn(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,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}!function(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(),on(o(tn,"app.initialize"),e)},e._initialize=function(e){cr.currentWindow=e},e._uninitialize=function(){C.initializeCalled&&(Un(),C.initializeCalled=!1,C.initializeCompleted=!1,C.initializePromise=void 0,C.additionalValidOrigins=[],C.frameContext=void 0,C.hostClientType=void 0,C.isFramelessWindow=!1,Bt.telemetry._clearTelemetryPort(),Bt.dataLayer._clearDataLayerPort(),dr())},e.getContext=function(){return new Promise((e=>{At(),e(fr(o(tn,"app.getContext"),"getContext"))})).then((e=>mn(e)))},e.notifyAppLoaded=function(){At(),an(o(tn,"app.notifyAppLoaded"))},e.notifySuccess=function(){At(),ln(o(tn,"app.notifySuccess"))},e.notifyFailure=function(e){At(),cn(o(tn,"app.notifyFailure"),e)},e.notifyExpectedFailure=function(e){At(),sn(o(tn,"app.notifyExpectedFailure"),e)},e.registerOnThemeChangeHandler=function(e){fn(o(tn,"app.registerOnThemeChangeHandler"),e)},e.openLink=function(e){return pn(o(tn,"app.openLink"),e)},function(e){e.registerBeforeSuspendOrTerminateHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Pt(lt),$n(e)},e.registerOnResumeHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Pt(lt),Jn(e)}}(a=e.lifecycle||(e.lifecycle={}))}(gn||(gn={}));const hn="v2";function wn(e,t){return new Promise((n=>{if(Pt(lt,be.content,be.sidePanel,be.settings,be.remove,be.task,be.stage,be.meetingStage),!Fn.isSupported())throw Fe;n(gr(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function vn(e){return new Promise((t=>{if(Pt(lt),!Fn.backStack.isSupported())throw Fe;t(gr(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Cn(e,t){return new Promise((n=>{if(Pt(lt),!Fn.tabs.isSupported())throw Fe;n(gr(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function yn(e,t){if(Pt(lt),!Fn.isSupported())throw Fe;yr(e,"returnFocus",[t])}function Sn(e,t){return new Promise((n=>{if(Pt(lt),!Fn.tabs.isSupported())throw Fe;n(fr(e,"getTabInstances",t))}))}function bn(e,t){return new Promise((n=>{if(Pt(lt),!Fn.tabs.isSupported())throw Fe;n(fr(e,"getMruTabInstances",t))}))}function En(e,t){if(Pt(lt,be.content,be.sidePanel,be.meetingStage),!Fn.isSupported())throw Fe;yr(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function In(e,t){if(Pt(lt,be.content),!Fn.isSupported())throw Fe;yr(e,"setFrameContext",[t])}function Tn(e,t){if(Pt(lt,be.settings,be.remove),!Fn.config.isSupported())throw Fe;yr(e,"settings.setValidityState",[t])}function An(e){return new Promise((t=>{if(Pt(lt,be.content,be.settings,be.remove,be.sidePanel),!Fn.isSupported())throw Fe;t(fr(e,"settings.getSettings"))}))}function Pn(e,t){return new Promise((n=>{if(Pt(lt,be.content,be.settings,be.sidePanel),!Fn.config.isSupported())throw Fe;n(pr(e,"settings.setSettings",t))}))}var Fn;!function(e){function t(e){In(o(hn,"pages.setCurrentFrame"),e)}function n(){return!(!Pt(lt)||!lt.supports.pages)}let r,i,a,s,c,l;e.returnFocus=function(e){yn(o(hn,"pages.returnFocus"),e)},e.registerFocusEnterHandler=function(e){Vn(o(hn,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!n())throw Fe}))},e.setCurrentFrame=t,e.initializeWithFrameContext=function(e,n,r){Nt(),on(o(hn,"pages.initializeWithFrameContext"),r).then((()=>n&&n())),t(e)},e.getConfig=function(){return An(o(hn,"pages.getConfig."))},e.navigateCrossDomain=function(e){return wn(o(hn,"pages.navigateCrossDomain"),e)},e.navigateToApp=function(e){return new Promise((t=>{if(Pt(lt,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!n())throw Fe;const r=o(hn,"pages.navigateToApp");lt.isLegacyTeams?t(pr(r,"executeDeepLink",Be(e))):t(pr(r,"pages.navigateToApp",e))}))},e.shareDeepLink=function(e){return En(o(hn,"pages.shareDeepLink"),e)},e.registerFullScreenHandler=function(e){Vn(o(hn,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Mt(e)&&!n())throw Fe}))},e.isSupported=n,function(e){e.navigateToTab=function(e){return Cn(o(hn,"pages.tabs.navigateToTab"),e)},e.getTabInstances=function(e){return Sn(o(hn,"pages.tabs.getTabInstances"),e)},e.getMruTabInstances=function(e){return bn(o(hn,"pages.tabs.getMruTabInstances"),e)},e.isSupported=function(){return!(!Pt(lt)||!lt.supports.pages)&&!!lt.supports.pages.tabs}}(r=e.tabs||(e.tabs={})),function(e){let t,n;function r(e,n,r){!Mt(n)&&Pt(lt,be.settings),r&&r(),t=n,!Mt(n)&&yr(e,"registerHandler",["save"])}function i(e,t,r){!Mt(t)&&Pt(lt,be.remove,be.settings),r&&r(),n=t,!Mt(t)&&yr(e,"registerHandler",["remove"])}function a(e){const n=new s(e);t?t(n):cr.childWindow?Kr("settings.save",[e]):n.notifySuccess()}e.initialize=function(){Nn(o(hn,"pages.config.registerSettingsSaveHandler"),"settings.save",a,!1),Nn(o(hn,"pages.config.registerSettingsRemoveHandler"),"settings.remove",c,!1)},e.setValidityState=function(e){return Tn(o(hn,"pages.config.setValidityState"),e)},e.setConfig=function(e){return Pn(o(hn,"pages.config.setConfig"),e)},e.registerOnSaveHandler=function(e){r(o(hn,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Mt(e)&&!u())throw Fe}))},e.registerOnSaveHandlerHelper=r,e.registerOnRemoveHandler=function(e){i(o(hn,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Mt(e)&&!u())throw Fe}))},e.registerOnRemoveHandlerHelper=i,e.registerChangeConfigHandler=function(e){Vn(o(hn,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[be.content],(()=>{if(!u())throw Fe}))};class s{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),yr(o(hn,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),yr(o(hn,"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 c(){const e=new l;n?n(e):cr.childWindow?Kr("settings.remove",[]):e.notifySuccess()}class l{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),yr(o(hn,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),yr(o(hn,"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!(!Pt(lt)||!lt.supports.pages)&&!!lt.supports.pages.config}e.isSupported=u}(i=e.config||(e.config={})),function(e){let t;function n(){return vn(o(hn,"pages.backStack.navigateBack"))}function r(e,n,r){!Mt(n)&&Pt(lt),r&&r(),t=n,!Mt(n)&&yr(e,"registerHandler",["backButton"])}function i(){t&&t()||(cr.childWindow?Kr("backButtonPress",[]):n())}function a(){return!(!Pt(lt)||!lt.supports.pages)&&!!lt.supports.pages.backStack}e._initialize=function(){Nn(o(hn,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",i,!1)},e.navigateBack=n,e.registerBackButtonHandler=function(e){r(o(hn,"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!(!Pt(lt)||!lt.supports.pages)&&!!lt.supports.pages.fullTrust}e.enterFullscreen=function(){if(Pt(lt,be.content),!t())throw Fe;yr(o(hn,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])},e.exitFullscreen=function(){if(Pt(lt,be.content),!t())throw Fe;yr(o(hn,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])},e.isSupported=t}(s=e.fullTrust||(e.fullTrust={})),function(e){function t(){return!(!Pt(lt)||!lt.supports.pages)&&!!lt.supports.pages.appButton}e.onClick=function(e){Vn(o(hn,"pages.appButton.onClick"),"appButtonClick",e,[be.content],(()=>{if(!t())throw Fe}))},e.onHoverEnter=function(e){Vn(o(hn,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[be.content],(()=>{if(!t())throw Fe}))},e.onHoverLeave=function(e){Vn(o(hn,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[be.content],(()=>{if(!t())throw Fe}))},e.isSupported=t}(c=e.appButton||(e.appButton={})),function(e){function t(){return!(!Pt(lt)||!lt.supports.pages)&&!!lt.supports.pages.currentApp}e.navigateTo=function(e){return new Promise((n=>{if(Pt(lt,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!t())throw Fe;n(mr(o(hn,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))},e.navigateToDefaultPage=function(){return new Promise((e=>{if(Pt(lt,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!t())throw Fe;e(mr(o(hn,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))},e.isSupported=t}(l=e.currentApp||(e.currentApp={}))}(Fn||(Fn={}));var Rn=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const On=t("handlers");class kn{static initializeHandlers(){kn.handlers.themeChange=Wn,kn.handlers.load=jn,kn.handlers.beforeUnload=Gn,Fn.backStack._initialize()}static uninitializeHandlers(){kn.handlers={},kn.themeChangeHandler=null,kn.loadHandler=null,kn.beforeUnloadHandler=null,kn.beforeSuspendOrTerminateHandler=null,kn.resumeHandler=null}}function Mn(){kn.initializeHandlers()}function Un(){kn.uninitializeHandlers()}kn.handlers={},kn.themeChangeHandler=null,kn.loadHandler=null,kn.beforeUnloadHandler=null,kn.beforeSuspendOrTerminateHandler=null,kn.resumeHandler=null;const Dn=On.extend("callHandler");function Ln(e,t){const n=kn.handlers[e];if(n){Dn("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return cr.childWindow?(Kr(e,t),[!1,void 0]):(Dn("Handler for action message %s not found.",e),[!1,void 0])}function Nn(e,t,n,r=!0,o=[]){n?(kn.handlers[t]=n,r&&yr(e,"registerHandler",[t,...o])):delete kn.handlers[t]}function Hn(e){delete kn.handlers[e]}function xn(e){return null!=kn.handlers[e]}function Vn(e,t,n,r,o){n&&Pt(lt,...r),o&&o(),Nn(e,t,n)}function _n(e,t){kn.themeChangeHandler=t,!Mt(t)&&yr(e,"registerHandler",["themeChange"])}function Wn(e){kn.themeChangeHandler&&kn.themeChangeHandler(e),cr.childWindow&&Kr("themeChange",[e])}function Bn(e,t){kn.loadHandler=t,!Mt(t)&&yr(e,"registerHandler",["load"])}function jn(e){const t=zn(e);kn.resumeHandler?(kn.resumeHandler(t),cr.childWindow&&Kr("load",[t])):kn.loadHandler&&(kn.loadHandler(e),cr.childWindow&&Kr("load",[e]))}function zn(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function qn(e,t){kn.beforeUnloadHandler=t,!Mt(t)&&yr(e,"registerHandler",["beforeUnload"])}function Gn(){return Rn(this,void 0,void 0,(function*(){const e=()=>{yr(o("v2","handleBeforeUnload"),"readyToUnload",[])};kn.beforeSuspendOrTerminateHandler?(yield kn.beforeSuspendOrTerminateHandler(),cr.childWindow?Kr("beforeUnload"):e()):kn.beforeUnloadHandler&&kn.beforeUnloadHandler(e)||(cr.childWindow?Kr("beforeUnload"):e())}))}function $n(e){kn.beforeSuspendOrTerminateHandler=e,!Mt(e)&&yr(o("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Jn(e){kn.resumeHandler=e,!Mt(e)&&yr(o("v2","registerOnResumeHandler"),"registerHandler",["load"])}class Kn{constructor(e=Ne()){this.uuid=e,nt(e)}toString(){return this.uuid}}var Zn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Qn=e=>{const{uuid:t}=e,n=Zn(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Xn=e=>{const{uuidAsString:t}=e,n=Zn(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Kn(t):void 0})},Yn=e=>{const{uuidAsString:t}=e,n=Zn(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Kn(t):void 0})},er=e=>{const{uuid:t}=e,n=Zn(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},tr=t("nestedAppAuthUtils"),nr=tr.extend("tryPolyfillWithNestedAppAuthBridge");function rr(e,t,n){var r;const o=nr;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=ir(a,n);s&&(a.nestedAppAuthBridge=s)}const or=tr.extend("createNestedAppAuthBridge");function ir(e,t){const n=or;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 ar=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const sr=t("communication");class cr{}class lr{}function ur(e,t){if(lr.messageListener=e=>ar(this,void 0,void 0,(function*(){return yield Fr(e)})),cr.currentWindow=cr.currentWindow||$e(),cr.parentWindow=cr.currentWindow.parent!==cr.currentWindow.self?cr.currentWindow.parent:cr.currentWindow.opener,cr.topWindow=cr.currentWindow.top,(cr.parentWindow||e)&&cr.currentWindow.addEventListener("message",lr.messageListener,!1),!cr.parentWindow){const e=cr.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));C.isFramelessWindow=!0,e.onNativeMessage=xr}try{return cr.parentOrigin="*",hr(t,"initialize",[bt,it,e]).then((([e,t,n,r])=>(rr(r,cr.currentWindow,{onMessage:Or,sendPostMessage:br}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{cr.parentOrigin=null}}function dr(){cr.currentWindow&&cr.currentWindow.removeEventListener("message",lr.messageListener,!1),cr.currentWindow=null,cr.parentWindow=null,cr.parentOrigin=null,cr.childWindow=null,cr.childOrigin=null,lr.parentMessageQueue=[],lr.childMessageQueue=[],lr.nextMessageId=0,lr.callbacks.clear(),lr.promiseCallbacks.clear(),lr.portCallbacks.clear(),lr.legacyMessageIdsToUuidMap={}}function fr(e,t,...n){return hr(e,t,n).then((([e])=>e))}function pr(e,t,...n){return hr(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function gr(e,t,n,...r){return hr(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function mr(e,t,...n){return hr(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function hr(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(Ar(e,t,n).uuid))}))}function wr(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 vr(Ar(e,t,n).uuid)}function vr(e){return new Promise(((t,n)=>{lr.portCallbacks.set(e,((e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}))}))}function Cr(e){return new Promise((t=>{lr.promiseCallbacks.set(e,t)}))}function yr(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=Ar(e,t,o);r&&lr.callbacks.set(a.uuid,r)}lr.parentMessageQueue=[],lr.childMessageQueue=[],lr.topMessageQueue=[],lr.nextMessageId=0,lr.callbacks=new Map,lr.promiseCallbacks=new Map,lr.portCallbacks=new Map,lr.legacyMessageIdsToUuidMap={};const Sr=sr.extend("sendNestedAuthRequestToTopWindow");function br(e){const t=Sr,n=cr.topWindow,r=Qr(e);return t("Message %i information: %o",r.uuid,{actionName:r.func}),Ir(n,r)}const Er=sr.extend("sendRequestToTargetWindowHelper");function Ir(e,t){const n=Er,r=zr(e),o=Qn(t);if(C.isFramelessWindow)cr.currentWindow&&cr.currentWindow.nativeInterface&&(n(`Sending message %i to ${r} via framelessPostMessage interface`,o.uuidAsString),cr.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=jr(e);e&&i?(n(`Sending message %i to ${r} via postMessage`,o.uuidAsString),e.postMessage(o,i)):(n(`Adding message %i to ${r} message queue`,o.uuidAsString),Br(e).push(t))}return t}const Tr=sr.extend("sendMessageToParentHelper");function Ar(e,t,n){const r=Tr,o=cr.parentWindow,i=Zr(e,t,n);return r("Message %i information: %o",i.uuid,{actionName:t,args:n}),Ir(o,i)}const Pr=sr.extend("processMessage");function Fr(e){return ar(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Pr("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 Mr(t,n).then((r=>{r?(Ur(t,n),t===cr.parentWindow?xr(e):t===cr.childWindow&&_r(e)):Pr("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin")}))}))}const Rr=sr.extend("processAuthBridgeMessage");function Or(e,t){var n,r;const o=Rr;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),l=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Mr(c,l)?(cr.topWindow&&!cr.topWindow.closed&&c!==cr.topWindow||(cr.topWindow=c,cr.topOrigin=l),cr.topWindow&&cr.topWindow.closed&&(cr.topWindow=null,cr.topOrigin=null),Gr(cr.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 kr=sr.extend("shouldProcessMessage");function Mr(e,t){return ar(this,void 0,void 0,(function*(){if(cr.currentWindow&&e===cr.currentWindow)return kr("Should not process message because it is coming from the current window"),!1;if(cr.currentWindow&&cr.currentWindow.location&&t&&t===cr.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return kr("Message has an invalid origin of %s",t),!1}const n=yield Wt(e);return n||kr("Message has an invalid origin of %s",t),n}}))}function Ur(e,t){C.isFramelessWindow||cr.parentWindow&&!cr.parentWindow.closed&&e!==cr.parentWindow?cr.childWindow&&!cr.childWindow.closed&&e!==cr.childWindow||(cr.childWindow=e,cr.childOrigin=t):(cr.parentWindow=e,cr.parentOrigin=t),cr.parentWindow&&cr.parentWindow.closed&&(cr.parentWindow=null,cr.parentOrigin=null),cr.childWindow&&cr.childWindow.closed&&(cr.childWindow=null,cr.childOrigin=null),Gr(cr.parentWindow),Gr(cr.childWindow)}const Dr=sr.extend("handleParentMessage");function Lr(e){var t;const n=Dr;if(!e.uuid)return lr.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Nr(lr.callbacks,t);if(n)return n;const r=Nr(lr.promiseCallbacks,t);if(r)return r;const o=Nr(lr.portCallbacks,t);if(o)return o}n(`Received a message with uuid: ${null===(t=e.uuid)||void 0===t?void 0:t.toString()} and legacyId: %i that failed to produce a callbackId`,e.id)}function Nr(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Hr(e,t){const n=Nr(t,e.uuid);n&&t.delete(n),e.uuid?lr.legacyMessageIdsToUuidMap={}:delete lr.legacyMessageIdsToUuidMap[e.id]}function xr(e){const t=Dr;if("id"in e.data&&"number"==typeof e.data.id){const n=e.data,r=Yn(n),o=Lr(r);if(o){const n=lr.callbacks.get(o);t("Received a response from parent for message %i",o),n&&(t("Invoking the registered callback for message %i with arguments %o",o,r.args),n.apply(null,[...r.args,r.isPartialResponse]),Vr(e)||(t("Removing registered callback for message %i",o),Hr(r,lr.callbacks)));const i=lr.promiseCallbacks.get(o);i&&(t("Invoking the registered promise callback for message %i with arguments %o",o,r.args),i(r.args),t("Removing registered promise callback for message %i",o),Hr(r,lr.promiseCallbacks));const a=lr.portCallbacks.get(o);if(a){let n;t("Invoking the registered port callback for message %i with arguments %o",o,r.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),a(n,r.args),t("Removing registered port callback for message %i",o),Hr(r,lr.portCallbacks)}r.uuid&&(lr.legacyMessageIdsToUuidMap={})}}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),Ln(n.func,n.args)}else t("Received an unknown message: %O",e)}function Vr(e){return!0===e.data.isPartialResponse}function _r(e){if("id"in e.data&&"func"in e.data){const t=Xn(e.data),[n,r]=Ln(t.func,t.args);n&&void 0!==r?Jr(t.id,t.uuid,Array.isArray(r)?r:[r]):yr(o("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(cr.childWindow){const n=e.pop();Jr(t.id,t.uuid,e,n)}}))}}function Wr(){return cr.topWindow!==cr.parentWindow}function Br(e){return e===cr.topWindow&&Wr()?lr.topMessageQueue:e===cr.parentWindow?lr.parentMessageQueue:e===cr.childWindow?lr.childMessageQueue:[]}function jr(e){return e===cr.topWindow&&Wr()?cr.topOrigin:e===cr.parentWindow?cr.parentOrigin:e===cr.childWindow?cr.childOrigin:null}function zr(e){return e===cr.topWindow&&Wr()?"top":e===cr.parentWindow?"parent":e===cr.childWindow?"child":null}const qr=sr.extend("flushMessageQueue");function Gr(e){const t=jr(e),n=Br(e),r=zr(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=Qn(o);qr("Flushing message %i from "+r+" message queue via postMessage.",null==n?void 0:n.uuidAsString),e.postMessage(n,t)}}}function $r(e,t){let n;n=cr.currentWindow.setInterval((()=>{0===Br(e).length&&(clearInterval(n),t())}),100)}function Jr(e,t,n,r){const o=cr.childWindow,i=Xr(e,t,n,r),a=er(i),s=jr(o);o&&s&&o.postMessage(a,s)}function Kr(e,t){const n=cr.childWindow,r=Yr(e,t),o=jr(n);n&&o?n.postMessage(r,o):Br(n).push(r)}function Zr(e,t,n){const r=lr.nextMessageId++,o=new Kn;return lr.legacyMessageIdsToUuidMap[r]=o,{id:r,uuid:o,func:t,timestamp:Date.now(),args:n||[],apiVersionTag:e}}function Qr(e){const t=lr.nextMessageId++,n=new Kn;return lr.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),args:[],data:e}}function Xr(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Yr(e,t){return{func:e,args:t||[]}}var eo,to,no,ro;!function(e){function t(){return!(!Pt(lt)||!lt.supports.logs)}e.registerGetLogHandler=function(e){if(!Mt(e)&&Pt(lt),!Mt(e)&&!t())throw Fe;e?Nn(o("v1","log.request"),"log.request",(()=>{const t=e();yr(o("v1","log.receive"),"log.receive",[t])})):Hn("log.request")},e.isSupported=t}(eo||(eo={})),function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(to||(to={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(no||(no={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(ro||(ro={}));const oo="v1";function io(e,t){Pt(lt),yr(o(oo,"uploadCustomApp"),"uploadCustomApp",[e],t||De())}function ao(e,t,n){Pt(lt),yr(o(oo,"sendCustomMessage"),e,t,n)}function so(e,t){if(Pt(lt),!cr.childWindow)throw new Error("The child window has not yet been initialized or is not present");Kr(e,t)}function co(e,t){Pt(lt),Nn(o(oo,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function lo(e,t){Pt(lt),Nn(o(oo,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function uo(e){Pt(lt,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];yr(o(oo,"openFilePreview"),"openFilePreview",t)}const fo="v1";var po;!function(e){function t(){return!(!Pt(lt)||!lt.supports.conversations)}e.openConversation=function(e){return new Promise((n=>{if(Pt(lt,be.content),!t())throw Fe;const r=pr(o(fo,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Nn(o(fo,"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&&Nn(o(fo,"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(Pt(lt,be.content),!t())throw Fe;yr(o(fo,"conversations.closeConversation"),"conversations.closeConversation"),Hn("startConversation"),Hn("closeConversation")},e.getChatMembers=function(){return new Promise((e=>{if(Pt(lt),!t())throw Fe;e(fr(o(fo,"conversations.getChatMember"),"getChatMembers"))}))},e.isSupported=t}(po||(po={}));const go="v2";var mo;!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!(!Pt(lt)||!lt.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(Pt(lt,be.content),!s())throw Fe;return Ke(e,new Error("App id is not valid.")),a(n),hr(o(go,"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(Pt(lt,be.content),!s())throw Fe;return Ke(e,new Error("App id is not valid.")),hr(o(go,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[e,t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithSSOAndResendRequest=function(e,t,n){if(Pt(lt,be.content),!s())throw Fe;return Ke(e,new Error("App id is not valid.")),a(n),hr(o(go,"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(Pt(lt,be.content),!s())throw Fe;return Ke(e,new Error("titleId is Invalid.")),Ke(t,new Error("oauthConfigId is Invalid.")),hr(o(go,"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(Pt(lt,be.content),!s())throw Fe;return Ke(e,new Error("titleId is Invalid.")),t&&Ze(t),hr(o(go,"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}(mo||(mo={}));var ho;!function(e){let t,n;function r(){return!(!Pt(lt)||!lt.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(Pt(lt,be.content),!r())throw Fe;return Ke(e,new Error("App id is not valid.")),hr(o("v2","externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[e,t]).then((([e,t])=>{if(!e)throw t}))},e.processActionOpenUrl=function(e,t,n){if(Pt(lt,be.content),!r())throw Fe;return Ke(e,new Error("App id is not valid.")),hr(o("v2","externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[e,t.href,n]).then((([e,t])=>{if(e)throw e;return t}))},e.isSupported=r}(ho||(ho={}));var wo=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};var vo;!function(e){function t(){return!(!Pt(lt)||!lt.supports.externalAppCommands)}e.processActionCommand=function(e,n,r){return wo(this,void 0,void 0,(function*(){if(Pt(lt,be.content),!t())throw Fe;Ke(e,new Error("App id is not valid."));const[i,a]=yield hr(o("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[e,n,r]);if(i)throw i;return a}))},e.isSupported=t}(vo||(vo={}));const Co="v1";var yo;!function(e){let t,n,r,i,a,s;function c(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(Pt(lt,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");yr(o(Co,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)},e.addCloudStorageFolder=function(e,t){if(Pt(lt,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");yr(o(Co,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)},e.deleteCloudStorageFolder=function(e,t,n){if(Pt(lt,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");yr(o(Co,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)},e.getCloudStorageFolderContents=function(e,t,n){if(Pt(lt,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");yr(o(Co,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)},e.openCloudStorageFile=function(e,t,n){if(Pt(lt,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");yr(o(Co,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])},e.getExternalProviders=function(e=!1,t){if(Pt(lt,be.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");yr(o(Co,"files.getExternalProviders"),"files.getExternalProviders",[e],t)},e.copyMoveFiles=function(e,t,n,r,i=!1,a){if(Pt(lt,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");yr(o(Co,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,i],a)},e.getFileDownloads=function(e){if(Pt(lt,be.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");yr(o(Co,"files.getFileDownloads"),"files.getFileDownloads",[],e)},e.openDownloadFolder=function(e=void 0,t){if(Pt(lt,be.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");yr(o(Co,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)},e.addCloudStorageProvider=function(e){if(Pt(lt,be.content),!e)throw c(we.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");yr(o(Co,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)},e.removeCloudStorageProvider=function(e,t){if(Pt(lt,be.content),!t)throw c(we.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw c(we.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");yr(o(Co,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)},e.addCloudStorageProviderFile=function(e,t){if(Pt(lt,be.content),!t)throw c(we.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw c(we.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");yr(o(Co,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)},e.renameCloudStorageProviderFile=function(e,t){if(Pt(lt,be.content),!t)throw c(we.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw c(we.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");yr(o(Co,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)},e.deleteCloudStorageProviderFile=function(e,t){if(Pt(lt,be.content),!t)throw c(we.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw c(we.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");yr(o(Co,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)},e.downloadCloudStorageProviderFile=function(e,t){if(Pt(lt,be.content),!t)throw c(we.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw c(we.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");yr(o(Co,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)},e.uploadCloudStorageProviderFile=function(e,t){if(Pt(lt,be.content),!t)throw c(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw c(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw c(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");yr(o(Co,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)},e.registerCloudStorageProviderListChangeHandler=function(e){if(Pt(lt),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Nn(o(Co,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)},e.registerCloudStorageProviderContentChangeHandler=function(e){if(Pt(lt),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Nn(o(Co,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}}(yo||(yo={}));const So="v1";var bo;!function(e){function t(){return!(!Pt(lt)||!lt.supports.meetingRoom)}e.getPairedMeetingRoomInfo=function(){return new Promise((e=>{if(Pt(lt),!t())throw Fe;e(mr(o(So,"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(Pt(lt),!t())throw Fe;n(mr(o(So,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))},e.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Pt(lt),!t())throw Fe;Nn(o(So,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Pt(lt),e(t)}))},e.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Pt(lt),!t())throw Fe;Nn(o(So,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Pt(lt),e(t)}))},e.isSupported=t}(bo||(bo={}));var Eo,Io;!function(e){function t(){return!(!Pt(lt)||!lt.supports.notifications)}e.showNotification=function(e){if(Pt(lt,be.content),!t())throw Fe;yr(o("v1","notifications.showNotification"),"notifications.showNotification",[e])},e.isSupported=t}(Eo||(Eo={})),function(e){function t(){return!(!Pt(lt)||!lt.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());Nn(o("v2","otherApp.install"),"otherApp.install",e)},e.unregisterAppInstallationHandler=function(){if(!t())throw new Error(we.NOT_SUPPORTED_ON_PLATFORM.toString());yr(o("v2","otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Hn("otherApp.install")},e.isSupported=t}(Io||(Io={}));const To="v1";var Ao;!function(e){let t,n,r;function i(){return!(!Pt(lt)||!lt.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(Pt(lt,be.sidePanel),!i())throw Fe;yr(o(To,"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(Pt(lt,be.sidePanel),!i())throw Fe;yr(o(To,"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(Pt(lt,be.sidePanel),!i())throw Fe;yr(o(To,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)},e.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Pt(lt,be.sidePanel),!i())throw Fe;yr(o(To,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)},e.registerOnCapableParticipantsChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Pt(lt,be.sidePanel),!i())throw Fe;Nn(o(To,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)},e.registerOnErrorHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Pt(lt,be.sidePanel),!i())throw Fe;Nn(o(To,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)},e.registerOnDeviceStateChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Pt(lt,be.sidePanel),!i())throw Fe;Nn(o(To,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)},e.registerOnSessionStatusChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Pt(lt,be.sidePanel),!i())throw Fe;Nn(o(To,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)},e.isSupported=i}(Ao||(Ao={}));var Po;!function(e){function t(){return!(!Pt(lt)||!lt.supports.appEntity)}e.selectAppEntity=function(e,n,r,i){if(Pt(lt,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");yr(o("v1","appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,n,r],i)},e.isSupported=t}(Po||(Po={}));const Fo="v1";var Ro;!function(e){let t,n;function r(){return!(!Pt(lt)||!lt.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(Pt(lt,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");yr(o(Fo,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)},e.refreshSiteUrl=function(e,t){if(Pt(lt),!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");yr(o(Fo,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)},e.isSupported=r,function(e){let t;function n(){return!(!Pt(lt)||!lt.supports.teams)&&!!lt.supports.teams.fullTrust}!function(e){function t(){return!(!Pt(lt)||!lt.supports.teams)&&(!!lt.supports.teams.fullTrust&&!!lt.supports.teams.fullTrust.joinedTeams)}e.getUserJoinedTeams=function(e){return new Promise((n=>{if(Pt(lt),!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(fr(o(Fo,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))},e.isSupported=t}(t=e.joinedTeams||(e.joinedTeams={})),e.getConfigSetting=function(e){return new Promise((t=>{if(Pt(lt),!n())throw Fe;t(fr(o(Fo,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))},e.isSupported=n}(n=e.fullTrust||(e.fullTrust={}))}(Ro||(Ro={}));class Oo{static setTimeout(e,t){const n=performance.now(),r=Ne();return Oo.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Oo.setTimeoutCallbacks[e]}static setInterval(e,t){Oo.setTimeout((function n(){e(),Oo.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Oo.setTimeoutCallbacks){const r=Oo.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Oo.setTimeoutCallbacks[e].callback(),delete Oo.setTimeoutCallbacks[e]}}}Oo.setTimeoutCallbacks={};class ko{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Oo.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&&Oo.clearTimeout(this.timeoutId),this.timeoutId=Oo.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(ko.maxSessionTimeoutInMs,2*t.timeoutInMs):ko.initialSessionTimeoutInMs}}ko.initialSessionTimeoutInMs=1e3,ko.maxSessionTimeoutInMs=3e4;const Mo="v2";class Uo{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new ko(Uo.distributionBinSize,(e=>this.reportPerformanceEvent(o(Mo,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Oo.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(o(Mo,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),Uo.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){Oo.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(Mo,"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(Mo,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Uo.distributionBinSize=1e3,Uo.calculateFPSInterval=1e3;var Do=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Lo=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 No="v2";var Ho;!function(e){const t=Je()?void 0:new Uo(yr);let n,r,i;function a(e){yr(o(No,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function s(e){yr(o(No,"videoEffects.notifyError"),"video.notifyError",[e])}function c(){return Pt(lt)&&!!lt.supports.video&&(!!lt.supports.video.mediaStream||!!lt.supports.video.sharedFrame)}function l(e,n){if(Pt(lt,be.sidePanel),!c()||!p())throw Fe;Nn(o(No,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>Do(this,void 0,void 0,(function*(){const{streamId:r}=n,o=u(e,t);yield _o(r,o,s,t)}))),!1),yr(o(No,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n])}function u(e,t){return n=>Do(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(Pt(lt,be.sidePanel),!c()||!m())throw Fe;Nn(o(No,"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),yr(o(No,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[n])}function f(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Lo(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function p(){var e;return Pt(lt,be.sidePanel)&&g()&&!!(null===(e=lt.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 Pt(lt,be.sidePanel)&&!!(null===(e=lt.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(Pt(lt,be.sidePanel),!c())throw Fe;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Nn(o(No,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e.timeLimit)),!1),p())l(e.videoFrameHandler,e.config);else{if(!m())throw Fe;d(e.videoBufferHandler,e.config)}null==t||t.startMonitorSlowFrameProcessing()},e.notifySelectedVideoEffectChanged=function(e,t){if(Pt(lt,be.sidePanel),!c())throw Fe;yr(o(No,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])},e.registerForVideoEffect=function(e){if(Pt(lt,be.sidePanel),!c())throw Fe;Nn(o(No,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Ko(e,t),!1),yr(o(No,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")},e.isSupported=c}(Ho||(Ho={}));var xo=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Vo="v2";function _o(e,t,n,r){var o,i;return xo(this,void 0,void 0,(function*(){const a=jo();!Je()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),zo(yield Bo(e,n,r),new qo(n,t),a.writable)}))}function Wo(e,t,n,r){var o,i;return xo(this,void 0,void 0,(function*(){const a=jo();!Je()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),zo(yield Bo(e,n,r),new Jo(n,t),a.writable)}))}function Bo(e,t,n){return xo(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 jo(){if(Je())throw Fe;const e=window.MediaStreamTrackGenerator;if(!e)throw Fe;return new e({kind:"video"})}function zo(e,t,n){new(0,$e().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class qo{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>xo(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 Go{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 $o{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const n=new Uint32Array(e);for(let r=0,o=0;r<t;r++){const t=n[o++],r=n[o++],i=n[o++],a=new Uint8Array(e,r,i);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,n=new TextDecoder("utf-8");let r=0;const o=e[r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24);for(let i=0;i<o&&r<e.length-1;i++){const o=e[++r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24),i=e.findIndex(((e,t,n)=>0==e&&t>r)),a=n.decode(e.slice(++r,i)),s=this.metadataMap.get(o);void 0!==s&&t.set(a,s);r=i+(4-(i-r)%4-1)}return t}}class Jo{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>xo(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o,attributes:i}={}}=yield this.extractVideoFrameAndMetadata(e),a=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o,attributes:i}),s=new VideoFrame(a,{timestamp:n});t.enqueue(s),r.close(),e.close(),a.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>xo(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 Go(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 $o(i,r.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult,attributes:a.attributes}}})),Nn(o(Vo,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Ko(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),yr(o(Vo,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Ho.EffectFailureReason?e:Ho.EffectFailureReason.InitializationFailure;yr(o(Vo,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Zo=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Qo="v2";var Xo;!function(e){e.frameProcessingTimeoutInMs=2e3;const t=Je()?void 0:new Uo(yr);let n;function r(){const t=setTimeout((()=>{l(`Frame not processed in ${e.frameProcessingTimeoutInMs}ms`,n.Warn)}),e.frameProcessingTimeoutInMs);return function(){clearTimeout(t)}}function i(e,t){return n=>Zo(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 Pt(lt),Ho.isSupported()}function c(e){yr(o(Qo,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function l(e,t=n.Warn){yr(o(Qo,"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(Pt(lt,be.sidePanel)){if(Nn(o(Qo,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e)),!1),null===(n=lt.supports.video)||void 0===n?void 0:n.mediaStream)Nn(o(Qo,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>Zo(this,void 0,void 0,(function*(){const{streamId:r,metadataInTexture:o}=n,a=t?i(e.videoFrameHandler,t):e.videoFrameHandler;o?yield Wo(r,a,l,t):yield _o(r,a,l,t)}))),!1),yr(o(Qo,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(u=lt.supports.video)||void 0===u?void 0:u.sharedFrame))throw Fe;Nn(o(Qo,"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(),c(i)}),l)}}),!1),yr(o(Qo,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==t||t.startMonitorSlowFrameProcessing()}},e.notifySelectedVideoEffectChanged=function(e,t,n){if(Pt(lt,be.sidePanel),!s())throw Fe;yr(o(Qo,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])},e.registerForVideoEffect=function(e){if(Pt(lt,be.sidePanel),!s())throw Fe;Nn(o(Qo,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Ko(e,t),!1),yr(o(Qo,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")},e.updatePersonalizedEffects=function(e){if(Pt(lt,be.sidePanel),!Ho.isSupported())throw Fe;yr(o(Qo,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])},e.isSupported=s,e.notifyFatalError=function(e){if(Pt(lt),!Ho.isSupported())throw Fe;l(e,n.Fatal)}}(Xo||(Xo={}));const Yo="users";function ei(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Yo}=`+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 ti(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Yo}=`+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 ni(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)}`,c=void 0===r?"":`&subject=${encodeURIComponent(r)}`,l=void 0===o?"":`&content=${encodeURIComponent(o)}`;return`${g}://${m}/l/meeting/new?${i}${a}${s}${c}${l}`}function ri(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 oi;!function(e){function t(){return!(!Pt(lt)||!lt.supports.appInstallDialog)}e.openAppInstallDialog=function(e){return new Promise((n=>{if(Pt(lt,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage),!t())throw new Error("Not supported");const r=o("v1","appInstallDialog.openAppInstallDialog");lt.isLegacyTeams?n(pr(r,"executeDeepLink",ri(e.appId))):(yr(r,"appInstallDialog.openAppInstallDialog",[e]),n())}))},e.isSupported=t}(oi||(oi={}));const ii="v1",ai=t("media");var si;function ci(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 li(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 ui(e){gi(e)?Ot("2.0.2"):mi(e)?Ot(c):pi(e)&&Ot("2.0.4")}function di(e){return!(e.mediaType!=si.MediaType.Video||!e.videoProps||!e.videoProps.videoController)}function fi(e){return!(null==e||e.maxMediaCount>10)}function pi(e){var t;return!((null==e?void 0:e.mediaType)!=si.MediaType.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function gi(e){return!(!e||e.mediaType!=si.MediaType.VideoAndImage&&!e.videoAndImageProps)}function mi(e){return!(!e||e.mediaType!=si.MediaType.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function hi(e,t,n){return null!=e&&null!=t&&t==si.FileFormat.ID&&null!=n}function wi(e){return!(null==e||e.length<=0||e.length>10)}function vi(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Ci(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,l;!function(e){e.Base64="base64",e.ID="id"}(t=e.FileFormat||(e.FileFormat={}));class d{}function f(){return!(!Pt(lt)||!lt.supports.permissions)}e.File=d,e.captureImage=function(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Pt(lt,be.content,be.task),C.isFramelessWindow)if(Ft("1.7.0"))yr(o(ii,"media.captureImage"),"captureImage",e);else{e({errorCode:we.OLD_PLATFORM},[])}else{e({errorCode:we.NOT_SUPPORTED_ON_PLATFORM},[])}},e.hasPermission=function(){if(Pt(lt,be.content,be.task),!f())throw Fe;const e=ve.Media;return new Promise((t=>{t(mr(o(ii,"media.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Pt(lt,be.content,be.task),!f())throw Fe;const e=ve.Media;return new Promise((t=>{t(mr(o(ii,"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(Pt(lt,be.content,be.task),Ft(u))if(hi(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];yr(o(ii,"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=ci(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=li(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):ai(`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)&&yr(o(ii,"media.getMedia"),"getMedia",r),Nn(o(ii,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Hn("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=ci(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Hn("getMedia"+t)}else{const e=li(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:we.INTERNAL_ERROR,message:"data received is null"},new Blob),Hn("getMedia"+t)}}))}}e.Media=p;class g{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Pt(lt,be.content,be.task);try{Ot(c)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};yr(o(ii,"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"}(l=e.ImageOutputFormats||(e.ImageOutputFormats={})),e.selectMedia=function(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Pt(lt,be.content,be.task),!Ft(u)){const e={errorCode:we.OLD_PLATFORM};return void t(e,[])}try{ui(e)}catch(e){return void t(e,[])}if(!fi(e)){const e={errorCode:we.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];yr(o(ii,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(di(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(Pt(lt,be.content,be.task),!Ft(u)){return void t({errorCode:we.OLD_PLATFORM})}if(!wi(e)){return void t({errorCode:we.INVALID_ARGUMENTS})}const n=[e];yr(o(ii,"media.viewImages"),"viewImages",n,t)},e.scanBarCode=function(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Pt(lt,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(vi(t))yr(o(ii,"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},"")}}}(si||(si={}));const yi="v2";var Si;!function(e){function t(){return!!(Pt(lt)&&lt.supports.barCode&&lt.supports.permissions)}e.scanBarCode=function(e){return new Promise((n=>{if(Pt(lt,be.content,be.task),!t())throw Fe;if(!vi(e))throw{errorCode:we.INVALID_ARGUMENTS};n(mr(o(yi,"barCode.scanBarCode"),"media.scanBarCode",e))}))},e.hasPermission=function(){if(Pt(lt,be.content,be.task),!t())throw Fe;const e=ve.Media;return new Promise((t=>{t(mr(o(yi,"barCode.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Pt(lt,be.content,be.task),!t())throw Fe;const e=ve.Media;return new Promise((t=>{t(mr(o(yi,"barCode.requestPermission"),"permissions.request",e))}))},e.isSupported=t}(Si||(Si={}));var bi;!function(e){function t(e,t){return new Promise((r=>{if(Pt(lt,be.content,be.task),!n())throw Fe;if(lt.isLegacyTeams)r(pr(e,"executeDeepLink",ei([t.user],void 0,t.message)));else{r(pr(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function n(){return!(!Pt(lt)||!lt.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(Pt(lt,be.content,be.task),!n())throw Fe;if(lt.isLegacyTeams)o(pr(r,"executeDeepLink",ei(e.users,e.topic,e.message)));else{o(pr(r,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))},e.isSupported=n}(bi||(bi={}));var Ei=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};var Ii,Ti;!function(e){function t(){return C.isFramelessWindow?!(!Pt(lt)||!lt.supports.clipboard):!!(Pt(lt)&&navigator&&navigator.clipboard&&lt.supports.clipboard)}e.write=function(e){return Ei(this,void 0,void 0,(function*(){if(Pt(lt,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 mr(o("v2","clipboard.write"),"clipboard.writeToClipboard",r)}))},e.read=function(){return Ei(this,void 0,void 0,(function*(){Pt(lt,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 mr(e,"clipboard.readFromClipboard");if("string"==typeof n){const e=JSON.parse(n);return qe(e.mimeType,e.content)}return n}))},e.isSupported=t}(Ii||(Ii={})),function(e){e.isNAAChannelRecommended=function(){var e;return null!==(e=Pt(lt)&&lt.isNAAChannelRecommended)&&void 0!==e&&e}}(Ti||(Ti={}));const Ai="v2";var Pi;function Fi(){return lt.hostVersionsInfo?lt.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}!function(e){function t(){return!!(Pt(lt)&&lt.supports.geoLocation&&lt.supports.permissions)}let n;e.getCurrentLocation=function(){if(Pt(lt,be.content,be.task),!t())throw Fe;return mr(o(Ai,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})},e.hasPermission=function(){if(Pt(lt,be.content,be.task),!t())throw Fe;const e=ve.GeoLocation;return new Promise((t=>{t(mr(o(Ai,"geoLocation.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Pt(lt,be.content,be.task),!t())throw Fe;const e=ve.GeoLocation;return new Promise((t=>{t(mr(o(Ai,"geoLocation.requestPermission"),"permissions.request",e))}))},e.isSupported=t,function(e){function t(){return!!(Pt(lt)&&lt.supports.geoLocation&&lt.supports.geoLocation.map&&lt.supports.permissions)}e.chooseLocation=function(){if(Pt(lt,be.content,be.task),!t())throw Fe;return mr(o(Ai,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})},e.showLocation=function(e){if(Pt(lt,be.content,be.task),!t())throw Fe;if(!e)throw{errorCode:we.INVALID_ARGUMENTS};return mr(o(Ai,"geoLocation.showLocation"),"location.showLocation",e)},e.isSupported=t}(n=e.map||(e.map={}))}(Pi||(Pi={}));const Ri="v1";class Oi{postMessage(e,t){Pt(lt),yr(o(Ri,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||De())}addEventListener(e,t){Pt(lt),"message"===e&&Nn(o(Ri,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class ki{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Pt(lt,be.task),yr(o(Ri,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||De())}addEventListener(e,t){Pt(lt,be.task),"message"===e&&Nn(o(Ri,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}var Mi;!function(e){function t(){return!(!Pt(lt)||!lt.supports.secondaryBrowser)}e.open=function(e){if(Pt(lt,be.content),!t())throw Fe;if(!e||!ze(e))throw{errorCode:we.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return mr(o("v2","secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())},e.isSupported=t}(Mi||(Mi={}));var Ui;!function(e){function t(){return!(!Pt(lt)||!lt.supports.location)}e.getLocation=function(e,n){if(!n)throw new Error("[location.getLocation] Callback cannot be null");if(Pt(lt,be.content,be.task),!Ft(l))throw{errorCode:we.OLD_PLATFORM};if(!e)throw{errorCode:we.INVALID_ARGUMENTS};if(!t())throw Fe;yr(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(Pt(lt,be.content,be.task),!Ft(l))throw{errorCode:we.OLD_PLATFORM};if(!e)throw{errorCode:we.INVALID_ARGUMENTS};if(!t())throw Fe;yr(o("v1","location.showLocation"),"location.showLocation",[e],n)},e.isSupported=t}(Ui||(Ui={}));var Di=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Li="v1";var Ni;!function(e){let t,n,r,i,a,s,c;function l(e,n){yr(o(Li,"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");Nn(o(Li,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(n=>Di(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)}}))));Nn(o(Li,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),n(i)}))}function u(e,t){yr(o(Li,"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");xn("meeting.micStateChanged")&&Hn("meeting.micStateChanged"),xn("meeting.audioDeviceSelectionChanged")&&Hn("meeting.audioDeviceSelectionChanged"),t(n)}))}function d(e,t){Pt(lt,be.sidePanel,be.meetingStage),yr(o(Li,"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");Pt(lt,be.sidePanel,be.meetingStage),yr(o(Li,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)},e.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Pt(lt,be.sidePanel,be.meetingStage),yr(o(Li,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)},e.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Pt(lt,be.sidePanel,be.meetingStage,be.settings,be.content),yr(o(Li,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)},e.getMeetingDetailsVerbose=function(){var e,t,n;return Di(this,void 0,void 0,(function*(){let r;Pt(lt,be.sidePanel,be.meetingStage,be.settings,be.content);try{const e=!0;r=yield mr(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");Pt(lt,be.sidePanel,be.meetingStage,be.task),yr(o(Li,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)},e.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Pt(lt,be.sidePanel),yr(o(Li,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)},e.requestStartLiveStreaming=function(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Pt(lt,be.sidePanel),yr(o(Li,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)},e.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Pt(lt,be.sidePanel),yr(o(Li,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)},e.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Pt(lt,be.sidePanel),Nn(o(Li,"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");Pt(lt,be.sidePanel,be.meetingStage),yr(o(Li,"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");Pt(lt,be.sidePanel,be.meetingStage),yr(o(Li,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)},e.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Pt(lt,be.sidePanel,be.meetingStage),yr(o(Li,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)},e.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Pt(lt,be.sidePanel,be.meetingStage),yr(o(Li,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)},e.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Pt(lt,be.sidePanel,be.meetingStage),Nn(o(Li,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)},e.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Pt(lt,be.sidePanel,be.meetingStage),Nn(o(Li,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)},e.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Pt(lt,be.sidePanel,be.meetingStage),Nn(o(Li,"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"));Pt(lt);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||s.Other};return mr(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){Pt(lt,be.sidePanel),e.contentUrl&&new URL(e.contentUrl),yr(o(Li,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}}(c=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");Pt(lt,be.sidePanel,be.meetingStage),e.isAppHandlingAudio?l(e,t):u(e,t)},e.updateMicState=function(e){d(e,t.AppInitiated)}}(Ni||(Ni={}));var Hi;!function(e){function t(){return!(!Pt(lt)||!lt.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")),Pt(lt,be.content),_e((()=>new Promise((e=>{if(!t())throw Fe;e(mr(a,"monetization.openPurchaseExperience",i))}))),r)},e.isSupported=t}(Hi||(Hi={}));var xi;!function(e){function t(){return!(!Pt(lt)||!lt.supports.calendar)}e.openCalendarItem=function(e){return new Promise((n=>{if(Pt(lt,be.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");n(pr(o("v2","calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))},e.composeMeeting=function(e){return new Promise((n=>{if(Pt(lt,be.content),!t())throw new Error("Not supported");const r=o("v2","calendar.composeMeeting");lt.isLegacyTeams?n(pr(r,"executeDeepLink",ni(e.attendees,e.startTime,e.endTime,e.subject,e.content))):n(pr(r,"calendar.composeMeeting",e))}))},e.isSupported=t}(xi||(xi={}));var Vi;!function(e){function t(){return!(!Pt(lt)||!lt.supports.mail)}let n;e.openMailItem=function(e){return new Promise((n=>{if(Pt(lt,be.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");n(pr(o("v2","mail.openMailItem"),"mail.openMailItem",e))}))},e.composeMail=function(e){return new Promise((n=>{if(Pt(lt,be.content),!t())throw new Error("Not supported");n(pr(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={}))}(Vi||(Vi={}));var _i;!function(e){function t(){$e().print()}function n(e,t,n){!Mt(t)&&Pt(lt),!Mt(t)&&n&&n(),Bn(e,t)}function r(e,t,n){!Mt(t)&&Pt(lt),!Mt(t)&&n&&n(),qn(e,t)}function i(){return!(!Pt(lt)||!lt.supports.teamsCore)}e.enablePrintCapability=function(){if(!C.printCapabilityEnabled){if(Pt(lt),!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}(_i||(_i={}));var Wi;function Bi(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?ji(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function ji(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(!Ci(t))throw{errorCode:we.INVALID_ARGUMENTS};if(!n())throw Fe;r(mr(e,"people.selectPeople",t))}))}function n(){return!(!Pt(lt)||!lt.supports.people)}e.selectPeople=function(e,n){let r,i;Pt(lt,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}(Wi||(Wi={}));var zi;!function(e){e.showProfile=function(e){return Pt(lt,be.content),new Promise((t=>{const[n,r]=Bi(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(mr(o("v2","profile.showProfile"),"profile.showProfile",i))}))},e.isSupported=function(){return!(!Pt(lt)||!lt.supports.profile)}}(zi||(zi={}));const qi="v2";var Gi;!function(e){const t="search.queryChange",n="search.queryClose",r="search.queryExecute";function i(){return!(!Pt(lt)||!lt.supports.search)}e.registerHandlers=function(e,a,s){if(Pt(lt,be.content),!i())throw Fe;Nn(o(qi,"search.registerOnClosedHandler"),n,e),Nn(o(qi,"search.registerOnExecutedHandler"),r,a),s&&Nn(o(qi,"search.registerOnChangeHandler"),t,s)},e.unregisterHandlers=function(){if(Pt(lt,be.content),!i())throw Fe;yr(o(qi,"search.unregisterHandlers"),"search.unregister"),Hn(t),Hn(n),Hn(r)},e.isSupported=i,e.closeSearch=function(){return new Promise((e=>{if(Pt(lt,be.content),!i())throw new Error("Not supported");e(pr(o(qi,"search.closeSearch"),"search.closeSearch"))}))}}(Gi||(Gi={}));var $i=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};var Ji;!function(e){function t(t,n){return new Promise((r=>{if(!a())throw Fe;r(mr(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!(!Pt(lt)||!lt.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 Pt(lt,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 Pt(lt)&&void 0!==(null===(e=lt.supports.sharing)||void 0===e?void 0:e.history)}e.getContent=function(){return $i(this,void 0,void 0,(function*(){if(Pt(lt,be.sidePanel,be.meetingStage),!t())throw Fe;const e=yield mr(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={}))}(Ji||(Ji={}));var Ki;!function(e){let t,n;function r(){return!(!Pt(lt)||!lt.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(Pt(lt,be.content),!r())throw Fe;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(mr(o("v2","stageView.open"),"stageView.open",e))}))},e.isSupported=r,function(e){function t(){var e;return Pt(lt)&&void 0!==(null===(e=lt.supports.stageView)||void 0===e?void 0:e.self)}e.close=function(){return new Promise((e=>{if(Pt(lt,be.content),!t())throw Fe;e(mr(o("v2","stageView.self.close"),"stageView.self.close"))}))},e.isSupported=t}(n=e.self||(e.self={}))}(Ki||(Ki={}));var Zi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Qi="v2";var Xi;!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(Pt(lt,be.content,be.task),!r.isSupported())throw Fe;const e=ve.Media;return mr(o(Qi,"visualMedia.hasPermission"),"permissions.has",e)},e.requestPermission=function(){if(Pt(lt,be.content,be.task),!r.isSupported())throw Fe;const e=ve.Media;return mr(o(Qi,"visualMedia.requestPermission"),"permissions.request",e)},function(e){function t(){return!!(Pt(lt)&&lt.supports.visualMedia&&lt.supports.visualMedia.image&&lt.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 Ue}e.captureImages=function(e){return Zi(this,void 0,void 0,(function*(){Pt(lt,be.content,be.task),n(),r(e);const t=yield mr(o(Qi,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return i(e.maxVisualMediaCount,t),t}))},e.retrieveImages=function(e){return Zi(this,void 0,void 0,(function*(){Pt(lt,be.content,be.task),n(),r(e);const t=yield mr(o(Qi,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return i(e.maxVisualMediaCount,t),t}))},e.isSupported=t}(r=e.image||(e.image={}))}(Xi||(Xi={}));var Yi,ea=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};!function(e){function t(){return Pt(lt)&&void 0!==lt.supports.webStorage}e.isWebStorageClearedOnUserLogOut=function(){return ea(this,void 0,void 0,(function*(){if(Pt(lt),!t())throw Fe;return yield fr(o("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut")}))},e.isSupported=t}(Yi||(Yi={}));var ta;!function(e){let t;function n(){return!(!Pt(lt)||!lt.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(Pt(lt,be.content,be.task),!n())throw Fe;if(!lt.isLegacyTeams)return yr(r,"call.startCall",[e],o);o(fr(r,"executeDeepLink",ti(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}(ta||(ta={}));const na="v1";var ra;!function(e){e.Messages=gn.Messages,e.FailedReason=gn.FailedReason,e.ExpectedFailureReason=gn.ExpectedFailureReason,e.notifyAppLoaded=function(){an(o(na,"appInitialization.notifyAppLoaded"))},e.notifySuccess=function(){ln(o(na,"appInitialization.notifySuccess"))},e.notifyFailure=function(e){cn(o(na,"appInitialization.notifyFailure"),e)},e.notifyExpectedFailure=function(e){sn(o(na,"appInitialization.notifyExpectedFailure"),e)}}(ra||(ra={}));const oa=t("thirdPartyCloudStorage");var ia;!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||(oa("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=li(e.fileChunk,e.fileType);if(o?(r||(r=new t(e.fileType,[])),r.assembleAttachment.push(o)):(oa(`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=ci(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 c(){return!(!Pt(lt)||!lt.supports.thirdPartyCloudStorage)}e.getDragAndDropFiles=function(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Pt(lt,be.content,be.task),!c())throw Fe;if(a)throw a=null,new Error("getDragAndDropFiles cannot be called twice");a=t,i=!0,yr(o("v2","thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],s)}else{t([],{errorCode:we.INVALID_ARGUMENTS})}},e.isSupported=c}(ia||(ia={}));const aa="v1";function sa(e,t){on(o(aa,"initialize"),t).then((()=>{e&&e()}))}function ca(){_i.enablePrintCapability()}function la(){_i.print()}function ua(e){At(),yr(o(aa,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=C.frameContext),e(t)}))}function da(e){fn(o(aa,"registerOnThemeChangeHandlerHelper"),e)}function fa(e){Vn(o(aa,"registerFullScreenHandler"),"fullScreenChange",e,[])}function pa(e){Vn(o(aa,"registerAppButtonClickHandler"),"appButtonClick",e,[be.content])}function ga(e){Vn(o(aa,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[be.content])}function ma(e){Vn(o(aa,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[be.content])}function ha(e){Fn.backStack.registerBackButtonHandlerHelper(o(aa,"registerBackButtonHandler"),e)}function wa(e){_i.registerOnLoadHandlerHelper(o(aa,"registerOnLoadHandler"),e)}function va(e){_i.registerBeforeUnloadHandlerHelper(o(aa,"registerBeforeUnloadHandler"),e)}function Ca(e){Vn(o(aa,"registerFocusEnterHandler"),"focusEnter",e,[])}function ya(e){Vn(o(aa,"registerChangeSettingsHandler"),"changeSettings",e,[be.content])}function Sa(e,t){Pt(lt),Sn(o(aa,"getTabInstances"),t).then((t=>{e(t)}))}function ba(e,t){Pt(lt),bn(o(aa,"getMruTabInstances"),t).then((t=>{e(t)}))}function Ea(e){En(o(aa,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Ia(e,t){Pt(lt,be.content,be.sidePanel,be.settings,be.task,be.stage,be.meetingStage);const n=null!=t?t:De();pn(o(aa,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Ta(e){In(o(aa,"setFrameContext"),e)}function Aa(e,t,n){on(o(aa,"initializeWithFrameContext"),n).then((()=>t&&t())),In(o(aa,"setFrameContext"),e)}const Pa="v1";function Fa(e){yn(o(Pa,"navigation.returnFocus"),e)}function Ra(e,t){Pt(lt);const n=null!=t?t:De();Cn(o(Pa,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Oa(e,t){Pt(lt,be.content,be.sidePanel,be.settings,be.remove,be.task,be.stage,be.meetingStage);const n=null!=t?t:De();wn(o(Pa,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function ka(e){Pt(lt);const t=null!=e?e:De();vn(o(Pa,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const Ma="v1";var Ua;!function(e){e.setValidityState=function(e){Tn(o(Ma,"settings.setValidityState"),e)},e.getSettings=function(e){Pt(lt,be.content,be.settings,be.remove,be.sidePanel),An(o(Ma,"settings.getSettings")).then((t=>{e(t)}))},e.setSettings=function(e,t){Pt(lt,be.content,be.settings,be.sidePanel);const n=null!=t?t:De();Pn(o(Ma,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))},e.registerOnSaveHandler=function(e){Fn.config.registerOnSaveHandlerHelper(o(Ma,"settings.registerOnSaveHandler"),e)},e.registerOnRemoveHandler=function(e){Fn.config.registerOnRemoveHandlerHelper(o(Ma,"settings.registerOnRemoveHandler"),e)}}(Ua||(Ua={}));var Da=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 La="v1";var Na;!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:Pe.Small,width:e.width?e.width:Pe.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:Pe.Small,width:e.width?e.width:Pe.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function r(e){return e.height=e.height?e.height:Pe.Small,e.width=e.width?e.width:Pe.Small,e}e.startTask=function(e,r){const i=o(La,"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?(Pt(lt,be.content,be.sidePanel,be.meetingStage),yr(i,"tasks.startTask",[e],r)):void 0!==e.completionBotId?Zt(i,n(e),a):Kt(i,t(e),a),new Oi},e.updateTask=function(e){e=r(e);const{width:t,height:n}=e,i=Da(e,["width","height"]);if(Object.keys(i).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Jt(o(La,"tasks.updateTask"),e)},e.submitTask=function(e,t){Qt(o(La,"tasks.submitTask"),e,t)},e.getDefaultSizeIfNotProvided=r}(Na||(Na={}));const Ha="v2";var xa;!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!(!Pt(lt,be.meetingStage,be.sidePanel,be.content)||!lt.supports.interactive)}}(xa||(xa={}));class Va{getFluidTenantInfo(){return _a(),new Promise((e=>{e(mr(o(Ha,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return _a(),new Promise((t=>{t(mr(o(Ha,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return _a(),new Promise((e=>{e(mr(o(Ha,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return _a(),new Promise((t=>{t(mr(o(Ha,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return _a(),new Promise((e=>{e(mr(o(Ha,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return _a(),new Promise((t=>{t(mr(o(Ha,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return _a(),new Promise((t=>{t(mr(o(Ha,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return _a(),new Promise((t=>{t(mr(o(Ha,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return _a(),new Va}}function _a(){if(!xa.isSupported())throw new Error("LiveShareHost Not supported")}var Wa=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 Ba(e){try{return e.cartItems=ja(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function ja(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=ja(e.accessories)),e}))}const za=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Wa(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=za(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function qa(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)$a(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");$a(t)}}}function $a(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");Ka(e.price),Za(e.quantity)}function Ja(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 Ka(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 Za(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Qa(e){if(!Object.values(Ya.CartStatus).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Xa="v2";var Ya;!function(e){let t,n;function r(){return!(!Pt(lt)||!lt.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(Pt(lt,be.content,be.task),!r())throw Fe;return mr(o(Xa,"marketplace.getCart"),"marketplace.getCart",e.cartVersion).then(Ba)},e.addOrUpdateCartItems=function(t){if(Pt(lt,be.content,be.task),!r())throw Fe;if(!t)throw new Error("addOrUpdateCartItemsParams must be provided");return Ja(null==t?void 0:t.cartId),qa(null==t?void 0:t.cartItems),mr(o(Xa,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},t),{cartItems:za(t.cartItems),cartVersion:e.cartVersion})).then(Ba)},e.removeCartItems=function(t){if(Pt(lt,be.content,be.task),!r())throw Fe;if(!t)throw new Error("removeCartItemsParams must be provided");if(Ja(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 mr(o(Xa,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(Ba)},e.updateCartStatus=function(t){if(Pt(lt,be.content,be.task),!r())throw Fe;if(!t)throw new Error("updateCartStatusParams must be provided");return Ja(null==t?void 0:t.cartId),Qa(null==t?void 0:t.cartStatus),mr(o(Xa,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(Ba)},e.isSupported=r}(Ya||(Ya={}))})(),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},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function 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:()=>Oe,ChildAppWindow:()=>Di,DialogDimension:()=>Re,ErrorCode:()=>we,FileOpenPreference:()=>ge,FrameContexts:()=>Te,HostClientType:()=>Ie,HostName:()=>Ae,LiveShareHost:()=>qa,NotificationTypes:()=>io,ParentAppWindow:()=>Ni,SecondaryM365ContentIdName:()=>he,TaskModuleDimension:()=>ke,TeamType:()=>Pe,UserSettingTypes:()=>so,UserTeamRole:()=>Fe,ViewerActionTypes:()=>ao,app:()=>vn,appEntity:()=>Mo,appInitialization:()=>ca,appInstallDialog:()=>ci,authentication:()=>Zt,barCode:()=>Ti,calendar:()=>ji,call:()=>sa,chat:()=>Pi,clipboard:()=>Ri,conversations:()=>wo,copilot:()=>vo,dialog:()=>nn,enablePrintCapability:()=>ga,executeDeepLink:()=>Oa,externalAppAuthentication:()=>yo,externalAppCardActions:()=>So,externalAppCommands:()=>Eo,files:()=>Ao,geoLocation:()=>Mi,getAdaptiveCardSchemaVersion:()=>Ui,getContext:()=>ha,getMruTabInstances:()=>Fa,getTabInstances:()=>Pa,initialize:()=>pa,initializeWithFrameContext:()=>Ma,liveShare:()=>za,location:()=>xi,logs:()=>oo,mail:()=>zi,marketplace:()=>is,media:()=>fi,meeting:()=>Wi,meetingRoom:()=>Po,menus:()=>on,messageChannels:()=>Gt,monetization:()=>Bi,navigateBack:()=>Ha,navigateCrossDomain:()=>Na,navigateToTab:()=>Da,nestedAppAuth:()=>Oi,notifications:()=>Fo,openFilePreview:()=>mo,otherAppStateChange:()=>Ro,pages:()=>Mn,people:()=>Gi,print:()=>ma,profile:()=>Ki,registerAppButtonClickHandler:()=>Ca,registerAppButtonHoverEnterHandler:()=>ya,registerAppButtonHoverLeaveHandler:()=>Sa,registerBackButtonHandler:()=>ba,registerBeforeUnloadHandler:()=>Ia,registerChangeSettingsHandler:()=>Ta,registerCustomHandler:()=>po,registerFocusEnterHandler:()=>Aa,registerFullScreenHandler:()=>va,registerOnLoadHandler:()=>Ea,registerOnThemeChangeHandler:()=>wa,registerUserSettingsChangeHandler:()=>go,remoteCamera:()=>ko,returnFocus:()=>La,search:()=>Qi,secondaryBrowser:()=>Hi,sendCustomEvent:()=>fo,sendCustomMessage:()=>uo,setFrameContext:()=>ka,settings:()=>Va,shareDeepLink:()=>Ra,sharing:()=>Yi,stageView:()=>ea,tasks:()=>Ba,teams:()=>Lo,teamsCore:()=>qi,thirdPartyCloudStorage:()=>da,uploadCustomApp:()=>co,version:()=>Tt,videoEffects:()=>Bo,videoEffectsEx:()=>ri,visualMedia:()=>ra,webStorage:()=>oa});const e=(0,n(815).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","*.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const 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 I(e,t,n)}function I(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 T(e),P(e<0?0:0|F(e))}function T(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 P(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=P(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 U(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 U(e){return y.toByteArray(D(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 I(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 L=/[^+/0-9A-Za-z-_]/g;function D(e){if((e=(e=e.split("=")[0]).trim().replace(L,"")).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=P(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(U(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=P(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ne(e.length)?P(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,Ie,Ae,Te,Pe,Fe,Re;!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.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ce||(Ce={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(ye||(ye={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Se||(Se={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(be||(be={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Ee||(Ee={})),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"}(Ie||(Ie={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(Ae||(Ae={})),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"}(Te||(Te={})),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"}(Pe||(Pe={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(Fe||(Fe={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Re||(Re={}));var Oe,ke=Re;!function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Oe||(Oe={}));const Me={errorCode:we.NOT_SUPPORTED_ON_PLATFORM},Ue=1,Le=5,De={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Ne=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),He=new Error("Invalid response: Received more images than the specified max limit in the response.");function xe(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Ve(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 _e(){return de()}function We(e){return Object.keys(e).forEach((t=>{"object"==typeof e[t]&&We(e[t])})),Object.freeze(e)}function Be(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function je(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function ze(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function qe(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 Ge(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.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function $e(e){return!(Ve(`${e.majorVersion}.${e.minorVersion}`,`${Ue}.${Le}`)>=0)}function Je(e){return"https:"===e.protocol}function Ke(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 Ze(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 Qe(){if(Xe())throw new Error("window object undefined at SSR check");return window}function Xe(){return"undefined"==typeof window}function Ye(e,t){if(nt(e)||!ot(e)||!it(e))throw t||new Error("id is not valid.")}function et(e,t){const n=e.toString().toLocaleLowerCase();if(nt(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Je(e))throw t||new Error("Url should be a valid https url")}function tt(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function nt(e){let t;try{const n=rt(e);t=decodeURIComponent(n)}catch(n){t=e}return/<script[^>]*>[\s\S]*?<\/script[^>]*>/gi.test(t)}function rt(e){return new Map([["&lt;","<"],["&gt;",">"],["&amp;","&"],["&quot;",'"'],["&#39;","'"],["&#x2F;","/"]]).forEach(((t,n)=>{e=e.replace(new RegExp(n,"gi"),t)})),e}function ot(e){return e.length<256&&e.length>4}function it(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function at(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 st=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 lt=t("runtime"),ct=4;function ut(e){return e.apiVersion===ct}const dt={apiVersion:-1,supports:{}};function ft(e){if(ut(e))return!0;throw-1===e.apiVersion?new Error(w):new Error(v)}let pt=dt;const gt={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:De,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:{}}}},mt=[Ie.desktop,Ie.web,Ie.rigel,Ie.surfaceHub,Ie.teamsRoomsWindows,Ie.teamsRoomsAndroid,Ie.teamsPhones,Ie.teamsDisplays],ht=[Ie.android,Ie.ios,Ie.ipados],wt=[...mt,...ht];function vt(e){let t=e;if(t.apiVersion<ct&&Ct.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),ut(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const Ct=[{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=st(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})}}}],yt={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:mt}],"1.9.0":[{capability:{location:{}},hostClientTypes:wt}],"2.0.0":[{capability:{people:{}},hostClientTypes:wt},{capability:{sharing:{}},hostClientTypes:[Ie.desktop,Ie.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[Ie.android,Ie.desktop,Ie.ios,Ie.teamsRoomsAndroid,Ie.teamsPhones,Ie.teamsDisplays,Ie.web]},{capability:{webStorage:{}},hostClientTypes:[Ie.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[Ie.android,Ie.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[Ie.android,Ie.ios]}]},St=lt.extend("generateBackCompatRuntimeConfig");function bt(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]=bt(e[r]||{},t[r]));return n}function Et(e,t,n){St("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);St("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{Ve(e,t)>=0&&n[t].forEach((e=>{void 0!==C.hostClientType&&e.hostClientTypes.includes(C.hostClientType)&&(r=bt(r,e.capability))}))}));const o={apiVersion:ct,hostVersionsInfo:De,isLegacyTeams:!0,supports:r};return St("Runtime config after updating based on highestSupportedVersion: %o",o),o}const It=lt.extend("applyRuntimeConfig");function At(e){"string"==typeof e.apiVersion&&(It("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),It("Fast-forwarding runtime %o",e);const t=vt(e);It("Applying runtime %o",t),pt=We(t)}const Tt="2.27.0-beta.0",Pt=t("internal"),Ft=Pt.extend("ensureInitializeCalled"),Rt=Pt.extend("ensureInitialized");function Ot(){if(!C.initializeCalled)throw Ft(h),new Error(h)}function kt(e,...t){if(!C.initializeCompleted)throw Rt("%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 ft(e)}function Mt(e=s){const t=Ve(C.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Ut(){return C.hostClientType==Ie.android||C.hostClientType==Ie.ios||C.hostClientType==Ie.ipados}function Lt(e=s){if(!Ut()){throw{errorCode:we.NOT_SUPPORTED_ON_PLATFORM}}if(!Mt(e)){throw{errorCode:we.OLD_PLATFORM}}}function Dt(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 Nt(e){return null==e}var Ht=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 xt=[];const Vt=t("validateOrigin");function _t(){return Ht(this,void 0,void 0,(function*(){yield Bt()}))}function Wt(){return 0===xt.length}function Bt(){return Ht(this,void 0,void 0,(function*(){return Wt()?Xe()?(xt=d,d):fetch(f).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(jt(JSON.stringify(e)))return xt=e.validOrigins,xt;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(Vt("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),xt=d,xt))):xt}))}function jt(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 Vt("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function zt(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 qt(e){return Bt().then((t=>{if(!Je(e))return Vt("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=>zt(e,n))))return!0;for(const e of C.additionalValidOrigins){if(zt("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return Vt("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}))}var Gt,$t=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!(!kt(pt)||!(null===(e=pt.supports.messageChannels)||void 0===e?void 0:e.telemetry))}e.getTelemetryPort=function(){return $t(this,void 0,void 0,(function*(){if(n)return r("Returning telemetry port from cache"),n;if(!i())throw Me;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!(!kt(pt)||!(null===(e=pt.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}e.getDataLayerPort=function(){return $t(this,void 0,void 0,(function*(){if(n)return r("Returning dataLayer port from cache"),n;if(!i())throw Me;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!(!kt(pt)||!pt.supports.messageChannels)}}(Gt||(Gt={}));const Jt="v1",Kt="v2";var Zt;!function(e){let t,n,r,i;function a(e,n){return new Promise(((r,o)=>{if(C.hostClientType!==Ie.web){const t=tt(n.url);et(t),r(yr(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(yr(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(yr(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function c(){d();try{fr.childWindow&&fr.childWindow.close()}finally{fr.childWindow=null,fr.childOrigin=null}}function u(e){c();let t=e.width||600,n=e.height||400;t=Math.min(t,fr.currentWindow.outerWidth-400),n=Math.min(n,fr.currentWindow.outerHeight-200);const r=tt(e.url.replace("{oauthRedirectMethod}","web"));et(r);let o=void 0!==fr.currentWindow.screenLeft?fr.currentWindow.screenLeft:fr.currentWindow.screenX,i=void 0!==fr.currentWindow.screenTop?fr.currentWindow.screenTop:fr.currentWindow.screenY;o+=fr.currentWindow.outerWidth/2-t/2,i+=fr.currentWindow.outerHeight/2-n/2,fr.childWindow=fr.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),fr.childWindow?f():g("FailedToOpenWindow")}function d(){n&&(clearInterval(n),n=0),Wn("initialize"),Wn("navigateCrossDomain")}function f(){d(),n=fr.currentWindow.setInterval((()=>{if(!fr.childWindow||fr.childWindow.closed)g("CancelledByUser");else{const e=fr.childOrigin;try{fr.childOrigin="*",Yr("ping")}finally{fr.childOrigin=e}}}),100),_n(o(Jt,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[Te.authentication,C.hostClientType])),_n(o(Jt,"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(){_n(o(Jt,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",p,!1),_n(o(Jt,"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 kt(pt,Te.content,Te.sidePanel,Te.settings,Te.remove,Te.task,Te.stage,Te.meetingStage),a(n.successCallback||n.failureCallback?o(Jt,"authentication.authenticate"):o(Kt,"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 Ot(),s(e&&(e.successCallback||e.failureCallback)?o(Jt,"authentication.getAuthToken"):o(Kt,"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 Ot(),l(e&&(e.successCallback||e.failureCallback)?o(Jt,"authentication.getUser"):o(Kt,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)}))},e.notifySuccess=function(e,t){kt(pt,Te.authentication),Ir(o(t?Jt:Kt,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Qr(fr.parentWindow,(()=>setTimeout((()=>fr.currentWindow.close()),200)))},e.notifyFailure=function(e,t){kt(pt,Te.authentication),Ir(o(t?Jt:Kt,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Qr(fr.parentWindow,(()=>setTimeout((()=>fr.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 Xt(e,t){if(kt(pt,Te.content,Te.sidePanel,Te.task,Te.meetingStage),!nn.update.isSupported())throw Me;Ir(e,"tasks.updateTask",[t])}function Yt(e,t,n,r){if(kt(pt,Te.content,Te.sidePanel,Te.meetingStage),!nn.url.isSupported())throw Me;r&&_n(o(Qt,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Ir(e,"tasks.startTask",[nn.url.getDialogInfoFromUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Wn("messageForParent")}))}function en(e,t,n,r){if(kt(pt,Te.content,Te.sidePanel,Te.meetingStage),!nn.url.bot.isSupported())throw Me;r&&_n(o(Qt,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Ir(e,"tasks.startTask",[nn.url.getDialogInfoFromBotUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Wn("messageForParent")}))}function tn(e,t,n){if(kt(pt,Te.task),!nn.url.isSupported())throw Me;Ir(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}var nn;!function(e){const t=[];function n(e){C.frameContext&&(C.frameContext===Te.task?t.push(e):Wn("messageForChild"))}let r,i,a;e.initialize=function(){_n(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:Re.Small,width:e.size?e.size.width:Re.Small,title:e.title,fallbackUrl:e.fallbackUrl}}e.open=function(e,t,n){Yt(o(Qt,"dialog.url.open"),e,t,n)},e.submit=function(e,t){tn(o(Qt,"dialog.url.submit"),e,t)},function(e){function n(){var e,t;return kt(pt)&&!!(null===(t=null===(e=pt.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}e.sendMessageToParentFromDialog=function(e){if(kt(pt,Te.task),!n())throw Me;Ir(o(Qt,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])},e.sendMessageToDialog=function(e){if(kt(pt,Te.content,Te.sidePanel,Te.meetingStage),!n())throw Me;Ir(o(Qt,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])},e.registerOnMessageFromParent=function(e){if(kt(pt,Te.task),!n())throw Me;for(Wn("messageForChild"),_n(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 kt(pt)&&void 0!==(pt.supports.dialog&&pt.supports.dialog.url)},function(e){e.open=function(e,t,n){en(o(Qt,"dialog.url.bot.open"),e,t,n)},e.isSupported=function(){return kt(pt)&&void 0!==(pt.supports.dialog&&pt.supports.dialog.url&&pt.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!(!kt(pt)||!pt.supports.dialog)},function(e){e.resize=function(e){Xt(o(Qt,"dialog.update.resize"),e)},e.isSupported=function(){return!(!kt(pt)||!pt.supports.dialog)&&!!pt.supports.dialog.update}}(i=e.update||(e.update={})),function(e){function t(){const e=pt.hostVersionsInfo&&pt.hostVersionsInfo.adaptiveCardSchemaVersion&&!$e(pt.hostVersionsInfo.adaptiveCardSchemaVersion);return kt(pt)&&void 0!==(e&&pt.supports.dialog&&pt.supports.dialog.card)}let n;function r(e){return{card:e.card,height:e.size?e.size.height:Re.Small,width:e.size?e.size.width:Re.Small,title:e.title}}function i(e){const t=r(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,n){if(kt(pt,Te.content,Te.sidePanel,Te.meetingStage),!t())throw Me;const i=r(e);Ir(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=pt.hostVersionsInfo&&pt.hostVersionsInfo.adaptiveCardSchemaVersion&&!$e(pt.hostVersionsInfo.adaptiveCardSchemaVersion);return kt(pt)&&void 0!==(e&&pt.supports.dialog&&pt.supports.dialog.card&&pt.supports.dialog.card.bot)}e.open=function(e,n){if(kt(pt,Te.content,Te.sidePanel,Te.meetingStage),!t())throw Me;const r=i(e);Ir(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={}))}(nn||(nn={}));const rn="v2";var on;!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)||(kt(pt),Ir(o(rn,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function l(e){r&&r(e)||(kt(pt),Ir(o(rn,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function c(e){i&&i(e)||(kt(pt),Ir(o(rn,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function u(){return!(!kt(pt)||!pt.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(){_n(o(rn,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",l,!1),_n(o(rn,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",c,!1),_n(o(rn,"menus.registerSetModuleViewHandler"),"setModuleView",s,!1)},e.setUpViews=function(e,t){if(kt(pt),!u())throw Me;a=t,Ir(o(rn,"menus.setUpViews"),"setUpViews",[e])},e.setNavBarMenu=function(e,t){if(kt(pt),!u())throw Me;r=t,Ir(o(rn,"menus.setNavBarMenu"),"setNavBarMenu",[e])},e.showActionMenu=function(e,t){if(kt(pt),!u())throw Me;i=t,Ir(o(rn,"menus.showActionMenu"),"showActionMenu",[e])},e.isSupported=u}(on||(on={}));const an="v2",sn=5e3,ln=t("app");function cn(e,t){if(Xe()){return ln.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return qe((()=>mn(e,t)),sn,new Error("SDK initialization timed out."))}function un(e){Ir(e,vn.Messages.AppLoaded,[Tt])}function dn(e,t){Ir(e,vn.Messages.ExpectedFailure,[t.reason,t.message])}function fn(e,t){Ir(e,vn.Messages.Failure,[t.reason,t.message])}function pn(e){Ir(e,vn.Messages.Success,[Tt])}const gn=ln.extend("initializeHelper");function mn(e,t){return new Promise((n=>{C.initializeCalled||(C.initializeCalled=!0,Nn(),C.initializePromise=gr(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=s})=>{C.frameContext=e,C.hostClientType=t,C.clientSupportedSDKVersion=r;try{gn("Parsing %s",n);const e=JSON.parse(n);if(gn("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&At(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{gn("Attempting to parse %s as an SDK version",n),isNaN(Ve(n,s))||(C.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(gn("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");At(e)}catch(e){if(!(e instanceof SyntaxError))throw e;At(Et(C.clientSupportedSDKVersion,gt,yt))}}C.initializeCompleted=!0})),Zt.initialize(),on.initialize(),Mn.config.initialize(),nn.initialize()),Array.isArray(t)&&Dt(t),void 0!==C.initializePromise?n(C.initializePromise):gn("GlobalVars.initializePromise is unexpectedly undefined")}))}function hn(e,t){!Nt(t)&&Ot(),zn(e,t)}function wn(e,t){return new Promise((n=>{kt(pt,Te.content,Te.sidePanel,Te.settings,Te.task,Te.stage,Te.meetingStage),n(wr(e,"executeDeepLink",t))}))}var vn;function Cn(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:Ae.teams,clientType:e.hostClientType?e.hostClientType:Ie.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,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}!function(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(Xe())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 _t(),cn(o(an,"app.initialize"),e)},e._initialize=function(e){fr.currentWindow=e},e._uninitialize=function(){C.initializeCalled&&(Hn(),C.initializeCalled=!1,C.initializeCompleted=!1,C.initializePromise=void 0,C.additionalValidOrigins=[],C.frameContext=void 0,C.hostClientType=void 0,C.isFramelessWindow=!1,Gt.telemetry._clearTelemetryPort(),Gt.dataLayer._clearDataLayerPort(),mr())},e.getContext=function(){return new Promise((e=>{Ot(),e(hr(o(an,"app.getContext"),"getContext"))})).then((e=>Cn(e)))},e.notifyAppLoaded=function(){Ot(),un(o(an,"app.notifyAppLoaded"))},e.notifySuccess=function(){Ot(),pn(o(an,"app.notifySuccess"))},e.notifyFailure=function(e){Ot(),fn(o(an,"app.notifyFailure"),e)},e.notifyExpectedFailure=function(e){Ot(),dn(o(an,"app.notifyExpectedFailure"),e)},e.registerOnThemeChangeHandler=function(e){hn(o(an,"app.registerOnThemeChangeHandler"),e)},e.openLink=function(e){return wn(o(an,"app.openLink"),e)},function(e){e.registerBeforeSuspendOrTerminateHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");kt(pt),Qn(e)},e.registerOnResumeHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");kt(pt),Xn(e)}}(a=e.lifecycle||(e.lifecycle={}))}(vn||(vn={}));const yn="v2";function Sn(e,t){return new Promise((n=>{if(kt(pt,Te.content,Te.sidePanel,Te.settings,Te.remove,Te.task,Te.stage,Te.meetingStage),!Mn.isSupported())throw Me;n(vr(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function bn(e){return new Promise((t=>{if(kt(pt),!Mn.backStack.isSupported())throw Me;t(vr(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function En(e,t){return new Promise((n=>{if(kt(pt),!Mn.tabs.isSupported())throw Me;n(vr(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function In(e,t){if(kt(pt),!Mn.isSupported())throw Me;Ir(e,"returnFocus",[t])}function An(e,t){return new Promise((n=>{if(kt(pt),!Mn.tabs.isSupported())throw Me;n(hr(e,"getTabInstances",t))}))}function Tn(e,t){return new Promise((n=>{if(kt(pt),!Mn.tabs.isSupported())throw Me;n(hr(e,"getMruTabInstances",t))}))}function Pn(e,t){if(kt(pt,Te.content,Te.sidePanel,Te.meetingStage),!Mn.isSupported())throw Me;Ir(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Fn(e,t){if(kt(pt,Te.content),!Mn.isSupported())throw Me;Ir(e,"setFrameContext",[t])}function Rn(e,t){if(kt(pt,Te.settings,Te.remove),!Mn.config.isSupported())throw Me;Ir(e,"settings.setValidityState",[t])}function On(e){return new Promise((t=>{if(kt(pt,Te.content,Te.settings,Te.remove,Te.sidePanel),!Mn.isSupported())throw Me;t(hr(e,"settings.getSettings"))}))}function kn(e,t){return new Promise((n=>{if(kt(pt,Te.content,Te.settings,Te.sidePanel),!Mn.config.isSupported())throw Me;n(wr(e,"settings.setSettings",t))}))}var Mn;!function(e){function t(e){Fn(o(yn,"pages.setCurrentFrame"),e)}function n(){return!(!kt(pt)||!pt.supports.pages)}let r,i,a,s,l,c;e.returnFocus=function(e){In(o(yn,"pages.returnFocus"),e)},e.registerFocusEnterHandler=function(e){jn(o(yn,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!n())throw Me}))},e.setCurrentFrame=t,e.initializeWithFrameContext=function(e,n,r){_t(),cn(o(yn,"pages.initializeWithFrameContext"),r).then((()=>n&&n())),t(e)},e.getConfig=function(){return On(o(yn,"pages.getConfig."))},e.navigateCrossDomain=function(e){return Sn(o(yn,"pages.navigateCrossDomain"),e)},e.navigateToApp=function(e){return new Promise((t=>{if(kt(pt,Te.content,Te.sidePanel,Te.settings,Te.task,Te.stage,Te.meetingStage),!n())throw Me;const r=o(yn,"pages.navigateToApp");pt.isLegacyTeams?t(wr(r,"executeDeepLink",Ge(e))):t(wr(r,"pages.navigateToApp",e))}))},e.shareDeepLink=function(e){return Pn(o(yn,"pages.shareDeepLink"),e)},e.registerFullScreenHandler=function(e){jn(o(yn,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Nt(e)&&!n())throw Me}))},e.isSupported=n,function(e){e.navigateToTab=function(e){return En(o(yn,"pages.tabs.navigateToTab"),e)},e.getTabInstances=function(e){return An(o(yn,"pages.tabs.getTabInstances"),e)},e.getMruTabInstances=function(e){return Tn(o(yn,"pages.tabs.getMruTabInstances"),e)},e.isSupported=function(){return!(!kt(pt)||!pt.supports.pages)&&!!pt.supports.pages.tabs}}(r=e.tabs||(e.tabs={})),function(e){let t,n;function r(e,n,r){!Nt(n)&&kt(pt,Te.settings),r&&r(),t=n,!Nt(n)&&Ir(e,"registerHandler",["save"])}function i(e,t,r){!Nt(t)&&kt(pt,Te.remove,Te.settings),r&&r(),n=t,!Nt(t)&&Ir(e,"registerHandler",["remove"])}function a(e){const n=new s(e);t?t(n):fr.childWindow?Yr("settings.save",[e]):n.notifySuccess()}e.initialize=function(){_n(o(yn,"pages.config.registerSettingsSaveHandler"),"settings.save",a,!1),_n(o(yn,"pages.config.registerSettingsRemoveHandler"),"settings.remove",l,!1)},e.setValidityState=function(e){return Rn(o(yn,"pages.config.setValidityState"),e)},e.setConfig=function(e){return kn(o(yn,"pages.config.setConfig"),e)},e.registerOnSaveHandler=function(e){r(o(yn,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Nt(e)&&!u())throw Me}))},e.registerOnSaveHandlerHelper=r,e.registerOnRemoveHandler=function(e){i(o(yn,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Nt(e)&&!u())throw Me}))},e.registerOnRemoveHandlerHelper=i,e.registerChangeConfigHandler=function(e){jn(o(yn,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[Te.content],(()=>{if(!u())throw Me}))};class s{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Ir(o(yn,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ir(o(yn,"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):fr.childWindow?Yr("settings.remove",[]):e.notifySuccess()}class c{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Ir(o(yn,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ir(o(yn,"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!(!kt(pt)||!pt.supports.pages)&&!!pt.supports.pages.config}e.isSupported=u}(i=e.config||(e.config={})),function(e){let t;function n(){return bn(o(yn,"pages.backStack.navigateBack"))}function r(e,n,r){!Nt(n)&&kt(pt),r&&r(),t=n,!Nt(n)&&Ir(e,"registerHandler",["backButton"])}function i(){t&&t()||(fr.childWindow?Yr("backButtonPress",[]):n())}function a(){return!(!kt(pt)||!pt.supports.pages)&&!!pt.supports.pages.backStack}e._initialize=function(){_n(o(yn,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",i,!1)},e.navigateBack=n,e.registerBackButtonHandler=function(e){r(o(yn,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Nt(e)&&!a())throw Me}))},e.registerBackButtonHandlerHelper=r,e.isSupported=a}(a=e.backStack||(e.backStack={})),function(e){function t(){return!(!kt(pt)||!pt.supports.pages)&&!!pt.supports.pages.fullTrust}e.enterFullscreen=function(){if(kt(pt,Te.content),!t())throw Me;Ir(o(yn,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])},e.exitFullscreen=function(){if(kt(pt,Te.content),!t())throw Me;Ir(o(yn,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])},e.isSupported=t}(s=e.fullTrust||(e.fullTrust={})),function(e){function t(){return!(!kt(pt)||!pt.supports.pages)&&!!pt.supports.pages.appButton}e.onClick=function(e){jn(o(yn,"pages.appButton.onClick"),"appButtonClick",e,[Te.content],(()=>{if(!t())throw Me}))},e.onHoverEnter=function(e){jn(o(yn,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[Te.content],(()=>{if(!t())throw Me}))},e.onHoverLeave=function(e){jn(o(yn,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[Te.content],(()=>{if(!t())throw Me}))},e.isSupported=t}(l=e.appButton||(e.appButton={})),function(e){function t(){return!(!kt(pt)||!pt.supports.pages)&&!!pt.supports.pages.currentApp}e.navigateTo=function(e){return new Promise((n=>{if(kt(pt,Te.content,Te.sidePanel,Te.settings,Te.task,Te.stage,Te.meetingStage),!t())throw Me;n(Cr(o(yn,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))},e.navigateToDefaultPage=function(){return new Promise((e=>{if(kt(pt,Te.content,Te.sidePanel,Te.settings,Te.task,Te.stage,Te.meetingStage),!t())throw Me;e(Cr(o(yn,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))},e.isSupported=t}(c=e.currentApp||(e.currentApp={}))}(Mn||(Mn={}));var Un=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 Ln=t("handlers");class Dn{static initializeHandlers(){Dn.handlers.themeChange=qn,Dn.handlers.load=$n,Dn.handlers.beforeUnload=Zn,Mn.backStack._initialize()}static uninitializeHandlers(){Dn.handlers={},Dn.themeChangeHandler=null,Dn.loadHandler=null,Dn.beforeUnloadHandler=null,Dn.beforeSuspendOrTerminateHandler=null,Dn.resumeHandler=null}}function Nn(){Dn.initializeHandlers()}function Hn(){Dn.uninitializeHandlers()}Dn.handlers={},Dn.themeChangeHandler=null,Dn.loadHandler=null,Dn.beforeUnloadHandler=null,Dn.beforeSuspendOrTerminateHandler=null,Dn.resumeHandler=null;const xn=Ln.extend("callHandler");function Vn(e,t){const n=Dn.handlers[e];if(n){xn("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return fr.childWindow?(Yr(e,t),[!1,void 0]):(xn("Handler for action message %s not found.",e),[!1,void 0])}function _n(e,t,n,r=!0,o=[]){n?(Dn.handlers[t]=n,r&&Ir(e,"registerHandler",[t,...o])):delete Dn.handlers[t]}function Wn(e){delete Dn.handlers[e]}function Bn(e){return null!=Dn.handlers[e]}function jn(e,t,n,r,o){n&&kt(pt,...r),o&&o(),_n(e,t,n)}function zn(e,t){Dn.themeChangeHandler=t,!Nt(t)&&Ir(e,"registerHandler",["themeChange"])}function qn(e){Dn.themeChangeHandler&&Dn.themeChangeHandler(e),fr.childWindow&&Yr("themeChange",[e])}function Gn(e,t){Dn.loadHandler=t,!Nt(t)&&Ir(e,"registerHandler",["load"])}function $n(e){const t=Jn(e);Dn.resumeHandler?(Dn.resumeHandler(t),fr.childWindow&&Yr("load",[t])):Dn.loadHandler&&(Dn.loadHandler(e),fr.childWindow&&Yr("load",[e]))}function Jn(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Kn(e,t){Dn.beforeUnloadHandler=t,!Nt(t)&&Ir(e,"registerHandler",["beforeUnload"])}function Zn(){return Un(this,void 0,void 0,(function*(){const e=()=>{Ir(o("v2","handleBeforeUnload"),"readyToUnload",[])};Dn.beforeSuspendOrTerminateHandler?(yield Dn.beforeSuspendOrTerminateHandler(),fr.childWindow?Yr("beforeUnload"):e()):Dn.beforeUnloadHandler&&Dn.beforeUnloadHandler(e)||(fr.childWindow?Yr("beforeUnload"):e())}))}function Qn(e){Dn.beforeSuspendOrTerminateHandler=e,!Nt(e)&&Ir(o("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Xn(e){Dn.resumeHandler=e,!Nt(e)&&Ir(o("v2","registerOnResumeHandler"),"registerHandler",["load"])}class Yn{constructor(e=_e()){this.uuid=e,at(e)}toString(){return this.uuid}}var er=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const tr=e=>{const{uuid:t}=e,n=er(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},nr=e=>{const{uuidAsString:t}=e,n=er(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Yn(t):void 0})},rr=e=>{const{uuidAsString:t}=e,n=er(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Yn(t):void 0})},or=e=>{const{uuid:t}=e,n=er(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},ir=t("nestedAppAuthUtils"),ar=ir.extend("tryPolyfillWithNestedAppAuthBridge");function sr(e,t,n){var r;const o=ar;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=cr(a,n);s&&(a.nestedAppAuthBridge=s)}const lr=ir.extend("createNestedAppAuthBridge");function cr(e,t){const n=lr;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 ur=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 dr=t("communication");class fr{}class pr{}function gr(e,t){if(pr.messageListener=e=>ur(this,void 0,void 0,(function*(){return yield Mr(e)})),fr.currentWindow=fr.currentWindow||Qe(),fr.parentWindow=fr.currentWindow.parent!==fr.currentWindow.self?fr.currentWindow.parent:fr.currentWindow.opener,fr.topWindow=fr.currentWindow.top,(fr.parentWindow||e)&&fr.currentWindow.addEventListener("message",pr.messageListener,!1),!fr.parentWindow){const e=fr.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));C.isFramelessWindow=!0,e.onNativeMessage=Br}try{return fr.parentOrigin="*",yr(t,"initialize",[Tt,ct,e]).then((([e,t,n,r])=>(sr(r,fr.currentWindow,{onMessage:Lr,sendPostMessage:Tr}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{fr.parentOrigin=null}}function mr(){fr.currentWindow&&fr.currentWindow.removeEventListener("message",pr.messageListener,!1),fr.currentWindow=null,fr.parentWindow=null,fr.parentOrigin=null,fr.childWindow=null,fr.childOrigin=null,pr.parentMessageQueue=[],pr.childMessageQueue=[],pr.nextMessageId=0,pr.callbacks.clear(),pr.promiseCallbacks.clear(),pr.portCallbacks.clear(),pr.legacyMessageIdsToUuidMap={}}function hr(e,t,...n){return yr(e,t,n).then((([e])=>e))}function wr(e,t,...n){return yr(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function vr(e,t,n,...r){return yr(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function Cr(e,t,...n){return yr(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function yr(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(Er(Or(e,t,n).uuid))}))}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 br(Or(e,t,n).uuid)}function br(e){return new Promise(((t,n)=>{pr.portCallbacks.set(e,((e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}))}))}function Er(e){return new Promise((t=>{pr.promiseCallbacks.set(e,t)}))}function Ir(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=Or(e,t,o);r&&pr.callbacks.set(a.uuid,r)}pr.parentMessageQueue=[],pr.childMessageQueue=[],pr.topMessageQueue=[],pr.nextMessageId=0,pr.callbacks=new Map,pr.promiseCallbacks=new Map,pr.portCallbacks=new Map,pr.legacyMessageIdsToUuidMap={};const Ar=dr.extend("sendNestedAuthRequestToTopWindow");function Tr(e){const t=Ar,n=fr.topWindow,r=to(e);return t("Message %i information: %o",r.uuid,{actionName:r.func}),Fr(n,r)}const Pr=dr.extend("sendRequestToTargetWindowHelper");function Fr(e,t){const n=Pr,r=Jr(e),o=tr(t);if(C.isFramelessWindow)fr.currentWindow&&fr.currentWindow.nativeInterface&&(n(`Sending message %i to ${r} via framelessPostMessage interface`,o.uuidAsString),fr.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=$r(e);e&&i?(n(`Sending message %i to ${r} via postMessage`,o.uuidAsString),e.postMessage(o,i)):(n(`Adding message %i to ${r} message queue`,o.uuidAsString),Gr(e).push(t))}return t}const Rr=dr.extend("sendMessageToParentHelper");function Or(e,t,n){const r=Rr,o=fr.parentWindow,i=eo(e,t,n);return r("Message %i information: %o",i.uuid,{actionName:t,args:n}),Fr(o,i)}const kr=dr.extend("processMessage");function Mr(e){return ur(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void kr("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 Nr(t,n).then((r=>{r?(Hr(t,n),t===fr.parentWindow?Br(e):t===fr.childWindow&&zr(e)):kr("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin")}))}))}const Ur=dr.extend("processAuthBridgeMessage");function Lr(e,t){var n,r;const o=Ur;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?Nr(l,c)?(fr.topWindow&&!fr.topWindow.closed&&l!==fr.topWindow||(fr.topWindow=l,fr.topOrigin=c),fr.topWindow&&fr.topWindow.closed&&(fr.topWindow=null,fr.topOrigin=null),Zr(fr.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 Dr=dr.extend("shouldProcessMessage");function Nr(e,t){return ur(this,void 0,void 0,(function*(){if(fr.currentWindow&&e===fr.currentWindow)return Dr("Should not process message because it is coming from the current window"),!1;if(fr.currentWindow&&fr.currentWindow.location&&t&&t===fr.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Dr("Message has an invalid origin of %s",t),!1}const n=yield qt(e);return n||Dr("Message has an invalid origin of %s",t),n}}))}function Hr(e,t){C.isFramelessWindow||fr.parentWindow&&!fr.parentWindow.closed&&e!==fr.parentWindow?fr.childWindow&&!fr.childWindow.closed&&e!==fr.childWindow||(fr.childWindow=e,fr.childOrigin=t):(fr.parentWindow=e,fr.parentOrigin=t),fr.parentWindow&&fr.parentWindow.closed&&(fr.parentWindow=null,fr.parentOrigin=null),fr.childWindow&&fr.childWindow.closed&&(fr.childWindow=null,fr.childOrigin=null),Zr(fr.parentWindow),Zr(fr.childWindow)}const xr=dr.extend("handleParentMessage");function Vr(e){var t;const n=xr;if(!e.uuid)return pr.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=_r(pr.callbacks,t);if(n)return n;const r=_r(pr.promiseCallbacks,t);if(r)return r;const o=_r(pr.portCallbacks,t);if(o)return o}n(`Received a message with uuid: ${null===(t=e.uuid)||void 0===t?void 0:t.toString()} and legacyId: %i that failed to produce a callbackId`,e.id)}function _r(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Wr(e,t){const n=_r(t,e.uuid);n&&t.delete(n),e.uuid?pr.legacyMessageIdsToUuidMap={}:delete pr.legacyMessageIdsToUuidMap[e.id]}function Br(e){const t=xr;if("id"in e.data&&"number"==typeof e.data.id){const n=e.data,r=rr(n),o=Vr(r);if(o){const n=pr.callbacks.get(o);t("Received a response from parent for message %i",o),n&&(t("Invoking the registered callback for message %i with arguments %o",o,r.args),n.apply(null,[...r.args,r.isPartialResponse]),jr(e)||(t("Removing registered callback for message %i",o),Wr(r,pr.callbacks)));const i=pr.promiseCallbacks.get(o);i&&(t("Invoking the registered promise callback for message %i with arguments %o",o,r.args),i(r.args),t("Removing registered promise callback for message %i",o),Wr(r,pr.promiseCallbacks));const a=pr.portCallbacks.get(o);if(a){let n;t("Invoking the registered port callback for message %i with arguments %o",o,r.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),a(n,r.args),t("Removing registered port callback for message %i",o),Wr(r,pr.portCallbacks)}r.uuid&&(pr.legacyMessageIdsToUuidMap={})}}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),Vn(n.func,n.args)}else t("Received an unknown message: %O",e)}function jr(e){return!0===e.data.isPartialResponse}function zr(e){if("id"in e.data&&"func"in e.data){const t=nr(e.data),[n,r]=Vn(t.func,t.args);n&&void 0!==r?Xr(t.id,t.uuid,Array.isArray(r)?r:[r]):Ir(o("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(fr.childWindow){const n=e.pop();Xr(t.id,t.uuid,e,n)}}))}}function qr(){return fr.topWindow!==fr.parentWindow}function Gr(e){return e===fr.topWindow&&qr()?pr.topMessageQueue:e===fr.parentWindow?pr.parentMessageQueue:e===fr.childWindow?pr.childMessageQueue:[]}function $r(e){return e===fr.topWindow&&qr()?fr.topOrigin:e===fr.parentWindow?fr.parentOrigin:e===fr.childWindow?fr.childOrigin:null}function Jr(e){return e===fr.topWindow&&qr()?"top":e===fr.parentWindow?"parent":e===fr.childWindow?"child":null}const Kr=dr.extend("flushMessageQueue");function Zr(e){const t=$r(e),n=Gr(e),r=Jr(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=tr(o);Kr("Flushing message %i from "+r+" message queue via postMessage.",null==n?void 0:n.uuidAsString),e.postMessage(n,t)}}}function Qr(e,t){let n;n=fr.currentWindow.setInterval((()=>{0===Gr(e).length&&(clearInterval(n),t())}),100)}function Xr(e,t,n,r){const o=fr.childWindow,i=no(e,t,n,r),a=or(i),s=$r(o);o&&s&&o.postMessage(a,s)}function Yr(e,t){const n=fr.childWindow,r=ro(e,t),o=$r(n);n&&o?n.postMessage(r,o):Gr(n).push(r)}function eo(e,t,n){const r=pr.nextMessageId++,o=new Yn;return pr.legacyMessageIdsToUuidMap[r]=o,{id:r,uuid:o,func:t,timestamp:Date.now(),args:n||[],apiVersionTag:e}}function to(e){const t=pr.nextMessageId++,n=new Yn;return pr.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),args:[],data:e}}function no(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function ro(e,t){return{func:e,args:t||[]}}var oo,io,ao,so;!function(e){function t(){return!(!kt(pt)||!pt.supports.logs)}e.registerGetLogHandler=function(e){if(!Nt(e)&&kt(pt),!Nt(e)&&!t())throw Me;e?_n(o("v1","log.request"),"log.request",(()=>{const t=e();Ir(o("v1","log.receive"),"log.receive",[t])})):Wn("log.request")},e.isSupported=t}(oo||(oo={})),function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(io||(io={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(ao||(ao={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(so||(so={}));const lo="v1";function co(e,t){kt(pt),Ir(o(lo,"uploadCustomApp"),"uploadCustomApp",[e],t||xe())}function uo(e,t,n){kt(pt),Ir(o(lo,"sendCustomMessage"),e,t,n)}function fo(e,t){if(kt(pt),!fr.childWindow)throw new Error("The child window has not yet been initialized or is not present");Yr(e,t)}function po(e,t){kt(pt),_n(o(lo,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function go(e,t){kt(pt),_n(o(lo,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function mo(e){kt(pt,Te.content,Te.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];Ir(o(lo,"openFilePreview"),"openFilePreview",t)}const ho="v1";var wo,vo;!function(e){function t(){return!(!kt(pt)||!pt.supports.conversations)}e.openConversation=function(e){return new Promise((n=>{if(kt(pt,Te.content),!t())throw Me;const r=wr(o(ho,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&_n(o(ho,"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&&_n(o(ho,"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(kt(pt,Te.content),!t())throw Me;Ir(o(ho,"conversations.closeConversation"),"conversations.closeConversation"),Wn("startConversation"),Wn("closeConversation")},e.getChatMembers=function(){return new Promise((e=>{if(kt(pt),!t())throw Me;e(hr(o(ho,"conversations.getChatMember"),"getChatMembers"))}))},e.isSupported=t}(wo||(wo={})),function(e){let t;!function(e){function t(){var e;return kt(pt)&&!!(null===(e=pt.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)}e.isSupported=t,e.getEligibilityInfo=function(){if(kt(pt),!t())throw Me;return pt.hostVersionsInfo.appEligibilityInformation}}(t=e.eligibility||(e.eligibility={}))}(vo||(vo={}));const Co="v2";var yo;!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!(!kt(pt)||!pt.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(kt(pt,Te.content),!s())throw Me;return Ye(e,new Error("App id is not valid.")),a(n),yr(o(Co,"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(kt(pt,Te.content),!s())throw Me;return Ye(e,new Error("App id is not valid.")),yr(o(Co,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[e,t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithSSOAndResendRequest=function(e,t,n){if(kt(pt,Te.content),!s())throw Me;return Ye(e,new Error("App id is not valid.")),a(n),yr(o(Co,"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(kt(pt,Te.content),!s())throw Me;return Ye(e,new Error("titleId is Invalid.")),Ye(t,new Error("oauthConfigId is Invalid.")),yr(o(Co,"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(kt(pt,Te.content),!s())throw Me;return Ye(e,new Error("titleId is Invalid.")),t&&et(t),yr(o(Co,"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}(yo||(yo={}));var So;!function(e){let t,n;function r(){return!(!kt(pt)||!pt.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(kt(pt,Te.content),!r())throw Me;return Ye(e,new Error("App id is not valid.")),yr(o("v2","externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[e,t]).then((([e,t])=>{if(!e)throw t}))},e.processActionOpenUrl=function(e,t,n){if(kt(pt,Te.content),!r())throw Me;return Ye(e,new Error("App id is not valid.")),yr(o("v2","externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[e,t.href,n]).then((([e,t])=>{if(e)throw e;return t}))},e.isSupported=r}(So||(So={}));var bo=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{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 Eo;!function(e){function t(){return!(!kt(pt)||!pt.supports.externalAppCommands)}e.processActionCommand=function(e,n,r){return bo(this,void 0,void 0,(function*(){if(kt(pt,Te.content),!t())throw Me;Ye(e,new Error("App id is not valid."));const[i,a]=yield yr(o("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[e,n,r]);if(i)throw i;return a}))},e.isSupported=t}(Eo||(Eo={}));const Io="v1";var Ao;!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(kt(pt,Te.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");Ir(o(Io,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)},e.addCloudStorageFolder=function(e,t){if(kt(pt,Te.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");Ir(o(Io,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)},e.deleteCloudStorageFolder=function(e,t,n){if(kt(pt,Te.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");Ir(o(Io,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)},e.getCloudStorageFolderContents=function(e,t,n){if(kt(pt,Te.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");Ir(o(Io,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)},e.openCloudStorageFile=function(e,t,n){if(kt(pt,Te.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");Ir(o(Io,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])},e.getExternalProviders=function(e=!1,t){if(kt(pt,Te.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Ir(o(Io,"files.getExternalProviders"),"files.getExternalProviders",[e],t)},e.copyMoveFiles=function(e,t,n,r,i=!1,a){if(kt(pt,Te.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");Ir(o(Io,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,i],a)},e.getFileDownloads=function(e){if(kt(pt,Te.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Ir(o(Io,"files.getFileDownloads"),"files.getFileDownloads",[],e)},e.openDownloadFolder=function(e=void 0,t){if(kt(pt,Te.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Ir(o(Io,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)},e.addCloudStorageProvider=function(e){if(kt(pt,Te.content),!e)throw l(we.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Ir(o(Io,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)},e.removeCloudStorageProvider=function(e,t){if(kt(pt,Te.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");Ir(o(Io,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)},e.addCloudStorageProviderFile=function(e,t){if(kt(pt,Te.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");Ir(o(Io,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)},e.renameCloudStorageProviderFile=function(e,t){if(kt(pt,Te.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");Ir(o(Io,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)},e.deleteCloudStorageProviderFile=function(e,t){if(kt(pt,Te.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");Ir(o(Io,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)},e.downloadCloudStorageProviderFile=function(e,t){if(kt(pt,Te.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");Ir(o(Io,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)},e.uploadCloudStorageProviderFile=function(e,t){if(kt(pt,Te.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");Ir(o(Io,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)},e.registerCloudStorageProviderListChangeHandler=function(e){if(kt(pt),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");_n(o(Io,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)},e.registerCloudStorageProviderContentChangeHandler=function(e){if(kt(pt),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");_n(o(Io,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}}(Ao||(Ao={}));const To="v1";var Po;!function(e){function t(){return!(!kt(pt)||!pt.supports.meetingRoom)}e.getPairedMeetingRoomInfo=function(){return new Promise((e=>{if(kt(pt),!t())throw Me;e(Cr(o(To,"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(kt(pt),!t())throw Me;n(Cr(o(To,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))},e.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(kt(pt),!t())throw Me;_n(o(To,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{kt(pt),e(t)}))},e.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(kt(pt),!t())throw Me;_n(o(To,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{kt(pt),e(t)}))},e.isSupported=t}(Po||(Po={}));var Fo,Ro;!function(e){function t(){return!(!kt(pt)||!pt.supports.notifications)}e.showNotification=function(e){if(kt(pt,Te.content),!t())throw Me;Ir(o("v1","notifications.showNotification"),"notifications.showNotification",[e])},e.isSupported=t}(Fo||(Fo={})),function(e){function t(){return!(!kt(pt)||!pt.supports.otherAppStateChange)}e.registerAppInstallationHandler=function(e){if(!t())throw new Error(we.NOT_SUPPORTED_ON_PLATFORM.toString());if(Nt(e))throw new Error(we.INVALID_ARGUMENTS.toString());_n(o("v2","otherApp.install"),"otherApp.install",e)},e.unregisterAppInstallationHandler=function(){if(!t())throw new Error(we.NOT_SUPPORTED_ON_PLATFORM.toString());Ir(o("v2","otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Wn("otherApp.install")},e.isSupported=t}(Ro||(Ro={}));const Oo="v1";var ko;!function(e){let t,n,r;function i(){return!(!kt(pt)||!pt.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(kt(pt,Te.sidePanel),!i())throw Me;Ir(o(Oo,"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(kt(pt,Te.sidePanel),!i())throw Me;Ir(o(Oo,"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(kt(pt,Te.sidePanel),!i())throw Me;Ir(o(Oo,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)},e.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(kt(pt,Te.sidePanel),!i())throw Me;Ir(o(Oo,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)},e.registerOnCapableParticipantsChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(kt(pt,Te.sidePanel),!i())throw Me;_n(o(Oo,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)},e.registerOnErrorHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(kt(pt,Te.sidePanel),!i())throw Me;_n(o(Oo,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)},e.registerOnDeviceStateChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(kt(pt,Te.sidePanel),!i())throw Me;_n(o(Oo,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)},e.registerOnSessionStatusChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(kt(pt,Te.sidePanel),!i())throw Me;_n(o(Oo,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)},e.isSupported=i}(ko||(ko={}));var Mo;!function(e){function t(){return!(!kt(pt)||!pt.supports.appEntity)}e.selectAppEntity=function(e,n,r,i){if(kt(pt,Te.content),!t())throw Me;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");Ir(o("v1","appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,n,r],i)},e.isSupported=t}(Mo||(Mo={}));const Uo="v1";var Lo;!function(e){let t,n;function r(){return!(!kt(pt)||!pt.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(kt(pt,Te.content),!r())throw Me;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Ir(o(Uo,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)},e.refreshSiteUrl=function(e,t){if(kt(pt),!r())throw Me;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Ir(o(Uo,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)},e.isSupported=r,function(e){let t;function n(){return!(!kt(pt)||!pt.supports.teams)&&!!pt.supports.teams.fullTrust}!function(e){function t(){return!(!kt(pt)||!pt.supports.teams)&&(!!pt.supports.teams.fullTrust&&!!pt.supports.teams.fullTrust.joinedTeams)}e.getUserJoinedTeams=function(e){return new Promise((n=>{if(kt(pt),!t())throw Me;if((C.hostClientType===Ie.android||C.hostClientType===Ie.teamsRoomsAndroid||C.hostClientType===Ie.teamsPhones||C.hostClientType===Ie.teamsDisplays)&&!Mt("2.0.1")){const e={errorCode:we.OLD_PLATFORM};throw new Error(JSON.stringify(e))}n(hr(o(Uo,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))},e.isSupported=t}(t=e.joinedTeams||(e.joinedTeams={})),e.getConfigSetting=function(e){return new Promise((t=>{if(kt(pt),!n())throw Me;t(hr(o(Uo,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))},e.isSupported=n}(n=e.fullTrust||(e.fullTrust={}))}(Lo||(Lo={}));class Do{static setTimeout(e,t){const n=performance.now(),r=_e();return Do.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Do.setTimeoutCallbacks[e]}static setInterval(e,t){Do.setTimeout((function n(){e(),Do.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Do.setTimeoutCallbacks){const r=Do.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Do.setTimeoutCallbacks[e].callback(),delete Do.setTimeoutCallbacks[e]}}}Do.setTimeoutCallbacks={};class No{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Do.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&&Do.clearTimeout(this.timeoutId),this.timeoutId=Do.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(No.maxSessionTimeoutInMs,2*t.timeoutInMs):No.initialSessionTimeoutInMs}}No.initialSessionTimeoutInMs=1e3,No.maxSessionTimeoutInMs=3e4;const Ho="v2";class xo{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new No(xo.distributionBinSize,(e=>this.reportPerformanceEvent(o(Ho,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Do.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(o(Ho,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),xo.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){Do.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(Ho,"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(Ho,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}xo.distributionBinSize=1e3,xo.calculateFPSInterval=1e3;var Vo=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())}))},_o=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 Wo="v2";var Bo;!function(e){const t=Xe()?void 0:new xo(Ir);let n,r,i;function a(e){Ir(o(Wo,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function s(e){Ir(o(Wo,"videoEffects.notifyError"),"video.notifyError",[e])}function l(){return kt(pt)&&!!pt.supports.video&&(!!pt.supports.video.mediaStream||!!pt.supports.video.sharedFrame)}function c(e,n){if(kt(pt,Te.sidePanel),!l()||!p())throw Me;_n(o(Wo,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>Vo(this,void 0,void 0,(function*(){const{streamId:r}=n,o=u(e,t);yield qo(r,o,s,t)}))),!1),Ir(o(Wo,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n])}function u(e,t){return n=>Vo(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(kt(pt,Te.sidePanel),!l()||!m())throw Me;_n(o(Wo,"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),Ir(o(Wo,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[n])}function f(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=_o(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function p(){var e;return kt(pt,Te.sidePanel)&&g()&&!!(null===(e=pt.supports.video)||void 0===e?void 0:e.mediaStream)}function g(){var e,t,n,r;return!(!(null===(t=null===(e=Qe().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Qe().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function m(){var e;return kt(pt,Te.sidePanel)&&!!(null===(e=pt.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(kt(pt,Te.sidePanel),!l())throw Me;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(_n(o(Wo,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e.timeLimit)),!1),p())c(e.videoFrameHandler,e.config);else{if(!m())throw Me;d(e.videoBufferHandler,e.config)}null==t||t.startMonitorSlowFrameProcessing()},e.notifySelectedVideoEffectChanged=function(e,t){if(kt(pt,Te.sidePanel),!l())throw Me;Ir(o(Wo,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])},e.registerForVideoEffect=function(e){if(kt(pt,Te.sidePanel),!l())throw Me;_n(o(Wo,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",ei(e,t),!1),Ir(o(Wo,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")},e.isSupported=l}(Bo||(Bo={}));var jo=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 zo="v2";function qo(e,t,n,r){var o,i;return jo(this,void 0,void 0,(function*(){const a=Jo();!Xe()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Ko(yield $o(e,n,r),new Zo(n,t),a.writable)}))}function Go(e,t,n,r){var o,i;return jo(this,void 0,void 0,(function*(){const a=Jo();!Xe()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Ko(yield $o(e,n,r),new Yo(n,t),a.writable)}))}function $o(e,t,n){return jo(this,void 0,void 0,(function*(){if(Xe())throw Me;const r=Qe().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 Jo(){if(Xe())throw Me;const e=window.MediaStreamTrackGenerator;if(!e)throw Me;return new e({kind:"video"})}function Ko(e,t,n){new(0,Qe().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Zo{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>jo(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 Qo{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 Xo{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const n=new Uint32Array(e);for(let r=0,o=0;r<t;r++){const t=n[o++],r=n[o++],i=n[o++],a=new Uint8Array(e,r,i);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,n=new TextDecoder("utf-8");let r=0;const o=e[r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24);for(let i=0;i<o&&r<e.length-1;i++){const o=e[++r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24),i=e.findIndex(((e,t,n)=>0==e&&t>r)),a=n.decode(e.slice(++r,i)),s=this.metadataMap.get(o);void 0!==s&&t.set(a,s);r=i+(4-(i-r)%4-1)}return t}}class Yo{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>jo(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o,attributes:i}={}}=yield this.extractVideoFrameAndMetadata(e),a=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o,attributes:i}),s=new VideoFrame(a,{timestamp:n});t.enqueue(s),r.close(),e.close(),a.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>jo(this,void 0,void 0,(function*(){if(Xe())throw Me;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 Qo(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 Xo(i,r.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult,attributes:a.attributes}}})),_n(o(zo,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function ei(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Ir(o(zo,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Bo.EffectFailureReason?e:Bo.EffectFailureReason.InitializationFailure;Ir(o(zo,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var ti=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{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 ni="v2";var ri;!function(e){e.frameProcessingTimeoutInMs=2e3;const t=Xe()?void 0:new xo(Ir);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=>ti(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 kt(pt),Bo.isSupported()}function l(e){Ir(o(ni,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function c(e,t=n.Warn){Ir(o(ni,"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 Me;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(kt(pt,Te.sidePanel)){if(_n(o(ni,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e)),!1),null===(n=pt.supports.video)||void 0===n?void 0:n.mediaStream)_n(o(ni,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>ti(this,void 0,void 0,(function*(){const{streamId:r,metadataInTexture:o}=n,a=t?i(e.videoFrameHandler,t):e.videoFrameHandler;o?yield Go(r,a,c,t):yield qo(r,a,c,t)}))),!1),Ir(o(ni,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(u=pt.supports.video)||void 0===u?void 0:u.sharedFrame))throw Me;_n(o(ni,"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),Ir(o(ni,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==t||t.startMonitorSlowFrameProcessing()}},e.notifySelectedVideoEffectChanged=function(e,t,n){if(kt(pt,Te.sidePanel),!s())throw Me;Ir(o(ni,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])},e.registerForVideoEffect=function(e){if(kt(pt,Te.sidePanel),!s())throw Me;_n(o(ni,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",ei(e,t),!1),Ir(o(ni,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")},e.updatePersonalizedEffects=function(e){if(kt(pt,Te.sidePanel),!Bo.isSupported())throw Me;Ir(o(ni,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])},e.isSupported=s,e.notifyFatalError=function(e){if(kt(pt),!Bo.isSupported())throw Me;c(e,n.Fatal)}}(ri||(ri={}));const oi="users";function ii(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${oi}=`+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 ai(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${oi}=`+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 si(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 li(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 ci;!function(e){function t(){return!(!kt(pt)||!pt.supports.appInstallDialog)}e.openAppInstallDialog=function(e){return new Promise((n=>{if(kt(pt,Te.content,Te.sidePanel,Te.settings,Te.task,Te.stage,Te.meetingStage),!t())throw new Error("Not supported");const r=o("v1","appInstallDialog.openAppInstallDialog");pt.isLegacyTeams?n(wr(r,"executeDeepLink",li(e.appId))):(Ir(r,"appInstallDialog.openAppInstallDialog",[e]),n())}))},e.isSupported=t}(ci||(ci={}));const ui="v1",di=t("media");var fi;function pi(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 gi(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 mi(e){Ci(e)?Lt("2.0.2"):yi(e)?Lt(l):vi(e)&&Lt("2.0.4")}function hi(e){return!(e.mediaType!=fi.MediaType.Video||!e.videoProps||!e.videoProps.videoController)}function wi(e){return!(null==e||e.maxMediaCount>10)}function vi(e){var t;return!((null==e?void 0:e.mediaType)!=fi.MediaType.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Ci(e){return!(!e||e.mediaType!=fi.MediaType.VideoAndImage&&!e.videoAndImageProps)}function yi(e){return!(!e||e.mediaType!=fi.MediaType.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Si(e,t,n){return null!=e&&null!=t&&t==fi.FileFormat.ID&&null!=n}function bi(e){return!(null==e||e.length<=0||e.length>10)}function Ei(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Ii(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!(!kt(pt)||!pt.supports.permissions)}e.File=d,e.captureImage=function(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(kt(pt,Te.content,Te.task),C.isFramelessWindow)if(Mt("1.7.0"))Ir(o(ui,"media.captureImage"),"captureImage",e);else{e({errorCode:we.OLD_PLATFORM},[])}else{e({errorCode:we.NOT_SUPPORTED_ON_PLATFORM},[])}},e.hasPermission=function(){if(kt(pt,Te.content,Te.task),!f())throw Me;const e=ve.Media;return new Promise((t=>{t(Cr(o(ui,"media.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(kt(pt,Te.content,Te.task),!f())throw Me;const e=ve.Media;return new Promise((t=>{t(Cr(o(ui,"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(kt(pt,Te.content,Te.task),Mt(u))if(Si(this.mimeType,this.format,this.content))Mt("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];Ir(o(ui,"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=pi(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=gi(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):di(`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=_e(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Nt(e)&&Ir(o(ui,"media.getMedia"),"getMedia",r),_n(o(ui,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Wn("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=pi(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Wn("getMedia"+t)}else{const e=gi(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:we.INTERNAL_ERROR,message:"data received is null"},new Blob),Wn("getMedia"+t)}}))}}e.Media=p;class g{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){kt(pt,Te.content,Te.task);try{Lt(l)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Ir(o(ui,"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(kt(pt,Te.content,Te.task),!Mt(u)){const e={errorCode:we.OLD_PLATFORM};return void t(e,[])}try{mi(e)}catch(e){return void t(e,[])}if(!wi(e)){const e={errorCode:we.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Ir(o(ui,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(hi(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(kt(pt,Te.content,Te.task),!Mt(u)){return void t({errorCode:we.OLD_PLATFORM})}if(!bi(e)){return void t({errorCode:we.INVALID_ARGUMENTS})}const n=[e];Ir(o(ui,"media.viewImages"),"viewImages",n,t)},e.scanBarCode=function(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(kt(pt,Te.content,Te.task),C.hostClientType!==Ie.desktop&&C.hostClientType!==Ie.web&&C.hostClientType!==Ie.rigel&&C.hostClientType!==Ie.teamsRoomsWindows&&C.hostClientType!==Ie.teamsRoomsAndroid&&C.hostClientType!==Ie.teamsPhones&&C.hostClientType!==Ie.teamsDisplays)if(Mt("1.9.0"))if(Ei(t))Ir(o(ui,"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},"")}}}(fi||(fi={}));const Ai="v2";var Ti;!function(e){function t(){return!!(kt(pt)&&pt.supports.barCode&&pt.supports.permissions)}e.scanBarCode=function(e){return new Promise((n=>{if(kt(pt,Te.content,Te.task),!t())throw Me;if(!Ei(e))throw{errorCode:we.INVALID_ARGUMENTS};n(Cr(o(Ai,"barCode.scanBarCode"),"media.scanBarCode",e))}))},e.hasPermission=function(){if(kt(pt,Te.content,Te.task),!t())throw Me;const e=ve.Media;return new Promise((t=>{t(Cr(o(Ai,"barCode.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(kt(pt,Te.content,Te.task),!t())throw Me;const e=ve.Media;return new Promise((t=>{t(Cr(o(Ai,"barCode.requestPermission"),"permissions.request",e))}))},e.isSupported=t}(Ti||(Ti={}));var Pi;!function(e){function t(e,t){return new Promise((r=>{if(kt(pt,Te.content,Te.task),!n())throw Me;if(pt.isLegacyTeams)r(wr(e,"executeDeepLink",ii([t.user],void 0,t.message)));else{r(wr(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function n(){return!(!kt(pt)||!pt.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(kt(pt,Te.content,Te.task),!n())throw Me;if(pt.isLegacyTeams)o(wr(r,"executeDeepLink",ii(e.users,e.topic,e.message)));else{o(wr(r,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))},e.isSupported=n}(Pi||(Pi={}));var Fi=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 Ri,Oi;!function(e){function t(){return C.isFramelessWindow?!(!kt(pt)||!pt.supports.clipboard):!!(kt(pt)&&navigator&&navigator.clipboard&&pt.supports.clipboard)}e.write=function(e){return Fi(this,void 0,void 0,(function*(){if(kt(pt,Te.content,Te.meetingStage,Te.task,Te.settings,Te.stage,Te.sidePanel),!t())throw Me;if(!e.type||!Object.values(Ee).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Ee)}`);const n=yield Ze(e),r={mimeType:e.type,content:n};return Cr(o("v2","clipboard.write"),"clipboard.writeToClipboard",r)}))},e.read=function(){return Fi(this,void 0,void 0,(function*(){kt(pt,Te.content,Te.meetingStage,Te.task,Te.settings,Te.stage,Te.sidePanel);const e=o("v2","clipboard.read");if(!t())throw Me;const n=yield Cr(e,"clipboard.readFromClipboard");if("string"==typeof n){const e=JSON.parse(n);return Ke(e.mimeType,e.content)}return n}))},e.isSupported=t}(Ri||(Ri={})),function(e){e.isNAAChannelRecommended=function(){var e;return null!==(e=kt(pt)&&pt.isNAAChannelRecommended)&&void 0!==e&&e}}(Oi||(Oi={}));const ki="v2";var Mi;function Ui(){return pt.hostVersionsInfo?pt.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}!function(e){function t(){return!!(kt(pt)&&pt.supports.geoLocation&&pt.supports.permissions)}let n;e.getCurrentLocation=function(){if(kt(pt,Te.content,Te.task),!t())throw Me;return Cr(o(ki,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})},e.hasPermission=function(){if(kt(pt,Te.content,Te.task),!t())throw Me;const e=ve.GeoLocation;return new Promise((t=>{t(Cr(o(ki,"geoLocation.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(kt(pt,Te.content,Te.task),!t())throw Me;const e=ve.GeoLocation;return new Promise((t=>{t(Cr(o(ki,"geoLocation.requestPermission"),"permissions.request",e))}))},e.isSupported=t,function(e){function t(){return!!(kt(pt)&&pt.supports.geoLocation&&pt.supports.geoLocation.map&&pt.supports.permissions)}e.chooseLocation=function(){if(kt(pt,Te.content,Te.task),!t())throw Me;return Cr(o(ki,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})},e.showLocation=function(e){if(kt(pt,Te.content,Te.task),!t())throw Me;if(!e)throw{errorCode:we.INVALID_ARGUMENTS};return Cr(o(ki,"geoLocation.showLocation"),"location.showLocation",e)},e.isSupported=t}(n=e.map||(e.map={}))}(Mi||(Mi={}));const Li="v1";class Di{postMessage(e,t){kt(pt),Ir(o(Li,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||xe())}addEventListener(e,t){kt(pt),"message"===e&&_n(o(Li,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Ni{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){kt(pt,Te.task),Ir(o(Li,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||xe())}addEventListener(e,t){kt(pt,Te.task),"message"===e&&_n(o(Li,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}var Hi;!function(e){function t(){return!(!kt(pt)||!pt.supports.secondaryBrowser)}e.open=function(e){if(kt(pt,Te.content),!t())throw Me;if(!e||!Je(e))throw{errorCode:we.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Cr(o("v2","secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())},e.isSupported=t}(Hi||(Hi={}));var xi;!function(e){function t(){return!(!kt(pt)||!pt.supports.location)}e.getLocation=function(e,n){if(!n)throw new Error("[location.getLocation] Callback cannot be null");if(kt(pt,Te.content,Te.task),!Mt(c))throw{errorCode:we.OLD_PLATFORM};if(!e)throw{errorCode:we.INVALID_ARGUMENTS};if(!t())throw Me;Ir(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(kt(pt,Te.content,Te.task),!Mt(c))throw{errorCode:we.OLD_PLATFORM};if(!e)throw{errorCode:we.INVALID_ARGUMENTS};if(!t())throw Me;Ir(o("v1","location.showLocation"),"location.showLocation",[e],n)},e.isSupported=t}(xi||(xi={}));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 _i="v1";var Wi;!function(e){let t,n,r,i,a,s,l;function c(e,n){Ir(o(_i,"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");_n(o(_i,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(n=>Vi(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)}}))));_n(o(_i,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),n(i)}))}function u(e,t){Ir(o(_i,"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");Bn("meeting.micStateChanged")&&Wn("meeting.micStateChanged"),Bn("meeting.audioDeviceSelectionChanged")&&Wn("meeting.audioDeviceSelectionChanged"),t(n)}))}function d(e,t){kt(pt,Te.sidePanel,Te.meetingStage),Ir(o(_i,"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");kt(pt,Te.sidePanel,Te.meetingStage),Ir(o(_i,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)},e.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");kt(pt,Te.sidePanel,Te.meetingStage),Ir(o(_i,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)},e.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");kt(pt,Te.sidePanel,Te.meetingStage,Te.settings,Te.content),Ir(o(_i,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)},e.getMeetingDetailsVerbose=function(){var e,t,n;return Vi(this,void 0,void 0,(function*(){let r;kt(pt,Te.sidePanel,Te.meetingStage,Te.settings,Te.content);try{const e=!0;r=yield Cr(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");kt(pt,Te.sidePanel,Te.meetingStage,Te.task),Ir(o(_i,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)},e.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");kt(pt,Te.sidePanel),Ir(o(_i,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)},e.requestStartLiveStreaming=function(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");kt(pt,Te.sidePanel),Ir(o(_i,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)},e.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");kt(pt,Te.sidePanel),Ir(o(_i,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)},e.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");kt(pt,Te.sidePanel),_n(o(_i,"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");kt(pt,Te.sidePanel,Te.meetingStage),Ir(o(_i,"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");kt(pt,Te.sidePanel,Te.meetingStage),Ir(o(_i,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)},e.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");kt(pt,Te.sidePanel,Te.meetingStage),Ir(o(_i,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)},e.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");kt(pt,Te.sidePanel,Te.meetingStage),Ir(o(_i,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)},e.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");kt(pt,Te.sidePanel,Te.meetingStage),_n(o(_i,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)},e.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");kt(pt,Te.sidePanel,Te.meetingStage),_n(o(_i,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)},e.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");kt(pt,Te.sidePanel,Te.meetingStage),_n(o(_i,"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"));kt(pt);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||s.Other};return Cr(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){kt(pt,Te.sidePanel),e.contentUrl&&new URL(e.contentUrl),Ir(o(_i,"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");kt(pt,Te.sidePanel,Te.meetingStage),e.isAppHandlingAudio?c(e,t):u(e,t)},e.updateMicState=function(e){d(e,t.AppInitiated)}}(Wi||(Wi={}));var Bi;!function(e){function t(){return!(!kt(pt)||!pt.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")),kt(pt,Te.content),ze((()=>new Promise((e=>{if(!t())throw Me;e(Cr(a,"monetization.openPurchaseExperience",i))}))),r)},e.isSupported=t}(Bi||(Bi={}));var ji;!function(e){function t(){return!(!kt(pt)||!pt.supports.calendar)}e.openCalendarItem=function(e){return new Promise((n=>{if(kt(pt,Te.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");n(wr(o("v2","calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))},e.composeMeeting=function(e){return new Promise((n=>{if(kt(pt,Te.content),!t())throw new Error("Not supported");const r=o("v2","calendar.composeMeeting");pt.isLegacyTeams?n(wr(r,"executeDeepLink",si(e.attendees,e.startTime,e.endTime,e.subject,e.content))):n(wr(r,"calendar.composeMeeting",e))}))},e.isSupported=t}(ji||(ji={}));var zi;!function(e){function t(){return!(!kt(pt)||!pt.supports.mail)}let n;e.openMailItem=function(e){return new Promise((n=>{if(kt(pt,Te.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");n(wr(o("v2","mail.openMailItem"),"mail.openMailItem",e))}))},e.composeMail=function(e){return new Promise((n=>{if(kt(pt,Te.content),!t())throw new Error("Not supported");n(wr(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={}))}(zi||(zi={}));var qi;!function(e){function t(){Qe().print()}function n(e,t,n){!Nt(t)&&kt(pt),!Nt(t)&&n&&n(),Gn(e,t)}function r(e,t,n){!Nt(t)&&kt(pt),!Nt(t)&&n&&n(),Kn(e,t)}function i(){return!(!kt(pt)||!pt.supports.teamsCore)}e.enablePrintCapability=function(){if(!C.printCapabilityEnabled){if(kt(pt),!i())throw Me;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(!Nt(e)&&!i())throw Me}))},e.registerOnLoadHandlerHelper=n,e.registerBeforeUnloadHandler=function(e){r(o("v2","teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Nt(e)&&!i())throw Me}))},e.registerBeforeUnloadHandlerHelper=r,e.isSupported=i}(qi||(qi={}));var Gi;function $i(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?Ji(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Ji(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(!Mt("2.0.0"))throw{errorCode:we.OLD_PLATFORM};if(!Ii(t))throw{errorCode:we.INVALID_ARGUMENTS};if(!n())throw Me;r(Cr(e,"people.selectPeople",t))}))}function n(){return!(!kt(pt)||!pt.supports.people)}e.selectPeople=function(e,n){let r,i;kt(pt,Te.content,Te.task,Te.settings);let a="";return"function"==typeof e?([r,i]=[e,n],a=o("v1","people.selectPeople")):(i=e,a=o("v2","people.selectPeople")),Be(t,r,a,i)},e.isSupported=n}(Gi||(Gi={}));var Ki;!function(e){e.showProfile=function(e){return kt(pt,Te.content),new Promise((t=>{const[n,r]=$i(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(Cr(o("v2","profile.showProfile"),"profile.showProfile",i))}))},e.isSupported=function(){return!(!kt(pt)||!pt.supports.profile)}}(Ki||(Ki={}));const Zi="v2";var Qi;!function(e){const t="search.queryChange",n="search.queryClose",r="search.queryExecute";function i(){return!(!kt(pt)||!pt.supports.search)}e.registerHandlers=function(e,a,s){if(kt(pt,Te.content),!i())throw Me;_n(o(Zi,"search.registerOnClosedHandler"),n,e),_n(o(Zi,"search.registerOnExecutedHandler"),r,a),s&&_n(o(Zi,"search.registerOnChangeHandler"),t,s)},e.unregisterHandlers=function(){if(kt(pt,Te.content),!i())throw Me;Ir(o(Zi,"search.unregisterHandlers"),"search.unregister"),Wn(t),Wn(n),Wn(r)},e.isSupported=i,e.closeSearch=function(){return new Promise((e=>{if(kt(pt,Te.content),!i())throw new Error("Not supported");e(wr(o(Zi,"search.closeSearch"),"search.closeSearch"))}))}}(Qi||(Qi={}));var Xi=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 Yi;!function(e){function t(t,n){return new Promise((r=>{if(!a())throw Me;r(Cr(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!(!kt(pt)||!pt.supports.sharing)}let s;e.SharingAPIMessages={shareWebContent:"sharing.shareWebContent"},e.shareWebContent=function(e,a){try{n(e),r(e),i(e)}catch(e){return je((()=>Promise.reject(e)),a)}return kt(pt,Te.content,Te.sidePanel,Te.task,Te.stage,Te.meetingStage),je(t,a,o(a?"v1":"v2","sharing.shareWebContent"),e)},e.isSupported=a,function(e){function t(){var e;return kt(pt)&&void 0!==(null===(e=pt.supports.sharing)||void 0===e?void 0:e.history)}e.getContent=function(){return Xi(this,void 0,void 0,(function*(){if(kt(pt,Te.sidePanel,Te.meetingStage),!t())throw Me;const e=yield Cr(o("v2","sharing.history.getContent"),"sharing.history.getContent");return e.map((e=>{at(e.author),at(e.threadId)})),e}))},e.isSupported=t}(s=e.history||(e.history={}))}(Yi||(Yi={}));var ea;!function(e){let t,n;function r(){return!(!kt(pt)||!pt.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(kt(pt,Te.content),!r())throw Me;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Cr(o("v2","stageView.open"),"stageView.open",e))}))},e.isSupported=r,function(e){function t(){var e;return kt(pt)&&void 0!==(null===(e=pt.supports.stageView)||void 0===e?void 0:e.self)}e.close=function(){return new Promise((e=>{if(kt(pt,Te.content),!t())throw Me;e(Cr(o("v2","stageView.self.close"),"stageView.self.close"))}))},e.isSupported=t}(n=e.self||(e.self={}))}(ea||(ea={}));var ta=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 na="v2";var ra;!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(kt(pt,Te.content,Te.task),!r.isSupported())throw Me;const e=ve.Media;return Cr(o(na,"visualMedia.hasPermission"),"permissions.has",e)},e.requestPermission=function(){if(kt(pt,Te.content,Te.task),!r.isSupported())throw Me;const e=ve.Media;return Cr(o(na,"visualMedia.requestPermission"),"permissions.request",e)},function(e){function t(){return!!(kt(pt)&&pt.supports.visualMedia&&pt.supports.visualMedia.image&&pt.supports.permissions)}function n(){if(!t())throw Me}function r(e){if(!e||e.maxVisualMediaCount>10||e.maxVisualMediaCount<1)throw Ne}function i(e,t){if(t.length>e)throw He}e.captureImages=function(e){return ta(this,void 0,void 0,(function*(){kt(pt,Te.content,Te.task),n(),r(e);const t=yield Cr(o(na,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return i(e.maxVisualMediaCount,t),t}))},e.retrieveImages=function(e){return ta(this,void 0,void 0,(function*(){kt(pt,Te.content,Te.task),n(),r(e);const t=yield Cr(o(na,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return i(e.maxVisualMediaCount,t),t}))},e.isSupported=t}(r=e.image||(e.image={}))}(ra||(ra={}));var oa,ia=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{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 ia(this,void 0,void 0,(function*(){return null===aa&&(aa=(yield vn.getContext()).app.host.name),aa}))}function n(){return kt(pt)&&void 0!==pt.supports.webStorage}e.isWebStorageClearedOnUserLogOut=function(){return ia(this,void 0,void 0,(function*(){if(kt(pt),!n())throw Me;return!(!pt.isLegacyTeams||C.hostClientType!==Ie.android&&C.hostClientType!==Ie.ios&&C.hostClientType!==Ie.ipados||(yield t())!==Ae.teams)||(yield hr(o("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))},e.isSupported=n}(oa||(oa={}));let aa=null;var sa;!function(e){let t;function n(){return!(!kt(pt)||!pt.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(kt(pt,Te.content,Te.task),!n())throw Me;if(!pt.isLegacyTeams)return Ir(r,"call.startCall",[e],o);o(hr(r,"executeDeepLink",ai(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}(sa||(sa={}));const la="v1";var ca;!function(e){e.Messages=vn.Messages,e.FailedReason=vn.FailedReason,e.ExpectedFailureReason=vn.ExpectedFailureReason,e.notifyAppLoaded=function(){un(o(la,"appInitialization.notifyAppLoaded"))},e.notifySuccess=function(){pn(o(la,"appInitialization.notifySuccess"))},e.notifyFailure=function(e){fn(o(la,"appInitialization.notifyFailure"),e)},e.notifyExpectedFailure=function(e){dn(o(la,"appInitialization.notifyExpectedFailure"),e)}}(ca||(ca={}));const ua=t("thirdPartyCloudStorage");var da;!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||(ua("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=gi(e.fileChunk,e.fileType);if(o?(r||(r=new t(e.fileType,[])),r.assembleAttachment.push(o)):(ua(`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=pi(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!(!kt(pt)||!pt.supports.thirdPartyCloudStorage)}e.getDragAndDropFiles=function(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(kt(pt,Te.content,Te.task),!l())throw Me;if(a)throw a=null,new Error("getDragAndDropFiles cannot be called twice");a=t,i=!0,Ir(o("v2","thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],s)}else{t([],{errorCode:we.INVALID_ARGUMENTS})}},e.isSupported=l}(da||(da={}));const fa="v1";function pa(e,t){cn(o(fa,"initialize"),t).then((()=>{e&&e()}))}function ga(){qi.enablePrintCapability()}function ma(){qi.print()}function ha(e){Ot(),Ir(o(fa,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=C.frameContext),e(t)}))}function wa(e){hn(o(fa,"registerOnThemeChangeHandlerHelper"),e)}function va(e){jn(o(fa,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Ca(e){jn(o(fa,"registerAppButtonClickHandler"),"appButtonClick",e,[Te.content])}function ya(e){jn(o(fa,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[Te.content])}function Sa(e){jn(o(fa,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[Te.content])}function ba(e){Mn.backStack.registerBackButtonHandlerHelper(o(fa,"registerBackButtonHandler"),e)}function Ea(e){qi.registerOnLoadHandlerHelper(o(fa,"registerOnLoadHandler"),e)}function Ia(e){qi.registerBeforeUnloadHandlerHelper(o(fa,"registerBeforeUnloadHandler"),e)}function Aa(e){jn(o(fa,"registerFocusEnterHandler"),"focusEnter",e,[])}function Ta(e){jn(o(fa,"registerChangeSettingsHandler"),"changeSettings",e,[Te.content])}function Pa(e,t){kt(pt),An(o(fa,"getTabInstances"),t).then((t=>{e(t)}))}function Fa(e,t){kt(pt),Tn(o(fa,"getMruTabInstances"),t).then((t=>{e(t)}))}function Ra(e){Pn(o(fa,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Oa(e,t){kt(pt,Te.content,Te.sidePanel,Te.settings,Te.task,Te.stage,Te.meetingStage);const n=null!=t?t:xe();wn(o(fa,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function ka(e){Fn(o(fa,"setFrameContext"),e)}function Ma(e,t,n){cn(o(fa,"initializeWithFrameContext"),n).then((()=>t&&t())),Fn(o(fa,"setFrameContext"),e)}const Ua="v1";function La(e){In(o(Ua,"navigation.returnFocus"),e)}function Da(e,t){kt(pt);const n=null!=t?t:xe();En(o(Ua,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Na(e,t){kt(pt,Te.content,Te.sidePanel,Te.settings,Te.remove,Te.task,Te.stage,Te.meetingStage);const n=null!=t?t:xe();Sn(o(Ua,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Ha(e){kt(pt);const t=null!=e?e:xe();bn(o(Ua,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const xa="v1";var Va;!function(e){e.setValidityState=function(e){Rn(o(xa,"settings.setValidityState"),e)},e.getSettings=function(e){kt(pt,Te.content,Te.settings,Te.remove,Te.sidePanel),On(o(xa,"settings.getSettings")).then((t=>{e(t)}))},e.setSettings=function(e,t){kt(pt,Te.content,Te.settings,Te.sidePanel);const n=null!=t?t:xe();kn(o(xa,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))},e.registerOnSaveHandler=function(e){Mn.config.registerOnSaveHandlerHelper(o(xa,"settings.registerOnSaveHandler"),e)},e.registerOnRemoveHandler=function(e){Mn.config.registerOnRemoveHandlerHelper(o(xa,"settings.registerOnRemoveHandler"),e)}}(Va||(Va={}));var _a=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 Wa="v1";var Ba;!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:ke.Small,width:e.width?e.width:ke.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:ke.Small,width:e.width?e.width:ke.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function r(e){return e.height=e.height?e.height:ke.Small,e.width=e.width?e.width:ke.Small,e}e.startTask=function(e,r){const i=o(Wa,"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?(kt(pt,Te.content,Te.sidePanel,Te.meetingStage),Ir(i,"tasks.startTask",[e],r)):void 0!==e.completionBotId?en(i,n(e),a):Yt(i,t(e),a),new Di},e.updateTask=function(e){e=r(e);const{width:t,height:n}=e,i=_a(e,["width","height"]);if(Object.keys(i).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Xt(o(Wa,"tasks.updateTask"),e)},e.submitTask=function(e,t){tn(o(Wa,"tasks.submitTask"),e,t)},e.getDefaultSizeIfNotProvided=r}(Ba||(Ba={}));const ja="v2";var za;!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!(!kt(pt,Te.meetingStage,Te.sidePanel,Te.content)||!pt.supports.interactive)}}(za||(za={}));class qa{getFluidTenantInfo(){return Ga(),new Promise((e=>{e(Cr(o(ja,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Ga(),new Promise((t=>{t(Cr(o(ja,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Ga(),new Promise((e=>{e(Cr(o(ja,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Ga(),new Promise((t=>{t(Cr(o(ja,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Ga(),new Promise((e=>{e(Cr(o(ja,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Ga(),new Promise((t=>{t(Cr(o(ja,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Ga(),new Promise((t=>{t(Cr(o(ja,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Ga(),new Promise((t=>{t(Cr(o(ja,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Ga(),new qa}}function Ga(){if(!za.isSupported())throw new Error("LiveShareHost Not supported")}var $a=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 Ja(e){try{return e.cartItems=Ka(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Ka(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Ka(e.accessories)),e}))}const Za=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=$a(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Za(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function Qa(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Ya(t),Xa(t.accessories)}function Xa(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");Ya(t)}}}function Ya(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");ts(e.price),ns(e.quantity)}function es(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 ts(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 ns(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function rs(e){if(!Object.values(is.CartStatus).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const os="v2";var is;!function(e){let t,n;function r(){return!(!kt(pt)||!pt.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(kt(pt,Te.content,Te.task),!r())throw Me;return Cr(o(os,"marketplace.getCart"),"marketplace.getCart",e.cartVersion).then(Ja)},e.addOrUpdateCartItems=function(t){if(kt(pt,Te.content,Te.task),!r())throw Me;if(!t)throw new Error("addOrUpdateCartItemsParams must be provided");return es(null==t?void 0:t.cartId),Qa(null==t?void 0:t.cartItems),Cr(o(os,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},t),{cartItems:Za(t.cartItems),cartVersion:e.cartVersion})).then(Ja)},e.removeCartItems=function(t){if(kt(pt,Te.content,Te.task),!r())throw Me;if(!t)throw new Error("removeCartItemsParams must be provided");if(es(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 Cr(o(os,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(Ja)},e.updateCartStatus=function(t){if(kt(pt,Te.content,Te.task),!r())throw Me;if(!t)throw new Error("updateCartStatusParams must be provided");return es(null==t?void 0:t.cartId),rs(null==t?void 0:t.cartStatus),Cr(o(os,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(Ja)},e.isSupported=r}(is||(is={}))})(),r})()));
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map