@microsoft/teams-js 2.22.0-beta.0 → 2.23.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,2 @@
1
- /*! For license information please see MicrosoftTeams.min.js.LICENSE.txt */
2
- !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={446:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=a(e),s=o[0],u=o[1],l=new i(c(e,s,u)),d=0,f=u>0?s-4:s;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,c=r-i;a<c;a+=s)o.push(l(e,a,a+s>c?c:a+s));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=o[s],r[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(u(r));return i.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},313:(e,t,n)=>{"use strict";const r=n(446),i=n(164),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=c,t.h2=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(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 f(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return p(e,t);if(ArrayBuffer.isView(e))return g(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(ie(e,ArrayBuffer)||e&&ie(e.buffer,ArrayBuffer))return m(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(ie(e,SharedArrayBuffer)||e&&ie(e.buffer,SharedArrayBuffer)))return m(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 c.from(r,t,n);const i=w(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.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 l(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 d(e,t,n){return l(e),e<=0?a(e):void 0!==t?"string"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)}function f(e){return l(e),a(e<0?0:0|v(e))}function p(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|y(e,t);let r=a(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function h(e){const t=e.length<0?0:0|v(e.length),n=a(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function g(e){if(ie(e,Uint8Array)){const t=new Uint8Array(e);return m(t.buffer,t.byteOffset,t.byteLength)}return h(e)}function m(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,c.prototype),r}function w(e){if(c.isBuffer(e)){const t=0|v(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||oe(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}function v(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function y(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ie(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 i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return ne(e).length;default:if(i)return r?-1:Y(e).length;t=(""+t).toLowerCase(),i=!0}}function C(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 H(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return U(this,t,n);case"latin1":case"binary":return L(this,t,n);case"base64":return R(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function S(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),oe(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:E(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):E(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function E(e,t,n,r,i){let o,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let r=-1;for(o=n;o<a;o++)if(u(e,o)===u(t,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===c)return r*s}else-1!==r&&(o-=o-r),r=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){let n=!0;for(let r=0;r<c;r++)if(u(e,o+r)!==u(t,r)){n=!1;break}if(n)return o}return-1}function I(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=t.length;let s;for(r>o/2&&(r=o/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(oe(r))return s;e[n+s]=r}return s}function A(e,t,n,r){return re(Y(t,e.length-n),e,n,r)}function T(e,t,n,r){return re(ee(t),e,n,r)}function P(e,t,n,r){return re(ne(t),e,n,r)}function F(e,t,n,r){return re(te(t,e.length-n),e,n,r)}function R(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=n){let n,r,a,c;switch(s){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(o=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:n=e[i+1],r=e[i+2],a=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return M(r)}c.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}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return d(e,t,n)},c.allocUnsafe=function(e){return f(e)},c.allocUnsafeSlow=function(e){return f(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(ie(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),ie(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.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}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(ie(t,Uint8Array))i+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):C.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.h2;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,i){if(ie(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const a=Math.min(o,s),u=this.slice(r,i),l=e.slice(t,n);for(let e=0;e<a;++e)if(u[e]!==l[e]){o=u[e],s=l[e];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)},c.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 i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return I(this,e,t,n);case"utf8":case"utf-8":return A(this,e,t,n);case"ascii":case"latin1":case"binary":return T(this,e,t,n);case"base64":return P(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function M(e){const t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=k));return n}function U(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function L(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function H(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=se[e[r]];return i}function N(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function B(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,r,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function D(e,t,n,r,i){J(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function V(e,t,n,r,i){J(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function _(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function W(e,t,n,r,o){return t=+t,n>>>=0,o||_(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,o){return t=+t,n>>>=0,o||_(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=ae((function(e){K(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=ae((function(e){K(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=ae((function(e){K(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=ae((function(e){K(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){x(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){x(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=ae((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=ae((function(e,t=0){return V(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}let i=0,o=1,s=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}let i=n-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=ae((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=ae((function(e,t=0){return V(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return W(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return W(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const o=c.isBuffer(e)?e:c.from(e,r),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%s]}return this};const z={};function $(e,t,n){z[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function G(e,t,n){K(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||Z(t,e.length-(n+1))}function J(e,t,n,r,i,o){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new z.ERR_OUT_OF_RANGE("value",i,e)}G(r,i,o)}function K(e,t){if("number"!=typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function Z(e,t,n){if(Math.floor(e)!==e)throw K(e,n),new z.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}$("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),$("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),$("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=q(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const Q=/[^+/0-9A-Za-z-_]/g;function X(e){if((e=(e=e.split("=")[0]).trim().replace(Q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Y(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.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;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function ee(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function te(e,t){let n,r,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function ne(e){return r.toByteArray(X(e))}function re(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function ie(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function oe(e){return e!=e}const se=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function ae(e){return"undefined"==typeof BigInt?ce:e}function ce(){throw new Error("BigInt not supported")}},302:(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,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,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(65)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},65:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,o,s=null;function a(...e){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];n=o.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(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(i),...t.skips.map(i).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,]+/),i=r.length;for(n=0;n<i;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(247),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}},164:(e,t)=>{t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,c=(1<<a)-1,u=c>>1,l=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+e[t+d],d+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+e[t+d],d+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=u}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,d=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*c-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=h,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+p]=255&s,p+=h,s/=256,u-=8);e[n+p-h]|=128*g}},247:e=>{var t=1e3,n=60*t,r=60*n,i=24*r;function o(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\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(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;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 o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=r?Math.round(e/r)+"h":o>=n?Math.round(e/n)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}function a(e){var o=Math.abs(e);return o>=i?c(e,o,i,"day"):o>=r?c(e,o,r,"hour"):o>=n?c(e,o,n,"minute"):o>=t?c(e,o,t,"second"):e+" ms"}function c(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return o(e);if("number"===n&&isFinite(e))return t.long?a(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 i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"==typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"==typeof r.then)return r}var o=Object.create(null);n.r(o);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>s[e]=()=>r[e]));return s.default=()=>r,n.d(o,s),o}})(),(()=>{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,{ChildAppWindow:()=>Ur,ErrorCode:()=>O,FrameContexts:()=>U,HostClientType:()=>M,LiveShareHost:()=>ao,ParentAppWindow:()=>Lr,TeamType:()=>L,UserTeamRole:()=>H,app:()=>mt,appEntity:()=>xo,appInitialization:()=>Ai,appInstallDialog:()=>ar,authentication:()=>Ke,barCode:()=>Ir,calendar:()=>_r,call:()=>Ei,chat:()=>Ar,clipboard:()=>Pr,conversations:()=>tr,dialog:()=>tt,enablePrintCapability:()=>Oi,executeDeepLink:()=>qi,externalAppAuthentication:()=>Io,externalAppCardActions:()=>Ao,externalAppCommands:()=>Po,files:()=>Ro,geoLocation:()=>Or,getAdaptiveCardSchemaVersion:()=>kr,getContext:()=>Mi,getMruTabInstances:()=>zi,getTabInstances:()=>ji,initialize:()=>Ri,initializeWithFrameContext:()=>Ji,liveShare:()=>so,location:()=>Nr,logs:()=>qn,mail:()=>Wr,marketplace:()=>So,media:()=>lr,meeting:()=>Dr,meetingRoom:()=>ko,menus:()=>rt,messageChannels:()=>Mo,monetization:()=>Vr,navigateBack:()=>Yi,navigateCrossDomain:()=>Xi,navigateToTab:()=>Qi,nestedAppAuth:()=>Fr,notifications:()=>Lo,openFilePreview:()=>Yn,otherAppStateChange:()=>Ho,pages:()=>Ot,people:()=>zr,print:()=>ki,profile:()=>Gr,registerAppButtonClickHandler:()=>Hi,registerAppButtonHoverEnterHandler:()=>Ni,registerAppButtonHoverLeaveHandler:()=>Bi,registerBackButtonHandler:()=>xi,registerBeforeUnloadHandler:()=>Vi,registerChangeSettingsHandler:()=>Wi,registerCustomHandler:()=>Qn,registerFocusEnterHandler:()=>_i,registerFullScreenHandler:()=>Li,registerOnLoadHandler:()=>Di,registerOnThemeChangeHandler:()=>Ui,registerUserSettingsChangeHandler:()=>Xn,remoteCamera:()=>Bo,returnFocus:()=>Zi,search:()=>gi,secondaryBrowser:()=>Hr,sendCustomEvent:()=>Zn,sendCustomMessage:()=>Kn,setFrameContext:()=>Gi,settings:()=>to,shareDeepLink:()=>$i,sharing:()=>wi,stageView:()=>vi,tasks:()=>io,teams:()=>Vo,teamsCore:()=>jr,thirdPartyCloudStorage:()=>Pi,uploadCustomApp:()=>Jn,version:()=>Pe,videoEffects:()=>pi,videoEffectsEx:()=>jo,visualMedia:()=>bi,webStorage:()=>Si});const e=(0,n(302).debug)("teamsJs");function t(t){return e.extend(t)}function i(e,t){return`${e}_${t}`}function o(e){return/^v\d+_[\w.]+$/.test(e)}const s=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","www.bing.com","www.staging-bing-int.com","teams.cloud.microsoft","outlook.cloud.microsoft","m365.cloud.microsoft","copilot.microsoft.com","windows.msn.com"]}');const a="2.0.1",c="2.0.3",u="1.9.0",l="1.8.0",d=n.t(s,2).validOrigins,f=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),p=/^https:\/\//,h="https",g="teams.microsoft.com",m="The library has not yet been initialized",w="The runtime has not yet been initialized",v="The runtime version is not supported";class y{}y.initializeCalled=!1,y.initializeCompleted=!1,y.additionalValidOrigins=[],y.initializePromise=void 0,y.isFramelessWindow=!1,y.frameContext=void 0,y.hostClientType=void 0,y.printCapabilityEnabled=!1;var C=n(313);const b={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let S;const E=new Uint8Array(16);function I(){if(!S&&(S="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!S))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return S(E)}const A=[];for(let e=0;e<256;++e)A.push((e+256).toString(16).slice(1));function T(e,t=0){return(A[e[t+0]]+A[e[t+1]]+A[e[t+2]]+A[e[t+3]]+"-"+A[e[t+4]]+A[e[t+5]]+"-"+A[e[t+6]]+A[e[t+7]]+"-"+A[e[t+8]]+A[e[t+9]]+"-"+A[e[t+10]]+A[e[t+11]]+A[e[t+12]]+A[e[t+13]]+A[e[t+14]]+A[e[t+15]]).toLowerCase()}const P=function(e,t,n){if(b.randomUUID&&!t&&!e)return b.randomUUID();const r=(e=e||{}).random||(e.rng||I)();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 T(r)},F=/^(?:[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 R=function(e){return"string"==typeof e&&F.test(e)};var O,k,M,U,L,H;!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"}(O||(O={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(k||(k={})),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"}(M||(M={})),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"}(U||(U={})),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"}(L||(L={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(H||(H={}));const N={errorCode:O.NOT_SUPPORTED_ON_PLATFORM},B=1,x=5,D={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},V=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),_=new Error("Invalid response: Received more images than the specified max limit in the response.");function W(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function j(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),r=t.split(".");function i(e){return/^\d+$/.test(e)}if(!n.every(i)||!r.every(i))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 z(){return P()}function $(e){return Object.keys(e).forEach((t=>{"object"==typeof e[t]&&$(e[t])})),Object.freeze(e)}function q(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function G(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function J(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function K(e,t,n){return new Promise(((r,i)=>{const o=setTimeout(i,t,n);e().then((e=>{clearTimeout(o),r(e)})).catch((e=>{clearTimeout(o),i(e)}))}))}function Z(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId)+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl),(e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function Q(e){return!(j(`${e.majorVersion}.${e.minorVersion}`,`${B}.${x}`)>=0)}function X(e){return"https:"===e.protocol}function Y(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),i=new Uint8Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);n(new Blob([i],{type:e}))}const i=C.lW.from(t,"base64").toString();n(new Blob([i],{type:e}))}))}function ee(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 te(){if(ne())throw new Error("window object undefined at SSR check");return window}function ne(){return"undefined"==typeof window}function re(e,t){if(ie(e)||!oe(e)||!se(e))throw t||new Error("id is not valid.")}function ie(e){return/<script[^>]*>[\s\S]*?<\/script[^>]*>/gi.test(e)}function oe(e){return e.length<256&&e.length>4}function se(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function ae(e){if(!e)throw new Error("id must not be empty");if(!1===R(e))throw new Error("id must be a valid UUID")}var ce=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const ue=t("runtime"),le=4;function de(e){return e.apiVersion===le}const fe={apiVersion:-1,supports:{}};function pe(e){if(de(e))return!0;throw-1===e.apiVersion?new Error(w):new Error(v)}let he=fe;const ge={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:D,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:{}}}},me=[M.desktop,M.web,M.rigel,M.surfaceHub,M.teamsRoomsWindows,M.teamsRoomsAndroid,M.teamsPhones,M.teamsDisplays],we=[M.android,M.ios,M.ipados],ve=[...me,...we];function ye(e){let t=e;if(t.apiVersion<le&&Ce.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),de(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const Ce=[{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=ce(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,i,o;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===(i=e.supports.dialog)||void 0===i?void 0:i.url)?{}:void 0},update:null===(o=e.supports.dialog)||void 0===o?void 0:o.update}:void 0})}}}],be={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:me}],"1.9.0":[{capability:{location:{}},hostClientTypes:ve}],"2.0.0":[{capability:{people:{}},hostClientTypes:ve},{capability:{sharing:{}},hostClientTypes:[M.desktop,M.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[M.android,M.desktop,M.ios,M.teamsRoomsAndroid,M.teamsPhones,M.teamsDisplays,M.web]},{capability:{webStorage:{}},hostClientTypes:[M.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[M.android,M.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[M.android,M.ios]}]},Se=ue.extend("generateBackCompatRuntimeConfig");function Ee(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]=Ee(e[r]||{},t[r]));return n}function Ie(e,t,n){Se("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);Se("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{j(e,t)>=0&&n[t].forEach((e=>{void 0!==y.hostClientType&&e.hostClientTypes.includes(y.hostClientType)&&(r=Ee(r,e.capability))}))}));const i={apiVersion:le,hostVersionsInfo:D,isLegacyTeams:!0,supports:r};return Se("Runtime config after updating based on highestSupportedVersion: %o",i),i}const Ae=ue.extend("applyRuntimeConfig");function Te(e){"string"==typeof e.apiVersion&&(Ae("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Ae("Fast-forwarding runtime %o",e);const t=ye(e);Ae("Applying runtime %o",t),he=$(t)}const Pe="2.22.0-beta.0",Fe=t("internal"),Re=Fe.extend("ensureInitializeCalled"),Oe=Fe.extend("ensureInitialized");function ke(){if(!y.initializeCalled)throw Re(m),new Error(m)}function Me(e,...t){if(!y.initializeCompleted)throw Oe("%s. initializeCalled: %s",m,y.initializeCalled.toString()),new Error(m);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===y.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${y.frameContext}".`)}return pe(e)}function Ue(e=a){const t=j(y.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Le(){return y.hostClientType==M.android||y.hostClientType==M.ios||y.hostClientType==M.ipados}function He(e=a){if(!Le()){throw{errorCode:O.NOT_SUPPORTED_ON_PLATFORM}}if(!Ue(e)){throw{errorCode:O.OLD_PLATFORM}}}function Ne(e){let t=y.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&p.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),y.additionalValidOrigins=t}function Be(e){return null==e}var xe=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};let De=[];const Ve=t("validateOrigin");function _e(){return xe(this,void 0,void 0,(function*(){yield je()}))}function We(){return 0!==De.length}function je(){return xe(this,void 0,void 0,(function*(){return We()?De:ne()?(De=d,d):fetch(f).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(ze(JSON.stringify(e)))return De=e.validOrigins,De;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(Ve("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),De=d,De)))}))}function ze(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 Ve("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function $e(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 qe(e){return je().then((t=>{if(!X(e))return Ve("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=>$e(e,n))))return!0;for(const e of y.additionalValidOrigins){if($e("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return Ve("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,y.additionalValidOrigins),!1}))}const Ge="v1",Je="v2";var Ke;!function(e){let t,n,r;function o(e,n){return new Promise(((r,i)=>{if(y.hostClientType===M.desktop||y.hostClientType===M.android||y.hostClientType===M.ios||y.hostClientType===M.ipados||y.hostClientType===M.macos||y.hostClientType===M.rigel||y.hostClientType===M.teamsRoomsWindows||y.hostClientType===M.teamsRoomsAndroid||y.hostClientType===M.teamsPhones||y.hostClientType===M.teamsDisplays||y.hostClientType===M.surfaceHub){const t=document.createElement("a");t.href=n.url,r(dn(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:i},u(n)}))}function s(e,t){return new Promise((n=>{n(dn(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 a(e){return new Promise((t=>{t(dn(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function c(){l();try{nn.childWindow&&nn.childWindow.close()}finally{nn.childWindow=null,nn.childOrigin=null}}function u(e){c();let t=e.width||600,n=e.height||400;t=Math.min(t,nn.currentWindow.outerWidth-400),n=Math.min(n,nn.currentWindow.outerHeight-200);const r=document.createElement("a");r.href=e.url.replace("{oauthRedirectMethod}","web");let i=void 0!==nn.currentWindow.screenLeft?nn.currentWindow.screenLeft:nn.currentWindow.screenX,o=void 0!==nn.currentWindow.screenTop?nn.currentWindow.screenTop:nn.currentWindow.screenY;i+=nn.currentWindow.outerWidth/2-t/2,o+=nn.currentWindow.outerHeight/2-n/2,nn.childWindow=nn.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+o+", left="+i+", width="+t+", height="+n),nn.childWindow?d():p("FailedToOpenWindow")}function l(){n&&(clearInterval(n),n=0),xt("initialize"),xt("navigateCrossDomain")}function d(){l(),n=nn.currentWindow.setInterval((()=>{if(!nn.childWindow||nn.childWindow.closed)p("CancelledByUser");else{const e=nn.childOrigin;try{nn.childOrigin="*",_n("ping")}finally{nn.childOrigin=e}}}),100),Bt(i(Ge,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[U.authentication,y.hostClientType])),Bt(i(Ge,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function f(e){try{t&&t.success(e)}finally{t=void 0,c()}}function p(e){try{t&&t.fail(new Error(e))}finally{t=void 0,c()}}e.initialize=function(){Bt(i(Ge,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",f,!1),Bt(i(Ge,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",p,!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 Me(he,U.content,U.sidePanel,U.settings,U.remove,U.task,U.stage,U.meetingStage),o(n.successCallback||n.failureCallback?i(Ge,"authentication.authenticate"):i(Je,"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 ke(),s(e&&(e.successCallback||e.failureCallback)?i(Ge,"authentication.getAuthToken"):i(Je,"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 ke(),a(e&&(e.successCallback||e.failureCallback)?i(Ge,"authentication.getUser"):i(Je,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),null;throw t}))},e.notifySuccess=function(e,t){Me(he,U.authentication),gn(i(t?Ge:Je,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Dn(nn.parentWindow,(()=>setTimeout((()=>nn.currentWindow.close()),200)))},e.notifyFailure=function(e,t){Me(he,U.authentication),gn(i(t?Ge:Je,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Dn(nn.parentWindow,(()=>setTimeout((()=>nn.currentWindow.close()),200)))}}(Ke||(Ke={}));const Ze="v2";function Qe(e,t){if(Me(he,U.content,U.sidePanel,U.task,U.meetingStage),!tt.update.isSupported())throw N;gn(e,"tasks.updateTask",[t])}function Xe(e,t,n,r){if(Me(he,U.content,U.sidePanel,U.meetingStage),!tt.url.isSupported())throw N;r&&Bt(i(Ze,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);gn(e,"tasks.startTask",[tt.url.getDialogInfoFromUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),xt("messageForParent")}))}function Ye(e,t,n,r){if(Me(he,U.content,U.sidePanel,U.meetingStage),!tt.url.bot.isSupported())throw N;r&&Bt(i(Ze,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);gn(e,"tasks.startTask",[tt.url.getDialogInfoFromBotUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),xt("messageForParent")}))}function et(e,t,n){if(Me(he,U.content,U.task),!tt.url.isSupported())throw N;gn(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}var tt;!function(e){const t=[];function n(e){y.frameContext&&(y.frameContext===U.task?t.push(e):xt("messageForChild"))}let r,o,s;e.initialize=function(){Bt(i(Ze,"dialog.registerMessageForChildHandler"),"messageForChild",n,!1)},function(e){let n,r;function o(e){return{url:e.url,height:e.size?e.size.height:"small",width:e.size?e.size.width:"small",title:e.title,fallbackUrl:e.fallbackUrl}}e.open=function(e,t,n){Xe(i(Ze,"dialog.url.open"),e,t,n)},e.submit=function(e,t){et(i(Ze,"dialog.url.submit"),e,t)},function(e){function n(){var e,t;return Me(he)&&!!(null===(t=null===(e=he.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}e.sendMessageToParentFromDialog=function(e){if(Me(he,U.task),!n())throw N;gn(i(Ze,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])},e.sendMessageToDialog=function(e){if(Me(he,U.content,U.sidePanel,U.meetingStage),!n())throw N;gn(i(Ze,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])},e.registerOnMessageFromParent=function(e){if(Me(he,U.task),!n())throw N;for(xt("messageForChild"),Bt(i(Ze,"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 Me(he)&&void 0!==(he.supports.dialog&&he.supports.dialog.url)},function(e){e.open=function(e,t,n){Ye(i(Ze,"dialog.url.bot.open"),e,t,n)},e.isSupported=function(){return Me(he)&&void 0!==(he.supports.dialog&&he.supports.dialog.url&&he.supports.dialog.url.bot)}}(r=e.bot||(e.bot={})),e.getDialogInfoFromUrlDialogInfo=o,e.getDialogInfoFromBotUrlDialogInfo=function(e){const t=o(e);return t.completionBotId=e.completionBotId,t}}(r=e.url||(e.url={})),e.isSupported=function(){return!(!Me(he)||!he.supports.dialog)},function(e){e.resize=function(e){Qe(i(Ze,"dialog.update.resize"),e)},e.isSupported=function(){return!(!Me(he)||!he.supports.dialog)&&!!he.supports.dialog.update}}(o=e.update||(e.update={})),function(e){function t(){const e=he.hostVersionsInfo&&he.hostVersionsInfo.adaptiveCardSchemaVersion&&!Q(he.hostVersionsInfo.adaptiveCardSchemaVersion);return Me(he)&&void 0!==(e&&he.supports.dialog&&he.supports.dialog.card)}let n;function r(e){return{card:e.card,height:e.size?e.size.height:"small",width:e.size?e.size.width:"small",title:e.title}}function o(e){const t=r(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,n){if(Me(he,U.content,U.sidePanel,U.meetingStage),!t())throw N;const o=r(e);gn(i(Ze,"dialog.adaptiveCard.open"),"tasks.startTask",[o],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t,function(e){function t(){const e=he.hostVersionsInfo&&he.hostVersionsInfo.adaptiveCardSchemaVersion&&!Q(he.hostVersionsInfo.adaptiveCardSchemaVersion);return Me(he)&&void 0!==(e&&he.supports.dialog&&he.supports.dialog.card&&he.supports.dialog.card.bot)}e.open=function(e,n){if(Me(he,U.content,U.sidePanel,U.meetingStage),!t())throw N;const r=o(e);gn(i(Ze,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[r],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t}(n=e.bot||(e.bot={}))}(s=e.adaptiveCard||(e.adaptiveCard={}))}(tt||(tt={}));const nt="v2";var rt;!function(e){let t,n,r,o;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(t=e.DisplayMode||(e.DisplayMode={}));function s(e){o&&o(e)||(Me(he),gn(i(nt,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function a(e){n&&n(e)||(Me(he),gn(i(nt,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function c(e){r&&r(e)||(Me(he),gn(i(nt,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function u(){return!(!Me(he)||!he.supports.menus)}e.MenuItem=class{constructor(){this.enabled=!0,this.selected=!1}},e.initialize=function(){Bt(i(nt,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",a,!1),Bt(i(nt,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",c,!1),Bt(i(nt,"menus.registerSetModuleViewHandler"),"setModuleView",s,!1)},e.setUpViews=function(e,t){if(Me(he),!u())throw N;o=t,gn(i(nt,"menus.setUpViews"),"setUpViews",[e])},e.setNavBarMenu=function(e,t){if(Me(he),!u())throw N;n=t,gn(i(nt,"menus.setNavBarMenu"),"setNavBarMenu",[e])},e.showActionMenu=function(e,t){if(Me(he),!u())throw N;r=t,gn(i(nt,"menus.showActionMenu"),"showActionMenu",[e])},e.isSupported=u}(rt||(rt={}));const it="v2",ot=5e3,st=t("app");function at(e,t){if(ne()){return st.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return K((()=>pt(e,t)),ot,new Error("SDK initialization timed out."))}function ct(e){gn(e,mt.Messages.AppLoaded,[Pe])}function ut(e,t){gn(e,mt.Messages.ExpectedFailure,[t.reason,t.message])}function lt(e,t){gn(e,mt.Messages.Failure,[t.reason,t.message])}function dt(e){gn(e,mt.Messages.Success,[Pe])}const ft=st.extend("initializeHelper");function pt(e,t){return new Promise((n=>{y.initializeCalled||(y.initializeCalled=!0,Ut(),y.initializePromise=on(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=a})=>{y.frameContext=e,y.hostClientType=t,y.clientSupportedSDKVersion=r;try{ft("Parsing %s",n);const e=JSON.parse(n);if(ft("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&Te(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ft("Attempting to parse %s as an SDK version",n),isNaN(j(n,a))||(y.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(ft("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");Te(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Te(Ie(y.clientSupportedSDKVersion,ge,be))}}y.initializeCompleted=!0})),Ke.initialize(),rt.initialize(),Ot.config.initialize(),tt.initialize()),Array.isArray(t)&&Ne(t),void 0!==y.initializePromise?n(y.initializePromise):ft("GlobalVars.initializePromise is unexpectedly undefined")}))}function ht(e,t){!Be(t)&&ke(),_t(e,t)}function gt(e,t){return new Promise((n=>{Me(he,U.content,U.sidePanel,U.settings,U.task,U.stage,U.meetingStage),n(cn(e,"executeDeepLink",t))}))}var mt;function wt(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:"Teams",clientType:e.hostClientType?e.hostClientType:M.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:y.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}!function(e){const n=t("app");let r,o,s;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"}(o=e.ExpectedFailureReason||(e.ExpectedFailureReason={})),e.isInitialized=function(){return y.initializeCompleted},e.getFrameContext=function(){return y.frameContext},function(){if(ne())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 _e(),at(i(it,"app.initialize"),e)},e._initialize=function(e){nn.currentWindow=e},e._uninitialize=function(){y.initializeCalled&&(Lt(),y.initializeCalled=!1,y.initializeCompleted=!1,y.initializePromise=void 0,y.additionalValidOrigins=[],y.frameContext=void 0,y.hostClientType=void 0,y.isFramelessWindow=!1,sn())},e.getContext=function(){return new Promise((e=>{ke(),e(an(i(it,"app.getContext"),"getContext"))})).then((e=>wt(e)))},e.notifyAppLoaded=function(){ke(),ct(i(it,"app.notifyAppLoaded"))},e.notifySuccess=function(){ke(),dt(i(it,"app.notifySuccess"))},e.notifyFailure=function(e){ke(),lt(i(it,"app.notifyFailure"),e)},e.notifyExpectedFailure=function(e){ke(),ut(i(it,"app.notifyExpectedFailure"),e)},e.registerOnThemeChangeHandler=function(e){ht(i(it,"app.registerOnThemeChangeHandler"),e)},e.openLink=function(e){return gt(i(it,"app.openLink"),e)},function(e){e.registerBeforeSuspendOrTerminateHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Me(he),Gt(e)},e.registerOnResumeHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Me(he),Jt(e)}}(s=e.lifecycle||(e.lifecycle={}))}(mt||(mt={}));const vt="v2";function yt(e,t){return new Promise((n=>{if(Me(he,U.content,U.sidePanel,U.settings,U.remove,U.task,U.stage,U.meetingStage),!Ot.isSupported())throw N;n(un(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Ct(e){return new Promise((t=>{if(Me(he),!Ot.backStack.isSupported())throw N;t(un(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function bt(e,t){return new Promise((n=>{if(Me(he),!Ot.tabs.isSupported())throw N;n(un(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function St(e,t){if(Me(he),!Ot.isSupported())throw N;gn(e,"returnFocus",[t])}function Et(e,t){return new Promise((n=>{if(Me(he),!Ot.tabs.isSupported())throw N;n(an(e,"getTabInstances",t))}))}function It(e,t){return new Promise((n=>{if(Me(he),!Ot.tabs.isSupported())throw N;n(an(e,"getMruTabInstances",t))}))}function At(e,t){if(Me(he,U.content,U.sidePanel,U.meetingStage),!Ot.isSupported())throw N;gn(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Tt(e,t){if(Me(he,U.content),!Ot.isSupported())throw N;gn(e,"setFrameContext",[t])}function Pt(e,t){if(Me(he,U.settings,U.remove),!Ot.config.isSupported())throw N;gn(e,"settings.setValidityState",[t])}function Ft(e){return new Promise((t=>{if(Me(he,U.content,U.settings,U.remove,U.sidePanel),!Ot.isSupported())throw N;t(an(e,"settings.getSettings"))}))}function Rt(e,t){return new Promise((n=>{if(Me(he,U.content,U.settings,U.sidePanel),!Ot.config.isSupported())throw N;n(cn(e,"settings.setSettings",t))}))}var Ot;!function(e){function t(e){Tt(i(vt,"pages.setCurrentFrame"),e)}function n(){return!(!Me(he)||!he.supports.pages)}let r,o,s,a,c,u;e.returnFocus=function(e){St(i(vt,"pages.returnFocus"),e)},e.registerFocusEnterHandler=function(e){Vt(i(vt,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!n())throw N}))},e.setCurrentFrame=t,e.initializeWithFrameContext=function(e,n,r){_e(),at(i(vt,"pages.initializeWithFrameContext"),r).then((()=>n&&n())),t(e)},e.getConfig=function(){return Ft(i(vt,"pages.getConfig."))},e.navigateCrossDomain=function(e){return yt(i(vt,"pages.navigateCrossDomain"),e)},e.navigateToApp=function(e){return new Promise((t=>{if(Me(he,U.content,U.sidePanel,U.settings,U.task,U.stage,U.meetingStage),!n())throw N;const r=i(vt,"pages.navigateCrossDomain");he.isLegacyTeams?t(cn(r,"executeDeepLink",Z(e))):t(cn(r,"pages.navigateToApp",e))}))},e.shareDeepLink=function(e){return At(i(vt,"pages.shareDeepLink"),e)},e.registerFullScreenHandler=function(e){Vt(i(vt,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Be(e)&&!n())throw N}))},e.isSupported=n,function(e){e.navigateToTab=function(e){return bt(i(vt,"pages.tabs.navigateToTab"),e)},e.getTabInstances=function(e){return Et(i(vt,"pages.tabs.getTabInstances"),e)},e.getMruTabInstances=function(e){return It(i(vt,"pages.tabs.getMruTabInstances"),e)},e.isSupported=function(){return!(!Me(he)||!he.supports.pages)&&!!he.supports.pages.tabs}}(r=e.tabs||(e.tabs={})),function(e){let t,n;function r(e,n,r){!Be(n)&&Me(he,U.settings),r&&r(),t=n,!Be(n)&&gn(e,"registerHandler",["save"])}function o(e,t,r){!Be(t)&&Me(he,U.remove,U.settings),r&&r(),n=t,!Be(t)&&gn(e,"registerHandler",["remove"])}function s(e){const n=new a(e);t?t(n):nn.childWindow?_n("settings.save",[e]):n.notifySuccess()}e.initialize=function(){Bt(i(vt,"pages.config.registerSettingsSaveHandler"),"settings.save",s,!1),Bt(i(vt,"pages.config.registerSettingsRemoveHandler"),"settings.remove",c,!1)},e.setValidityState=function(e){return Pt(i(vt,"pages.config.setValidityState"),e)},e.setConfig=function(e){return Rt(i(vt,"pages.config.setConfig"),e)},e.registerOnSaveHandler=function(e){r(i(vt,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Be(e)&&!l())throw N}))},e.registerOnSaveHandlerHelper=r,e.registerOnRemoveHandler=function(e){o(i(vt,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Be(e)&&!l())throw N}))},e.registerOnRemoveHandlerHelper=o,e.registerChangeConfigHandler=function(e){Vt(i(vt,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[U.content],(()=>{if(!l())throw N}))};class a{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),gn(i(vt,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),gn(i(vt,"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 u;n?n(e):nn.childWindow?_n("settings.remove",[]):e.notifySuccess()}class u{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),gn(i(vt,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),gn(i(vt,"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 l(){return!(!Me(he)||!he.supports.pages)&&!!he.supports.pages.config}e.isSupported=l}(o=e.config||(e.config={})),function(e){let t;function n(){return Ct(i(vt,"pages.backStack.navigateBack"))}function r(e,n,r){!Be(n)&&Me(he),r&&r(),t=n,!Be(n)&&gn(e,"registerHandler",["backButton"])}function o(){t&&t()||(nn.childWindow?_n("backButtonPress",[]):n())}function s(){return!(!Me(he)||!he.supports.pages)&&!!he.supports.pages.backStack}e._initialize=function(){Bt(i(vt,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",o,!1)},e.navigateBack=n,e.registerBackButtonHandler=function(e){r(i(vt,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Be(e)&&!s())throw N}))},e.registerBackButtonHandlerHelper=r,e.isSupported=s}(s=e.backStack||(e.backStack={})),function(e){function t(){return!(!Me(he)||!he.supports.pages)&&!!he.supports.pages.fullTrust}e.enterFullscreen=function(){if(Me(he,U.content),!t())throw N;gn(i(vt,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])},e.exitFullscreen=function(){if(Me(he,U.content),!t())throw N;gn(i(vt,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])},e.isSupported=t}(a=e.fullTrust||(e.fullTrust={})),function(e){function t(){return!(!Me(he)||!he.supports.pages)&&!!he.supports.pages.appButton}e.onClick=function(e){Vt(i(vt,"pages.appButton.onClick"),"appButtonClick",e,[U.content],(()=>{if(!t())throw N}))},e.onHoverEnter=function(e){Vt(i(vt,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[U.content],(()=>{if(!t())throw N}))},e.onHoverLeave=function(e){Vt(i(vt,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[U.content],(()=>{if(!t())throw N}))},e.isSupported=t}(c=e.appButton||(e.appButton={})),function(e){function t(){return!(!Me(he)||!he.supports.pages)&&!!he.supports.pages.currentApp}e.navigateTo=function(e){return new Promise((n=>{if(Me(he,U.content,U.sidePanel,U.settings,U.task,U.stage,U.meetingStage),!t())throw N;n(ln(i(vt,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))},e.navigateToDefaultPage=function(){return new Promise((e=>{if(Me(he,U.content,U.sidePanel,U.settings,U.task,U.stage,U.meetingStage),!t())throw N;e(ln(i(vt,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))},e.isSupported=t}(u=e.currentApp||(e.currentApp={}))}(Ot||(Ot={}));const kt=t("handlers");class Mt{static initializeHandlers(){Mt.handlers.themeChange=Wt,Mt.handlers.load=zt,Mt.handlers.beforeUnload=qt,Ot.backStack._initialize()}static uninitializeHandlers(){Mt.handlers={},Mt.themeChangeHandler=null,Mt.loadHandler=null,Mt.beforeUnloadHandler=null,Mt.beforeSuspendOrTerminateHandler=null,Mt.resumeHandler=null}}function Ut(){Mt.initializeHandlers()}function Lt(){Mt.uninitializeHandlers()}Mt.handlers={},Mt.themeChangeHandler=null,Mt.loadHandler=null,Mt.beforeUnloadHandler=null,Mt.beforeSuspendOrTerminateHandler=null,Mt.resumeHandler=null;const Ht=kt.extend("callHandler");function Nt(e,t){const n=Mt.handlers[e];if(n){Ht("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return nn.childWindow?(_n(e,t),[!1,void 0]):(Ht("Handler for action message %s not found.",e),[!1,void 0])}function Bt(e,t,n,r=!0,i=[]){n?(Mt.handlers[t]=n,r&&gn(e,"registerHandler",[t,...i])):delete Mt.handlers[t]}function xt(e){delete Mt.handlers[e]}function Dt(e){return null!=Mt.handlers[e]}function Vt(e,t,n,r,i){n&&Me(he,...r),i&&i(),Bt(e,t,n)}function _t(e,t){Mt.themeChangeHandler=t,!Be(t)&&gn(e,"registerHandler",["themeChange"])}function Wt(e){Mt.themeChangeHandler&&Mt.themeChangeHandler(e),nn.childWindow&&_n("themeChange",[e])}function jt(e,t){Mt.loadHandler=t,!Be(t)&&gn(e,"registerHandler",["load"])}function zt(e){Mt.resumeHandler?Mt.resumeHandler(e):Mt.loadHandler&&Mt.loadHandler(e),nn.childWindow&&_n("load",[e])}function $t(e,t){Mt.beforeUnloadHandler=t,!Be(t)&&gn(e,"registerHandler",["beforeUnload"])}function qt(){const e=()=>{gn(i("v2","handleBeforeUnload"),"readyToUnload",[])};Mt.beforeSuspendOrTerminateHandler?(Mt.beforeSuspendOrTerminateHandler(),nn.childWindow?_n("beforeUnload"):e()):Mt.beforeUnloadHandler&&Mt.beforeUnloadHandler(e)||(nn.childWindow?_n("beforeUnload"):e())}function Gt(e){Mt.beforeSuspendOrTerminateHandler=e,!Be(e)&&gn(i("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Jt(e){Mt.resumeHandler=e,!Be(e)&&gn(i("v2","registerOnResumeHandler"),"registerHandler",["load"])}const Kt=t("nestedAppAuthUtils"),Zt=Kt.extend("tryPolyfillWithNestedAppAuthBridge");function Qt(e,t,n){var r;const i=Zt;if(y.isFramelessWindow)return void i("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void i("Cannot polyfill nestedAppAuthBridge as current window does not exist");const o=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!o||!(null===(r=o.supports)||void 0===r?void 0:r.nestedAppAuth))return void i("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const s=t;if(s.nestedAppAuthBridge)return void i("nestedAppAuthBridge already exists on current window, skipping polyfill");const a=Yt(s,n);a&&(s.nestedAppAuthBridge=a)}const Xt=Kt.extend("createNestedAppAuthBridge");function Yt(e,t){const n=Xt;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:i}=t,o=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,o(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?i(e):n("Unrecognized data format received by app, message being ignored. Message: %o",e)},removeEventListener:(t,n)=>{e.removeEventListener(t,o(n))}}}var en=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};const tn=t("communication");class nn{}class rn{}function on(e,t){if(rn.messageListener=e=>en(this,void 0,void 0,(function*(){return yield En(e)})),nn.currentWindow=nn.currentWindow||te(),nn.parentWindow=nn.currentWindow.parent!==nn.currentWindow.self?nn.currentWindow.parent:nn.currentWindow.opener,nn.topWindow=nn.currentWindow.top,(nn.parentWindow||e)&&nn.currentWindow.addEventListener("message",rn.messageListener,!1),!nn.parentWindow){const e=nn.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));y.isFramelessWindow=!0,e.onNativeMessage=On}try{return nn.parentOrigin="*",dn(t,"initialize",[Pe,le]).then((([e,t,n,r])=>(Qt(r,nn.currentWindow,{onMessage:An,sendPostMessage:wn}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{nn.parentOrigin=null}}function sn(){nn.currentWindow&&nn.currentWindow.removeEventListener("message",rn.messageListener,!1),nn.currentWindow=null,nn.parentWindow=null,nn.parentOrigin=null,nn.childWindow=null,nn.childOrigin=null,rn.parentMessageQueue=[],rn.childMessageQueue=[],rn.nextMessageId=0,rn.callbacks={},rn.promiseCallbacks={},rn.portCallbacks={}}function an(e,t,...n){return dn(e,t,n).then((([e])=>e))}function cn(e,t,...n){return dn(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function un(e,t,n,...r){return dn(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function ln(e,t,...n){return dn(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function dn(e,t,n=void 0){if(!o(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(hn(bn(e,t,n).id))}))}function fn(e,t,n=void 0){if(!o(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 pn(bn(e,t,n).id)}function pn(e){return new Promise(((t,n)=>{rn.portCallbacks[e]=(e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}}))}function hn(e){return new Promise((t=>{rn.promiseCallbacks[e]=t}))}function gn(e,t,n,r){let i;if(n instanceof Function?r=n:n instanceof Array&&(i=n),!o(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 s=bn(e,t,i);r&&(rn.callbacks[s.id]=r)}rn.parentMessageQueue=[],rn.childMessageQueue=[],rn.topMessageQueue=[],rn.nextMessageId=0,rn.callbacks={},rn.promiseCallbacks={},rn.portCallbacks={};const mn=tn.extend("sendNestedAuthRequestToTopWindow");function wn(e){const t=mn,n=nn.topWindow,r=jn(e);return t("Message %i information: %o",r.id,{actionName:r.func}),yn(n,r)}const vn=tn.extend("sendRequestToTargetWindowHelper");function yn(e,t){const n=vn,r=Nn(e);if(y.isFramelessWindow)nn.currentWindow&&nn.currentWindow.nativeInterface&&(n(`Sending message %i to ${r} via framelessPostMessage interface`,t.id),nn.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(t)));else{const i=Hn(e);e&&i?(n(`Sending message %i to ${r} via postMessage`,t.id),e.postMessage(t,i)):(n(`Adding message %i to ${r} message queue`,t.id),Ln(e).push(t))}return t}const Cn=tn.extend("sendMessageToParentHelper");function bn(e,t,n){const r=Cn,i=nn.parentWindow,o=Wn(e,t,n);return r("Message %i information: %o",o.id,{actionName:t,args:n}),yn(i,o)}const Sn=tn.extend("processMessage");function En(e){return en(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Sn("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 Pn(t,n).then((r=>{r?(Fn(t,n),t===nn.parentWindow?On(e):t===nn.childWindow&&Mn(e)):Sn("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin")}))}))}const In=tn.extend("processAuthBridgeMessage");function An(e,t){var n,r;const i=In;if(!e||!e.data||"object"!=typeof e.data)return void i("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:o}=e.data,[,s]=null!=o?o:[],a=(()=>{try{return JSON.parse(s)}catch(e){return null}})();if(!a||"object"!=typeof a||"NestedAppAuthResponse"!==a.messageType)return void i("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),u=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Pn(c,u)?(nn.topWindow&&!nn.topWindow.closed&&c!==nn.topWindow||(nn.topWindow=c,nn.topOrigin=u),nn.topWindow&&nn.topWindow.closed&&(nn.topWindow=null,nn.topOrigin=null),xn(nn.topWindow),t(s)):i("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):i("Message being ignored by app because it is coming for a target that is null")}const Tn=tn.extend("shouldProcessMessage");function Pn(e,t){return en(this,void 0,void 0,(function*(){if(nn.currentWindow&&e===nn.currentWindow)return Tn("Should not process message because it is coming from the current window"),!1;if(nn.currentWindow&&nn.currentWindow.location&&t&&t===nn.currentWindow.location.origin)return!0;{const e=yield qe(new URL(t));return e||Tn("Message has an invalid origin of %s",t),e}}))}function Fn(e,t){y.isFramelessWindow||nn.parentWindow&&!nn.parentWindow.closed&&e!==nn.parentWindow?nn.childWindow&&!nn.childWindow.closed&&e!==nn.childWindow||(nn.childWindow=e,nn.childOrigin=t):(nn.parentWindow=e,nn.parentOrigin=t),nn.parentWindow&&nn.parentWindow.closed&&(nn.parentWindow=null,nn.parentOrigin=null),nn.childWindow&&nn.childWindow.closed&&(nn.childWindow=null,nn.childOrigin=null),xn(nn.parentWindow),xn(nn.childWindow)}const Rn=tn.extend("handleParentMessage");function On(e){const t=Rn;if("id"in e.data&&"number"==typeof e.data.id){const n=e.data,r=rn.callbacks[n.id];t("Received a response from parent for message %i",n.id),r&&(t("Invoking the registered callback for message %i with arguments %o",n.id,n.args),r.apply(null,[...n.args,n.isPartialResponse]),kn(e)||(t("Removing registered callback for message %i",n.id),delete rn.callbacks[n.id]));const i=rn.promiseCallbacks[n.id];i&&(t("Invoking the registered promise callback for message %i with arguments %o",n.id,n.args),i(n.args),t("Removing registered promise callback for message %i",n.id),delete rn.promiseCallbacks[n.id]);const o=rn.portCallbacks[n.id];if(o){let r;t("Invoking the registered port callback for message %i with arguments %o",n.id,n.args),e.ports&&e.ports[0]instanceof MessagePort&&(r=e.ports[0]),o(r,n.args),t("Removing registered port callback for message %i",n.id),delete rn.portCallbacks[n.id]}}else if("func"in e.data&&"string"==typeof e.data.func){const n=e.data;t("Received an action message %s from parent",n.func),Nt(n.func,n.args)}else t("Received an unknown message: %O",e)}function kn(e){return!0===e.data.isPartialResponse}function Mn(e){if("id"in e.data&&"func"in e.data){const t=e.data,[n,r]=Nt(t.func,t.args);n&&void 0!==r?Vn(t.id,Array.isArray(r)?r:[r]):gn(i("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(nn.childWindow){const n=e.pop();Vn(t.id,e,n)}}))}}function Un(){return nn.topWindow!==nn.parentWindow}function Ln(e){return e===nn.topWindow&&Un()?rn.topMessageQueue:e===nn.parentWindow?rn.parentMessageQueue:e===nn.childWindow?rn.childMessageQueue:[]}function Hn(e){return e===nn.topWindow&&Un()?nn.topOrigin:e===nn.parentWindow?nn.parentOrigin:e===nn.childWindow?nn.childOrigin:null}function Nn(e){return e===nn.topWindow&&Un()?"top":e===nn.parentWindow?"parent":e===nn.childWindow?"child":null}const Bn=tn.extend("flushMessageQueue");function xn(e){const t=Hn(e),n=Ln(e),r=Nn(e);for(;e&&t&&n.length>0;){const i=n.shift();Bn("Flushing message %i from "+r+" message queue via postMessage.",null==i?void 0:i.id),e.postMessage(i,t)}}function Dn(e,t){let n;n=nn.currentWindow.setInterval((()=>{0===Ln(e).length&&(clearInterval(n),t())}),100)}function Vn(e,t,n){const r=nn.childWindow,i=zn(e,t,n),o=Hn(r);r&&o&&r.postMessage(i,o)}function _n(e,t){const n=nn.childWindow,r=$n(e,t),i=Hn(n);n&&i?n.postMessage(r,i):Ln(n).push(r)}function Wn(e,t,n){return{id:rn.nextMessageId++,func:t,timestamp:Date.now(),args:n||[],apiVersionTag:e}}function jn(e){return{id:rn.nextMessageId++,func:"nestedAppAuth.execute",timestamp:Date.now(),args:[],data:e}}function zn(e,t,n){return{id:e,args:t||[],isPartialResponse:n}}function $n(e,t){return{func:e,args:t||[]}}var qn;!function(e){function t(){return!(!Me(he)||!he.supports.logs)}e.registerGetLogHandler=function(e){if(!Be(e)&&Me(he),!Be(e)&&!t())throw N;e?Bt(i("v1","log.request"),"log.request",(()=>{const t=e();gn(i("v1","log.receive"),"log.receive",[t])})):xt("log.request")},e.isSupported=t}(qn||(qn={}));const Gn="v1";function Jn(e,t){Me(he),gn(i(Gn,"uploadCustomApp"),"uploadCustomApp",[e],t||W())}function Kn(e,t,n){Me(he),gn(i(Gn,"sendCustomMessage"),e,t,n)}function Zn(e,t){if(Me(he),!nn.childWindow)throw new Error("The child window has not yet been initialized or is not present");_n(e,t)}function Qn(e,t){Me(he),Bt(i(Gn,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Xn(e,t){Me(he),Bt(i(Gn,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Yn(e){Me(he,U.content,U.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];gn(i(Gn,"openFilePreview"),"openFilePreview",t)}const er="v1";var tr;!function(e){function t(){return!(!Me(he)||!he.supports.conversations)}e.openConversation=function(e){return new Promise((n=>{if(Me(he,U.content),!t())throw N;const r=cn(i(er,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Bt(i(er,"conversations.registerStartConversationHandler"),"startConversation",((t,n,r,i)=>{var o;return null===(o=e.onStartConversation)||void 0===o?void 0:o.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:i})})),e.onCloseConversation&&Bt(i(er,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,i)=>{var o;return null===(o=e.onCloseConversation)||void 0===o?void 0:o.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:i})})),n(r)}))},e.closeConversation=function(){if(Me(he,U.content),!t())throw N;gn(i(er,"conversations.closeConversation"),"conversations.closeConversation"),xt("startConversation"),xt("closeConversation")},e.getChatMembers=function(){return new Promise((e=>{if(Me(he),!t())throw N;e(an(i(er,"conversations.getChatMember"),"getChatMembers"))}))},e.isSupported=t}(tr||(tr={}));const nr="users";function rr(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${nr}=`+e.map((e=>encodeURIComponent(e))).join(","),i=void 0===t?"":`&topicName=${encodeURIComponent(t)}`,o=void 0===n?"":`&message=${encodeURIComponent(n)}`;return`${h}://${g}/l/chat/0/0?${r}${i}${o}`}function ir(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${nr}=`+e.map((e=>encodeURIComponent(e))).join(","),i=void 0===t?"":`&withVideo=${encodeURIComponent(t)}`,o=void 0===n?"":`&source=${encodeURIComponent(n)}`;return`${h}://${g}/l/call/0/0?${r}${i}${o}`}function or(e,t,n,r,i){const o=void 0===e?"":"attendees="+e.map((e=>encodeURIComponent(e))).join(","),s=void 0===t?"":`&startTime=${encodeURIComponent(t)}`,a=void 0===n?"":`&endTime=${encodeURIComponent(n)}`,c=void 0===r?"":`&subject=${encodeURIComponent(r)}`,u=void 0===i?"":`&content=${encodeURIComponent(i)}`;return`${h}://${g}/l/meeting/new?${o}${s}${a}${c}${u}`}function sr(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${h}://${g}/l/app/${encodeURIComponent(e)}`}var ar;!function(e){function t(){return!(!Me(he)||!he.supports.appInstallDialog)}e.openAppInstallDialog=function(e){return new Promise((n=>{if(Me(he,U.content,U.sidePanel,U.settings,U.task,U.stage,U.meetingStage),!t())throw new Error("Not supported");const r=i("v1","appInstallDialog.openAppInstallDialog");he.isLegacyTeams?n(cn(r,"executeDeepLink",sr(e.appId))):(gn(r,"appInstallDialog.openAppInstallDialog",[e]),n())}))},e.isSupported=t}(ar||(ar={}));const cr="v1",ur=t("media");var lr;function dr(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 fr(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 i=new Uint8Array(r),o=new Blob([i],{type:t});return{sequence:e.chunkSequence,file:o}}function pr(e){wr(e)?He("2.0.2"):vr(e)?He(c):mr(e)&&He("2.0.4")}function hr(e){return!(e.mediaType!=lr.MediaType.Video||!e.videoProps||!e.videoProps.videoController)}function gr(e){return!(null==e||e.maxMediaCount>10)}function mr(e){var t;return!((null==e?void 0:e.mediaType)!=lr.MediaType.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function wr(e){return!(!e||e.mediaType!=lr.MediaType.VideoAndImage&&!e.videoAndImageProps)}function vr(e){return!(!e||e.mediaType!=lr.MediaType.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function yr(e,t,n){return null!=e&&null!=t&&"id"==t&&null!=n}function Cr(e){return!(null==e||e.length<=0||e.length>10)}function br(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Sr(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){class t{}function n(){return!(!Me(he)||!he.supports.permissions)}e.File=t,e.captureImage=function(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Me(he,U.content,U.task),y.isFramelessWindow)if(Ue("1.7.0"))gn(i(cr,"media.captureImage"),"captureImage",e);else{e({errorCode:O.OLD_PLATFORM},[])}else{e({errorCode:O.NOT_SUPPORTED_ON_PLATFORM},[])}},e.hasPermission=function(){if(Me(he,U.content,U.task),!n())throw N;return new Promise((e=>{e(ln(i(cr,"media.hasPermission"),"permissions.has","media"))}))},e.requestPermission=function(){if(Me(he,U.content,U.task),!n())throw N;return new Promise((e=>{e(ln(i(cr,"media.requestPermission"),"permissions.request","media"))}))};class r extends t{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(Me(he,U.content,U.task),Ue(l))if(yr(this.mimeType,this.format,this.content))Ue("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:O.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:O.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];gn(i(cr,"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=dr(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=fr(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):ur(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:O.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=z(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Be(e)&&gn(i(cr,"media.getMedia"),"getMedia",r),Bt(i(cr,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const i=JSON.parse(r);if(i.error)e(i.error,new Blob),xt("getMedia"+t);else if(i.mediaChunk)if(i.mediaChunk.chunkSequence<=0){const r=dr(n.assembleAttachment,n.mediaMimeType);e(i.error,null!=r?r:new Blob),xt("getMedia"+t)}else{const e=fr(i.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:O.INTERNAL_ERROR,message:"data received is null"},new Blob),xt("getMedia"+t)}}))}}e.Media=r;class o{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Me(he,U.content,U.task);try{He(c)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};gn(i(cr,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(s.StopRecording,e)}}let s,a,u,d,f,p;e.VideoController=class extends o{getMediaType(){return d.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case s.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}},function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(s=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"}(a=e.CameraStartMode||(e.CameraStartMode={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(u=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"}(d=e.MediaType||(e.MediaType={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(f=e.ImageUriType||(e.ImageUriType={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(p=e.ImageOutputFormats||(e.ImageOutputFormats={})),e.selectMedia=function(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Me(he,U.content,U.task),!Ue(l)){const e={errorCode:O.OLD_PLATFORM};return void t(e,[])}try{pr(e)}catch(e){return void t(e,[])}if(!gr(e)){const e={errorCode:O.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];gn(i(cr,"media.selectMedia"),"selectMedia",n,((n,i,o)=>{var s,a;if(o)return void(hr(e)&&(null===(a=null===(s=null==e?void 0:e.videoProps)||void 0===s?void 0:s.videoController)||void 0===a||a.notifyEventToApp(o)));if(!i)return void t(n,[]);const c=[];for(const e of i)c.push(new r(e));t(n,c)}))},e.viewImages=function(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Me(he,U.content,U.task),!Ue(l)){return void t({errorCode:O.OLD_PLATFORM})}if(!Cr(e)){return void t({errorCode:O.INVALID_ARGUMENTS})}const n=[e];gn(i(cr,"media.viewImages"),"viewImages",n,t)},e.scanBarCode=function(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Me(he,U.content,U.task),y.hostClientType!==M.desktop&&y.hostClientType!==M.web&&y.hostClientType!==M.rigel&&y.hostClientType!==M.teamsRoomsWindows&&y.hostClientType!==M.teamsRoomsAndroid&&y.hostClientType!==M.teamsPhones&&y.hostClientType!==M.teamsDisplays)if(Ue("1.9.0"))if(br(t))gn(i(cr,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:O.INVALID_ARGUMENTS},"")}else{e({errorCode:O.OLD_PLATFORM},"")}else{e({errorCode:O.NOT_SUPPORTED_ON_PLATFORM},"")}}}(lr||(lr={}));const Er="v2";var Ir;!function(e){function t(){return!!(Me(he)&&he.supports.barCode&&he.supports.permissions)}e.scanBarCode=function(e){return new Promise((n=>{if(Me(he,U.content,U.task),!t())throw N;if(!br(e))throw{errorCode:O.INVALID_ARGUMENTS};n(ln(i(Er,"barCode.scanBarCode"),"media.scanBarCode",e))}))},e.hasPermission=function(){if(Me(he,U.content,U.task),!t())throw N;return new Promise((e=>{e(ln(i(Er,"barCode.hasPermission"),"permissions.has","media"))}))},e.requestPermission=function(){if(Me(he,U.content,U.task),!t())throw N;return new Promise((e=>{e(ln(i(Er,"barCode.requestPermission"),"permissions.request","media"))}))},e.isSupported=t}(Ir||(Ir={}));var Ar;!function(e){function t(e,t){return new Promise((r=>{if(Me(he,U.content,U.task),!n())throw N;if(he.isLegacyTeams)r(cn(e,"executeDeepLink",rr([t.user],void 0,t.message)));else{r(cn(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function n(){return!(!Me(he)||!he.supports.chat)}e.openChat=function(e){return t(i("v2","chat.openChat"),e)},e.openGroupChat=function(e){const r=i("v2","chat.openGroupChat");return new Promise((i=>{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};i(t(r,n))}else{if(Me(he,U.content,U.task),!n())throw N;if(he.isLegacyTeams)i(cn(r,"executeDeepLink",rr(e.users,e.topic,e.message)));else{i(cn(r,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))},e.isSupported=n}(Ar||(Ar={}));var Tr=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};var Pr,Fr;!function(e){function t(){return!!(Me(he)&&navigator&&navigator.clipboard&&he.supports.clipboard)}e.write=function(e){return Tr(this,void 0,void 0,(function*(){if(Me(he,U.content,U.meetingStage,U.task,U.settings,U.stage,U.sidePanel),!t())throw N;if(!e.type||!Object.values(k).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(k)}`);const n=yield ee(e),r={mimeType:e.type,content:n};return ln(i("v2","clipboard.write"),"clipboard.writeToClipboard",r)}))},e.read=function(){return Tr(this,void 0,void 0,(function*(){Me(he,U.content,U.meetingStage,U.task,U.settings,U.stage,U.sidePanel);const e=i("v2","clipboard.read");if(!t())throw N;const n=yield ln(e,"clipboard.readFromClipboard");if("string"==typeof n){const e=JSON.parse(n);return Y(e.mimeType,e.content)}return n}))},e.isSupported=t}(Pr||(Pr={})),function(e){e.isNAAChannelRecommended=function(){var e;return null!==(e=Me(he)&&he.isNAAChannelRecommended)&&void 0!==e&&e}}(Fr||(Fr={}));const Rr="v2";var Or;function kr(){return he.hostVersionsInfo?he.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}!function(e){function t(){return!!(Me(he)&&he.supports.geoLocation&&he.supports.permissions)}let n;e.getCurrentLocation=function(){if(Me(he,U.content,U.task),!t())throw N;return ln(i(Rr,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})},e.hasPermission=function(){if(Me(he,U.content,U.task),!t())throw N;return new Promise((e=>{e(ln(i(Rr,"geoLocation.hasPermission"),"permissions.has","geolocation"))}))},e.requestPermission=function(){if(Me(he,U.content,U.task),!t())throw N;return new Promise((e=>{e(ln(i(Rr,"geoLocation.requestPermission"),"permissions.request","geolocation"))}))},e.isSupported=t,function(e){function t(){return!!(Me(he)&&he.supports.geoLocation&&he.supports.geoLocation.map&&he.supports.permissions)}e.chooseLocation=function(){if(Me(he,U.content,U.task),!t())throw N;return ln(i(Rr,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})},e.showLocation=function(e){if(Me(he,U.content,U.task),!t())throw N;if(!e)throw{errorCode:O.INVALID_ARGUMENTS};return ln(i(Rr,"geoLocation.showLocation"),"location.showLocation",e)},e.isSupported=t}(n=e.map||(e.map={}))}(Or||(Or={}));const Mr="v1";class Ur{postMessage(e,t){Me(he),gn(i(Mr,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||W())}addEventListener(e,t){Me(he),"message"===e&&Bt(i(Mr,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Lr{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Me(he,U.task),gn(i(Mr,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||W())}addEventListener(e,t){Me(he,U.task),"message"===e&&Bt(i(Mr,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}var Hr;!function(e){function t(){return!(!Me(he)||!he.supports.secondaryBrowser)}e.open=function(e){if(Me(he,U.content),!t())throw N;if(!e||!X(e))throw{errorCode:O.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return ln(i("v2","secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())},e.isSupported=t}(Hr||(Hr={}));var Nr;!function(e){function t(){return!(!Me(he)||!he.supports.location)}e.getLocation=function(e,n){if(!n)throw new Error("[location.getLocation] Callback cannot be null");if(Me(he,U.content,U.task),!Ue(u))throw{errorCode:O.OLD_PLATFORM};if(!e)throw{errorCode:O.INVALID_ARGUMENTS};if(!t())throw N;gn(i("v1","location.getLocation"),"location.getLocation",[e],n)},e.showLocation=function(e,n){if(!n)throw new Error("[location.showLocation] Callback cannot be null");if(Me(he,U.content,U.task),!Ue(u))throw{errorCode:O.OLD_PLATFORM};if(!e)throw{errorCode:O.INVALID_ARGUMENTS};if(!t())throw N;gn(i("v1","location.showLocation"),"location.showLocation",[e],n)},e.isSupported=t}(Nr||(Nr={}));var Br=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};const xr="v1";var Dr;!function(e){let t,n;function r(e,n){gn(i(xr,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((r,o)=>{if(r&&null!=o)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 o)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Bt(i(xr,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(n=>Br(this,void 0,void 0,(function*(){try{const r=yield e.micMuteStateChangedCallback(n);s(r,r.isMicMuted===n.isMicMuted?t.HostInitiated:t.AppDeclinedToChange)}catch(e){s(n,t.AppFailedToChange)}}))));Bt(i(xr,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),n(o)}))}function o(e,t){gn(i(xr,"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");Dt("meeting.micStateChanged")&&xt("meeting.micStateChanged"),Dt("meeting.audioDeviceSelectionChanged")&&xt("meeting.audioDeviceSelectionChanged"),t(n)}))}function s(e,t){Me(he,U.sidePanel,U.meetingStage),gn(i(xr,"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={})),e.getIncomingClientAudioState=function(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Me(he,U.sidePanel,U.meetingStage),gn(i(xr,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)},e.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Me(he,U.sidePanel,U.meetingStage),gn(i(xr,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)},e.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Me(he,U.sidePanel,U.meetingStage,U.settings,U.content),gn(i(xr,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)},e.getAuthenticationTokenForAnonymousUser=function(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Me(he,U.sidePanel,U.meetingStage,U.task),gn(i(xr,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)},e.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Me(he,U.sidePanel),gn(i(xr,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)},e.requestStartLiveStreaming=function(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Me(he,U.sidePanel),gn(i(xr,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)},e.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Me(he,U.sidePanel),gn(i(xr,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)},e.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Me(he,U.sidePanel),Bt(i(xr,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)},e.shareAppContentToStage=function(e,t,n={sharingProtocol:"Collaborative"}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Me(he,U.sidePanel,U.meetingStage),gn(i(xr,"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");Me(he,U.sidePanel,U.meetingStage),gn(i(xr,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)},e.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Me(he,U.sidePanel,U.meetingStage),gn(i(xr,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)},e.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Me(he,U.sidePanel,U.meetingStage),gn(i(xr,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)},e.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Me(he,U.sidePanel,U.meetingStage),Bt(i(xr,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)},e.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Me(he,U.sidePanel,U.meetingStage),Bt(i(xr,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)},e.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Me(he,U.sidePanel,U.meetingStage),Bt(i(xr,"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"));Me(he);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||"other"};return ln(i("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)},function(e){e.setOptions=function(e){Me(he,U.sidePanel),e.contentUrl&&new URL(e.contentUrl),gn(i(xr,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}}(n=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");Me(he,U.sidePanel,U.meetingStage),e.isAppHandlingAudio?r(e,t):o(e,t)},e.updateMicState=function(e){s(e,t.AppInitiated)}}(Dr||(Dr={}));var Vr;!function(e){function t(){return!(!Me(he)||!he.supports.monetization)}e.openPurchaseExperience=function(e,n){let r,o,s="";return"function"==typeof e?(r=e,o=n,s=i("v1","monetization.openPurchaseExperience")):(o=e,s=i("v2","monetization.openPurchaseExperience")),Me(he,U.content),J((()=>new Promise((e=>{if(!t())throw N;e(ln(s,"monetization.openPurchaseExperience",o))}))),r)},e.isSupported=t}(Vr||(Vr={}));var _r;!function(e){function t(){return!(!Me(he)||!he.supports.calendar)}e.openCalendarItem=function(e){return new Promise((n=>{if(Me(he,U.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");n(cn(i("v2","calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))},e.composeMeeting=function(e){return new Promise((n=>{if(Me(he,U.content),!t())throw new Error("Not supported");const r=i("v2","calendar.composeMeeting");he.isLegacyTeams?n(cn(r,"executeDeepLink",or(e.attendees,e.startTime,e.endTime,e.subject,e.content))):n(cn(r,"calendar.composeMeeting",e))}))},e.isSupported=t}(_r||(_r={}));var Wr;!function(e){function t(){return!(!Me(he)||!he.supports.mail)}let n;e.openMailItem=function(e){return new Promise((n=>{if(Me(he,U.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");n(cn(i("v2","mail.openMailItem"),"mail.openMailItem",e))}))},e.composeMail=function(e){return new Promise((n=>{if(Me(he,U.content),!t())throw new Error("Not supported");n(cn(i("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={}))}(Wr||(Wr={}));var jr;!function(e){function t(){te().print()}function n(e,t,n){!Be(t)&&Me(he),!Be(t)&&n&&n(),jt(e,t)}function r(e,t,n){!Be(t)&&Me(he),!Be(t)&&n&&n(),$t(e,t)}function o(){return!(!Me(he)||!he.supports.teamsCore)}e.enablePrintCapability=function(){if(!y.printCapabilityEnabled){if(Me(he),!o())throw N;y.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(i("v2","teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Be(e)&&!o())throw N}))},e.registerOnLoadHandlerHelper=n,e.registerBeforeUnloadHandler=function(e){r(i("v2","teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Be(e)&&!o())throw N}))},e.registerBeforeUnloadHandlerHelper=r,e.isSupported=o}(jr||(jr={}));var zr;function $r(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?qr(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function qr(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(!Ue("2.0.0"))throw{errorCode:O.OLD_PLATFORM};if(!Sr(t))throw{errorCode:O.INVALID_ARGUMENTS};if(!n())throw N;r(ln(e,"people.selectPeople",t))}))}function n(){return!(!Me(he)||!he.supports.people)}e.selectPeople=function(e,n){let r,o;Me(he,U.content,U.task,U.settings);let s="";return"function"==typeof e?([r,o]=[e,n],s=i("v1","people.selectPeople")):(o=e,s=i("v2","people.selectPeople")),q(t,r,s,o)},e.isSupported=n}(zr||(zr={}));var Gr;!function(e){e.showProfile=function(e){return Me(he,U.content),new Promise((t=>{const[n,r]=$r(e);if(!n)throw{errorCode:O.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(ln(i("v2","profile.showProfile"),"profile.showProfile",o))}))},e.isSupported=function(){return!(!Me(he)||!he.supports.profile)}}(Gr||(Gr={}));var Jr=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};const Kr="v2";function Zr(e,t,n,r){var i,o;return Jr(this,void 0,void 0,(function*(){const s=Yr();!ne()&&(null===(o=null===(i=window.chrome)||void 0===i?void 0:i.webview)||void 0===o||o.registerTextureStream(e,s)),ei(yield Xr(e,n,r),new ti(n,t),s.writable)}))}function Qr(e,t,n,r){var i,o;return Jr(this,void 0,void 0,(function*(){const s=Yr();!ne()&&(null===(o=null===(i=window.chrome)||void 0===i?void 0:i.webview)||void 0===o||o.registerTextureStream(e,s)),ei(yield Xr(e,n,r),new ii(n,t),s.writable)}))}function Xr(e,t,n){return Jr(this,void 0,void 0,(function*(){if(ne())throw N;const r=te().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 Yr(){if(ne())throw N;const e=window.MediaStreamTrackGenerator;if(!e)throw N;return new e({kind:"video"})}function ei(e,t,n){new(0,te().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class ti{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Jr(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const r=yield this.videoFrameHandler({videoFrame:e}),i=new VideoFrame(r,{timestamp:n});t.enqueue(i),e.close(),r.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")}))}}class ni{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 ri{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161;const n=new Uint32Array(e);for(let r=0,i=0;r<t;r++){const t=n[i++],r=n[i++],o=n[i++],s=new Uint8Array(e,r,o);this.metadataMap.set(t,s)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}}class ii{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Jr(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:i}={}}=yield this.extractVideoFrameAndMetadata(e),o=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:i}),s=new VideoFrame(o,{timestamp:n});t.enqueue(s),r.close(),e.close(),o.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>Jr(this,void 0,void 0,(function*(){if(ne())throw N;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 ni(n,this.notifyError),i={x:0,y:r.multiStreamHeaderRowOffset,width:e.codedWidth,height:e.codedHeight-r.multiStreamHeaderRowOffset},o=new ArrayBuffer(i.width*i.height*3/2);yield e.copyTo(o,{rect:i});const s=new ri(o,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:s.audioInferenceResult}}})),Bt(i(Kr,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function oi(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),gn(i(Kr,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in pi.EffectFailureReason?e:pi.EffectFailureReason.InitializationFailure;gn(i(Kr,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}class si{static setTimeout(e,t){const n=performance.now(),r=z();return si.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete si.setTimeoutCallbacks[e]}static setInterval(e,t){si.setTimeout((function n(){e(),si.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in si.setTimeoutCallbacks){const r=si.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){si.setTimeoutCallbacks[e].callback(),delete si.setTimeoutCallbacks[e]}}}si.setTimeoutCallbacks={};class ai{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){si.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,i){e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,r,i),this.timeoutId&&si.clearTimeout(this.timeoutId),this.timeoutId=si.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,r,i)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(e,t,n,r,i){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:r,frameHeight:i},this.sampleCount=0,this.distributionBins.fill(0)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(ai.maxSessionTimeoutInMs,2*t.timeoutInMs):ai.initialSessionTimeoutInMs}}ai.initialSessionTimeoutInMs=1e3,ai.maxSessionTimeoutInMs=3e4;const ci="v2";class ui{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new ai(ui.distributionBinSize,(e=>this.reportPerformanceEvent(i(ci,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){si.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(i(ci,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),ui.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){si.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(i(ci,"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(i(ci,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}ui.distributionBinSize=1e3,ui.calculateFPSInterval=1e3;var li=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},di=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const fi="v2";var pi;!function(e){const t=ne()?void 0:new ui(gn);let n;function r(e){gn(i(fi,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function o(e){gn(i(fi,"videoEffects.notifyError"),"video.notifyError",[e])}function s(){return Me(he)&&!!he.supports.video&&(!!he.supports.video.mediaStream||!!he.supports.video.sharedFrame)}function a(e,n){if(Me(he,U.sidePanel),!s()||!d())throw N;Bt(i(fi,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>li(this,void 0,void 0,(function*(){const{streamId:r}=n,i=c(e,t);yield Zr(r,i,o,t)}))),!1),gn(i(fi,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n])}function c(e,t){return n=>li(this,void 0,void 0,(function*(){const r=n.videoFrame;null==t||t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const i=yield e(n);return null==t||t.reportFrameProcessed(),i}))}function u(e,n){if(Me(he,U.sidePanel),!s()||!p())throw N;Bt(i(fi,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(n=>{if(n){const i=n.timestamp;null==t||t.reportStartFrameProcessing(n.width,n.height),e(l(n),(()=>{null==t||t.reportFrameProcessed(),r(i)}),o)}}),!1),gn(i(fi,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[n])}function l(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=di(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function d(){var e;return Me(he,U.sidePanel)&&f()&&!!(null===(e=he.supports.video)||void 0===e?void 0:e.mediaStream)}function f(){var e,t,n,r;return!(!(null===(t=null===(e=te().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=te().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function p(){var e;return Me(he,U.sidePanel)&&!!(null===(e=he.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(n=e.EffectFailureReason||(e.EffectFailureReason={})),e.registerForVideoFrame=function(e){if(Me(he,U.sidePanel),!s())throw N;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Bt(i(fi,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e.timeLimit)),!1),d())a(e.videoFrameHandler,e.config);else{if(!p())throw N;u(e.videoBufferHandler,e.config)}null==t||t.startMonitorSlowFrameProcessing()},e.notifySelectedVideoEffectChanged=function(e,t){if(Me(he,U.sidePanel),!s())throw N;gn(i(fi,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])},e.registerForVideoEffect=function(e){if(Me(he,U.sidePanel),!s())throw N;Bt(i(fi,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",oi(e,t),!1),gn(i(fi,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")},e.isSupported=s}(pi||(pi={}));const hi="v2";var gi;!function(e){const t="search.queryChange",n="search.queryClose",r="search.queryExecute";function o(){return!(!Me(he)||!he.supports.search)}e.registerHandlers=function(e,s,a){if(Me(he,U.content),!o())throw N;Bt(i(hi,"search.registerOnClosedHandler"),n,e),Bt(i(hi,"search.registerOnExecutedHandler"),r,s),a&&Bt(i(hi,"search.registerOnChangeHandler"),t,a)},e.unregisterHandlers=function(){if(Me(he,U.content),!o())throw N;gn(i(hi,"search.unregisterHandlers"),"search.unregister"),xt(t),xt(n),xt(r)},e.isSupported=o,e.closeSearch=function(){return new Promise((e=>{if(Me(he,U.content),!o())throw new Error("Not supported");e(cn(i(hi,"search.closeSearch"),"search.closeSearch"))}))}}(gi||(gi={}));var mi=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};var wi;!function(e){function t(t,n){return new Promise((r=>{if(!s())throw N;r(ln(t,e.SharingAPIMessages.shareWebContent,n))}))}function n(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:O.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function r(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:O.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:O.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function o(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:O.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:O.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function s(){return!(!Me(he)||!he.supports.sharing)}let a;e.SharingAPIMessages={shareWebContent:"sharing.shareWebContent"},e.shareWebContent=function(e,s){try{n(e),r(e),o(e)}catch(e){return G((()=>Promise.reject(e)),s)}return Me(he,U.content,U.sidePanel,U.task,U.stage,U.meetingStage),G(t,s,i(s?"v1":"v2","sharing.shareWebContent"),e)},e.isSupported=s,function(e){function t(){var e;return Me(he)&&void 0!==(null===(e=he.supports.sharing)||void 0===e?void 0:e.history)}e.getContent=function(){return mi(this,void 0,void 0,(function*(){if(Me(he,U.sidePanel,U.meetingStage),!t())throw N;const e=yield ln(i("v2","sharing.history.getContent"),"sharing.history.getContent");return e.map((e=>{ae(e.author),ae(e.threadId)})),e}))},e.isSupported=t}(a=e.history||(e.history={}))}(wi||(wi={}));var vi;!function(e){function t(){return!(!Me(he)||!he.supports.stageView)}e.open=function(e){return new Promise((n=>{if(Me(he,U.content),!t())throw N;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");n(ln(i("v2","stageView.open"),"stageView.open",e))}))},e.isSupported=t}(vi||(vi={}));var yi=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};const Ci="v2";var bi,Si;!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(Me(he,U.content,U.task),!r.isSupported())throw N;return ln(i(Ci,"visualMedia.hasPermission"),"permissions.has","media")},e.requestPermission=function(){if(Me(he,U.content,U.task),!r.isSupported())throw N;return ln(i(Ci,"visualMedia.requestPermission"),"permissions.request","media")},function(e){function t(){return!!(Me(he)&&he.supports.visualMedia&&he.supports.visualMedia.image&&he.supports.permissions)}function n(){if(!t())throw N}function r(e){if(!e||e.maxVisualMediaCount>10||e.maxVisualMediaCount<1)throw V}function o(e,t){if(t.length>e)throw _}e.captureImages=function(e){return yi(this,void 0,void 0,(function*(){Me(he,U.content,U.task),n(),r(e);const t=yield ln(i(Ci,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return o(e.maxVisualMediaCount,t),t}))},e.retrieveImages=function(e){return yi(this,void 0,void 0,(function*(){Me(he,U.content,U.task),n(),r(e);const t=yield ln(i(Ci,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return o(e.maxVisualMediaCount,t),t}))},e.isSupported=t}(r=e.image||(e.image={}))}(bi||(bi={})),function(e){function t(){return!(!Me(he)||!he.supports.webStorage)}e.isWebStorageClearedOnUserLogOut=function(){return Me(he),t()},e.isSupported=t}(Si||(Si={}));var Ei;!function(e){function t(){return!(!Me(he)||!he.supports.call)}e.startCall=function(e){const n=i("v2","call.startCall");return new Promise((r=>{var i;if(Me(he,U.content,U.task),!t())throw N;if(!he.isLegacyTeams)return gn(n,"call.startCall",[e],r);r(an(n,"executeDeepLink",ir(e.targets,null===(i=e.requestedModalities)||void 0===i?void 0:i.includes("video"),e.source)).then((e=>{if(!e)throw new Error("The call was not properly started");return e})))}))},e.isSupported=t}(Ei||(Ei={}));const Ii="v1";var Ai;!function(e){e.Messages=mt.Messages,e.FailedReason=mt.FailedReason,e.ExpectedFailureReason=mt.ExpectedFailureReason,e.notifyAppLoaded=function(){ct(i(Ii,"appInitialization.notifyAppLoaded"))},e.notifySuccess=function(){dt(i(Ii,"appInitialization.notifySuccess"))},e.notifyFailure=function(e){lt(i(Ii,"appInitialization.notifyFailure"),e)},e.notifyExpectedFailure=function(e){ut(i(Ii,"appInitialization.notifyExpectedFailure"),e)}}(Ai||(Ai={}));const Ti=t("thirdPartyCloudStorage");var Pi;!function(e){class t{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let n=[],r=null,o=!0,s=null;function a(e){if(s)if(e&&e.error)s([],e.error),s=null;else if(e&&e.fileChunk)try{o||0!==e.fileChunk.chunkSequence||(Ti("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),o=!0,s([],{errorCode:O.INTERNAL_ERROR,message:"error occurred while receiving data"}),n=[],s=null);const i=fr(e.fileChunk,e.fileType);if(i?(r||(r=new t(e.fileType,[])),r.assembleAttachment.push(i)):(Ti(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),s?s([],{errorCode:O.INTERNAL_ERROR,message:"error occurred while receiving data"}):s=null,n=[],s=null,o=!0),o=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&r){const t=dr(r.assembleAttachment,r.fileType);if(t){const r=new File([t],e.fileName,{type:t.type});n.push(r)}e.isLastFile&&s&&(s(n,e.error),n=[],s=null,o=!0),r=null}}catch(e){s&&(s([],{errorCode:O.INTERNAL_ERROR,message:e}),n=[],s=null,o=!0)}else s([],{errorCode:O.INTERNAL_ERROR,message:"data received is null"}),n=[],s=null,o=!0}function c(){return!(!Me(he)||!he.supports.thirdPartyCloudStorage)}e.getDragAndDropFiles=function(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Me(he,U.content,U.task),!c())throw N;if(s)throw s=null,new Error("getDragAndDropFiles cannot be called twice");s=t,o=!0,gn(i("v2","thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],a)}else{t([],{errorCode:O.INVALID_ARGUMENTS})}},e.isSupported=c}(Pi||(Pi={}));const Fi="v1";function Ri(e,t){at(i(Fi,"initialize"),t).then((()=>{e&&e()}))}function Oi(){jr.enablePrintCapability()}function ki(){jr.print()}function Mi(e){ke(),gn(i(Fi,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=y.frameContext),e(t)}))}function Ui(e){ht(i(Fi,"registerOnThemeChangeHandlerHelper"),e)}function Li(e){Vt(i(Fi,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Hi(e){Vt(i(Fi,"registerAppButtonClickHandler"),"appButtonClick",e,[U.content])}function Ni(e){Vt(i(Fi,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[U.content])}function Bi(e){Vt(i(Fi,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[U.content])}function xi(e){Ot.backStack.registerBackButtonHandlerHelper(i(Fi,"registerBackButtonHandler"),e)}function Di(e){jr.registerOnLoadHandlerHelper(i(Fi,"registerOnLoadHandler"),e)}function Vi(e){jr.registerBeforeUnloadHandlerHelper(i(Fi,"registerBeforeUnloadHandler"),e)}function _i(e){Vt(i(Fi,"registerFocusEnterHandler"),"focusEnter",e,[])}function Wi(e){Vt(i(Fi,"registerChangeSettingsHandler"),"changeSettings",e,[U.content])}function ji(e,t){Me(he),Et(i(Fi,"getTabInstances"),t).then((t=>{e(t)}))}function zi(e,t){Me(he),It(i(Fi,"getMruTabInstances"),t).then((t=>{e(t)}))}function $i(e){At(i(Fi,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function qi(e,t){Me(he,U.content,U.sidePanel,U.settings,U.task,U.stage,U.meetingStage);const n=null!=t?t:W();gt(i(Fi,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Gi(e){Tt(i(Fi,"setFrameContext"),e)}function Ji(e,t,n){at(i(Fi,"initializeWithFrameContext"),n).then((()=>t&&t())),Tt(i(Fi,"setFrameContext"),e)}const Ki="v1";function Zi(e){St(i(Ki,"navigation.returnFocus"),e)}function Qi(e,t){Me(he);const n=null!=t?t:W();bt(i(Ki,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Xi(e,t){Me(he,U.content,U.sidePanel,U.settings,U.remove,U.task,U.stage,U.meetingStage);const n=null!=t?t:W();yt(i(Ki,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Yi(e){Me(he);const t=null!=e?e:W();Ct(i(Ki,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const eo="v1";var to;!function(e){e.setValidityState=function(e){Pt(i(eo,"settings.setValidityState"),e)},e.getSettings=function(e){Me(he,U.content,U.settings,U.remove,U.sidePanel),Ft(i(eo,"settings.getSettings")).then((t=>{e(t)}))},e.setSettings=function(e,t){Me(he,U.content,U.settings,U.sidePanel);const n=null!=t?t:W();Rt(i(eo,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))},e.registerOnSaveHandler=function(e){Ot.config.registerOnSaveHandlerHelper(i(eo,"settings.registerOnSaveHandler"),e)},e.registerOnRemoveHandler=function(e){Ot.config.registerOnRemoveHandlerHelper(i(eo,"settings.registerOnRemoveHandler"),e)}}(to||(to={}));var no=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const ro="v1";var io;!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:"small",width:e.width?e.width:"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:"small",width:e.width?e.width:"small"},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function r(e){return e.height=e.height?e.height:"small",e.width=e.width?e.width:"small",e}e.startTask=function(e,r){const o=i(ro,"tasks.startTask"),s=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?(Me(he,U.content,U.sidePanel,U.meetingStage),gn(o,"tasks.startTask",[e],r)):void 0!==e.completionBotId?Ye(o,n(e),s):Xe(o,t(e),s),new Ur},e.updateTask=function(e){e=r(e);const{width:t,height:n}=e,o=no(e,["width","height"]);if(Object.keys(o).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Qe(i(ro,"tasks.updateTask"),e)},e.submitTask=function(e,t){et(i(ro,"tasks.submitTask"),e,t)},e.getDefaultSizeIfNotProvided=r}(io||(io={}));const oo="v2";var so;!function(e){e.isSupported=function(){return!(!Me(he,U.meetingStage,U.sidePanel)||!he.supports.interactive)}}(so||(so={}));class ao{getFluidTenantInfo(){return co(),new Promise((e=>{e(ln(i(oo,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return co(),new Promise((t=>{t(ln(i(oo,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return co(),new Promise((e=>{e(ln(i(oo,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return co(),new Promise((t=>{t(ln(i(oo,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return co(),new Promise((e=>{e(ln(i(oo,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return co(),new Promise((t=>{t(ln(i(oo,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return co(),new Promise((t=>{t(ln(i(oo,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return co(),new Promise((t=>{t(ln(i(oo,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return co(),new ao}}function co(){if(!so.isSupported())throw new Error("LiveShareHost Not supported")}var uo=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function lo(e){try{return e.cartItems=fo(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function fo(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=fo(e.accessories)),e}))}const po=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=uo(e,["imageURL","accessories"]),i=Object.assign({},r);return t&&(i.imageURL=t.href),n&&(i.accessories=po(n)),i}))}catch(e){throw new Error("Error serializing cart items")}};function ho(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)mo(t),go(t.accessories)}function go(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");mo(t)}}}function mo(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");vo(e.price),yo(e.quantity)}function wo(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===R(e))throw new Error("id must be a valid UUID")}}function vo(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 yo(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Co(e){if(!Object.values(So.CartStatus).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const bo="v2";var So;!function(e){let t;function n(){return!(!Me(he)||!he.supports.marketplace)}e.cartVersion={majorVersion:1,minorVersion:1},function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(t=e.CartStatus||(e.CartStatus={})),e.getCart=function(){if(Me(he,U.content,U.task),!n())throw N;return ln(i(bo,"marketplace.getCart"),"marketplace.getCart",e.cartVersion).then(lo)},e.addOrUpdateCartItems=function(t){if(Me(he,U.content,U.task),!n())throw N;if(!t)throw new Error("addOrUpdateCartItemsParams must be provided");return wo(null==t?void 0:t.cartId),ho(null==t?void 0:t.cartItems),ln(i(bo,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},t),{cartItems:po(t.cartItems),cartVersion:e.cartVersion})).then(lo)},e.removeCartItems=function(t){if(Me(he,U.content,U.task),!n())throw N;if(!t)throw new Error("removeCartItemsParams must be provided");if(wo(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 ln(i(bo,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(lo)},e.updateCartStatus=function(t){if(Me(he,U.content,U.task),!n())throw N;if(!t)throw new Error("updateCartStatusParams must be provided");return wo(null==t?void 0:t.cartId),Co(null==t?void 0:t.cartStatus),ln(i(bo,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(lo)},e.isSupported=n}(So||(So={}));const Eo="v2";var Io;!function(e){const t="Action.Execute";function n(e){if("ActionExecuteInvokeRequest"===e.requestType){const n=e;if(n.type!==t){throw{errorCode:"INTERNAL_ERROR",message:`Invalid action type ${n.type}. Action type must be "${t}"`}}}else if("QueryMessageExtensionRequest"===e.requestType){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 r(){return!(!Me(he)||!he.supports.externalAppAuthentication)}e.authenticateAndResendRequest=function(e,t,o){if(Me(he,U.content),!r())throw N;return re(e,new Error("App id is not valid.")),n(o),dn(i(Eo,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[e,o,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(Me(he,U.content),!r())throw N;return re(e,new Error("App id is not valid.")),dn(i(Eo,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[e,t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithSSOAndResendRequest=function(e,t,o){if(Me(he,U.content),!r())throw N;return re(e,new Error("App id is not valid.")),n(o),dn(i(Eo,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[e,o,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},e.authenticateWithOauth2=function(e,t,n){if(Me(he,U.content),!r())throw N;return re(e,new Error("titleId is Invalid.")),re(t,new Error("oauthConfigId is Invalid.")),dn(i(Eo,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))},e.isSupported=r}(Io||(Io={}));var Ao;!function(e){function t(){return!(!Me(he)||!he.supports.externalAppCardActions)}e.processActionSubmit=function(e,n){if(Me(he,U.content),!t())throw N;return re(e,new Error("App id is not valid.")),dn(i("v2","externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[e,n]).then((([e,t])=>{if(!e)throw t}))},e.processActionOpenUrl=function(e,n,r){if(Me(he,U.content),!t())throw N;return re(e,new Error("App id is not valid.")),dn(i("v2","externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[e,n.href,r]).then((([e,t])=>{if(e)throw e;return t}))},e.isSupported=t}(Ao||(Ao={}));var To=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};var Po;!function(e){function t(){return!(!Me(he)||!he.supports.externalAppCommands)}e.processActionCommand=function(e,n,r){return To(this,void 0,void 0,(function*(){if(Me(he,U.content),!t())throw N;re(e,new Error("App id is not valid."));const[o,s]=yield dn(i("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[e,n,r]);if(o)throw o;return s}))},e.isSupported=t}(Po||(Po={}));const Fo="v1";var Ro;!function(e){function t(e,t){return{errorCode:e,message:t}}e.getCloudStorageFolders=function(e,t){if(Me(he,U.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");gn(i(Fo,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)},e.addCloudStorageFolder=function(e,t){if(Me(he,U.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");gn(i(Fo,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)},e.deleteCloudStorageFolder=function(e,t,n){if(Me(he,U.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");gn(i(Fo,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)},e.getCloudStorageFolderContents=function(e,t,n){if(Me(he,U.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");gn(i(Fo,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)},e.openCloudStorageFile=function(e,t,n){if(Me(he,U.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");gn(i(Fo,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])},e.getExternalProviders=function(e=!1,t){if(Me(he,U.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");gn(i(Fo,"files.getExternalProviders"),"files.getExternalProviders",[e],t)},e.copyMoveFiles=function(e,t,n,r,o=!1,s){if(Me(he,U.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(!s)throw new Error("[files.copyMoveFiles] callback cannot be null");gn(i(Fo,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],s)},e.getFileDownloads=function(e){if(Me(he,U.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");gn(i(Fo,"files.getFileDownloads"),"files.getFileDownloads",[],e)},e.openDownloadFolder=function(e=void 0,t){if(Me(he,U.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");gn(i(Fo,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)},e.addCloudStorageProvider=function(e){if(Me(he,U.content),!e)throw t(O.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");gn(i(Fo,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)},e.removeCloudStorageProvider=function(e,n){if(Me(he,U.content),!n)throw t(O.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw t(O.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");gn(i(Fo,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],n)},e.addCloudStorageProviderFile=function(e,n){if(Me(he,U.content),!n)throw t(O.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw t(O.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");gn(i(Fo,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],n)},e.renameCloudStorageProviderFile=function(e,n){if(Me(he,U.content),!n)throw t(O.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw t(O.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");gn(i(Fo,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],n)},e.deleteCloudStorageProviderFile=function(e,n){if(Me(he,U.content),!n)throw t(O.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(O.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");gn(i(Fo,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],n)},e.downloadCloudStorageProviderFile=function(e,n){if(Me(he,U.content),!n)throw t(O.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(O.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");gn(i(Fo,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],n)},e.uploadCloudStorageProviderFile=function(e,n){if(Me(he,U.content),!n)throw t(O.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(O.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw t(O.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");gn(i(Fo,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],n)},e.registerCloudStorageProviderListChangeHandler=function(e){if(Me(he),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Bt(i(Fo,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)},e.registerCloudStorageProviderContentChangeHandler=function(e){if(Me(he),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Bt(i(Fo,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}}(Ro||(Ro={}));const Oo="v1";var ko;!function(e){function t(){return!(!Me(he)||!he.supports.meetingRoom)}e.getPairedMeetingRoomInfo=function(){return new Promise((e=>{if(Me(he),!t())throw N;e(ln(i(Oo,"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(Me(he),!t())throw N;n(ln(i(Oo,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))},e.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Me(he),!t())throw N;Bt(i(Oo,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Me(he),e(t)}))},e.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Me(he),!t())throw N;Bt(i(Oo,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Me(he),e(t)}))},e.isSupported=t}(ko||(ko={}));var Mo,Uo=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};!function(e){let n;const r=t("messageChannels");function o(){return!(!Me(he)||!he.supports.messageChannels)}e.getTelemetryPort=function(){return Uo(this,void 0,void 0,(function*(){if(n)return r("Returning telemetry port from cache"),n;if(!o())throw N;return n=yield fn(i("v1","messageChannels.getTelemetryPort"),"messageChannels.getTelemetryPort"),n}))},e.isSupported=o,e._clearTelemetryPort=function(){n=void 0}}(Mo||(Mo={}));var Lo,Ho;!function(e){function t(){return!(!Me(he)||!he.supports.notifications)}e.showNotification=function(e){if(Me(he,U.content),!t())throw N;gn(i("v1","notifications.showNotification"),"notifications.showNotification",[e])},e.isSupported=t}(Lo||(Lo={})),function(e){function t(){return!(!Me(he)||!he.supports.otherAppStateChange)}e.registerAppInstallationHandler=function(e){if(!t())throw new Error(O.NOT_SUPPORTED_ON_PLATFORM.toString());if(Be(e))throw new Error(O.INVALID_ARGUMENTS.toString());Bt(i("v2","otherApp.install"),"otherApp.install",e)},e.unregisterAppInstallationHandler=function(){if(!t())throw new Error(O.NOT_SUPPORTED_ON_PLATFORM.toString());gn(i("v2","otherApp.unregisterInstall"),"otherApp.unregisterInstall"),xt("otherApp.install")},e.isSupported=t}(Ho||(Ho={}));const No="v1";var Bo;!function(e){let t;function n(){return!(!Me(he)||!he.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={})),e.getCapableParticipants=function(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Me(he,U.sidePanel),!n())throw N;gn(i(No,"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(Me(he,U.sidePanel),!n())throw N;gn(i(No,"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(Me(he,U.sidePanel),!n())throw N;gn(i(No,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)},e.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Me(he,U.sidePanel),!n())throw N;gn(i(No,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)},e.registerOnCapableParticipantsChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Me(he,U.sidePanel),!n())throw N;Bt(i(No,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)},e.registerOnErrorHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Me(he,U.sidePanel),!n())throw N;Bt(i(No,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)},e.registerOnDeviceStateChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Me(he,U.sidePanel),!n())throw N;Bt(i(No,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)},e.registerOnSessionStatusChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Me(he,U.sidePanel),!n())throw N;Bt(i(No,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)},e.isSupported=n}(Bo||(Bo={}));var xo;!function(e){function t(){return!(!Me(he)||!he.supports.appEntity)}e.selectAppEntity=function(e,n,r,o){if(Me(he,U.content),!t())throw N;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!o)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");gn(i("v1","appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,n,r],o)},e.isSupported=t}(xo||(xo={}));const Do="v1";var Vo;!function(e){function t(){return!(!Me(he)||!he.supports.teams)}let n;e.getTeamChannels=function(e,n){if(Me(he,U.content),!t())throw N;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!n)throw new Error("[teams.getTeamChannels] Callback cannot be null");gn(i(Do,"teams.getTeamChannels"),"teams.getTeamChannels",[e],n)},e.refreshSiteUrl=function(e,n){if(Me(he),!t())throw N;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!n)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");gn(i(Do,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],n)},e.isSupported=t,function(e){let t;function n(){return!(!Me(he)||!he.supports.teams)&&!!he.supports.teams.fullTrust}!function(e){function t(){return!(!Me(he)||!he.supports.teams)&&(!!he.supports.teams.fullTrust&&!!he.supports.teams.fullTrust.joinedTeams)}e.getUserJoinedTeams=function(e){return new Promise((n=>{if(Me(he),!t())throw N;if((y.hostClientType===M.android||y.hostClientType===M.teamsRoomsAndroid||y.hostClientType===M.teamsPhones||y.hostClientType===M.teamsDisplays)&&!Ue("2.0.1")){const e={errorCode:O.OLD_PLATFORM};throw new Error(JSON.stringify(e))}n(an(i(Do,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))},e.isSupported=t}(t=e.joinedTeams||(e.joinedTeams={})),e.getConfigSetting=function(e){return new Promise((t=>{if(Me(he),!n())throw N;t(an(i(Do,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))},e.isSupported=n}(n=e.fullTrust||(e.fullTrust={}))}(Vo||(Vo={}));var _o=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};const Wo="v2";var jo;!function(e){e.frameProcessingTimeoutInMs=2e3;const t=ne()?void 0:new ui(gn);function n(){const t=setTimeout((()=>{c(`Frame not processed in ${e.frameProcessingTimeoutInMs}ms`,"warn")}),e.frameProcessingTimeoutInMs);return function(){clearTimeout(t)}}function r(e,t){return r=>_o(this,void 0,void 0,(function*(){const i=r.videoFrame;t.reportStartFrameProcessing(i.codedWidth,i.codedHeight);const o=n(),s=yield e(r);return o(),t.reportFrameProcessed(),s}))}function o(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function s(){return Me(he),pi.isSupported()}function a(e){gn(i(Wo,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function c(e,t="warn"){gn(i(Wo,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}e.registerForVideoFrame=function(e){var u,l;if(!s())throw N;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Me(he,U.sidePanel)){if(Bt(i(Wo,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e)),!1),null===(u=he.supports.video)||void 0===u?void 0:u.mediaStream)Bt(i(Wo,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>_o(this,void 0,void 0,(function*(){const{streamId:i,metadataInTexture:o}=n,s=t?r(e.videoFrameHandler,t):e.videoFrameHandler;o?yield Qr(i,s,c,t):yield Zr(i,s,c,t)}))),!1),gn(i(Wo,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(l=he.supports.video)||void 0===l?void 0:l.sharedFrame))throw N;Bt(i(Wo,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(r=>{if(r){null==t||t.reportStartFrameProcessing(r.width,r.height);const i=n(),s=r.timestamp;e.videoBufferHandler(o(r),(()=>{i(),null==t||t.reportFrameProcessed(),a(s)}),c)}}),!1),gn(i(Wo,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==t||t.startMonitorSlowFrameProcessing()}},e.notifySelectedVideoEffectChanged=function(e,t,n){if(Me(he,U.sidePanel),!s())throw N;gn(i(Wo,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])},e.registerForVideoEffect=function(e){if(Me(he,U.sidePanel),!s())throw N;Bt(i(Wo,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",oi(e,t),!1),gn(i(Wo,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")},e.updatePersonalizedEffects=function(e){if(Me(he,U.sidePanel),!pi.isSupported())throw N;gn(i(Wo,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])},e.isSupported=s,e.notifyFatalError=function(e){if(Me(he),!pi.isSupported())throw N;c(e,"fatal")}}(jo||(jo={}))})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],l=i[1],u=new o(c(e,a,l)),d=0,f=l>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(l(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},46:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(601)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},601:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function 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:()=>Pe,ChildAppWindow:()=>Po,DialogDimension:()=>Ae,ErrorCode:()=>we,FileOpenPreference:()=>ge,FrameContexts:()=>Se,HostClientType:()=>ye,HostName:()=>be,LiveShareHost:()=>ea,ParentAppWindow:()=>To,SecondaryM365ContentIdName:()=>he,TaskModuleDimension:()=>Te,TeamType:()=>Ee,UserTeamRole:()=>Ie,app:()=>ln,appEntity:()=>Oa,appInitialization:()=>vi,appInstallDialog:()=>Yr,authentication:()=>Bt,barCode:()=>wo,calendar:()=>Uo,call:()=>hi,chat:()=>vo,clipboard:()=>yo,conversations:()=>Gr,dialog:()=>Gt,enablePrintCapability:()=>Ei,executeDeepLink:()=>Vi,externalAppAuthentication:()=>ha,externalAppCardActions:()=>wa,externalAppCommands:()=>Ca,files:()=>ba,geoLocation:()=>Eo,getAdaptiveCardSchemaVersion:()=>Io,getContext:()=>Ai,getMruTabInstances:()=>xi,getTabInstances:()=>Li,initialize:()=>Si,initializeWithFrameContext:()=>Bi,liveShare:()=>Yi,location:()=>Ro,logs:()=>Dr,mail:()=>No,marketplace:()=>ga,media:()=>no,meeting:()=>Mo,meetingRoom:()=>Ea,menus:()=>Kt,messageChannels:()=>Ia,monetization:()=>Ho,navigateBack:()=>$i,navigateCrossDomain:()=>qi,navigateToTab:()=>zi,nestedAppAuth:()=>bo,notifications:()=>Pa,openFilePreview:()=>qr,otherAppStateChange:()=>Ta,pages:()=>En,people:()=>xo,print:()=>Ii,profile:()=>_o,registerAppButtonClickHandler:()=>Fi,registerAppButtonHoverEnterHandler:()=>Ri,registerAppButtonHoverLeaveHandler:()=>Oi,registerBackButtonHandler:()=>ki,registerBeforeUnloadHandler:()=>Hi,registerChangeSettingsHandler:()=>Ni,registerCustomHandler:()=>jr,registerFocusEnterHandler:()=>Ui,registerFullScreenHandler:()=>Ti,registerOnLoadHandler:()=>Mi,registerOnThemeChangeHandler:()=>Pi,registerUserSettingsChangeHandler:()=>zr,remoteCamera:()=>Ra,returnFocus:()=>ji,search:()=>ci,secondaryBrowser:()=>Fo,sendCustomEvent:()=>Wr,sendCustomMessage:()=>Br,setFrameContext:()=>_i,settings:()=>Ji,shareDeepLink:()=>Di,sharing:()=>ui,stageView:()=>di,tasks:()=>Qi,teams:()=>Ma,teamsCore:()=>Lo,thirdPartyCloudStorage:()=>yi,uploadCustomApp:()=>_r,version:()=>Ct,videoEffects:()=>ai,videoEffectsEx:()=>Na,visualMedia:()=>gi,webStorage:()=>mi});const e=(0,n(46).debug)("teamsJs");function t(t){return e.extend(t)}function o(e,t){return`${e}_${t}`}function i(e){return/^v\d+_[\w.]+$/.test(e)}const a=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","www.bing.com","www.staging-bing-int.com","teams.cloud.microsoft","outlook.cloud.microsoft","m365.cloud.microsoft","copilot.microsoft.com","windows.msn.com"]}');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 b=E,S=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 L(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 x(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(k(e,SharedArrayBuffer)||e&&k(e.buffer,SharedArrayBuffer)))return x(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 P(e),T(e<0?0:0|F(e))}function P(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function T(e){if(e>S)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>=S)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S.toString(16)+" bytes");return 0|e}function R(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!E.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|O(e,t);let r=T(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function O(e,t){if(E.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||k(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(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 H(e){return y.toByteArray(N(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 U=/[^+/0-9A-Za-z-_]/g;function N(e){if((e=(e=e.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function L(e){if(k(e,Uint8Array)){const t=new Uint8Array(e);return x(t.buffer,t.byteOffset,t.byteLength)}return D(e)}function x(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 D(e){const t=e.length<0?0:0|F(e.length),n=T(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function V(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,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 W(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 $(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(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 B=4096;function W(e){const t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=B));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 $(e,t,n){return 0===t&&n===e.length?y.fromByteArray(e):y.fromByteArray(e.slice(t,n))}function G(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(H(t),e,n,r)}function X(e,t,n,r){return te(ee(t,e.length-n),e,n,r)}function Y(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function ee(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function te(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function ne(e){return e!=e}E.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return J(this,e,t,n);case"utf8":case"utf-8":return K(this,e,t,n);case"ascii":case"latin1":case"binary":return Z(this,e,t,n);case"base64":return Q(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const re=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function oe(e){if(E.isBuffer(e)){const t=0|F(e.length),n=T(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ne(e.length)?T(0):D(e):"Buffer"===e.type&&Array.isArray(e.data)?D(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,be,Se,Ee,Ie,Ae;!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(ge||(ge={})),function(e){e.M365Content="m365content"}(me||(me={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(he||(he={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(we||(we={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(ve||(ve={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Ce||(Ce={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(ye||(ye={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(be||(be={})),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"}(Se||(Se={})),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"}(Ae||(Ae={}));var Pe,Te=Ae;!function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Pe||(Pe={}));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)."),He=new Error("Invalid response: Received more images than the specified max limit in the response.");function Ue(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Ne(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 Le(){return de()}function xe(e){return Object.keys(e).forEach((t=>{"object"==typeof e[t]&&xe(e[t])})),Object.freeze(e)}function De(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 Be(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 We(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId)+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl),(e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function je(e){return!(Ne(`${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=b.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function $e(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 Ge(){if(Je())throw new Error("window object undefined at SSR check");return window}function Je(){return"undefined"==typeof window}function Ke(e,t){if(Ze(e)||!Qe(e)||!Xe(e))throw t||new Error("id is not valid.")}function Ze(e){return/<script[^>]*>[\s\S]*?<\/script[^>]*>/gi.test(e)}function Qe(e){return e.length<256&&e.length>4}function Xe(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Ye(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 et=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 tt=t("runtime"),nt=4;function rt(e){return e.apiVersion===nt}const ot={apiVersion:-1,supports:{}};function it(e){if(rt(e))return!0;throw-1===e.apiVersion?new Error(w):new Error(v)}let at=ot;const st={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:{}}}},ct=[ye.desktop,ye.web,ye.rigel,ye.surfaceHub,ye.teamsRoomsWindows,ye.teamsRoomsAndroid,ye.teamsPhones,ye.teamsDisplays],lt=[ye.android,ye.ios,ye.ipados],ut=[...ct,...lt];function dt(e){let t=e;if(t.apiVersion<nt&&ft.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),rt(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const ft=[{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=et(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})}}}],pt={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:ct}],"1.9.0":[{capability:{location:{}},hostClientTypes:ut}],"2.0.0":[{capability:{people:{}},hostClientTypes:ut},{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]}]},gt=tt.extend("generateBackCompatRuntimeConfig");function mt(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]=mt(e[r]||{},t[r]));return n}function ht(e,t,n){gt("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);gt("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{Ne(e,t)>=0&&n[t].forEach((e=>{void 0!==C.hostClientType&&e.hostClientTypes.includes(C.hostClientType)&&(r=mt(r,e.capability))}))}));const o={apiVersion:nt,hostVersionsInfo:ke,isLegacyTeams:!0,supports:r};return gt("Runtime config after updating based on highestSupportedVersion: %o",o),o}const wt=tt.extend("applyRuntimeConfig");function vt(e){"string"==typeof e.apiVersion&&(wt("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),wt("Fast-forwarding runtime %o",e);const t=dt(e);wt("Applying runtime %o",t),at=xe(t)}const Ct="2.23.0-beta.0",yt=t("internal"),bt=yt.extend("ensureInitializeCalled"),St=yt.extend("ensureInitialized");function Et(){if(!C.initializeCalled)throw bt(h),new Error(h)}function It(e,...t){if(!C.initializeCompleted)throw St("%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 it(e)}function At(e=s){const t=Ne(C.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Pt(){return C.hostClientType==ye.android||C.hostClientType==ye.ios||C.hostClientType==ye.ipados}function Tt(e=s){if(!Pt()){throw{errorCode:we.NOT_SUPPORTED_ON_PLATFORM}}if(!At(e)){throw{errorCode:we.OLD_PLATFORM}}}function Ft(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 Rt(e){return null==e}var Ot=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 kt=[];const Mt=t("validateOrigin");function Ht(){return Ot(this,void 0,void 0,(function*(){yield Nt()}))}function Ut(){return 0!==kt.length}function Nt(){return Ot(this,void 0,void 0,(function*(){return Ut()?kt:Je()?(kt=d,d):fetch(f).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(Lt(JSON.stringify(e)))return kt=e.validOrigins,kt;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(Mt("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),kt=d,kt)))}))}function Lt(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 Mt("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function xt(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 Dt(e){return Nt().then((t=>{if(!ze(e))return Mt("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=>xt(e,n))))return!0;for(const e of C.additionalValidOrigins){if(xt("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return Mt("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,C.additionalValidOrigins),!1}))}const Vt="v1",_t="v2";var Bt;!function(e){let t,n,r,i;function a(e,n){return new Promise(((r,o)=>{if(C.hostClientType===ye.desktop||C.hostClientType===ye.android||C.hostClientType===ye.ios||C.hostClientType===ye.ipados||C.hostClientType===ye.macos||C.hostClientType===ye.rigel||C.hostClientType===ye.teamsRoomsWindows||C.hostClientType===ye.teamsRoomsAndroid||C.hostClientType===ye.teamsPhones||C.hostClientType===ye.teamsDisplays||C.hostClientType===ye.surfaceHub){const t=document.createElement("a");t.href=n.url,r(rr(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(rr(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(rr(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function l(){d();try{Kn.childWindow&&Kn.childWindow.close()}finally{Kn.childWindow=null,Kn.childOrigin=null}}function u(e){l();let t=e.width||600,n=e.height||400;t=Math.min(t,Kn.currentWindow.outerWidth-400),n=Math.min(n,Kn.currentWindow.outerHeight-200);const r=document.createElement("a");r.href=e.url.replace("{oauthRedirectMethod}","web");let o=void 0!==Kn.currentWindow.screenLeft?Kn.currentWindow.screenLeft:Kn.currentWindow.screenX,i=void 0!==Kn.currentWindow.screenTop?Kn.currentWindow.screenTop:Kn.currentWindow.screenY;o+=Kn.currentWindow.outerWidth/2-t/2,i+=Kn.currentWindow.outerHeight/2-n/2,Kn.childWindow=Kn.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),Kn.childWindow?f():g("FailedToOpenWindow")}function d(){n&&(clearInterval(n),n=0),kn("initialize"),kn("navigateCrossDomain")}function f(){d(),n=Kn.currentWindow.setInterval((()=>{if(!Kn.childWindow||Kn.childWindow.closed)g("CancelledByUser");else{const e=Kn.childOrigin;try{Kn.childOrigin="*",Hr("ping")}finally{Kn.childOrigin=e}}}),100),On(o(Vt,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[Se.authentication,C.hostClientType])),On(o(Vt,"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(){On(o(Vt,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",p,!1),On(o(Vt,"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 It(at,Se.content,Se.sidePanel,Se.settings,Se.remove,Se.task,Se.stage,Se.meetingStage),a(n.successCallback||n.failureCallback?o(Vt,"authentication.authenticate"):o(_t,"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 Et(),s(e&&(e.successCallback||e.failureCallback)?o(Vt,"authentication.getAuthToken"):o(_t,"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 Et(),c(e&&(e.successCallback||e.failureCallback)?o(Vt,"authentication.getUser"):o(_t,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),null;throw t}))},e.notifySuccess=function(e,t){It(at,Se.authentication),sr(o(t?Vt:_t,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),kr(Kn.parentWindow,(()=>setTimeout((()=>Kn.currentWindow.close()),200)))},e.notifyFailure=function(e,t){It(at,Se.authentication),sr(o(t?Vt:_t,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),kr(Kn.parentWindow,(()=>setTimeout((()=>Kn.currentWindow.close()),200)))},function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(i=e.DataResidency||(e.DataResidency={}))}(Bt||(Bt={}));const Wt="v2";function jt(e,t){if(It(at,Se.content,Se.sidePanel,Se.task,Se.meetingStage),!Gt.update.isSupported())throw Fe;sr(e,"tasks.updateTask",[t])}function zt(e,t,n,r){if(It(at,Se.content,Se.sidePanel,Se.meetingStage),!Gt.url.isSupported())throw Fe;r&&On(o(Wt,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);sr(e,"tasks.startTask",[Gt.url.getDialogInfoFromUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),kn("messageForParent")}))}function qt(e,t,n,r){if(It(at,Se.content,Se.sidePanel,Se.meetingStage),!Gt.url.bot.isSupported())throw Fe;r&&On(o(Wt,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);sr(e,"tasks.startTask",[Gt.url.getDialogInfoFromBotUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),kn("messageForParent")}))}function $t(e,t,n){if(It(at,Se.content,Se.task),!Gt.url.isSupported())throw Fe;sr(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}var Gt;!function(e){const t=[];function n(e){C.frameContext&&(C.frameContext===Se.task?t.push(e):kn("messageForChild"))}let r,i,a;e.initialize=function(){On(o(Wt,"dialog.registerMessageForChildHandler"),"messageForChild",n,!1)},function(e){let n,r;function i(e){return{url:e.url,height:e.size?e.size.height:Ae.Small,width:e.size?e.size.width:Ae.Small,title:e.title,fallbackUrl:e.fallbackUrl}}e.open=function(e,t,n){zt(o(Wt,"dialog.url.open"),e,t,n)},e.submit=function(e,t){$t(o(Wt,"dialog.url.submit"),e,t)},function(e){function n(){var e,t;return It(at)&&!!(null===(t=null===(e=at.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}e.sendMessageToParentFromDialog=function(e){if(It(at,Se.task),!n())throw Fe;sr(o(Wt,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])},e.sendMessageToDialog=function(e){if(It(at,Se.content,Se.sidePanel,Se.meetingStage),!n())throw Fe;sr(o(Wt,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])},e.registerOnMessageFromParent=function(e){if(It(at,Se.task),!n())throw Fe;for(kn("messageForChild"),On(o(Wt,"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 It(at)&&void 0!==(at.supports.dialog&&at.supports.dialog.url)},function(e){e.open=function(e,t,n){qt(o(Wt,"dialog.url.bot.open"),e,t,n)},e.isSupported=function(){return It(at)&&void 0!==(at.supports.dialog&&at.supports.dialog.url&&at.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!(!It(at)||!at.supports.dialog)},function(e){e.resize=function(e){jt(o(Wt,"dialog.update.resize"),e)},e.isSupported=function(){return!(!It(at)||!at.supports.dialog)&&!!at.supports.dialog.update}}(i=e.update||(e.update={})),function(e){function t(){const e=at.hostVersionsInfo&&at.hostVersionsInfo.adaptiveCardSchemaVersion&&!je(at.hostVersionsInfo.adaptiveCardSchemaVersion);return It(at)&&void 0!==(e&&at.supports.dialog&&at.supports.dialog.card)}let n;function r(e){return{card:e.card,height:e.size?e.size.height:Ae.Small,width:e.size?e.size.width:Ae.Small,title:e.title}}function i(e){const t=r(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,n){if(It(at,Se.content,Se.sidePanel,Se.meetingStage),!t())throw Fe;const i=r(e);sr(o(Wt,"dialog.adaptiveCard.open"),"tasks.startTask",[i],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t,function(e){function t(){const e=at.hostVersionsInfo&&at.hostVersionsInfo.adaptiveCardSchemaVersion&&!je(at.hostVersionsInfo.adaptiveCardSchemaVersion);return It(at)&&void 0!==(e&&at.supports.dialog&&at.supports.dialog.card&&at.supports.dialog.card.bot)}e.open=function(e,n){if(It(at,Se.content,Se.sidePanel,Se.meetingStage),!t())throw Fe;const r=i(e);sr(o(Wt,"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={}))}(Gt||(Gt={}));const Jt="v2";var Kt;!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)||(It(at),sr(o(Jt,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function c(e){r&&r(e)||(It(at),sr(o(Jt,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function l(e){i&&i(e)||(It(at),sr(o(Jt,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function u(){return!(!It(at)||!at.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(){On(o(Jt,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",c,!1),On(o(Jt,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",l,!1),On(o(Jt,"menus.registerSetModuleViewHandler"),"setModuleView",s,!1)},e.setUpViews=function(e,t){if(It(at),!u())throw Fe;a=t,sr(o(Jt,"menus.setUpViews"),"setUpViews",[e])},e.setNavBarMenu=function(e,t){if(It(at),!u())throw Fe;r=t,sr(o(Jt,"menus.setNavBarMenu"),"setNavBarMenu",[e])},e.showActionMenu=function(e,t){if(It(at),!u())throw Fe;i=t,sr(o(Jt,"menus.showActionMenu"),"showActionMenu",[e])},e.isSupported=u}(Kt||(Kt={}));const Zt="v2",Qt=5e3,Xt=t("app");function Yt(e,t){if(Je()){return Xt.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Be((()=>an(e,t)),Qt,new Error("SDK initialization timed out."))}function en(e){sr(e,ln.Messages.AppLoaded,[Ct])}function tn(e,t){sr(e,ln.Messages.ExpectedFailure,[t.reason,t.message])}function nn(e,t){sr(e,ln.Messages.Failure,[t.reason,t.message])}function rn(e){sr(e,ln.Messages.Success,[Ct])}const on=Xt.extend("initializeHelper");function an(e,t){return new Promise((n=>{C.initializeCalled||(C.initializeCalled=!0,Pn(),C.initializePromise=Qn(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=s})=>{C.frameContext=e,C.hostClientType=t,C.clientSupportedSDKVersion=r;try{on("Parsing %s",n);const e=JSON.parse(n);if(on("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&vt(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{on("Attempting to parse %s as an SDK version",n),isNaN(Ne(n,s))||(C.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(on("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");vt(e)}catch(e){if(!(e instanceof SyntaxError))throw e;vt(ht(C.clientSupportedSDKVersion,st,pt))}}C.initializeCompleted=!0})),Bt.initialize(),Kt.initialize(),En.config.initialize(),Gt.initialize()),Array.isArray(t)&&Ft(t),void 0!==C.initializePromise?n(C.initializePromise):on("GlobalVars.initializePromise is unexpectedly undefined")}))}function sn(e,t){!Rt(t)&&Et(),Un(e,t)}function cn(e,t){return new Promise((n=>{It(at,Se.content,Se.sidePanel,Se.settings,Se.task,Se.stage,Se.meetingStage),n(er(e,"executeDeepLink",t))}))}var ln;function un(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:be.teams,clientType:e.hostClientType?e.hostClientType:ye.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:C.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}!function(e){const n=t("app");let r,i,a;e.Messages={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"},function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(r=e.FailedReason||(e.FailedReason={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(i=e.ExpectedFailureReason||(e.ExpectedFailureReason={})),e.isInitialized=function(){return C.initializeCompleted},e.getFrameContext=function(){return C.frameContext},function(){if(Je())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,r="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?n("teamsjs is being used from %s. %s",t,r):n("teamsjs is being used from a script tag embedded directly in your html. %s",r)}(),e.initialize=function(e){return Ht(),Yt(o(Zt,"app.initialize"),e)},e._initialize=function(e){Kn.currentWindow=e},e._uninitialize=function(){C.initializeCalled&&(Tn(),C.initializeCalled=!1,C.initializeCompleted=!1,C.initializePromise=void 0,C.additionalValidOrigins=[],C.frameContext=void 0,C.hostClientType=void 0,C.isFramelessWindow=!1,Xn())},e.getContext=function(){return new Promise((e=>{Et(),e(Yn(o(Zt,"app.getContext"),"getContext"))})).then((e=>un(e)))},e.notifyAppLoaded=function(){Et(),en(o(Zt,"app.notifyAppLoaded"))},e.notifySuccess=function(){Et(),rn(o(Zt,"app.notifySuccess"))},e.notifyFailure=function(e){Et(),nn(o(Zt,"app.notifyFailure"),e)},e.notifyExpectedFailure=function(e){Et(),tn(o(Zt,"app.notifyExpectedFailure"),e)},e.registerOnThemeChangeHandler=function(e){sn(o(Zt,"app.registerOnThemeChangeHandler"),e)},e.openLink=function(e){return cn(o(Zt,"app.openLink"),e)},function(e){e.registerBeforeSuspendOrTerminateHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");It(at),_n(e)},e.registerOnResumeHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");It(at),Bn(e)}}(a=e.lifecycle||(e.lifecycle={}))}(ln||(ln={}));const dn="v2";function fn(e,t){return new Promise((n=>{if(It(at,Se.content,Se.sidePanel,Se.settings,Se.remove,Se.task,Se.stage,Se.meetingStage),!En.isSupported())throw Fe;n(tr(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function pn(e){return new Promise((t=>{if(It(at),!En.backStack.isSupported())throw Fe;t(tr(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function gn(e,t){return new Promise((n=>{if(It(at),!En.tabs.isSupported())throw Fe;n(tr(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function mn(e,t){if(It(at),!En.isSupported())throw Fe;sr(e,"returnFocus",[t])}function hn(e,t){return new Promise((n=>{if(It(at),!En.tabs.isSupported())throw Fe;n(Yn(e,"getTabInstances",t))}))}function wn(e,t){return new Promise((n=>{if(It(at),!En.tabs.isSupported())throw Fe;n(Yn(e,"getMruTabInstances",t))}))}function vn(e,t){if(It(at,Se.content,Se.sidePanel,Se.meetingStage),!En.isSupported())throw Fe;sr(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Cn(e,t){if(It(at,Se.content),!En.isSupported())throw Fe;sr(e,"setFrameContext",[t])}function yn(e,t){if(It(at,Se.settings,Se.remove),!En.config.isSupported())throw Fe;sr(e,"settings.setValidityState",[t])}function bn(e){return new Promise((t=>{if(It(at,Se.content,Se.settings,Se.remove,Se.sidePanel),!En.isSupported())throw Fe;t(Yn(e,"settings.getSettings"))}))}function Sn(e,t){return new Promise((n=>{if(It(at,Se.content,Se.settings,Se.sidePanel),!En.config.isSupported())throw Fe;n(er(e,"settings.setSettings",t))}))}var En;!function(e){function t(e){Cn(o(dn,"pages.setCurrentFrame"),e)}function n(){return!(!It(at)||!at.supports.pages)}let r,i,a,s,c,l;e.returnFocus=function(e){mn(o(dn,"pages.returnFocus"),e)},e.registerFocusEnterHandler=function(e){Hn(o(dn,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!n())throw Fe}))},e.setCurrentFrame=t,e.initializeWithFrameContext=function(e,n,r){Ht(),Yt(o(dn,"pages.initializeWithFrameContext"),r).then((()=>n&&n())),t(e)},e.getConfig=function(){return bn(o(dn,"pages.getConfig."))},e.navigateCrossDomain=function(e){return fn(o(dn,"pages.navigateCrossDomain"),e)},e.navigateToApp=function(e){return new Promise((t=>{if(It(at,Se.content,Se.sidePanel,Se.settings,Se.task,Se.stage,Se.meetingStage),!n())throw Fe;const r=o(dn,"pages.navigateCrossDomain");at.isLegacyTeams?t(er(r,"executeDeepLink",We(e))):t(er(r,"pages.navigateToApp",e))}))},e.shareDeepLink=function(e){return vn(o(dn,"pages.shareDeepLink"),e)},e.registerFullScreenHandler=function(e){Hn(o(dn,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Rt(e)&&!n())throw Fe}))},e.isSupported=n,function(e){e.navigateToTab=function(e){return gn(o(dn,"pages.tabs.navigateToTab"),e)},e.getTabInstances=function(e){return hn(o(dn,"pages.tabs.getTabInstances"),e)},e.getMruTabInstances=function(e){return wn(o(dn,"pages.tabs.getMruTabInstances"),e)},e.isSupported=function(){return!(!It(at)||!at.supports.pages)&&!!at.supports.pages.tabs}}(r=e.tabs||(e.tabs={})),function(e){let t,n;function r(e,n,r){!Rt(n)&&It(at,Se.settings),r&&r(),t=n,!Rt(n)&&sr(e,"registerHandler",["save"])}function i(e,t,r){!Rt(t)&&It(at,Se.remove,Se.settings),r&&r(),n=t,!Rt(t)&&sr(e,"registerHandler",["remove"])}function a(e){const n=new s(e);t?t(n):Kn.childWindow?Hr("settings.save",[e]):n.notifySuccess()}e.initialize=function(){On(o(dn,"pages.config.registerSettingsSaveHandler"),"settings.save",a,!1),On(o(dn,"pages.config.registerSettingsRemoveHandler"),"settings.remove",c,!1)},e.setValidityState=function(e){return yn(o(dn,"pages.config.setValidityState"),e)},e.setConfig=function(e){return Sn(o(dn,"pages.config.setConfig"),e)},e.registerOnSaveHandler=function(e){r(o(dn,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Rt(e)&&!u())throw Fe}))},e.registerOnSaveHandlerHelper=r,e.registerOnRemoveHandler=function(e){i(o(dn,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Rt(e)&&!u())throw Fe}))},e.registerOnRemoveHandlerHelper=i,e.registerChangeConfigHandler=function(e){Hn(o(dn,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[Se.content],(()=>{if(!u())throw Fe}))};class s{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),sr(o(dn,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),sr(o(dn,"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):Kn.childWindow?Hr("settings.remove",[]):e.notifySuccess()}class l{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),sr(o(dn,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),sr(o(dn,"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!(!It(at)||!at.supports.pages)&&!!at.supports.pages.config}e.isSupported=u}(i=e.config||(e.config={})),function(e){let t;function n(){return pn(o(dn,"pages.backStack.navigateBack"))}function r(e,n,r){!Rt(n)&&It(at),r&&r(),t=n,!Rt(n)&&sr(e,"registerHandler",["backButton"])}function i(){t&&t()||(Kn.childWindow?Hr("backButtonPress",[]):n())}function a(){return!(!It(at)||!at.supports.pages)&&!!at.supports.pages.backStack}e._initialize=function(){On(o(dn,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",i,!1)},e.navigateBack=n,e.registerBackButtonHandler=function(e){r(o(dn,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Rt(e)&&!a())throw Fe}))},e.registerBackButtonHandlerHelper=r,e.isSupported=a}(a=e.backStack||(e.backStack={})),function(e){function t(){return!(!It(at)||!at.supports.pages)&&!!at.supports.pages.fullTrust}e.enterFullscreen=function(){if(It(at,Se.content),!t())throw Fe;sr(o(dn,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])},e.exitFullscreen=function(){if(It(at,Se.content),!t())throw Fe;sr(o(dn,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])},e.isSupported=t}(s=e.fullTrust||(e.fullTrust={})),function(e){function t(){return!(!It(at)||!at.supports.pages)&&!!at.supports.pages.appButton}e.onClick=function(e){Hn(o(dn,"pages.appButton.onClick"),"appButtonClick",e,[Se.content],(()=>{if(!t())throw Fe}))},e.onHoverEnter=function(e){Hn(o(dn,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[Se.content],(()=>{if(!t())throw Fe}))},e.onHoverLeave=function(e){Hn(o(dn,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[Se.content],(()=>{if(!t())throw Fe}))},e.isSupported=t}(c=e.appButton||(e.appButton={})),function(e){function t(){return!(!It(at)||!at.supports.pages)&&!!at.supports.pages.currentApp}e.navigateTo=function(e){return new Promise((n=>{if(It(at,Se.content,Se.sidePanel,Se.settings,Se.task,Se.stage,Se.meetingStage),!t())throw Fe;n(nr(o(dn,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))},e.navigateToDefaultPage=function(){return new Promise((e=>{if(It(at,Se.content,Se.sidePanel,Se.settings,Se.task,Se.stage,Se.meetingStage),!t())throw Fe;e(nr(o(dn,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))},e.isSupported=t}(l=e.currentApp||(e.currentApp={}))}(En||(En={}));const In=t("handlers");class An{static initializeHandlers(){An.handlers.themeChange=Nn,An.handlers.load=xn,An.handlers.beforeUnload=Vn,En.backStack._initialize()}static uninitializeHandlers(){An.handlers={},An.themeChangeHandler=null,An.loadHandler=null,An.beforeUnloadHandler=null,An.beforeSuspendOrTerminateHandler=null,An.resumeHandler=null}}function Pn(){An.initializeHandlers()}function Tn(){An.uninitializeHandlers()}An.handlers={},An.themeChangeHandler=null,An.loadHandler=null,An.beforeUnloadHandler=null,An.beforeSuspendOrTerminateHandler=null,An.resumeHandler=null;const Fn=In.extend("callHandler");function Rn(e,t){const n=An.handlers[e];if(n){Fn("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Kn.childWindow?(Hr(e,t),[!1,void 0]):(Fn("Handler for action message %s not found.",e),[!1,void 0])}function On(e,t,n,r=!0,o=[]){n?(An.handlers[t]=n,r&&sr(e,"registerHandler",[t,...o])):delete An.handlers[t]}function kn(e){delete An.handlers[e]}function Mn(e){return null!=An.handlers[e]}function Hn(e,t,n,r,o){n&&It(at,...r),o&&o(),On(e,t,n)}function Un(e,t){An.themeChangeHandler=t,!Rt(t)&&sr(e,"registerHandler",["themeChange"])}function Nn(e){An.themeChangeHandler&&An.themeChangeHandler(e),Kn.childWindow&&Hr("themeChange",[e])}function Ln(e,t){An.loadHandler=t,!Rt(t)&&sr(e,"registerHandler",["load"])}function xn(e){An.resumeHandler?An.resumeHandler(e):An.loadHandler&&An.loadHandler(e),Kn.childWindow&&Hr("load",[e])}function Dn(e,t){An.beforeUnloadHandler=t,!Rt(t)&&sr(e,"registerHandler",["beforeUnload"])}function Vn(){const e=()=>{sr(o("v2","handleBeforeUnload"),"readyToUnload",[])};An.beforeSuspendOrTerminateHandler?(An.beforeSuspendOrTerminateHandler(),Kn.childWindow?Hr("beforeUnload"):e()):An.beforeUnloadHandler&&An.beforeUnloadHandler(e)||(Kn.childWindow?Hr("beforeUnload"):e())}function _n(e){An.beforeSuspendOrTerminateHandler=e,!Rt(e)&&sr(o("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Bn(e){An.resumeHandler=e,!Rt(e)&&sr(o("v2","registerOnResumeHandler"),"registerHandler",["load"])}const Wn=t("nestedAppAuthUtils"),jn=Wn.extend("tryPolyfillWithNestedAppAuthBridge");function zn(e,t,n){var r;const o=jn;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=$n(a,n);s&&(a.nestedAppAuthBridge=s)}const qn=Wn.extend("createNestedAppAuthBridge");function $n(e,t){const n=qn;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 Gn=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 Jn=t("communication");class Kn{}class Zn{}function Qn(e,t){if(Zn.messageListener=e=>Gn(this,void 0,void 0,(function*(){return yield mr(e)})),Kn.currentWindow=Kn.currentWindow||Ge(),Kn.parentWindow=Kn.currentWindow.parent!==Kn.currentWindow.self?Kn.currentWindow.parent:Kn.currentWindow.opener,Kn.topWindow=Kn.currentWindow.top,(Kn.parentWindow||e)&&Kn.currentWindow.addEventListener("message",Zn.messageListener,!1),!Kn.parentWindow){const e=Kn.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));C.isFramelessWindow=!0,e.onNativeMessage=Sr}try{return Kn.parentOrigin="*",rr(t,"initialize",[Ct,nt]).then((([e,t,n,r])=>(zn(r,Kn.currentWindow,{onMessage:wr,sendPostMessage:lr}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Kn.parentOrigin=null}}function Xn(){Kn.currentWindow&&Kn.currentWindow.removeEventListener("message",Zn.messageListener,!1),Kn.currentWindow=null,Kn.parentWindow=null,Kn.parentOrigin=null,Kn.childWindow=null,Kn.childOrigin=null,Zn.parentMessageQueue=[],Zn.childMessageQueue=[],Zn.nextMessageId=0,Zn.callbacks={},Zn.promiseCallbacks={},Zn.portCallbacks={}}function Yn(e,t,...n){return rr(e,t,n).then((([e])=>e))}function er(e,t,...n){return rr(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function tr(e,t,n,...r){return rr(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function nr(e,t,...n){return rr(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function rr(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(ar(pr(e,t,n).id))}))}function or(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 ir(pr(e,t,n).id)}function ir(e){return new Promise(((t,n)=>{Zn.portCallbacks[e]=(e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}}))}function ar(e){return new Promise((t=>{Zn.promiseCallbacks[e]=t}))}function sr(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=pr(e,t,o);r&&(Zn.callbacks[a.id]=r)}Zn.parentMessageQueue=[],Zn.childMessageQueue=[],Zn.topMessageQueue=[],Zn.nextMessageId=0,Zn.callbacks={},Zn.promiseCallbacks={},Zn.portCallbacks={};const cr=Jn.extend("sendNestedAuthRequestToTopWindow");function lr(e){const t=cr,n=Kn.topWindow,r=Nr(e);return t("Message %i information: %o",r.id,{actionName:r.func}),dr(n,r)}const ur=Jn.extend("sendRequestToTargetWindowHelper");function dr(e,t){const n=ur,r=Fr(e);if(C.isFramelessWindow)Kn.currentWindow&&Kn.currentWindow.nativeInterface&&(n(`Sending message %i to ${r} via framelessPostMessage interface`,t.id),Kn.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(t)));else{const o=Tr(e);e&&o?(n(`Sending message %i to ${r} via postMessage`,t.id),e.postMessage(t,o)):(n(`Adding message %i to ${r} message queue`,t.id),Pr(e).push(t))}return t}const fr=Jn.extend("sendMessageToParentHelper");function pr(e,t,n){const r=fr,o=Kn.parentWindow,i=Ur(e,t,n);return r("Message %i information: %o",i.id,{actionName:t,args:n}),dr(o,i)}const gr=Jn.extend("processMessage");function mr(e){return Gn(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void gr("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 Cr(t,n).then((r=>{r?(yr(t,n),t===Kn.parentWindow?Sr(e):t===Kn.childWindow&&Ir(e)):gr("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin")}))}))}const hr=Jn.extend("processAuthBridgeMessage");function wr(e,t){var n,r;const o=hr;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?Cr(c,l)?(Kn.topWindow&&!Kn.topWindow.closed&&c!==Kn.topWindow||(Kn.topWindow=c,Kn.topOrigin=l),Kn.topWindow&&Kn.topWindow.closed&&(Kn.topWindow=null,Kn.topOrigin=null),Or(Kn.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 vr=Jn.extend("shouldProcessMessage");function Cr(e,t){return Gn(this,void 0,void 0,(function*(){if(Kn.currentWindow&&e===Kn.currentWindow)return vr("Should not process message because it is coming from the current window"),!1;if(Kn.currentWindow&&Kn.currentWindow.location&&t&&t===Kn.currentWindow.location.origin)return!0;{const e=yield Dt(new URL(t));return e||vr("Message has an invalid origin of %s",t),e}}))}function yr(e,t){C.isFramelessWindow||Kn.parentWindow&&!Kn.parentWindow.closed&&e!==Kn.parentWindow?Kn.childWindow&&!Kn.childWindow.closed&&e!==Kn.childWindow||(Kn.childWindow=e,Kn.childOrigin=t):(Kn.parentWindow=e,Kn.parentOrigin=t),Kn.parentWindow&&Kn.parentWindow.closed&&(Kn.parentWindow=null,Kn.parentOrigin=null),Kn.childWindow&&Kn.childWindow.closed&&(Kn.childWindow=null,Kn.childOrigin=null),Or(Kn.parentWindow),Or(Kn.childWindow)}const br=Jn.extend("handleParentMessage");function Sr(e){const t=br;if("id"in e.data&&"number"==typeof e.data.id){const n=e.data,r=Zn.callbacks[n.id];t("Received a response from parent for message %i",n.id),r&&(t("Invoking the registered callback for message %i with arguments %o",n.id,n.args),r.apply(null,[...n.args,n.isPartialResponse]),Er(e)||(t("Removing registered callback for message %i",n.id),delete Zn.callbacks[n.id]));const o=Zn.promiseCallbacks[n.id];o&&(t("Invoking the registered promise callback for message %i with arguments %o",n.id,n.args),o(n.args),t("Removing registered promise callback for message %i",n.id),delete Zn.promiseCallbacks[n.id]);const i=Zn.portCallbacks[n.id];if(i){let r;t("Invoking the registered port callback for message %i with arguments %o",n.id,n.args),e.ports&&e.ports[0]instanceof MessagePort&&(r=e.ports[0]),i(r,n.args),t("Removing registered port callback for message %i",n.id),delete Zn.portCallbacks[n.id]}}else if("func"in e.data&&"string"==typeof e.data.func){const n=e.data;t("Received an action message %s from parent",n.func),Rn(n.func,n.args)}else t("Received an unknown message: %O",e)}function Er(e){return!0===e.data.isPartialResponse}function Ir(e){if("id"in e.data&&"func"in e.data){const t=e.data,[n,r]=Rn(t.func,t.args);n&&void 0!==r?Mr(t.id,Array.isArray(r)?r:[r]):sr(o("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(Kn.childWindow){const n=e.pop();Mr(t.id,e,n)}}))}}function Ar(){return Kn.topWindow!==Kn.parentWindow}function Pr(e){return e===Kn.topWindow&&Ar()?Zn.topMessageQueue:e===Kn.parentWindow?Zn.parentMessageQueue:e===Kn.childWindow?Zn.childMessageQueue:[]}function Tr(e){return e===Kn.topWindow&&Ar()?Kn.topOrigin:e===Kn.parentWindow?Kn.parentOrigin:e===Kn.childWindow?Kn.childOrigin:null}function Fr(e){return e===Kn.topWindow&&Ar()?"top":e===Kn.parentWindow?"parent":e===Kn.childWindow?"child":null}const Rr=Jn.extend("flushMessageQueue");function Or(e){const t=Tr(e),n=Pr(e),r=Fr(e);for(;e&&t&&n.length>0;){const o=n.shift();Rr("Flushing message %i from "+r+" message queue via postMessage.",null==o?void 0:o.id),e.postMessage(o,t)}}function kr(e,t){let n;n=Kn.currentWindow.setInterval((()=>{0===Pr(e).length&&(clearInterval(n),t())}),100)}function Mr(e,t,n){const r=Kn.childWindow,o=Lr(e,t,n),i=Tr(r);r&&i&&r.postMessage(o,i)}function Hr(e,t){const n=Kn.childWindow,r=xr(e,t),o=Tr(n);n&&o?n.postMessage(r,o):Pr(n).push(r)}function Ur(e,t,n){return{id:Zn.nextMessageId++,func:t,timestamp:Date.now(),args:n||[],apiVersionTag:e}}function Nr(e){return{id:Zn.nextMessageId++,func:"nestedAppAuth.execute",timestamp:Date.now(),args:[],data:e}}function Lr(e,t,n){return{id:e,args:t||[],isPartialResponse:n}}function xr(e,t){return{func:e,args:t||[]}}var Dr;!function(e){function t(){return!(!It(at)||!at.supports.logs)}e.registerGetLogHandler=function(e){if(!Rt(e)&&It(at),!Rt(e)&&!t())throw Fe;e?On(o("v1","log.request"),"log.request",(()=>{const t=e();sr(o("v1","log.receive"),"log.receive",[t])})):kn("log.request")},e.isSupported=t}(Dr||(Dr={}));const Vr="v1";function _r(e,t){It(at),sr(o(Vr,"uploadCustomApp"),"uploadCustomApp",[e],t||Ue())}function Br(e,t,n){It(at),sr(o(Vr,"sendCustomMessage"),e,t,n)}function Wr(e,t){if(It(at),!Kn.childWindow)throw new Error("The child window has not yet been initialized or is not present");Hr(e,t)}function jr(e,t){It(at),On(o(Vr,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function zr(e,t){It(at),On(o(Vr,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function qr(e){It(at,Se.content,Se.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];sr(o(Vr,"openFilePreview"),"openFilePreview",t)}const $r="v1";var Gr;!function(e){function t(){return!(!It(at)||!at.supports.conversations)}e.openConversation=function(e){return new Promise((n=>{if(It(at,Se.content),!t())throw Fe;const r=er(o($r,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&On(o($r,"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&&On(o($r,"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(It(at,Se.content),!t())throw Fe;sr(o($r,"conversations.closeConversation"),"conversations.closeConversation"),kn("startConversation"),kn("closeConversation")},e.getChatMembers=function(){return new Promise((e=>{if(It(at),!t())throw Fe;e(Yn(o($r,"conversations.getChatMember"),"getChatMembers"))}))},e.isSupported=t}(Gr||(Gr={}));const Jr="users";function Kr(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Jr}=`+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 Zr(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Jr}=`+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 Qr(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 Xr(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 Yr;!function(e){function t(){return!(!It(at)||!at.supports.appInstallDialog)}e.openAppInstallDialog=function(e){return new Promise((n=>{if(It(at,Se.content,Se.sidePanel,Se.settings,Se.task,Se.stage,Se.meetingStage),!t())throw new Error("Not supported");const r=o("v1","appInstallDialog.openAppInstallDialog");at.isLegacyTeams?n(er(r,"executeDeepLink",Xr(e.appId))):(sr(r,"appInstallDialog.openAppInstallDialog",[e]),n())}))},e.isSupported=t}(Yr||(Yr={}));const eo="v1",to=t("media");var no;function ro(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 oo(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 io(e){lo(e)?Tt("2.0.2"):uo(e)?Tt(c):co(e)&&Tt("2.0.4")}function ao(e){return!(e.mediaType!=no.MediaType.Video||!e.videoProps||!e.videoProps.videoController)}function so(e){return!(null==e||e.maxMediaCount>10)}function co(e){var t;return!((null==e?void 0:e.mediaType)!=no.MediaType.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function lo(e){return!(!e||e.mediaType!=no.MediaType.VideoAndImage&&!e.videoAndImageProps)}function uo(e){return!(!e||e.mediaType!=no.MediaType.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function fo(e,t,n){return null!=e&&null!=t&&t==no.FileFormat.ID&&null!=n}function po(e){return!(null==e||e.length<=0||e.length>10)}function go(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function mo(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!(!It(at)||!at.supports.permissions)}e.File=d,e.captureImage=function(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(It(at,Se.content,Se.task),C.isFramelessWindow)if(At("1.7.0"))sr(o(eo,"media.captureImage"),"captureImage",e);else{e({errorCode:we.OLD_PLATFORM},[])}else{e({errorCode:we.NOT_SUPPORTED_ON_PLATFORM},[])}},e.hasPermission=function(){if(It(at,Se.content,Se.task),!f())throw Fe;const e=ve.Media;return new Promise((t=>{t(nr(o(eo,"media.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(It(at,Se.content,Se.task),!f())throw Fe;const e=ve.Media;return new Promise((t=>{t(nr(o(eo,"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(It(at,Se.content,Se.task),At(u))if(fo(this.mimeType,this.format,this.content))At("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];sr(o(eo,"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=ro(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=oo(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):to(`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=Le(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Rt(e)&&sr(o(eo,"media.getMedia"),"getMedia",r),On(o(eo,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),kn("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=ro(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),kn("getMedia"+t)}else{const e=oo(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:we.INTERNAL_ERROR,message:"data received is null"},new Blob),kn("getMedia"+t)}}))}}e.Media=p;class g{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){It(at,Se.content,Se.task);try{Tt(c)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};sr(o(eo,"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(It(at,Se.content,Se.task),!At(u)){const e={errorCode:we.OLD_PLATFORM};return void t(e,[])}try{io(e)}catch(e){return void t(e,[])}if(!so(e)){const e={errorCode:we.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];sr(o(eo,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(ao(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(It(at,Se.content,Se.task),!At(u)){return void t({errorCode:we.OLD_PLATFORM})}if(!po(e)){return void t({errorCode:we.INVALID_ARGUMENTS})}const n=[e];sr(o(eo,"media.viewImages"),"viewImages",n,t)},e.scanBarCode=function(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(It(at,Se.content,Se.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(At("1.9.0"))if(go(t))sr(o(eo,"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},"")}}}(no||(no={}));const ho="v2";var wo;!function(e){function t(){return!!(It(at)&&at.supports.barCode&&at.supports.permissions)}e.scanBarCode=function(e){return new Promise((n=>{if(It(at,Se.content,Se.task),!t())throw Fe;if(!go(e))throw{errorCode:we.INVALID_ARGUMENTS};n(nr(o(ho,"barCode.scanBarCode"),"media.scanBarCode",e))}))},e.hasPermission=function(){if(It(at,Se.content,Se.task),!t())throw Fe;const e=ve.Media;return new Promise((t=>{t(nr(o(ho,"barCode.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(It(at,Se.content,Se.task),!t())throw Fe;const e=ve.Media;return new Promise((t=>{t(nr(o(ho,"barCode.requestPermission"),"permissions.request",e))}))},e.isSupported=t}(wo||(wo={}));var vo;!function(e){function t(e,t){return new Promise((r=>{if(It(at,Se.content,Se.task),!n())throw Fe;if(at.isLegacyTeams)r(er(e,"executeDeepLink",Kr([t.user],void 0,t.message)));else{r(er(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function n(){return!(!It(at)||!at.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(It(at,Se.content,Se.task),!n())throw Fe;if(at.isLegacyTeams)o(er(r,"executeDeepLink",Kr(e.users,e.topic,e.message)));else{o(er(r,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))},e.isSupported=n}(vo||(vo={}));var Co=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 yo,bo;!function(e){function t(){return!!(It(at)&&navigator&&navigator.clipboard&&at.supports.clipboard)}e.write=function(e){return Co(this,void 0,void 0,(function*(){if(It(at,Se.content,Se.meetingStage,Se.task,Se.settings,Se.stage,Se.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 $e(e),r={mimeType:e.type,content:n};return nr(o("v2","clipboard.write"),"clipboard.writeToClipboard",r)}))},e.read=function(){return Co(this,void 0,void 0,(function*(){It(at,Se.content,Se.meetingStage,Se.task,Se.settings,Se.stage,Se.sidePanel);const e=o("v2","clipboard.read");if(!t())throw Fe;const n=yield nr(e,"clipboard.readFromClipboard");if("string"==typeof n){const e=JSON.parse(n);return qe(e.mimeType,e.content)}return n}))},e.isSupported=t}(yo||(yo={})),function(e){e.isNAAChannelRecommended=function(){var e;return null!==(e=It(at)&&at.isNAAChannelRecommended)&&void 0!==e&&e}}(bo||(bo={}));const So="v2";var Eo;function Io(){return at.hostVersionsInfo?at.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}!function(e){function t(){return!!(It(at)&&at.supports.geoLocation&&at.supports.permissions)}let n;e.getCurrentLocation=function(){if(It(at,Se.content,Se.task),!t())throw Fe;return nr(o(So,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})},e.hasPermission=function(){if(It(at,Se.content,Se.task),!t())throw Fe;const e=ve.GeoLocation;return new Promise((t=>{t(nr(o(So,"geoLocation.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(It(at,Se.content,Se.task),!t())throw Fe;const e=ve.GeoLocation;return new Promise((t=>{t(nr(o(So,"geoLocation.requestPermission"),"permissions.request",e))}))},e.isSupported=t,function(e){function t(){return!!(It(at)&&at.supports.geoLocation&&at.supports.geoLocation.map&&at.supports.permissions)}e.chooseLocation=function(){if(It(at,Se.content,Se.task),!t())throw Fe;return nr(o(So,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})},e.showLocation=function(e){if(It(at,Se.content,Se.task),!t())throw Fe;if(!e)throw{errorCode:we.INVALID_ARGUMENTS};return nr(o(So,"geoLocation.showLocation"),"location.showLocation",e)},e.isSupported=t}(n=e.map||(e.map={}))}(Eo||(Eo={}));const Ao="v1";class Po{postMessage(e,t){It(at),sr(o(Ao,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||Ue())}addEventListener(e,t){It(at),"message"===e&&On(o(Ao,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class To{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){It(at,Se.task),sr(o(Ao,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||Ue())}addEventListener(e,t){It(at,Se.task),"message"===e&&On(o(Ao,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}var Fo;!function(e){function t(){return!(!It(at)||!at.supports.secondaryBrowser)}e.open=function(e){if(It(at,Se.content),!t())throw Fe;if(!e||!ze(e))throw{errorCode:we.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return nr(o("v2","secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())},e.isSupported=t}(Fo||(Fo={}));var Ro;!function(e){function t(){return!(!It(at)||!at.supports.location)}e.getLocation=function(e,n){if(!n)throw new Error("[location.getLocation] Callback cannot be null");if(It(at,Se.content,Se.task),!At(l))throw{errorCode:we.OLD_PLATFORM};if(!e)throw{errorCode:we.INVALID_ARGUMENTS};if(!t())throw Fe;sr(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(It(at,Se.content,Se.task),!At(l))throw{errorCode:we.OLD_PLATFORM};if(!e)throw{errorCode:we.INVALID_ARGUMENTS};if(!t())throw Fe;sr(o("v1","location.showLocation"),"location.showLocation",[e],n)},e.isSupported=t}(Ro||(Ro={}));var Oo=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 ko="v1";var Mo;!function(e){let t,n,r,i,a,s,c;function l(e,n){sr(o(ko,"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");On(o(ko,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(n=>Oo(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)}}))));On(o(ko,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),n(i)}))}function u(e,t){sr(o(ko,"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");Mn("meeting.micStateChanged")&&kn("meeting.micStateChanged"),Mn("meeting.audioDeviceSelectionChanged")&&kn("meeting.audioDeviceSelectionChanged"),t(n)}))}function d(e,t){It(at,Se.sidePanel,Se.meetingStage),sr(o(ko,"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");It(at,Se.sidePanel,Se.meetingStage),sr(o(ko,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)},e.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");It(at,Se.sidePanel,Se.meetingStage),sr(o(ko,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)},e.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");It(at,Se.sidePanel,Se.meetingStage,Se.settings,Se.content),sr(o(ko,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)},e.getAuthenticationTokenForAnonymousUser=function(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");It(at,Se.sidePanel,Se.meetingStage,Se.task),sr(o(ko,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)},e.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");It(at,Se.sidePanel),sr(o(ko,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)},e.requestStartLiveStreaming=function(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");It(at,Se.sidePanel),sr(o(ko,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)},e.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");It(at,Se.sidePanel),sr(o(ko,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)},e.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");It(at,Se.sidePanel),On(o(ko,"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");It(at,Se.sidePanel,Se.meetingStage),sr(o(ko,"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");It(at,Se.sidePanel,Se.meetingStage),sr(o(ko,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)},e.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");It(at,Se.sidePanel,Se.meetingStage),sr(o(ko,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)},e.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");It(at,Se.sidePanel,Se.meetingStage),sr(o(ko,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)},e.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");It(at,Se.sidePanel,Se.meetingStage),On(o(ko,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)},e.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");It(at,Se.sidePanel,Se.meetingStage),On(o(ko,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)},e.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");It(at,Se.sidePanel,Se.meetingStage),On(o(ko,"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"));It(at);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||s.Other};return nr(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){It(at,Se.sidePanel),e.contentUrl&&new URL(e.contentUrl),sr(o(ko,"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");It(at,Se.sidePanel,Se.meetingStage),e.isAppHandlingAudio?l(e,t):u(e,t)},e.updateMicState=function(e){d(e,t.AppInitiated)}}(Mo||(Mo={}));var Ho;!function(e){function t(){return!(!It(at)||!at.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")),It(at,Se.content),_e((()=>new Promise((e=>{if(!t())throw Fe;e(nr(a,"monetization.openPurchaseExperience",i))}))),r)},e.isSupported=t}(Ho||(Ho={}));var Uo;!function(e){function t(){return!(!It(at)||!at.supports.calendar)}e.openCalendarItem=function(e){return new Promise((n=>{if(It(at,Se.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");n(er(o("v2","calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))},e.composeMeeting=function(e){return new Promise((n=>{if(It(at,Se.content),!t())throw new Error("Not supported");const r=o("v2","calendar.composeMeeting");at.isLegacyTeams?n(er(r,"executeDeepLink",Qr(e.attendees,e.startTime,e.endTime,e.subject,e.content))):n(er(r,"calendar.composeMeeting",e))}))},e.isSupported=t}(Uo||(Uo={}));var No;!function(e){function t(){return!(!It(at)||!at.supports.mail)}let n;e.openMailItem=function(e){return new Promise((n=>{if(It(at,Se.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");n(er(o("v2","mail.openMailItem"),"mail.openMailItem",e))}))},e.composeMail=function(e){return new Promise((n=>{if(It(at,Se.content),!t())throw new Error("Not supported");n(er(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={}))}(No||(No={}));var Lo;!function(e){function t(){Ge().print()}function n(e,t,n){!Rt(t)&&It(at),!Rt(t)&&n&&n(),Ln(e,t)}function r(e,t,n){!Rt(t)&&It(at),!Rt(t)&&n&&n(),Dn(e,t)}function i(){return!(!It(at)||!at.supports.teamsCore)}e.enablePrintCapability=function(){if(!C.printCapabilityEnabled){if(It(at),!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(!Rt(e)&&!i())throw Fe}))},e.registerOnLoadHandlerHelper=n,e.registerBeforeUnloadHandler=function(e){r(o("v2","teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Rt(e)&&!i())throw Fe}))},e.registerBeforeUnloadHandlerHelper=r,e.isSupported=i}(Lo||(Lo={}));var xo;function Do(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?Vo(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Vo(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(!At("2.0.0"))throw{errorCode:we.OLD_PLATFORM};if(!mo(t))throw{errorCode:we.INVALID_ARGUMENTS};if(!n())throw Fe;r(nr(e,"people.selectPeople",t))}))}function n(){return!(!It(at)||!at.supports.people)}e.selectPeople=function(e,n){let r,i;It(at,Se.content,Se.task,Se.settings);let a="";return"function"==typeof e?([r,i]=[e,n],a=o("v1","people.selectPeople")):(i=e,a=o("v2","people.selectPeople")),De(t,r,a,i)},e.isSupported=n}(xo||(xo={}));var _o;!function(e){e.showProfile=function(e){return It(at,Se.content),new Promise((t=>{const[n,r]=Do(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(nr(o("v2","profile.showProfile"),"profile.showProfile",i))}))},e.isSupported=function(){return!(!It(at)||!at.supports.profile)}}(_o||(_o={}));var Bo=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Wo="v2";function jo(e,t,n,r){var o,i;return Bo(this,void 0,void 0,(function*(){const a=$o();!Je()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Go(yield qo(e,n,r),new Jo(n,t),a.writable)}))}function zo(e,t,n,r){var o,i;return Bo(this,void 0,void 0,(function*(){const a=$o();!Je()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Go(yield qo(e,n,r),new Qo(n,t),a.writable)}))}function qo(e,t,n){return Bo(this,void 0,void 0,(function*(){if(Je())throw Fe;const r=Ge().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 $o(){if(Je())throw Fe;const e=window.MediaStreamTrackGenerator;if(!e)throw Fe;return new e({kind:"video"})}function Go(e,t,n){new(0,Ge().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Jo{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Bo(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 Ko{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 Zo{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161;const n=new Uint32Array(e);for(let r=0,o=0;r<t;r++){const t=n[o++],r=n[o++],i=n[o++],a=new Uint8Array(e,r,i);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}}class Qo{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Bo(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o}={}}=yield this.extractVideoFrameAndMetadata(e),i=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o}),a=new VideoFrame(i,{timestamp:n});t.enqueue(a),r.close(),e.close(),i.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>Bo(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 Ko(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 Zo(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}}})),On(o(Wo,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Xo(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),sr(o(Wo,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in ai.EffectFailureReason?e:ai.EffectFailureReason.InitializationFailure;sr(o(Wo,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}class Yo{static setTimeout(e,t){const n=performance.now(),r=Le();return Yo.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Yo.setTimeoutCallbacks[e]}static setInterval(e,t){Yo.setTimeout((function n(){e(),Yo.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Yo.setTimeoutCallbacks){const r=Yo.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Yo.setTimeoutCallbacks[e].callback(),delete Yo.setTimeoutCallbacks[e]}}}Yo.setTimeoutCallbacks={};class ei{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Yo.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&&Yo.clearTimeout(this.timeoutId),this.timeoutId=Yo.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(ei.maxSessionTimeoutInMs,2*t.timeoutInMs):ei.initialSessionTimeoutInMs}}ei.initialSessionTimeoutInMs=1e3,ei.maxSessionTimeoutInMs=3e4;const ti="v2";class ni{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new ei(ni.distributionBinSize,(e=>this.reportPerformanceEvent(o(ti,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Yo.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(o(ti,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),ni.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){Yo.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(ti,"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(ti,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}ni.distributionBinSize=1e3,ni.calculateFPSInterval=1e3;var ri=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())}))},oi=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 ii="v2";var ai;!function(e){const t=Je()?void 0:new ni(sr);let n,r,i;function a(e){sr(o(ii,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function s(e){sr(o(ii,"videoEffects.notifyError"),"video.notifyError",[e])}function c(){return It(at)&&!!at.supports.video&&(!!at.supports.video.mediaStream||!!at.supports.video.sharedFrame)}function l(e,n){if(It(at,Se.sidePanel),!c()||!p())throw Fe;On(o(ii,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>ri(this,void 0,void 0,(function*(){const{streamId:r}=n,o=u(e,t);yield jo(r,o,s,t)}))),!1),sr(o(ii,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n])}function u(e,t){return n=>ri(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(It(at,Se.sidePanel),!c()||!m())throw Fe;On(o(ii,"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),sr(o(ii,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[n])}function f(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=oi(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function p(){var e;return It(at,Se.sidePanel)&&g()&&!!(null===(e=at.supports.video)||void 0===e?void 0:e.mediaStream)}function g(){var e,t,n,r;return!(!(null===(t=null===(e=Ge().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Ge().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function m(){var e;return It(at,Se.sidePanel)&&!!(null===(e=at.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(It(at,Se.sidePanel),!c())throw Fe;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(On(o(ii,"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(It(at,Se.sidePanel),!c())throw Fe;sr(o(ii,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])},e.registerForVideoEffect=function(e){if(It(at,Se.sidePanel),!c())throw Fe;On(o(ii,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Xo(e,t),!1),sr(o(ii,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")},e.isSupported=c}(ai||(ai={}));const si="v2";var ci;!function(e){const t="search.queryChange",n="search.queryClose",r="search.queryExecute";function i(){return!(!It(at)||!at.supports.search)}e.registerHandlers=function(e,a,s){if(It(at,Se.content),!i())throw Fe;On(o(si,"search.registerOnClosedHandler"),n,e),On(o(si,"search.registerOnExecutedHandler"),r,a),s&&On(o(si,"search.registerOnChangeHandler"),t,s)},e.unregisterHandlers=function(){if(It(at,Se.content),!i())throw Fe;sr(o(si,"search.unregisterHandlers"),"search.unregister"),kn(t),kn(n),kn(r)},e.isSupported=i,e.closeSearch=function(){return new Promise((e=>{if(It(at,Se.content),!i())throw new Error("Not supported");e(er(o(si,"search.closeSearch"),"search.closeSearch"))}))}}(ci||(ci={}));var li=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 ui;!function(e){function t(t,n){return new Promise((r=>{if(!a())throw Fe;r(nr(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!(!It(at)||!at.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 It(at,Se.content,Se.sidePanel,Se.task,Se.stage,Se.meetingStage),Ve(t,a,o(a?"v1":"v2","sharing.shareWebContent"),e)},e.isSupported=a,function(e){function t(){var e;return It(at)&&void 0!==(null===(e=at.supports.sharing)||void 0===e?void 0:e.history)}e.getContent=function(){return li(this,void 0,void 0,(function*(){if(It(at,Se.sidePanel,Se.meetingStage),!t())throw Fe;const e=yield nr(o("v2","sharing.history.getContent"),"sharing.history.getContent");return e.map((e=>{Ye(e.author),Ye(e.threadId)})),e}))},e.isSupported=t}(s=e.history||(e.history={}))}(ui||(ui={}));var di;!function(e){let t;function n(){return!(!It(at)||!at.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(It(at,Se.content),!n())throw Fe;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(nr(o("v2","stageView.open"),"stageView.open",e))}))},e.isSupported=n}(di||(di={}));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{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const pi="v2";var gi,mi;!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(It(at,Se.content,Se.task),!r.isSupported())throw Fe;const e=ve.Media;return nr(o(pi,"visualMedia.hasPermission"),"permissions.has",e)},e.requestPermission=function(){if(It(at,Se.content,Se.task),!r.isSupported())throw Fe;const e=ve.Media;return nr(o(pi,"visualMedia.requestPermission"),"permissions.request",e)},function(e){function t(){return!!(It(at)&&at.supports.visualMedia&&at.supports.visualMedia.image&&at.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 He}e.captureImages=function(e){return fi(this,void 0,void 0,(function*(){It(at,Se.content,Se.task),n(),r(e);const t=yield nr(o(pi,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return i(e.maxVisualMediaCount,t),t}))},e.retrieveImages=function(e){return fi(this,void 0,void 0,(function*(){It(at,Se.content,Se.task),n(),r(e);const t=yield nr(o(pi,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return i(e.maxVisualMediaCount,t),t}))},e.isSupported=t}(r=e.image||(e.image={}))}(gi||(gi={})),function(e){function t(){return!(!It(at)||!at.supports.webStorage)}e.isWebStorageClearedOnUserLogOut=function(){return It(at),t()},e.isSupported=t}(mi||(mi={}));var hi;!function(e){let t;function n(){return!(!It(at)||!at.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(It(at,Se.content,Se.task),!n())throw Fe;if(!at.isLegacyTeams)return sr(r,"call.startCall",[e],o);o(Yn(r,"executeDeepLink",Zr(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}(hi||(hi={}));const wi="v1";var vi;!function(e){e.Messages=ln.Messages,e.FailedReason=ln.FailedReason,e.ExpectedFailureReason=ln.ExpectedFailureReason,e.notifyAppLoaded=function(){en(o(wi,"appInitialization.notifyAppLoaded"))},e.notifySuccess=function(){rn(o(wi,"appInitialization.notifySuccess"))},e.notifyFailure=function(e){nn(o(wi,"appInitialization.notifyFailure"),e)},e.notifyExpectedFailure=function(e){tn(o(wi,"appInitialization.notifyExpectedFailure"),e)}}(vi||(vi={}));const Ci=t("thirdPartyCloudStorage");var yi;!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||(Ci("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=oo(e.fileChunk,e.fileType);if(o?(r||(r=new t(e.fileType,[])),r.assembleAttachment.push(o)):(Ci(`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=ro(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!(!It(at)||!at.supports.thirdPartyCloudStorage)}e.getDragAndDropFiles=function(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(It(at,Se.content,Se.task),!c())throw Fe;if(a)throw a=null,new Error("getDragAndDropFiles cannot be called twice");a=t,i=!0,sr(o("v2","thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],s)}else{t([],{errorCode:we.INVALID_ARGUMENTS})}},e.isSupported=c}(yi||(yi={}));const bi="v1";function Si(e,t){Yt(o(bi,"initialize"),t).then((()=>{e&&e()}))}function Ei(){Lo.enablePrintCapability()}function Ii(){Lo.print()}function Ai(e){Et(),sr(o(bi,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=C.frameContext),e(t)}))}function Pi(e){sn(o(bi,"registerOnThemeChangeHandlerHelper"),e)}function Ti(e){Hn(o(bi,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Fi(e){Hn(o(bi,"registerAppButtonClickHandler"),"appButtonClick",e,[Se.content])}function Ri(e){Hn(o(bi,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[Se.content])}function Oi(e){Hn(o(bi,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[Se.content])}function ki(e){En.backStack.registerBackButtonHandlerHelper(o(bi,"registerBackButtonHandler"),e)}function Mi(e){Lo.registerOnLoadHandlerHelper(o(bi,"registerOnLoadHandler"),e)}function Hi(e){Lo.registerBeforeUnloadHandlerHelper(o(bi,"registerBeforeUnloadHandler"),e)}function Ui(e){Hn(o(bi,"registerFocusEnterHandler"),"focusEnter",e,[])}function Ni(e){Hn(o(bi,"registerChangeSettingsHandler"),"changeSettings",e,[Se.content])}function Li(e,t){It(at),hn(o(bi,"getTabInstances"),t).then((t=>{e(t)}))}function xi(e,t){It(at),wn(o(bi,"getMruTabInstances"),t).then((t=>{e(t)}))}function Di(e){vn(o(bi,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Vi(e,t){It(at,Se.content,Se.sidePanel,Se.settings,Se.task,Se.stage,Se.meetingStage);const n=null!=t?t:Ue();cn(o(bi,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function _i(e){Cn(o(bi,"setFrameContext"),e)}function Bi(e,t,n){Yt(o(bi,"initializeWithFrameContext"),n).then((()=>t&&t())),Cn(o(bi,"setFrameContext"),e)}const Wi="v1";function ji(e){mn(o(Wi,"navigation.returnFocus"),e)}function zi(e,t){It(at);const n=null!=t?t:Ue();gn(o(Wi,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function qi(e,t){It(at,Se.content,Se.sidePanel,Se.settings,Se.remove,Se.task,Se.stage,Se.meetingStage);const n=null!=t?t:Ue();fn(o(Wi,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function $i(e){It(at);const t=null!=e?e:Ue();pn(o(Wi,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const Gi="v1";var Ji;!function(e){e.setValidityState=function(e){yn(o(Gi,"settings.setValidityState"),e)},e.getSettings=function(e){It(at,Se.content,Se.settings,Se.remove,Se.sidePanel),bn(o(Gi,"settings.getSettings")).then((t=>{e(t)}))},e.setSettings=function(e,t){It(at,Se.content,Se.settings,Se.sidePanel);const n=null!=t?t:Ue();Sn(o(Gi,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))},e.registerOnSaveHandler=function(e){En.config.registerOnSaveHandlerHelper(o(Gi,"settings.registerOnSaveHandler"),e)},e.registerOnRemoveHandler=function(e){En.config.registerOnRemoveHandlerHelper(o(Gi,"settings.registerOnRemoveHandler"),e)}}(Ji||(Ji={}));var Ki=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 Zi="v1";var Qi;!function(e){function t(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:Te.Small,width:e.width?e.width:Te.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function n(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:Te.Small,width:e.width?e.width:Te.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function r(e){return e.height=e.height?e.height:Te.Small,e.width=e.width?e.width:Te.Small,e}e.startTask=function(e,r){const i=o(Zi,"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?(It(at,Se.content,Se.sidePanel,Se.meetingStage),sr(i,"tasks.startTask",[e],r)):void 0!==e.completionBotId?qt(i,n(e),a):zt(i,t(e),a),new Po},e.updateTask=function(e){e=r(e);const{width:t,height:n}=e,i=Ki(e,["width","height"]);if(Object.keys(i).length)throw new Error("resize requires a TaskInfo argument containing only width and height");jt(o(Zi,"tasks.updateTask"),e)},e.submitTask=function(e,t){$t(o(Zi,"tasks.submitTask"),e,t)},e.getDefaultSizeIfNotProvided=r}(Qi||(Qi={}));const Xi="v2";var Yi;!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!(!It(at,Se.meetingStage,Se.sidePanel,Se.content)||!at.supports.interactive)}}(Yi||(Yi={}));class ea{getFluidTenantInfo(){return ta(),new Promise((e=>{e(nr(o(Xi,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return ta(),new Promise((t=>{t(nr(o(Xi,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return ta(),new Promise((e=>{e(nr(o(Xi,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return ta(),new Promise((t=>{t(nr(o(Xi,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return ta(),new Promise((e=>{e(nr(o(Xi,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return ta(),new Promise((t=>{t(nr(o(Xi,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return ta(),new Promise((t=>{t(nr(o(Xi,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return ta(),new Promise((t=>{t(nr(o(Xi,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return ta(),new ea}}function ta(){if(!Yi.isSupported())throw new Error("LiveShareHost Not supported")}var na=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function ra(e){try{return e.cartItems=oa(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function oa(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=oa(e.accessories)),e}))}const ia=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=na(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=ia(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function aa(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)ca(t),sa(t.accessories)}function sa(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");ca(t)}}}function ca(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");ua(e.price),da(e.quantity)}function la(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 ua(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 da(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function fa(e){if(!Object.values(ga.CartStatus).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const pa="v2";var ga;!function(e){let t,n;function r(){return!(!It(at)||!at.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(It(at,Se.content,Se.task),!r())throw Fe;return nr(o(pa,"marketplace.getCart"),"marketplace.getCart",e.cartVersion).then(ra)},e.addOrUpdateCartItems=function(t){if(It(at,Se.content,Se.task),!r())throw Fe;if(!t)throw new Error("addOrUpdateCartItemsParams must be provided");return la(null==t?void 0:t.cartId),aa(null==t?void 0:t.cartItems),nr(o(pa,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},t),{cartItems:ia(t.cartItems),cartVersion:e.cartVersion})).then(ra)},e.removeCartItems=function(t){if(It(at,Se.content,Se.task),!r())throw Fe;if(!t)throw new Error("removeCartItemsParams must be provided");if(la(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 nr(o(pa,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(ra)},e.updateCartStatus=function(t){if(It(at,Se.content,Se.task),!r())throw Fe;if(!t)throw new Error("updateCartStatusParams must be provided");return la(null==t?void 0:t.cartId),fa(null==t?void 0:t.cartStatus),nr(o(pa,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(ra)},e.isSupported=r}(ga||(ga={}));const ma="v2";var ha;!function(e){const t="Action.Execute";function n(e){if("ActionExecuteInvokeRequest"===e.requestType){const n=e;if(n.type!==t){throw{errorCode:"INTERNAL_ERROR",message:`Invalid action type ${n.type}. Action type must be "${t}"`}}}else if("QueryMessageExtensionRequest"===e.requestType){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 r(){return!(!It(at)||!at.supports.externalAppAuthentication)}e.authenticateAndResendRequest=function(e,t,i){if(It(at,Se.content),!r())throw Fe;return Ke(e,new Error("App id is not valid.")),n(i),rr(o(ma,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[e,i,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(It(at,Se.content),!r())throw Fe;return Ke(e,new Error("App id is not valid.")),rr(o(ma,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[e,t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithSSOAndResendRequest=function(e,t,i){if(It(at,Se.content),!r())throw Fe;return Ke(e,new Error("App id is not valid.")),n(i),rr(o(ma,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[e,i,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},e.authenticateWithOauth2=function(e,t,n){if(It(at,Se.content),!r())throw Fe;return Ke(e,new Error("titleId is Invalid.")),Ke(t,new Error("oauthConfigId is Invalid.")),rr(o(ma,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))},e.isSupported=r}(ha||(ha={}));var wa;!function(e){function t(){return!(!It(at)||!at.supports.externalAppCardActions)}e.processActionSubmit=function(e,n){if(It(at,Se.content),!t())throw Fe;return Ke(e,new Error("App id is not valid.")),rr(o("v2","externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[e,n]).then((([e,t])=>{if(!e)throw t}))},e.processActionOpenUrl=function(e,n,r){if(It(at,Se.content),!t())throw Fe;return Ke(e,new Error("App id is not valid.")),rr(o("v2","externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[e,n.href,r]).then((([e,t])=>{if(e)throw e;return t}))},e.isSupported=t}(wa||(wa={}));var va=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 Ca;!function(e){function t(){return!(!It(at)||!at.supports.externalAppCommands)}e.processActionCommand=function(e,n,r){return va(this,void 0,void 0,(function*(){if(It(at,Se.content),!t())throw Fe;Ke(e,new Error("App id is not valid."));const[i,a]=yield rr(o("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[e,n,r]);if(i)throw i;return a}))},e.isSupported=t}(Ca||(Ca={}));const ya="v1";var ba;!function(e){function t(e,t){return{errorCode:e,message:t}}e.getCloudStorageFolders=function(e,t){if(It(at,Se.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");sr(o(ya,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)},e.addCloudStorageFolder=function(e,t){if(It(at,Se.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");sr(o(ya,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)},e.deleteCloudStorageFolder=function(e,t,n){if(It(at,Se.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");sr(o(ya,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)},e.getCloudStorageFolderContents=function(e,t,n){if(It(at,Se.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");sr(o(ya,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)},e.openCloudStorageFile=function(e,t,n){if(It(at,Se.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");sr(o(ya,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])},e.getExternalProviders=function(e=!1,t){if(It(at,Se.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");sr(o(ya,"files.getExternalProviders"),"files.getExternalProviders",[e],t)},e.copyMoveFiles=function(e,t,n,r,i=!1,a){if(It(at,Se.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");sr(o(ya,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,i],a)},e.getFileDownloads=function(e){if(It(at,Se.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");sr(o(ya,"files.getFileDownloads"),"files.getFileDownloads",[],e)},e.openDownloadFolder=function(e=void 0,t){if(It(at,Se.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");sr(o(ya,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)},e.addCloudStorageProvider=function(e){if(It(at,Se.content),!e)throw t(we.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");sr(o(ya,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)},e.removeCloudStorageProvider=function(e,n){if(It(at,Se.content),!n)throw t(we.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw t(we.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");sr(o(ya,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],n)},e.addCloudStorageProviderFile=function(e,n){if(It(at,Se.content),!n)throw t(we.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw t(we.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");sr(o(ya,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],n)},e.renameCloudStorageProviderFile=function(e,n){if(It(at,Se.content),!n)throw t(we.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw t(we.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");sr(o(ya,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],n)},e.deleteCloudStorageProviderFile=function(e,n){if(It(at,Se.content),!n)throw t(we.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(we.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");sr(o(ya,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],n)},e.downloadCloudStorageProviderFile=function(e,n){if(It(at,Se.content),!n)throw t(we.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(we.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");sr(o(ya,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],n)},e.uploadCloudStorageProviderFile=function(e,n){if(It(at,Se.content),!n)throw t(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw t(we.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");sr(o(ya,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],n)},e.registerCloudStorageProviderListChangeHandler=function(e){if(It(at),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");On(o(ya,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)},e.registerCloudStorageProviderContentChangeHandler=function(e){if(It(at),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");On(o(ya,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}}(ba||(ba={}));const Sa="v1";var Ea;!function(e){function t(){return!(!It(at)||!at.supports.meetingRoom)}e.getPairedMeetingRoomInfo=function(){return new Promise((e=>{if(It(at),!t())throw Fe;e(nr(o(Sa,"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(It(at),!t())throw Fe;n(nr(o(Sa,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))},e.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(It(at),!t())throw Fe;On(o(Sa,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{It(at),e(t)}))},e.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(It(at),!t())throw Fe;On(o(Sa,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{It(at),e(t)}))},e.isSupported=t}(Ea||(Ea={}));var Ia,Aa=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{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;const r=t("messageChannels");function i(){return!(!It(at)||!at.supports.messageChannels)}e.getTelemetryPort=function(){return Aa(this,void 0,void 0,(function*(){if(n)return r("Returning telemetry port from cache"),n;if(!i())throw Fe;return n=yield or(o("v1","messageChannels.getTelemetryPort"),"messageChannels.getTelemetryPort"),n}))},e.isSupported=i,e._clearTelemetryPort=function(){n=void 0}}(Ia||(Ia={}));var Pa,Ta;!function(e){function t(){return!(!It(at)||!at.supports.notifications)}e.showNotification=function(e){if(It(at,Se.content),!t())throw Fe;sr(o("v1","notifications.showNotification"),"notifications.showNotification",[e])},e.isSupported=t}(Pa||(Pa={})),function(e){function t(){return!(!It(at)||!at.supports.otherAppStateChange)}e.registerAppInstallationHandler=function(e){if(!t())throw new Error(we.NOT_SUPPORTED_ON_PLATFORM.toString());if(Rt(e))throw new Error(we.INVALID_ARGUMENTS.toString());On(o("v2","otherApp.install"),"otherApp.install",e)},e.unregisterAppInstallationHandler=function(){if(!t())throw new Error(we.NOT_SUPPORTED_ON_PLATFORM.toString());sr(o("v2","otherApp.unregisterInstall"),"otherApp.unregisterInstall"),kn("otherApp.install")},e.isSupported=t}(Ta||(Ta={}));const Fa="v1";var Ra;!function(e){let t;function n(){return!(!It(at)||!at.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={})),e.getCapableParticipants=function(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(It(at,Se.sidePanel),!n())throw Fe;sr(o(Fa,"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(It(at,Se.sidePanel),!n())throw Fe;sr(o(Fa,"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(It(at,Se.sidePanel),!n())throw Fe;sr(o(Fa,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)},e.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(It(at,Se.sidePanel),!n())throw Fe;sr(o(Fa,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)},e.registerOnCapableParticipantsChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(It(at,Se.sidePanel),!n())throw Fe;On(o(Fa,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)},e.registerOnErrorHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(It(at,Se.sidePanel),!n())throw Fe;On(o(Fa,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)},e.registerOnDeviceStateChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(It(at,Se.sidePanel),!n())throw Fe;On(o(Fa,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)},e.registerOnSessionStatusChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(It(at,Se.sidePanel),!n())throw Fe;On(o(Fa,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)},e.isSupported=n}(Ra||(Ra={}));var Oa;!function(e){function t(){return!(!It(at)||!at.supports.appEntity)}e.selectAppEntity=function(e,n,r,i){if(It(at,Se.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");sr(o("v1","appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,n,r],i)},e.isSupported=t}(Oa||(Oa={}));const ka="v1";var Ma;!function(e){function t(){return!(!It(at)||!at.supports.teams)}let n;e.getTeamChannels=function(e,n){if(It(at,Se.content),!t())throw Fe;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!n)throw new Error("[teams.getTeamChannels] Callback cannot be null");sr(o(ka,"teams.getTeamChannels"),"teams.getTeamChannels",[e],n)},e.refreshSiteUrl=function(e,n){if(It(at),!t())throw Fe;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!n)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");sr(o(ka,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],n)},e.isSupported=t,function(e){let t;function n(){return!(!It(at)||!at.supports.teams)&&!!at.supports.teams.fullTrust}!function(e){function t(){return!(!It(at)||!at.supports.teams)&&(!!at.supports.teams.fullTrust&&!!at.supports.teams.fullTrust.joinedTeams)}e.getUserJoinedTeams=function(e){return new Promise((n=>{if(It(at),!t())throw Fe;if((C.hostClientType===ye.android||C.hostClientType===ye.teamsRoomsAndroid||C.hostClientType===ye.teamsPhones||C.hostClientType===ye.teamsDisplays)&&!At("2.0.1")){const e={errorCode:we.OLD_PLATFORM};throw new Error(JSON.stringify(e))}n(Yn(o(ka,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))},e.isSupported=t}(t=e.joinedTeams||(e.joinedTeams={})),e.getConfigSetting=function(e){return new Promise((t=>{if(It(at),!n())throw Fe;t(Yn(o(ka,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))},e.isSupported=n}(n=e.fullTrust||(e.fullTrust={}))}(Ma||(Ma={}));var Ha=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 Ua="v2";var Na;!function(e){e.frameProcessingTimeoutInMs=2e3;const t=Je()?void 0:new ni(sr);function n(){const t=setTimeout((()=>{c(`Frame not processed in ${e.frameProcessingTimeoutInMs}ms`,"warn")}),e.frameProcessingTimeoutInMs);return function(){clearTimeout(t)}}function r(e,t){return r=>Ha(this,void 0,void 0,(function*(){const o=r.videoFrame;t.reportStartFrameProcessing(o.codedWidth,o.codedHeight);const i=n(),a=yield e(r);return i(),t.reportFrameProcessed(),a}))}function i(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function a(){return It(at),ai.isSupported()}function s(e){sr(o(Ua,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function c(e,t="warn"){sr(o(Ua,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}e.registerForVideoFrame=function(e){var l,u;if(!a())throw Fe;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(It(at,Se.sidePanel)){if(On(o(Ua,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e)),!1),null===(l=at.supports.video)||void 0===l?void 0:l.mediaStream)On(o(Ua,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>Ha(this,void 0,void 0,(function*(){const{streamId:o,metadataInTexture:i}=n,a=t?r(e.videoFrameHandler,t):e.videoFrameHandler;i?yield zo(o,a,c,t):yield jo(o,a,c,t)}))),!1),sr(o(Ua,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(u=at.supports.video)||void 0===u?void 0:u.sharedFrame))throw Fe;On(o(Ua,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(r=>{if(r){null==t||t.reportStartFrameProcessing(r.width,r.height);const o=n(),a=r.timestamp;e.videoBufferHandler(i(r),(()=>{o(),null==t||t.reportFrameProcessed(),s(a)}),c)}}),!1),sr(o(Ua,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==t||t.startMonitorSlowFrameProcessing()}},e.notifySelectedVideoEffectChanged=function(e,t,n){if(It(at,Se.sidePanel),!a())throw Fe;sr(o(Ua,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])},e.registerForVideoEffect=function(e){if(It(at,Se.sidePanel),!a())throw Fe;On(o(Ua,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Xo(e,t),!1),sr(o(Ua,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")},e.updatePersonalizedEffects=function(e){if(It(at,Se.sidePanel),!ai.isSupported())throw Fe;sr(o(Ua,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])},e.isSupported=a,e.notifyFatalError=function(e){if(It(at),!ai.isSupported())throw Fe;c(e,"fatal")}}(Na||(Na={}))})(),r})()));
3
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map