1var bt=(H,x,k)=>new Promise((q,z)=>{var _=O=>{try{j(k.next(O))}catch(F){z(F)}},K=O=>{try{j(k.throw(O))}catch(F){z(F)}},j=O=>O.done?q(O.value):Promise.resolve(O.value).then(_,K);j((k=k.apply(H,x)).next())});(function(){"use strict";function H(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i}function x(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(d){try{u(n.next(d))}catch(c){r(c)}}function a(d){try{u(n.throw(d))}catch(c){r(c)}}function u(d){var c;d.done?o(d.value):(c=d.value,c instanceof i?c:new i(function(p){p(c)})).then(s,a)}u((n=n.apply(e,[])).next())})}typeof SuppressedError=="function"&&SuppressedError;var k,q,z,_,K,j,O,F,ye,be;(function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"})(k||(k={})),(function(e){e.M365Content="m365content"})(q||(q={})),(function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"})(z||(z={})),(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"})(_||(_={})),(function(e){e.GeoLocation="geolocation",e.Media="media"})(K||(K={})),(function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"})(j||(j={})),(function(e){e.Faculty="faculty",e.Student="student",e.Other="other"})(O||(O={})),(function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"})(F||(F={})),(function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"})(ye||(ye={})),(function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"})(be||(be={}));var m,ie,S,Ce,Ie,Se,$e,Oe;(function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"})(m||(m={})),(function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"})(ie||(ie={})),(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"})(S||(S={})),(function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"})(Ce||(Ce={})),(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"})(Ie||(Ie={})),(function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"})(Se||(Se={})),(function(e){e.Large="large",e.Medium="medium",e.Small="small"})($e||($e={})),(function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"})(Oe||(Oe={}));const It={errorCode:_.NOT_SUPPORTED_ON_PLATFORM},St={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}};var Te={randomUUID:typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Q;const $t=new Uint8Array(16);function Ot(){if(!Q&&(Q=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Q))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Q($t)}const y=[];for(let e=0;e<256;++e)y.push((e+256).toString(16).slice(1));function Tt(e,t=0){return y[e[t+0]]+y[e[t+1]]+y[e[t+2]]+y[e[t+3]]+"-"+y[e[t+4]]+y[e[t+5]]+"-"+y[e[t+6]]+y[e[t+7]]+"-"+y[e[t+8]]+y[e[t+9]]+"-"+y[e[t+10]]+y[e[t+11]]+y[e[t+12]]+y[e[t+13]]+y[e[t+14]]+y[e[t+15]]}function Et(e,t,i){if(Te.randomUUID&&!e)return Te.randomUUID();const n=(e=e||{}).random||(e.rng||Ot)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,Tt(n)}var Pt=/^(?:[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;function At(e){return typeof e=="string"&&Pt.test(e)}function Ee(e,t){if(typeof e!="string"||typeof t!="string")return NaN;const i=e.split("."),n=t.split(".");function o(r){return/^\d+$/.test(r)}if(!i.every(o)||!n.every(o))return NaN;for(;i.length<n.length;)i.push("0");for(;n.length<i.length;)n.push("0");for(let r=0;r<i.length;++r)if(Number(i[r])!=Number(n[r]))return Number(i[r])>Number(n[r])?1:-1;return 0}
1function xt(){return Et()}function Pe(e){return Object.keys(e).forEach(t=>{e[t]!==null&&e[t]!==void 0&&typeof e[t]=="object"&&Pe(e[t])}),Object.freeze(e)}function Mt(e,t,i){return new Promise((n,o)=>{const r=setTimeout(o,t,i);e().then(s=>{clearTimeout(r),n(s)}).catch(s=>{clearTimeout(r),o(s)})})}function Ae(e){return e.protocol==="https:"}function Nt(){if(Y())throw new Error("window object undefined at SSR check");return window}function Y(){return typeof window=="undefined"}function kt(e,t){const i=e.toString().toLocaleLowerCase();if(xe(i))throw new Error("Invalid Url");if(i.length>2048)throw new Error("Url exceeds the maximum size of 2048 characters");if(!Ae(e))throw new Error("Url should be a valid https url")}function Ft(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function xe(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Rt(e){if(!e)throw new Error("id must not be empty");if(At(e)===!1)throw new Error("id must be a valid UUID")}const Ut=!!performance&&"now"in performance;function oe(){return Ut?performance.now()+performance.timeOrigin:void 0}function Me(e){var t,i;if(!(!((i=(t=e.hostVersionsInfo)===null||t===void 0?void 0:t.appEligibilityInformation)===null||i===void 0)&&i.ageGroup))return e;const n=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return(n==null?void 0:n.toLowerCase())!=="nonadult"?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:F.NotAdult})})})}let B=class{constructor(t=xt()){this.uuid=t,Rt(t)}toString(){return this.uuid}serialize(){return this.toString()}};const Ne=e=>{const{uuid:t}=e,i=H(e,["uuid"]),n=t==null?void 0:t.toString();return Object.assign(Object.assign({},i),{uuidAsString:n})},Wt=e=>{const{uuidAsString:t}=e,i=H(e,["uuidAsString"]);return Object.assign(Object.assign({},i),{uuid:t?new B(t):void 0})};var re={exports:{}},ke,Fe;function Dt(){if(Fe)return ke;Fe=1;var e=1e3,t=60*e,i=60*t,n=24*i,o=7*n,r=365.25*n;function s(a,u,d,c){var p=u>=1.5*d;return Math.round(a/d)+" "+c+(p?"s":"")}return ke=function(a,u){u=u||{};var d=typeof a;if(d==="string"&&a.length>0)return(function(c){if(!((c=String(c)).length>100)){var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(p){var b=parseFloat(p[1]);switch((p[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return b*r;case"weeks":case"week":case"w":return b*o;case"days":case"day":case"d":return b*n;case"hours":case"hour":case"hrs":case"hr":case"h":return b*i;case"minutes":case"minute":case"mins":case"min":case"m":return b*t;case"seconds":case"second":case"secs":case"sec":case"s":return b*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return b;default:return}}}})(a);if(d==="number"&&isFinite(a))return u.long?(function(c){var p=Math.abs(c);return p>=n?s(c,p,n,"day"):p>=i?s(c,p,i,"hour"):p>=t?s(c,p,t,"minute"):p>=e?s(c,p,e,"second"):c+" ms"})(a):(function(c){var p=Math.abs(c);return p>=n?Math.round(c/n)+"d":p>=i?Math.round(c/i)+"h":p>=t?Math.round(c/t)+"m":p>=e?Math.round(c/e)+"s":c+"ms"})(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))}}var jt=function(e){function t(o){let r,s,a,u=null;function d(...c){if(!d.enabled)return;const p=d,b=Number(new Date),C=b-(r||b);p.diff=C,p.prev=r,p.curr=b,r=b,c[0]=t.coerce(c[0]),typeof c[0]!="string"&&c.unshift("%O");let v=0;c[0]=c[0].replace(/%([a-zA-Z%])/g,(I,we)=>{if(I==="%%")return"%";v++;const ve=t.formatters[we];if(typeof ve=="function"){const fi=c[v];I=ve.call(p,fi),c.splice(v,1),v--}return I}),t.formatArgs.call(p,c),(p.log||t.log).apply(p,c)}return d.namespace=o,d.useColors=t.useColors(),d.color=t.selectColor(o),d.extend=i,d.destroy=t.destroy,Object.defineProperty(d,"enabled",{enumerable:!0,configurable:!1,get:()=>u!==null?u:(s!==t.namespaces&&(s=t.namespaces,a=t.enabled(o)),a),set:c=>{u=c}}),typeof t.init=="function"&&t.init(d),d}function i(o,r){const s=t(this.namespace+(r===void 0?":":r)+o);return s.log=this.log,s}function n(o){return o.toString().substring(2,o.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(o){return o instanceof Error?o.stack||o.message:o},t.disable=function(){const o=[...t.names.map(n),...t.skips.map(n).map(r=>"-"+r)].join(",");return t.enable(""),o},t.enable=function(o){let r;t.save(o),t.namespaces=o,t.names=[],t.skips=[];
1const s=(typeof o=="string"?o:"").split(/[\s,]+/),a=s.length;for(r=0;r<a;r++)s[r]&&((o=s[r].replace(/\*/g,".*?"))[0]==="-"?t.skips.push(new RegExp("^"+o.slice(1)+"$")):t.names.push(new RegExp("^"+o+"$")))},t.enabled=function(o){if(o[o.length-1]==="*")return!0;let r,s;for(r=0,s=t.skips.length;r<s;r++)if(t.skips[r].test(o))return!1;for(r=0,s=t.names.length;r<s;r++)if(t.names[r].test(o))return!0;return!1},t.humanize=Dt(),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(o=>{t[o]=e[o]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(o){let r=0;for(let s=0;s<o.length;s++)r=(r<<5)-r+o.charCodeAt(s),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t};(function(e,t){t.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const o="color: "+this.color;n.splice(1,0,o,"color: inherit");let r=0,s=0;n[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(r++,a==="%c"&&(s=r))}),n.splice(s,0,o)},t.save=function(n){try{n?t.storage.setItem("debug",n):t.storage.removeItem("debug")}catch(o){}},t.load=function(){let n;try{n=t.storage.getItem("debug")}catch(o){}return!n&&typeof process!="undefined"&&"env"in process&&(n=process.env.DEBUG),n},t.useColors=function(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=(function(){try{return localStorage}catch(n){}})(),t.destroy=(()=>{let n=!1;return()=>{n||(n=!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=jt(t);const{formatters:i}=e.exports;i.j=function(n){try{return JSON.stringify(n)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}}})(re,re.exports);var se=re.exports;const Vt=new B,Lt=se.debug.formatArgs;se.debug.formatArgs=function(e){e[0]=`(${new Date().toISOString()}): ${e[0]} [${Vt.toString()}]`,Lt.call(this,e)};const Ht=se.debug("teamsJs");function T(e){return Ht.extend(e)}function w(e,t){return`${e}_${t}`}function Re(e){return/^v\d+_[\w.]+$/.test(e)}function M(e){return e.uuidAsString!==void 0?`${e.uuidAsString} (legacy id: ${e.id})`:e.uuid!==void 0?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const zt=T("flushMessageQueue");function Ue(e,t,i,n){if(e&&t&&i.length!==0)for(;i.length>0;){const o=i.shift();if(o){const r=Ne(o);zt("Flushing message %s from %s message queue via postMessage.",M(r),n),e.postMessage(r,t)}}}
1var _t=["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.office365.us","outlook-dod.office365.us","webmail.apps.mil","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","*.outlook.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com","fa000000136.mro1cdnstorage.public.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001","portal.officeppe.com","ignite.m365.admin.cloud.microsoft","ignite.admin.cloud.microsoft","sdf.m365.admin.cloud.microsoft","admin-sdf.microsoft.com","canary.m365.admin.cloud.microsoft","ring0.m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"];const We="2.0.1",X=_t,De=1500,Bt=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),ee="The library has not yet been initialized",Gt="The runtime has not yet been initialized",Zt="The runtime version is not supported";let f=class{};f.initializeCalled=!1,f.initializeCompleted=!1,f.additionalValidOrigins=[],f.initializePromise=void 0,f.isFramelessWindow=!1,f.frameContext=void 0,f.hostClientType=void 0,f.printCapabilityEnabled=!1,f.teamsJsInstanceId=new B().toString();const je=T("runtime"),Jt=4;function Ve(e){return e.apiVersion===4}function qt(e){if(Ve(e))return!0;throw e.apiVersion===-1?new Error(Gt):new Error(Zt)}let E={apiVersion:-1,supports:{}};const Kt={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:{}}}},Le=[m.desktop,m.web,m.rigel,m.surfaceHub,m.teamsRoomsWindows,m.teamsRoomsAndroid,m.teamsPhones,m.teamsDisplays],Qt=[m.android,m.ios,m.ipados,m.visionOS],He=[...Le,...Qt];function Yt(e){let t=e;if(t.apiVersion<4&&Xt.forEach(i=>{t.apiVersion===i.versionToUpgradeFrom&&(t=i.upgradeToNextVersion(t))}),Ve(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const Xt=[{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:(t=e.supports.dialog)===null||t===void 0?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:i}=t,n=H(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:n})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,i,n,o,r;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:(t=e.supports.dialog)===null||t===void 0?void 0:t.card,url:{bot:(n=(i=e.supports.dialog)===null||i===void 0?void 0:i.url)===null||n===void 0?void 0:n.bot,parentCommunication:!((o=e.supports.dialog)===null||o===void 0)&&o.url?{}:void 0},update:(r=e.supports.dialog)===null||r===void 0?void 0:r.update}:void 0})}}}],en={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:Le}],"1.9.0":[{capability:{location:{}},hostClientTypes:He}],"2.0.0":[{capability:{people:{}},hostClientTypes:He},{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]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[m.android,m.ios,m.ipados,m.visionOS]}],"2.1.2":[]},ae=je.extend("generateBackCompatRuntimeConfig");function ze(e,t){const i=Object.assign({},e);for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]!="object"||Array.isArray(t[n])?n in e||(i[n]=t[n]):i[n]=ze(e[n]||{},t[n]));return i}function tn(e,t,i){ae("generating back compat runtime config for %s",e);let n=Object.assign({},t.supports);ae("Supported capabilities in config before updating based on highestSupportedVersion: %o",n),Object.keys(i).forEac
1h(r=>{Ee(e,r)>=0&&i[r].forEach(s=>{f.hostClientType!==void 0&&s.hostClientTypes.includes(f.hostClientType)&&(n=ze(n,s.capability))})});const o={apiVersion:4,hostVersionsInfo:St,isLegacyTeams:!0,supports:n};return ae("Runtime config after updating based on highestSupportedVersion: %o",o),o}const ce=je.extend("applyRuntimeConfig");function le(e){typeof e.apiVersion=="string"&&(ce("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),ce("Fast-forwarding runtime %o",e);const t=Yt(e);ce("Applying runtime %o",t),E=Pe(t)}const _e="2.53.0";let te=class L{static storeCallbackInformation(t,i){L.callbackInformation.set(t,i)}static clearMessages(){L.callbackInformation.clear()}static deleteMessageInformation(t){L.callbackInformation.delete(t)}static handleOneWayPerformanceMetrics(t,i,n){const o=t.monotonicTimestamp;o&&n?wt({actionName:t.func,messageDelay:n-o,requestStartedAt:o}):i("Unable to send performance metrics for event %s",t.func)}static handlePerformanceMetrics(t,i,n,o){const r=L.callbackInformation.get(t);r&&i.monotonicTimestamp&&o?(wt({actionName:r.name,messageDelay:o-i.monotonicTimestamp,requestStartedAt:r.calledAt}),L.deleteMessageInformation(t)):n("Unable to send performance metrics for callback %s with arguments %o",t.toString(),i.args)}};te.callbackInformation=new Map;const Be=T("nestedAppAuthUtils"),nn=Be.extend("tryPolyfillWithNestedAppAuthBridge"),on="v2";function rn(e,t,i){var n;const o=nn;if(f.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const r=(()=>{try{return JSON.parse(e)}catch(u){return null}})();if(!r||!(!((n=r.supports)===null||n===void 0)&&n.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const s=t;if(s.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const a=(function(u,d){const c=sn;if(!u)return c("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:p,sendPostMessage:b}=d,C=v=>I=>p(I,v);return{addEventListener:(v,I)=>{v==="message"?u.addEventListener(v,C(I)):c(`Event ${v} is not supported by nestedAppAuthBridge`)},postMessage:v=>{const I=(()=>{try{return JSON.parse(v)}catch(ve){return null}})();if(!I||typeof I!="object"||I.messageType!=="NestedAppAuthRequest")return void c("Unrecognized data format received by app, message being ignored. Message: %o",v);const we=w(on,"nestedAppAuth.execute");b(v,we)},removeEventListener:(v,I)=>{u.removeEventListener(v,C(I))}}})(s,i);a&&(s.nestedAppAuthBridge=a)}const sn=Be.extend("createNestedAppAuthBridge"),an=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function Ge(e,t){const i=e.split("."),n=t.split(".");if(n.length!==i.length)return!1;let o=!1;for(let r=0;r<i.length;r++)if(i[r]!==n[r]){if(i[r]!=="*"||r===i.length-1||o)return!1;o=!0}return!0}let de=class Ct{constructor(t,i,n){this.protocol=t,this.host=i,this.logger=n}static canUse(t){return an.test(t)}static create(t,i){const n=t.split("://");return new Ct(n[0],n[1],i.extend("InternalURLPattern"))}test(t){return this.logger("Testing URL %s against pattern protocol: %s, host: %s",t,this.protocol,this.host),t.protocol===`${this.protocol}:`&&(!t.host||Ge(this.host,t.host))}};function cn(e){return de.canUse(e)}function ln(e,t){if(de.canUse(e))return de.create(e,t);t("No URL verifier available for pattern: %s",e)}let N=[];const A=T("validateOrigin");let G;function dn(){return x(this,void 0,void 0,function*(){G||(yield Je())})}function Ze(){return N.length===0}function Je(e=!1){return x(this,void 0,void 0,function*(){if(!Ze()&&!e)return N;if(G)return G;if(Y())return N=X,X;{A("Initiating fetch call to acquire valid origins list from CDN");const t=new AbortController,i=setTimeout(()=>t.abort(),De);return G=fetch(Bt,{signal:t.signal}).then(n=>{if(clearTimeout(i),!n.ok)throw new Error("Invalid Response from Fetch Call");return A("Fetch call completed and retrieved valid origins list from CDN"),n.json().then(o=>{if((function(r){let s=JSON.parse(r);try{s=JSON.parse(r)}catch(a){return!1}if(!s.validOrigins)return!1;for(const a of s.validOrigins)try{new URL("https://"+a)}catch(u){return A("isValidOriginsFromCDN call failed to validate origin: %s",a),!1}return!0})(JSON.stringify(o)))return N=o.validOrigins,N;throw new Error("Valid origins list retrieved from CDN is invali
1d")})}).catch(n=>(n.name==="AbortError"?A(`validOrigins fetch call to CDN failed due to Timeout of ${De} ms. Defaulting to fallback list`):A("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",n),N=X,N)),G}})}function un(e,t){let i;try{const n=ln(e,A);if(!n)return!1;i=n}catch(n){return!1}return i.test(t)}function fn(e,t){const i=Ze()?X:N;return qe(e,i)?Promise.resolve(!0):(A("Origin %s is not in the local valid origins list, fetching from CDN",e),Je(t).then(n=>qe(e,n)))}function qe(e,t){for(const n of f.additionalValidOrigins)if(un(n,e))return!0;const i=e.host;return Ae(e)?!!t.some(n=>Ge(n,i))||(A(`Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize. 2Origins approved by this library: %o 3Origins included in app.initialize: %o`,e,t,f.additionalValidOrigins),!1):(A("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}dn();const R=T("communication");let l=class{},g=class{};function pn(e,t){if(g.messageListener=i=>(function(n){return x(this,void 0,void 0,function*(){if(!n||!n.data||typeof n.data!="object")return void Ye("Unrecognized message format received by app, message being ignored. Message: %o",n);const o=n.source||n.originalEvent&&n.originalEvent.source,r=n.origin||n.originalEvent&&n.originalEvent.origin;return Xe(o,r).then(s=>{s?((function(a,u){f.isFramelessWindow||l.parentWindow&&!l.parentWindow.closed&&a!==l.parentWindow||(l.parentWindow=a,l.parentOrigin=u),l.parentWindow&&l.parentWindow.closed&&(l.parentWindow=null,l.parentOrigin=null),Ue(l.parentWindow,l.parentOrigin,g.parentMessageQueue,"parent")})(o,r),o!==l.parentWindow?si():tt(n)):Ye("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",n,o,r)})})})(i),l.currentWindow=l.currentWindow||Nt(),l.parentWindow=l.currentWindow.parent!==l.currentWindow.self?l.currentWindow.parent:l.currentWindow.opener,l.topWindow=l.currentWindow.top,(l.parentWindow||e)&&l.currentWindow.addEventListener("message",g.messageListener,!1),!l.parentWindow){const i=l.currentWindow;if(!i.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));f.isFramelessWindow=!0,i.onNativeMessage=tt}try{return l.parentOrigin="*",Z(t,"initialize",[_e,Jt,e]).then(([i,n,o,r])=>(rn(r,l.currentWindow,{onMessage:Cn,sendPostMessage:wn}),{context:i,clientType:n,runtimeConfig:o,clientSupportedSDKVersion:r}))}finally{l.parentOrigin=null}}function mn(e,t,...i){return Z(e,t,i).then(([n])=>n)}function gn(e,t,i,...n){return Z(e,t,n).then(([o,r])=>{if(!o)throw new Error(r||i)})}function Z(e,t,i=void 0){if(!Re(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(n=>{const o=Qe(e,t,i);var r;n((r=o.uuid,new Promise(s=>{g.promiseCallbacks.set(r,s)})))})}function P(e,t,i,n){let o;if(i instanceof Function?n=i:i instanceof Array&&(o=i),!Re(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 r=Qe(e,t,o);n&&g.callbacks.set(r.uuid,n)}g.parentMessageQueue=[],g.topMessageQueue=[],g.nextMessageId=0,g.callbacks=new Map,g.promiseCallbacks=new Map,g.portCallbacks=new Map,g.legacyMessageIdsToUuidMap={};const hn=R.extend("sendNestedAuthRequestToTopWindow");function wn(e,t){const i=hn,n=l.topWindow,o=(function(r,s){const a=g.nextMessageId++,u=new B;return g.legacyMessageIdsToUuidMap[a]=u,{id:a,uuid:u,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:oe(),apiVersionTag:s,args:[],data:r}})(e,t);return i("Message %s information: %o",M(o),{actionName:o.func}),Ke(n,o)}const vn=R.extend("sendRequestToTargetWindowHelper");function Ke(e,t){const i=vn,n=(function(r){return r===l.topWindow&&pe()?"top":r===l.parentWindow?"parent":null})(e),o=Ne(t);if(f.isFramelessWindow)l.currentWindow&&l.currentWindow.nativeInterface&&(i("Sending message %s to %s via framelessPostMessage interface",M(o),n),l.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const r=(function(s){return s===l.topWindow&&pe()?l.topOrigin:s===l.parentWindow?l.parentOrigin:null})(e);e&&r?(i("Sending message %s to %s via postMessage",M(o),n),e.postMessage(o,r)):(i("Adding message %s to %s message queue",M(o),n),nt(e).push(t))}return t}const yn=R.extend("sendMessageToParentHelper");function Qe(e,t,i,n,o){const r=yn,s=l.parentWindow,a=(function(u,d,c,p,b){const C=g.nextMessageId++,v=new B;g.legacyMessageIdsToUuidMap[C]=v;const I=f.teamsJsInstanceId;return{id:C,uuid:v,func:d,timestamp:Date.now(),monotonicTimestamp:oe(),args:c||[],apiVersionTag:u,isProxiedFromChild:p!=null,teamsJsInstanceId:I}})(e,t,i,n);return te.storeCallbackInformation(a.uuid,{name:t,calledAt:a.timestamp}),r("Message %s information: %o",M(a),{actionName:t,args:i}),Ke(s,a)}const Ye=R.extend("processIncomingMessage"),bn=R.extend("processAuthBridgeMessage");function Cn(e,t){var i,n;const o=bn;if(!e||!e.data||typeof e.data!="object")return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:r}=e.data,[,s]=r!=null?r:[],a=(()=>{try{return JSON.parse(s)}catch(c){return null}})();if(!a||typeof a!="object"||a.messageType!=="NestedAppAuthResponse")return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const u=e.source||((i=e==null?void 0:e.originalEvent)===null||i===void 0?void 0:i.source),d=e.origin||((n=e==null?void 0:e.originalEvent)===null||n===void 0?void 0:n.origin);u?Xe(u,d)?(l.topWindow&&!l.topWindow.closed&&u!==l.topWindow||(l.topWindow=u,l.topOrigin=d),l.topWindow&&l.topWindow.closed&&(l.topWindow=null,l.topOrigin=null),Ue(l.topWindow,l.to
3pOrigin,g.topMessageQueue,"top"),t(s)):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 ue=R.extend("shouldProcessIncomingMessage");function Xe(e,t){return x(this,void 0,void 0,function*(){if(l.currentWindow&&e===l.currentWindow)return ue("Should not process message because it is coming from the current window"),!1;if(l.currentWindow&&l.currentWindow.location&&t&&t===l.currentWindow.location.origin)return!0;{let i;try{i=new URL(t)}catch(o){return ue("Message has an invalid origin of %s",t),!1}const n=yield fn(i);return n||ue("Message has an invalid origin of %s",t),n}})}const et=R.extend("handleIncomingMessageFromParent");function ne(e,t){if(t){const i=[...e].find(([n,o])=>n.toString()===t.toString());if(i)return i[0]}}function fe(e,t){const i=ne(t,e.uuid);i&&t.delete(i),e.uuid?g.legacyMessageIdsToUuidMap={}:delete g.legacyMessageIdsToUuidMap[e.id]}function tt(e){const t=et,i=oe();if("id"in e.data&&typeof e.data.id=="number"){const n=e.data,o=Wt(n),r=(function(s){const a=et;if(!s.uuid)return g.legacyMessageIdsToUuidMap[s.id];{const u=s.uuid,d=ne(g.callbacks,u);if(d)return d;const c=ne(g.promiseCallbacks,u);if(c)return c;const p=ne(g.portCallbacks,u);if(p)return p}a("Received message %s that failed to produce a callbackId",M(s))})(o);if(r){const s=g.callbacks.get(r);t("Received a response from parent for message %s",r.toString()),te.handlePerformanceMetrics(r,o,t,i),s&&(t("Invoking the registered callback for message %s with arguments %o",r.toString(),o.args),s.apply(null,[...o.args,o.isPartialResponse]),(function(d){return d.data.isPartialResponse===!0})(e)||(t("Removing registered callback for message %s",r.toString()),fe(o,g.callbacks)));const a=g.promiseCallbacks.get(r);a&&(t("Invoking the registered promise callback for message %s with arguments %o",r.toString(),o.args),a(o.args),t("Removing registered promise callback for message %s",r.toString()),fe(o,g.promiseCallbacks));const u=g.portCallbacks.get(r);if(u){let d;t("Invoking the registered port callback for message %s with arguments %o",r.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(d=e.ports[0]),u(d,o.args),t("Removing registered port callback for message %s",r.toString()),fe(o,g.portCallbacks)}o.uuid&&(g.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&typeof e.data.func=="string"){const n=e.data;te.handleOneWayPerformanceMetrics(n,t,i),t('Received a message from parent %s, action: "%s"',M(n),n.func),Xn(n.func,n.args)}else t("Received an unknown message: %O",e)}function pe(){return l.topWindow!==l.parentWindow}function nt(e){return e===l.topWindow&&pe()?g.topMessageQueue:e===l.parentWindow?g.parentMessageQueue:[]}function In(e,t){let i;i=l.currentWindow.setInterval(()=>{nt(e).length===0&&(clearInterval(i),t())},100)}const it=T("internal"),Sn=it.extend("ensureInitializeCalled"),ot=it.extend("ensureInitialized");function rt(){if(!f.initializeCalled)throw Sn(ee),new Error(ee)}function U(e,...t){if(!f.initializeCompleted)throw ot("%s. initializeCalled: %s",ee,f.initializeCalled.toString()),new Error(ee);if(t&&t.length>0){let i=!1;for(let n=0;n<t.length;n++)if(t[n]===f.frameContext){i=!0;break}if(!i){const n=`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${f.frameContext}".`;throw ot(n),new Error(n)}}return qt(e)}function $n(e){let t=f.additionalValidOrigins.concat(e.filter(n=>typeof n=="string"&&cn(n)));const i={};t=t.filter(n=>!i[n]&&(i[n]=!0,!0)),f.additionalValidOrigins=t}function On(e){if(!En(e))throw new Error(`Potential app id (${e}
3) is invalid; its length ${e.length} is not within the length limits (${st}-${at}).`)}function Tn(e){if(xe(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(Pn(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const st=4,at=256;function En(e){return e.length<at&&e.length>st}function Pn(e){return[...e].some(t=>{const i=t.charCodeAt(0);return i<32||i>126})}let An=class{constructor(t){this.idAsString=t,Tn(t)}serialize(){return this.toString()}toString(){return this.idAsString}},xn=class extends An{constructor(t){super(t),On(t)}toJSON(){return{appIdAsString:this.toString()}}};const ct="v2",me=T("app");var lt,dt;function ut(){return f.initializeCompleted}function ft(e){return Bn(w(ct,"app.initialize"),e)}function Mn(){return new Promise(e=>{rt(),e(mn(w(ct,"app.getContext"),"getContext"))}).then(e=>(function(t){var i;return{actionInfo:t.actionInfo,app:{locale:t.locale,sessionId:t.appSessionId?t.appSessionId:"",theme:t.theme?t.theme:"default",iconPositionVertical:t.appIconPosition,osLocaleInfo:t.osLocaleInfo,messageId:t.messageId,parentMessageId:t.parentMessageId,userClickTime:t.userClickTime,userClickTimeV2:t.userClickTimeV2,userFileOpenPreference:t.userFileOpenPreference,host:{name:t.hostName?t.hostName:ie.teams,clientType:t.hostClientType?t.hostClientType:m.web,features:t.hostFeatures,sessionId:t.sessionId?t.sessionId:"",ringId:t.ringId,ancestors:t.hostAncestors},appLaunchId:t.appLaunchId,appId:t.appId?new xn(t.appId):void 0,manifestVersion:t.manifestVersion},page:{id:t.entityId,frameContext:t.frameContext?t.frameContext:f.frameContext,renderingSurface:t.renderingSurface?t.renderingSurface:void 0,subPageId:t.subEntityId,isFullScreen:t.isFullScreen,isMultiWindow:t.isMultiWindow,isBackgroundLoad:t.isBackgroundLoad,sourceOrigin:t.sourceOrigin},user:{id:(i=t.userObjectId)!==null&&i!==void 0?i:"",displayName:t.userDisplayName,isCallingAllowed:t.isCallingAllowed,isPSTNCallingAllowed:t.isPSTNCallingAllowed,licenseType:t.userLicenseType,loginHint:t.loginHint,userPrincipalName:t.userPrincipalName,tenant:t.tid?{id:t.tid,teamsSku:t.tenantSKU}:void 0},channel:t.channelId?{id:t.channelId,displayName:t.channelName,relativeUrl:t.channelRelativeUrl,membershipType:t.channelType,defaultOneNoteSectionId:t.defaultOneNoteSectionId,ownerGroupId:t.hostTeamGroupId,ownerTenantId:t.hostTeamTenantId}:void 0,chat:t.chatId?{id:t.chatId}:void 0,meeting:t.meetingId?{id:t.meetingId}:void 0,sharepoint:t.sharepoint,team:t.teamId?{internalId:t.teamId,displayName:t.teamName,type:t.teamType,groupId:t.groupId,templateId:t.teamTemplateId,isArchived:t.isTeamArchived,userRole:t.userTeamRole}:void 0,sharePointSite:t.teamSiteUrl||t.teamSiteDomain||t.teamSitePath||t.mySitePath||t.mySiteDomain?{teamSiteUrl:t.teamSiteUrl,teamSiteDomain:t.teamSiteDomain,teamSitePath:t.teamSitePath,teamSiteId:t.teamSiteId,mySitePath:t.mySitePath,mySiteDomain:t.mySiteDomain}:void 0,dialogParameters:t.dialogParameters||{}}})(e))}(function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"})(lt||(lt={})),(function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"})(dt||(dt={})),me("teamsjs instance is version %s, starting at %s UTC (%s local)",_e,new Date().toISOString(),new Date().toLocaleString()),(function(){if(Y())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,i="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&&t.length!==0?me("teamsjs is being used from %s. %s",t,i):me("teamsjs is being used from a script tag embedded directly in your html. %s",i)})();const Nn="v2",kn=[];function Fn(e){f.frameContext&&(f.frameContext===S.task?kn.push(e):ei("messageForChild"))}function Rn(){D(w(Nn,"dialog.registerMessageForChildHandler"),"messageForChild",Fn,!1)}const V="v2";var pt,mt;(function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"})(pt||(pt={}));function Un(){D(w(V,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Dn,
3!1),D(w(V,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",jn,!1),D(w(V,"menus.registerSetModuleViewHandler"),"setModuleView",Wn,!1)}function Wn(e){U(E),P(w(V,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e])}function Dn(e){U(E),P(w(V,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e])}function jn(e){U(E),P(w(V,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e])}(function(e){e.dropDown="dropDown",e.popOver="popOver"})(mt||(mt={}));function Vn(){D(w(W,"pages.config.registerSettingsSaveHandler"),"settings.save",Ln,!1),D(w(W,"pages.config.registerSettingsRemoveHandler"),"settings.remove",zn,!1)}function Ln(e){new Hn(e).notifySuccess()}class Hn{constructor(t){this.notified=!1,this.result=t||{}}notifySuccess(){this.ensureNotNotified(),P(w(W,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(t){this.ensureNotNotified(),P(w(W,"pages.saveEvent.notifyFailure"),"settings.save.failure",[t]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function zn(){new _n().notifySuccess()}class _n{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),P(w(W,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(t){this.ensureNotNotified(),P(w(W,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[t]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}const gt=T("app");function Bn(e,t){return Y()?(gt.extend("initialize")("window object undefined at initialization"),Promise.resolve()):Mt(()=>(function(i,n){return new Promise(o=>{f.initializeCalled||(f.initializeCalled=!0,Yn(),f.initializePromise=pn(n,i).then(({context:r,clientType:s,runtimeConfig:a,clientSupportedSDKVersion:u=We})=>{f.frameContext=r,f.hostClientType=s,f.clientSupportedSDKVersion=u;try{J("Parsing %s",a);let d=JSON.parse(a);if(J("Checking if %o is a valid runtime object",d!=null?d:"null"),!d||!d.apiVersion)throw new Error("Received runtime config is invalid");d=Me(d),a&&le(d)}catch(d){if(!(d instanceof SyntaxError))throw d;try{J("Attempting to parse %s as an SDK version",a),isNaN(Ee(a,We))||(f.clientSupportedSDKVersion=a);let c=JSON.parse(u);if(J("givenRuntimeConfig parsed to %o",c!=null?c:"null"),!c)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");c=Me(c),le(c)}catch(c){if(!(c instanceof SyntaxError))throw c;le(tn(f.clientSupportedSDKVersion,Kt,en))}}f.initializeCompleted=!0}),Un(),Vn(),Rn()),Array.isArray(n)&&$n(n),f.initializePromise!==void 0?o(f.initializePromise):J("GlobalVars.initializePromise is unexpectedly undefined")})})(e,t),6e4,new Error("SDK initialization timed out."))}const J=gt.extend("initializeHelper");function Gn(){return Jn(w(W,"pages.backStack.navigateBack"))}function Zn(){return!(!U(E)||!E.supports.pages)&&!!E.supports.pages.backStack}const W="v2";function Jn(e){return new Promise(t=>{if(U(E),!Zn())throw It;t(gn(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function qn(){D(w("v2","pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Kn,!1)}function Kn(){Gn()}const Qn=T("handlers");let h=class ${static initializeHandlers(){$.handlers.themeChange=ti,$.handlers.contextChange=ni,$.handlers.load=ii,$.handlers.beforeUnload=oi,qn()}static uninitializeHandlers(){$.handlers={},$.themeChangeHandler=null,$.beforeUnloadHandler=null,$.beforeSuspendOrTerminateHandler=null,$.resumeHandler=null,$.contextChangeHandler=null}};function Yn(){h.initializeHandlers()}h.handlers={},h.themeChangeHandler=null,h.loadHandler=null,h.beforeUnloadHandler=null,h.beforeSuspendOrTerminateHandler=null,h.resumeHandler=null,h.hostToAppPerformanceMetricsHandler=null,h.contextChangeHandler=null;const ht=Qn.extend("callHandler");function Xn(e,t){const i=h.handlers[e];return i?(ht("Invoking the registered handler for message %s with arguments %o",e,t),[!0,i.apply(this,t)]):(ht("Handler for action message %s not found.",e),[!1,void 0])}function D(e,t,i,n=!0,o=[]){i?(h.handlers[t]=i,n&&P(e,"registerHandler",[t,...o])):delete h.handlers[t]}function ei(e){delete h.handlers[e]}function ti(e){h.themeChangeHandler&&h.themeChangeHandler(e)}function ni(e){h.contextChangeHandler&&h.contextChangeHandler(e)}function wt(e){h.hostToAppPerformanceMetricsHandler&&h.hostToAppPerformanceMetricsHandler(e)}
3function ii(e){const t={entityId:(i=e).entityId,contentUrl:new URL(i.contentUrl)};var i;h.resumeHandler?(h.resumeHandler(t),vt()):h.loadHandler&&(h.loadHandler(e),vt())}function oi(){return x(this,void 0,void 0,function*(){const e=()=>{P(w("v2","handleBeforeUnload"),"readyToUnload",[])};h.beforeSuspendOrTerminateHandler?(yield h.beforeSuspendOrTerminateHandler(),e()):h.beforeUnloadHandler&&h.beforeUnloadHandler(e)||e()})}const ri=T("childProxyingCommunication");function vt(){return!1}function si(e,t){return!1}ri.extend("handleIncomingMessageFromChild");const ai="v1",ge="v2";let he;function ci(e){const t=e!==void 0,i=t?e:he;if(!i)throw new Error("No parameters are provided for authentication");return U(E,S.content,S.sidePanel,S.settings,S.remove,S.task,S.stage,S.meetingStage),(function(n,o){return x(this,void 0,void 0,function*(){const r=Ft(o.url);return kt(r),Z(n,"authentication.authenticate",[r.href,o.width,o.height,o.isExternal]).then(([s,a])=>{if(s)return a;throw new Error(a)})})})(i.successCallback||i.failureCallback?w(ai,"authentication.authenticate"):w(ge,"authentication.authenticate"),i).then(n=>{try{return i&&i.successCallback?(i.successCallback(n),""):n}finally{t||(he=void 0)}}).catch(n=>{try{if(i&&i.failureCallback)return i.failureCallback(n.message),"";throw n}finally{t||(he=void 0)}})}function li(e){return rt(),(function(t,i){return new Promise(n=>{n(Z(t,"authentication.getAuthToken",[void 0,void 0,void 0,void 0]))}).then(([n,o])=>{if(n)return o;throw new Error(o)})})(w(ge,"authentication.getAuthToken")).then(t=>t).catch(t=>{throw t})}function di(e,t){U(E,S.authentication);const i=w(ge,"authentication.notifySuccess");P(i,"authentication.authenticate.success",[e]),In(l.parentWindow,()=>setTimeout(()=>l.currentWindow.close(),200))}var yt;(function(e){e.Public="public",e.EUDB="eudb",e.Other="other"})(yt||(yt={}));class ui{constructor(){this.inIframe=!1,this.isTeams=!1,this.tryTeamsAuth=(t,i)=>{if(!ut()){console.error("PintraRedirect.tryTeamsAuth -> Microsoft Teams SDK not initialized.");return}Mn().then(n=>{li().then(o=>{const r={state:i,id_token:o};this.formPost(r,window.wpo365.siteUrl?window.wpo365.siteUrl:window.location.href)}).catch(o=>{const r=`PintraRedirect.tryTeamsAuth -> Microsoft Teams SDK failed to get token [Error: ${o.message}].`;console.error(r),this.teamsPopup(t),this.showErrorMessage(r)})}).catch(n=>{const o=`PintraRedirect.tryTeamsAuth -> Microsoft Teams SDK failed to get context [Error: ${n.message}].`;console.error(n),this.showErrorMessage(o)})},this.teamsPopup=t=>{const i=()=>{ci({url:t,width:600,height:535}).then(()=>window.location.reload())};i(),this.fallbackButtonAndListeners(i)},this.showErrorMessage=t=>{let i=document.getElementById("wpo365RedirectError");i&&(i.innerHTML=`<br/><div style="font-family: Sans-Serif; padding: 20px; text-align: center; font-size: 13px; color: #8c8c8c"><strong>Important information for administrators</strong></span><br/><br/>Your <strong>WPO365 | LOGIN</strong> plugin now supports a more integrated single sign-on experience for Microsoft Teams Tabs and Apps.<br/><br/>Please update your App Manifest. <a href="https://docs.wpo365.com/article/70-adding-a-wordpress-tab-to-microsoft-teams-and-use-single-sign-on">Continue reading</a><br/><br/>[Exception details: ${t}]</div>`)},this.fallbackButtonAndListeners=t=>{let i=document.getElementById("wpo365RedirectLoadingOther");if(i||(i=document.getElementById("wpo365OpenIdRedirect")),!i)return;const n=document.createElement("button");n.setAttribute("style","border: 1px solid #8c8c8c; background: #ffffff;"),n.className="pintraRedirectMsSignin",n.innerHTML='<div style="display: flex; height: 41px; box-sizing: border-box; pointer: cursor;"><img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMSIgaGVpZ2h0PSIyMSIgdmlld0JveD0iMCAwIDIxIDIxIj48dGl0bGU+TVMtU3ltYm9sTG9ja3VwPC90aXRsZT48cmVjdCB4PSIxIiB5PSIxIiB3aWR0aD0iOSIgaGVpZ2h0PSI5IiBmaWxsPSIjZjI1MDIyIi8+PHJlY3QgeD0iMSIgeT0iMTEiIHdpZHRoPSI5IiBoZWlnaHQ9IjkiIGZpbGw9IiMwMGE0ZWYiLz48cmVjdCB4PSIxMSIgeT0iMSIgd2lkdGg9IjkiIGhlaWdodD0iOSIgZmlsbD0iIzdmYmEwMCIvPjxyZWN0IHg9IjExIiB5PSIxMSIgd2lkdGg9IjkiIGhlaWdodD0iOSIgZmlsbD0iI2ZmYjkwMCIvPjwvc3ZnPg=="><span style="white-space: nowrap; margin-left: 15px; padding-right: 12px; font-weight: 600; font-size: 15px; line-height: 41px; color: #5e5e5e;">Sign in with Microsoft</span>',n.onclick=t,i.appendChild(n)},this.uuidv4=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=Math.random()*16|0,n=t=="x"?i:i&3|8;return n.toString(16)}),this.queryString=t=>{const i=t.indexOf("?");if(i==-1)return{};const o=t.substr(i+1).split("&"),r={};for(let s=0;s<o.length;s++){const a=o[s].split("=");r[a[0]]=a.length==2?a[1]:""}return r},this.PopupCenter=(t,i,n=600,o=535)=>
3{const r=screen.availWidth,s=screen.availHeight;n>r&&(n=r),o>s&&(o=s);const a=(r-n)/2,u=(s-o)/2,d=window.open(t,i,"width="+n+",height="+o+",top="+u+",left="+a+"toolbar=no,menubar=no,scrollbars=no,location=no,status=no");d&&d.focus()},this.formPost=(t,i)=>{const n=document.getElementById("wpo365OpenIdRedirect");if(!n)return;const o=document.createElement("form");o.method="POST",o.action=i,o.style.display="none";for(const r in t)if(t.hasOwnProperty(r)){const s=document.createElement("input");s.type="hidden",s.name=r,s.value=t[r],o.appendChild(s)}n.appendChild(o),o.submit()},this.inIframe=window!=top,this.isTeams=!!(window.name&&["embedded-page-container","extension-tab-frame"].indexOf(window.name)>=0),window.wpoNotifyTeamsSuccess=t=>bt(this,null,function*(){try{yield ft(),di(t)}catch(i){console.error(`PintraRedirect.constructor -> Failed to notify success [Error: ${i.message}].`)}})}toMsOnline(t="",i=location.href,n="",o="",r=!1,s=""){if(["interactive","complete"].indexOf(document.readyState)==-1){setTimeout(()=>this.toMsOnline(t,i,n,o,r,s),500);return}if(t&&!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,6})+$/.test(t)&&(console.log("WPO365 -> loginHint parameter ignored because it is not a valid email address"),t=""),i&&!/^((http|https):\/\/)([a-zA-Z0-9@:%._\-\+~#?&\/\$=]*)$/.test(i)&&(console.log("WPO365 -> pRedirectTo parameter ignored because it is not a valid (encoded) URL"),i=location.href),n&&!/^([a-zA-Z0-9])([a-zA-Z0-9\-\.])*(\.)([a-zA-Z0-9\-]){2,6}$/.test(n)&&(console.log("WPO365 -> domainHint parameter ignored because it is not a valid domain name"),n=""),s){const C=document.createElement("div");C.innerHTML=s;const v=C.textContent;s!=v&&(console.log("WPO365 -> idpKey parameter ignored because its escaped value is not equal to its actual value"),s="")}let a=window.location.href;window.wpo365.bounceUrl?a=window.wpo365.bounceUrl:window.wpo365.siteUrl&&(a=window.wpo365.siteUrl);const u=this.queryString(window.location.href),d=Object.keys(this.queryString(a)).length===0?"?":"&",c="redirect_to"in u?decodeURIComponent(u.redirect_to):i,p="idp_id"in u?decodeURIComponent(u.idp_id):s;if(this.inIframe&&!r){const C=`${a}${d}action=openidredirect&redirect_to=${c}&domain_hint=${n}&b2c_policy=${o}&idp_id=${p}&cb=${this.uuidv4()}&wpo_embedded=${this.isTeams?"teams":"iframe"}`;this.isTeams?ut()?this.tryTeamsAuth(C,c):ft().then(()=>{this.tryTeamsAuth(C,c)}).catch(v=>{console.error(`PintraRedirect.toMsOnline -> Failed to initialize Microsoft Teams SDK [Error: ${v.message}].`)}):(this.PopupCenter(C,"msOnline"),this.fallbackButtonAndListeners(()=>{this.PopupCenter(C,"msOnline")}));return}const b={action:"openidredirect",login_hint:t,domain_hint:n,redirect_to:c,b2c_policy:o,idp_id:p};this.formPost(b,`${a}${d}cb=${this.uuidv4()}`)}}window.wpo365=window.wpo365||{},window.wpo365.pintraRedirect=new ui})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.