res-1.cdn.office.net Open in urlscan Pro
2600:1408:ec00:17::17d7:84  Public Scan

URL: https://res-1.cdn.office.net/wise/owl/word.boot.7d853654a9b1d901b5ef.js
Submission: On January 15 via manual from US — Scanned from US

Form analysis 0 forms found in the DOM

Text Content

var Microsoft="object"==typeof Microsoft?Microsoft:{};Microsoft.Office=Microsoft.Office||{},Microsoft.Office.Word=function(t){var e={};function i(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(s,n,function(e){return t[e]}.bind(null,n));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=78)}([function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t[t.O=0]="msoulscat_ES_EWAJS",t[t._=1]="msoulscat_ES_EWAJSGrid",t[t.A=6]="msoulscat_ES_EWAJSChart",t[t.P=202]="msoulscat_MSOSP_FileMenuCommands",t[t.U=220]="msoulscat_MSOSP_AddInCommands",t[t.R=225]="msoulscat_MSOSP_OTelJS",t[t.F=227]="msoulscat_MSOSP_OTelJSInWebWoker",t[t.N=228]="msoulscat_MSOSP_OTelJSWebWorkerPrototype",t[t.H=301]="msoulscat_Wac_WordViewer",t[t.B=306]="msoulscat_Wac_BrowserGeneral",t[t.$=320]="msoulscat_Wac_TaskPane",t[t.J=339]="msoulscat_Wac_OneNoteGeneral",t[t.K=340]="msoulscat_Wac_Ribbon",t[t.Z=356]="msoulscat_Wac_WacFeedback",t[t.X=379]="msoulscat_Wac_WopiPendingApplication",t[t.Y=383]="msoulscat_Wac_Telemetry",t[t.tt=391]="msoulscat_Wac_WacCatchUpActivities",t[t.et=394]="msoulscat_Wac_Dictation",t[t.it=395]="msoulscat_Wac_OneNoteSync",t[t.st=700]="msoulscat_Wac_VisioApp",t[t.nt=1601]="msoulscat_OneNoteOnline_EditableCache",t[t.ot=800]="msoulscat_Wac_PptAnimation",t[t.rt=833]="msoulscat_Wac_PptLive",t[t.ct=834]="msoulscat_Wac_PptMWeb",t[t.ht=835]="msoulscat_Wac_PptGc2General",t[t.dt=836]="msoulscat_Wac_PptGc2GraphicHost",t[t.ut=837]="msoulscat_Wac_PptGc2Operation",t[t.lt=852]="msoulscat_Wac_PptGc2EditCanvas",t[t.ft=844]="msoulscat_Wac_PptDataSync",t[t.pt=848]="msoulscat_Wac_PptFluidRuntime",t[t.wt=815]="msoulscat_Wac_PptShape",t[t.bt=817]="msoulscat_Wac_PptSession",t[t.Ot=830]="msoulscat_Wac_PptSlideshow",t[t.gt=822]="msoulscat_Wac_PptView",t[t.vt=846]="msoulscat_Wac_PptVideos",t[t.jt=1303]="msoulscat_Uci_Insights",t[t.St=2300]="msoulscat_Wac_VersionHistory",t[t.It=302]="msoulscat_Wac_WordPresence",t[t._t=3e3]="msoulscat_Wac_OAuth",t[t.Tt=3005]="msoulscat_Wac_WordVersionHistory",t[t.Ct=3006]="msoulscat_Wac_LivePersonaCard",t[t.yt=3012]="msoulscat_Wac_CatchUpFlyout",t[t.At=3016]="msoulscat_Wac_WordDesigner",t[t.Et=3021]="msoulscat_Wac_ModernFontPicker",t[t.Pt=3027]="msoulscat_Wac_UnifiedUiHost",t[t.Ut=3033]="msoulscat_Wac_EquationTools",t[t.Wt=1401]="msoulscat_Osf_Latency",t[t.Rt=1402]="msoulscat_Osf_Notification",t[t.Ft=1403]="msoulscat_Osf_Runtime",t[t.kt=3041]="msoulscat_Wac_AiMaker",t[t.Nt=3043]="msoulscat_Wac_AiRewrite",t[t.Mt=3044]="msoulscat_Wac_AiInsert",t[t.xt=3047]="msoulscat_Wac_AiSummarize",t[t.Dt=3048]="msoulscat_Wac_CopilotCompose",t[t.Vt=3049]="msoulscat_Wac_Skittles",t[t.Ht=3050]="msoulscat_Wac_CopilotChat",t[t.Bt=3051]="msoulscat_Wac_Syntex",t[t.Lt=3052]="msoulscat_Wac_WireGraph",t[t.$t=3053]="msoulscat_Wac_CshCopilot",t[t.Jt=3055]="msoulscat_Wac_CopilotProactiveSummary",t[t.Gt=3056]="msoulscat_Wac_CopilotProactiveShared",t[t.zt=3057]="msoulscat_Wac_CopilotCursor",t[t.qt=3059]="msoulscat_Wac_WasmGeneral",t[t.Kt=3060]="msoulscat_Wac_WasmTextLayout",t[t.Zt=3061]="msoulscat_Wac_WasmSmartArt",t[t.Xt=3062]="msoulscat_Wac_WasmClient",t[t.Qt=3063]="msoulscat_Wac_WasmNative",t[t.Yt=4e3]="msoulscat_AIHub_CreateModuleTelemetry"}(s||(s={}))},function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t[t.Error=10]="Error",t[t.Warning=15]="Warning",t[t.Important=20]="Important",t[t.Info=50]="Info",t[t.Verbose=100]="Verbose",t[t.Spam=200]="Spam"}(s||(s={}))},function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t.BrowserEvent="BrowserEvent",t.AcquireOAuthTokenTeams="AcquireOAuthTokenTeams",t.PageChanged="PageChanged",t.ZoomChanged="ZoomChanged",t.ContentRefreshBegin="ContentRefreshBegin",t.ContentRefreshEnd="ContentRefreshEnd",t.AppClosed="UI_Close",t.UserEdit="Edit_Notification",t.FileRename="File_Rename",t.FileShare="UI_Sharing",t.ShowFileVersions="UI_FileVersions",t.UIWorkflow="UI_Workflow",t.IsDisabled="IsDisabled",t.AccessibilityLoopComplete="App_AccessibilityLoopComplete",t.Unloaded="Unloaded",t.Disposed="Disposed",t.SwitchMode="App_SwitchMode",t.DocumentReboot="DocReboot",t.WopiInfoFromUrl="WopiInfoFromUrl",t.DavUrlFromIds="DavUrlFromIds",t.ModeSwitched="ModeSwitched",t.CreateNewDocument="App_CreateNewDocument",t.GetAuthToken="GetAuthToken",t.GetCustomAuthConfig="GetCustomAuthConfig",t.SetOverlayContent="SetOverlayContent",t.MoveToFolder="MoveToFolder",t.SharedFilePicker="SharedFilePicker"}(s||(s={}))},function(t,e,i){"use strict";i.d(e,"i",(function(){return n})),i.d(e,"f",(function(){return o})),i.d(e,"g",(function(){return r})),i.d(e,"h",(function(){return a})),i.d(e,"j",(function(){return h})),i.d(e,"k",(function(){return d})),i.d(e,"b",(function(){return l})),i.d(e,"c",(function(){return f})),i.d(e,"d",(function(){return p})),i.d(e,"e",(function(){return m})),i.d(e,"a",(function(){return w}));var s=i(5);const n="word-edit",o="/we/",r="wordeditorframe.aspx",c=o+r,a="wordeditorstartsession.ashx",h="/wv/",d="wordviewerframe.aspx",u=h+d;function l(t){return t.toLowerCase().indexOf(r)>0}function f(t){return t.toLowerCase().indexOf(d)>0}function p(t,e=!1){let i=t;return i=i.replace(new RegExp(n,"i"),"word-view"),i=i.replace(new RegExp(c,"i"),u),e&&(i=Object(s.b)(i,"WordEditorFailedToLoad","1")),i}function m(t){let e=t;return e=e.replace(new RegExp("word-view","i"),n),e=e.replace(new RegExp(u,"i"),c),e}function w(t){var e;if(!t)return{AppMode:"Unknown",AppModeExtended:"Unknown"};const i=t.appUrl,o=t.appBasePath.indexOf(n)>-1,r=t.appContext.isUnifiedRead,c=null!==(e=t.bootParams)&&void 0!==e&&e.isNewFile?t.bootParams.isNewFile:Object(s.p)(i,"new"),a=Object(s.p)(t.appUrl,"embed"),h=!!t.wdParams&&"1"===t.wdParams.wdnc;return o?c?{AppMode:"Edit",AppModeExtended:"EDIT_NEW"}:r?{AppMode:"Unified",AppModeExtended:"UNIFIED_READ"}:{AppMode:"Unified",AppModeExtended:"UNIFIED_EDIT"}:a?{AppMode:"View",AppModeExtended:"EMBED_VIEW"}:h?{AppMode:"View",AppModeExtended:"CHROMELESS_VIEW"}:{AppMode:"View",AppModeExtended:"VIEW"}}},,function(t,e,i){"use strict";i.d(e,"c",(function(){return n})),i.d(e,"u",(function(){return o})),i.d(e,"t",(function(){return r})),i.d(e,"n",(function(){return c})),i.d(e,"o",(function(){return a})),i.d(e,"m",(function(){return h})),i.d(e,"v",(function(){return d})),i.d(e,"i",(function(){return u})),i.d(e,"h",(function(){return l})),i.d(e,"f",(function(){return f})),i.d(e,"e",(function(){return p})),i.d(e,"a",(function(){return m})),i.d(e,"r",(function(){return w})),i.d(e,"d",(function(){return b})),i.d(e,"k",(function(){return O})),i.d(e,"b",(function(){return g})),i.d(e,"s",(function(){return v})),i.d(e,"x",(function(){return j})),i.d(e,"j",(function(){return S})),i.d(e,"w",(function(){return I})),i.d(e,"p",(function(){return _})),i.d(e,"l",(function(){return T})),i.d(e,"g",(function(){return C})),i.d(e,"q",(function(){return y}));const s=["eurppc"],n="AppSettingsHandler.ashx",o="RemoteUls.ashx",r="RemoteTelemetry.ashx";function c(t){return 8===t.toLowerCase().indexOf("ffc")}function a(t){return 8===t.toLowerCase().indexOf("ppc")}function h(t){const e=t.match(/^https:\/\/((?!word)\w+)(-\w+)+\..*$/i);return e&&e[1]?e[1]:"public"}function d(t,e){if(!e||-1===s.indexOf(e.toLowerCase()))return t;const i=t.match(/(^http[s]:\/\/)((?!word)\w*[-])?(.*)/i);return i?`${i[1]}${e}-${i[3]}`:t}function u(t){const e=t.match(/^(.*?\/\/[^\/]+)(.*)$/);if(!e)throw new Error("Invalid URL");return e[1]}function l(t,e){const i=t.match(/^(.*?\/\/)([^\/:]+)(.*)$/);if(!i)throw new Error("Invalid URL");const s=i[2];if(void 0===e)return s;if(e<0)throw new Error("subDomainParts should be at least 1");return s.split(".").slice(-(e+1)).join(".")}function f(t){return t+o}function p(t,e){return t+r+(e?"?usid="+e:"")}function m(t,e,i){i&&(t[e.toLowerCase()]=i)}function w(t,e){t[e.toLowerCase()]=""}function b(t,e,i){const s=[];for(const t in i)i[t]&&s.push(t+"="+i[t]);return t+e+(s.length>0?"?"+s.join("&"):"")}function O(t,e){const i=t.toLowerCase(),s=e.toLowerCase();let n=i.indexOf("&"+s+"=");if(-1===n&&(n=i.indexOf("?"+s+"=")),-1===n)return"";const o=n+(e.length+2),r=t.indexOf("&",o);return t.substring(o,-1===r?void 0:r)}function g(t,e,i,s){if(!i)return t;let n=t;const o=n.indexOf("?");let r="&";o===n.length-1||"&"===n.slice(-1)||"&>"===n.slice(-2)?r="":-1===o&&(r="?");const c=e.toLowerCase()+"=",a=new RegExp("\\W"+c,"i").exec(n);if("?"!==r&&a){if(s){const t=a.index+1,e=n.indexOf("&",t);n=n.substring(0,t)+c+i+(-1===e?"":n.substring(e))}return n}return n.concat(r,c,i)}function v(t){const e={},i=t.indexOf("?");return-1===i||i===t.length-1||t.substring(i+1).replace(new RegExp(/<.*?>/g),"").split("&").forEach(t=>{if(t){const i=t.indexOf("=");-1!==i&&i!==t.length-1&&(e[t.substring(0,i).toLowerCase()]=t.substring(i+1))}}),e}function j(t,e){if(!t)return t;let i=t;const s=i.indexOf("?"),n=e.toLowerCase()+"=",o=i.toLowerCase().indexOf(n,s);if(o>=0){const t=i.indexOf("&",o);return i=i.substring(0,o)+(-1===t?"":i.substring(t+1)),"&"===i.slice(-1)&&(i=i.slice(0,-1)),i}return t}function S(t){if(!t)return"";const e=-1===t.indexOf("#")?t.length:t.indexOf("#");let i=t.lastIndexOf("/",e);if(-1!==i&&i+1===t.indexOf("://")+"://".length)return"";i+=1;let s=t.indexOf("?");if(s=s>=e?-1:s,-1!==s&&i>s)return"";const n=-1===s?e:s;return i>=n?"":t.substring(i,n)}function I(t){const e=new RegExp("(c[1-5])h?(-)");return t.replace(e,"$1h$2")}function _(t,e,i){const s=new RegExp("[?&]"+e+"=("+(i||"1")+")\\b","i"),n=t.match(s);return!(!n||i&&n[1]!==i)}function T(t,e){const i=O(t,e);return i?decodeURI(i):i}function C(t){return t?t.indexOf("://")>-1?t.split("/")[2]:t.split("/")[0]:""}function y(t,e){return!!t&&t.includes(e)}},,function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t.te="App_AccessibilityLoopComplete",t.ee="Wac_ActionComplete",t.ie="WacInitialize_Ready",t.se="Wac_AppFailed",t.ne="Wac_AppBootState",t.oe="Wac_AppCompleted",t.re="BrowserEvent",t.ce="UI_Close",t.he="App_CloseTab",t.de="UI_Conversation",t.ue="UI_CopyAndEdit",t.le="App_CreateNewDocument",t.fe="Wac_AppDataSavedStatus",t.pe="UI_Download",t.me="UI_Edit",t.we="Error",t.be="UI_FileEmbed",t.Oe="UI_FileProperties",t.ge="File_Rename",t.ve="File_RenameFailed",t.je="UI_FileVersions",t.Se="StateChanged",t.Ie="App_IsFrameTrusted",t._e="GetAccessToken",t.Te="App_GetAuthToken",t.Ce="App_GetCustomAuthConfig",t.ye="App_GetHostKeyValue",t.Ae="App_WopiInfoFromUrl",t.Ee="App_DavUrlFromIds",t.Pe="App_LoadingStatus",t.Ue="App_SwitchMode",t.We="App_MoveToFolder",t.Re="UI_OpenInMobileApp",t.Fe="UI_OpenInBrowser",t.ke="UI_OpenInClient",t.Ne="PageChanged",t.Me="App_PushCommentContext",t.xe="App_PushState",t.De="App_DocReboot",t.Ve="UI_RedeemForCommenting",t.He="App_RefreshSessionInfo",t.Be="UI_ReplyWithChanges",t.Le="UI_ReportAbuse",t.$e="App_FilePicker",t.Je="UI_SaveStatus",t.Ge="WopiSession_Complete_Ack",t.ze="SetOverlayContent",t.qe="UI_Sharing",t.Ke="UI_ShareForm",t.Ze="UI_SignIn",t.Xe="App_StoreHostKeyValue",t.Qe="App_Unloaded",t.Ye="App_UlsLog",t.ti="Wac_UnloadingApp",t.ei="App_UpdateBootComplete",t.ii="PageCount",t.si="UI_CheckUserAccessAndGrantPermissions",t.ni="User_Activity",t.oi="Edit_Notification",t.ri="UI_Workflow",t.ci="ZoomChanged",t.hi="CAAEMessage",t.di="Excel_HostFrameCacheSave",t.li="Excel_HostFrameCacheEvict",t.fi="Excel_RegenerateFileBundle",t.pi="App_SwitchToWacFrame",t.mi="App_SaveSSRData",t.wi="App_PurgeDataInHostCache",t.bi="App_SaveHostRenderingV2Data",t.Oi="App_SaveHostUtilsData",t.gi="AcquireOAuthTokenTeams",t.vi="App_SwitchNotebook",t.ji="FailedBoot_CheckFileInfo",t.Si="GetTeamsUsers",t.Ii="SendTeamsUserMention",t._i="NavigateBackToHost",t.Ti="App_GetClientUrlComplete",t.Ci="App_GetWebUrlComplete",t.yi="App_CopyLinkComplete",t.Ai="App_SendConversationId",t.Ei="CloseTeamsConversation",t.Pi="PageLoaded",t.Ui="Visio_BRS",t.Wi="Visio_SendLicenseInfo",t.Ri="Visio_Consumption_CLTComplete",t.Fi="Visio_SwitchMode_FromViewFrame",t.ki="Visio_ModeSwitch_ToHost_Ack",t.Ni="Visio_UpdateEditUrl",t.Mi="Visio_PageViewLoaded",t.xi="Visio_ActiveAppFrameLoadFailed",t.Di="Visio_DisposeBkgFrame",t.Vi="Visio_ReadyToReceiveDocData",t.Hi="Visio_DocReboot_HostNav",t.Bi="Visio_SwitchToVisioFrame",t.Li="WacAppPerfMetric",t.$i="App_ModifyURLState",t.Ji="App_WacTokenAck",t.Gi="App_InitEnd",t.zi="App_SplashScreenShown",t.qi="App_SetWacFlightValue",t.Ki="App_PrintRedirect",t.Zi="App_RequestFullScreen"}(s||(s={}))},function(t,e,i){"use strict";function s(t){if(t){const e=t.lastIndexOf(".");if(-1!==e)return t.substring(e+1).toLowerCase()}return""}function n(t){if(!t)return"";const e=Object.getOwnPropertyNames(t),i=Object.getOwnPropertyNames(Object.getPrototypeOf(t));return JSON.stringify(t,[...e,...i])}i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return n}))},function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),i.d(e,"c",(function(){return r})),i.d(e,"g",(function(){return c})),i.d(e,"d",(function(){return a})),i.d(e,"f",(function(){return h})),i.d(e,"e",(function(){return d})),i.d(e,"h",(function(){return u})),i.d(e,"j",(function(){return l})),i.d(e,"b",(function(){return f})),i.d(e,"i",(function(){return p})),function(t){t[t.Firefox=0]="Firefox",t[t.Opera=1]="Opera",t[t.IE=2]="IE",t[t.Edge=3]="Edge",t[t.Chrome=4]="Chrome",t[t.Safari=5]="Safari",t[t.TeamsElectron=6]="TeamsElectron",t[t.Unknown=7]="Unknown"}(s||(s={}));const n=window.navigator,o=n?n.userAgent:void 0;function r(){if(o){if(o.indexOf("Firefox")>-1)return s.Firefox;if(o.indexOf("Opera")>-1||o.indexOf("OPR")>-1)return s.Opera;if(o.indexOf("Trident")>-1)return s.IE;if(o.indexOf("Electron")>-1&&o.indexOf("Teams")>-1)return s.TeamsElectron;if(o.indexOf("Edg")>-1)return s.Edge;if(o.indexOf("Chrome")>-1)return s.Chrome;if(o.indexOf("Safari")>-1)return s.Safari}return s.Unknown}function c(){try{return!!o&&o.indexOf("iPad")>=0||!!o&&o.indexOf("Macintosh")>=0&&m()&&!(o&&o.indexOf("iPhone")>=0)||!!o&&o.indexOf("Android")>=0||m()}catch{return!1}}function a(){try{return window.matchMedia("screen and (-ms-high-contrast: active)").matches}catch{return!1}}function h(){return r()===s.IE&&!(r()===s.IE&&null!=document.documentMode&&void 0!==document.documentMode&&document.documentMode>=11)}function d(){return r()===s.IE}function u(){try{return window.external&&window.external.getHostEnvironmentValue&&'{"os-sku":"189"}'===window.external.getHostEnvironmentValue("os-sku")}catch(t){return!1}}function l(){try{return window.matchMedia("(prefers-color-scheme: dark)").matches}catch{return!1}}function f(){try{return window.matchMedia("(forced-colors: active)").matches||window.matchMedia("screen and (-ms-high-contrast: active)").matches}catch{return!1}}function p(){try{return window.matchMedia("(prefers-contrast: more)").matches}catch{return!1}}function m(){return!!n&&n.maxTouchPoints>0}},,,function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t.AppInitError="AppInitError",t.ApiDisabledError="ApiDisabledError",t.CannotLoadFirstPage="CannotLoadFirstPage",t.InvalidWopiInfo="InvalidWopiInfo",t.TimeoutWacReady="TimeoutWacReady",t.WacFailed="WacFailed"}(s||(s={}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return d})),i.d(e,"d",(function(){return l})),i.d(e,"c",(function(){return f})),i.d(e,"b",(function(){return p}));var s=i(5),n=i(40),o=i(41),r=i(18),c=i(42),a=i(43),h=i(26);const d="Word";function u(t,e){const i=e?"?usid="+e:"";return t+s.t+i}function l(t,e){return u(p(t),e)}function f(t,e,i,l,f,m=!1){t.SessionInformation.IsCore&&(t.SessionInformation.HideViewerToolbar=!0),function(t,e){const i=t.SessionInformation;if(i.WdParams||(i.WdParams={}),i.WdParams.wd)return;e.substring(1).split("&").filter(t=>{if(0===t.indexOf("wd")){const e=t.split("=");e[0].length>2&&(i.WdParams[e[0]]=e[1])}});const s=t.RebootOverrideData;s&&s.previousSessionId&&(i.WdParams.wdprevioussession=s.previousSessionId),h.a.Instance.getBooleanSetting("OneNoteHostSessionOriginFixEnabled")}(t,window.location.search);const w=f||new n.a(d,i),b=p(t.ApplicationUrl);return{container:t.Container,sessionInformation:t.SessionInformation,applicationUrl:t.ApplicationUrl,wopiPrecheckInfo:t.WopiPrecheckInfo,applicationCustomSettings:t.ApplicationCustomSettings,diagnostics:{HostInitDiagnostics:t.Diagnostics,ClientDiagnostics:Object(o.c)(),AppInitDiagnostics:{officeSessionId:e,officeBootstrapperVersion:Object(r.a)(),hostName:t.SessionInformation.HostName},SessionTraces:{}},fnOnInitializeSuccess:t.FnOnInitializeSuccess,fnOnInitializeFailure:t.FnOnInitializeFailure,sessionId:e,applicationBasePath:b,remoteTelemetryUrl:u(b,e),wopiInfo:t.WopiInfo,forceSingleStepBoot:m,isCreateNew:t.WopiPrecheckInfo.IsNewFile||Object(s.p)(t.ApplicationUrl,"new"),featureManager:l||Object(c.a)(t.FnIsFeatureEnabled,i),Xi:w,newFileTemplateSource:t.NewFileTemplateSource,rebootOverrideData:t.RebootOverrideData,pageStateObserver:new a.a(i,!0),canSupportConsumption:!1}}function p(t){const e=t.match(/^(.*?\/\/[^\/]+\/[^\/]+\/)(.*)$/);if(!e)throw new Error("Invalid URL");return e[1]}},function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t.Qi="BootstrapperMaxUlsHeartbeatTime",t.Yi="BootstrapperNoCompleteWarning1Time",t.ts="BootstrapperNoCompleteWarning2Time",t.es="BootstrapperNoCompleteWarning3Time",t.ss="RemoteUlsETag",t.ns="RemoteUlsSuppressions",t.os="BootstrapperSettingsFetchPeriod",t.cs="timestamp",t.as="BootstrapperUlsHeartbeatIntervalMs",t.hs="BootstrapperUlsHeartBeatIsEnabled",t.ds="BootstrapperUlsUploadCadenceMs",t.us="WordConsumptionViewToEditRedirectIsEnabled",t.ls="RequestedCallThrottlingDefaultToViewMinimumValue",t.fs="BulsEndpointUrl",t.ps="EnableCommonHostDiagnosticsParams",t.ms="EnableICNForWord",t.ws="EnableModernEmbedViewForPowerPoint",t.bs="EnableModernEmbedViewInOneUpForPowerPoint",t.Os="EnableModernEmbedViewForPowerPointGlobalAppUrl",t.gs="EnableModernReadingViewForPowerPoint",t.vs="EnableDefaultToModernForPowerPoint",t.js="ShouldLogJsApiKpisForWord",t.Ss="WordSwitchToViewInTeamsJsapiV1Enabled",t.Is="EnableWordSessionRefreshTelemetry",t._s="PowerPointUseEssDCHint",t.Ts="ModernEmbedViewBootstrapperFeatureGatesForPowerPoint",t.Cs="ModernReadingViewBootstrapperFeatureGatesForPowerPoint",t.ys="ModernEmbedViewForPowerPointEnabledPercentage",t.As="PowerPointESSCookieLookbackThresholdHour",t.Es="PowerPointSetESSCookieLookbackExpEnabled",t.Ps="ExcelForceViewOnlyInTeamsJsapiV1",t.Us="EnableWordSessionRefreshLoggingCleanup",t.Ws="WordRefreshTelemetryExpirationInDays"}(s||(s={}))},function(t,e,i){"use strict";function s(){return window.performance.now()}function n(){return Math.round(window.performance.now()+window.performance.timeOrigin)}i.d(e,"b",(function(){return s})),i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t.Rs="Ack",t.Fs="WacInitialize_Ready_Ack",t.ks="Wac_BeforeUnloadApp",t.Ns="Blur_Focus",t.Ms="Wac_AppFailed_Ack",t.xs="Wac_AppCompleted_Ack",t.Ds="WopiStartSession_Complete",t.Vs="WopiPendingSession_Complete",t.Hs="Host_AccessibilityLoopComplete",t.Ie="Host_IsFrameTrusted",t.Bs="Grab_Focus",t.Ls="HostCacheDiagnostic",t.$s="Host_KeyValue",t.Js="JsApiDiagnostics",t.We="Host_MoveToFolder",t.Gs="PageChanged_Ack",t.zs="App_PopState",t.qs="Host_SendChannelId",t.Ks="Host_SendConversationId",t.Zs="GetTeamsUsers_Reply",t.Xs="SendTeamsUserMention_Reply",t.Qs="Host_BackButtonPressed",t.Ys="Host_GetClientUrl",t.tn="Host_GetWebUrl",t.en="File_Rename",t.$e="Host_FilePicker",t.in="PostAccessToken",t.sn="Host_SetAuthToken",t.nn="Host_SetCustomAuthConfig",t.on="App_PushCommentContext",t.rn="CanEmbed",t.cn="Host_RefreshSessionInfo",t.an="CheckUserAccessAndGrantPermissions_Result",t.hn="Host_WopiInfoFromUrl",t.dn="Host_DavUrlFromIds",t.un="SetCurrentPage",t.ln="SetZoomLevel",t.fn="WopiPendingSession_Fail",t.pn="SetOverlayContent",t.mn="WopiPendingApplicationComplete_Received",t.wn="Host_SwitchMode",t.bn="Host_Unload",t.On="PageCount_Ack",t.gn="ZoomChanged_Ack",t.vn="Host_ShareUI",t.jn="Host_Telemetry",t.Sn="Visio_ConsumptionCLTComplete_Ack",t.In="Visio_SwitchMode_FromHF_Ack",t._n="Visio_SwitchMode_FromHostFrame",t.Tn="Visio_FallbackToLegacySwitch",t.Cn="Visio_DocumentData",t.yn="Host_PostWacToken"}(s||(s={}))},function(t,e,i){"use strict";i.d(e,"c",(function(){return s})),i.d(e,"a",(function(){return n})),i.d(e,"b",(function(){return o})),i.d(e,"d",(function(){return r}));const s=365;function n(t,e){const i=o(t);return"true"===i||"false"!==i&&e}function o(t){if(!t)return"";const e=""+document.cookie,i=new RegExp("(?:^|; )"+t+"=([^;]*)"),s=e.match(i);return!s||s.length<2?"":s[1]}function r(t,e,i,n=c.none,o){const a=t+"="+e;let h="";const d=new Date;d.setTime(d.getTime()+864e5*s);let u=new Date;u.setTime(u.getTime()+864e5*i),u>d&&(u=d),u&&(h=";expires="+u.toUTCString());const l=a+h+";SameSite="+c[n];return document.cookie=o?l+"; Secure":l,!(!document.cookie||-1===document.cookie.indexOf(a))||n===c.none&&r(t,e,i,c.doNotSet,o)}var c;!function(t){t[t.doNotSet=0]="doNotSet",t[t.none=1]="none",t[t.lax=2]="lax",t[t.strict=3]="strict"}(c||(c={}))},function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return o}));const s={BUILD_NUMBER:"###VERSION###",BUILD_NUMBER_MINOR:-1};function n(t){if(t&&(s.BUILD_NUMBER=t,t.includes("."))){const e=t.split(".");s.BUILD_NUMBER_MINOR=parseInt((e[0]||"").concat((e[1]||"").padStart(3,"0")),10)}}function o(){try{return s.BUILD_NUMBER}catch(t){return s.BUILD_NUMBER}}},function(t,e,i){"use strict";i.d(e,"b",(function(){return u})),i.d(e,"a",(function(){return l}));var s=i(0),n=i(1),o=i(15),r=i(7),c=i(16),a=i(8);let h=!1,d=!1;function u(){h=!1}function l(t,e,i,a,u,l,p){if(e.ULS.An(595714433,s.a.X,n.a.Important,`Starting disposing the application. unloadApp:${t}; disposed:${h}; unloading:${d}`),h||d&&t)return void e.ULS.An(595714908,s.a.X,n.a.Info,"Application is already disposed or unloading");const m={logger:e,postMessenger:i,innerApplicationFrame:a,onDisposed:u,onFrameRemoved:l,unloadTimeoutInMs:p||1e3,forceAppUnload:!1,disposeStartTime:Object(o.a)(),appUnloadTimedOut:!1};if(t&&a)return d=!0,m.forceAppUnload=!0,(w=m).forceAppUnloadStartTime=Object(o.a)(),w.logger.ULS.An(595855490,s.a.X,n.a.Info,"Sending postmessage to unload app"),w.logger.ULS.flush(),w.postMessenger.registerMessagePayloadHandler(r.a.Qe,t=>function(t,e){t.forceAppUnloadEndTime=Object(o.a)(),t.appUnloadedMessageValues=e,t.logger.ULS.An(595855491,s.a.X,n.a.Info,"AppUnloaded received from app"),f(t)}(w,t)),w.postMessenger.sendPostMessage(w.innerApplicationFrame,c.a.bn,{}),void window.setTimeout(()=>function(t){!d&&h||(t.appUnloadTimedOut=!0,t.logger.ULS.An(595855492,s.a.X,n.a.Info,"ApplicationUnload timed out, forcing dispose"),f(t))}(w),w.unloadTimeoutInMs);var w;f(m)}function f(t){if(!h)try{h=!0,d=!1,function(t){t.innerApplicationFrame&&(t.innerApplicationFrame.src="about:blank",window.setTimeout(()=>{t.innerApplicationFrame&&t.innerApplicationFrame.parentElement&&t.innerApplicationFrame.parentElement.removeChild(t.innerApplicationFrame),t.onFrameRemoved&&t.onFrameRemoved()},0))}(t),function(t){const e={disposeStartTime:t.disposeStartTime,disposeEndTime:Object(o.a)(),forceAppUnload:t.forceAppUnload,appUnloadTimedOut:t.appUnloadTimedOut};if(t.forceAppUnloadStartTime&&(e.appUnloadStartTime=t.forceAppUnloadStartTime),t.forceAppUnloadEndTime&&(e.appUnloadEndTime=t.forceAppUnloadEndTime),t.appUnloadedMessageValues){const i=t.appUnloadedMessageValues,s=Number(i.hostMessageReceived);t.forceAppUnloadStartTime&&!isNaN(s)&&(e.hostToAppPostMessageLatency=s-t.forceAppUnloadStartTime);const n=Number(i.appMessageSent);!isNaN(n)&&t.forceAppUnloadEndTime&&(e.appToHostPostMessageLatency=t.forceAppUnloadEndTime-n);const o=Number(i.appUnloadStart),r=Number(i.appUnloadEnd);if(isNaN(o)||isNaN(r)||(e.appUnloadLatency=r-o),i.serverTimings){const t=i.serverTimings;for(const i in t)e["st-"+i.toString()]=t[i]}}t.logger.ULS.An(595855436,s.a.X,n.a.Info,"App disposed "+JSON.stringify(e)),t.logger.ULS.flushOnClose()}(t),t.onDisposed&&t.onDisposed()}catch(e){t.logger.ULS.An(595714434,s.a.X,n.a.Error,"Error disposing: "+Object(a.b)(e))}}},function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t.En="EnterpriseTemplates",t.Pn="ExcelAdaptiveLayoutDownload",t.Un="ExcelLandingPageOfflineTelemetry",t.Wn="ExcelLandingPageObserverRetry",t.Rn="H2StaticContent",t.Fn="HashedUrl",t.kn="ODCShareLinkPreload",t.Nn="OfficeComExcelJsApiV2",t.Mn="OfficeComPptJsApiV2",t.xn="OfficeComUiHost",t.Dn="OfficeComWordJsApiV2",t.Vn="OfficeHwaUiHost",t.Hn="OfficeUnifiedUiHostTeams",t.Bn="WordViewToUnifiedRead",t.Ln="DocAspxMsal"}(s||(s={}))},,,,,,function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var s=i(0),n=i(1),o=i(8),r=i(63);class c{}c.logger=Object(r.a)();class a extends class{constructor(t){this.$n={},this.resetCache=()=>{if(!this.Jn)return!1;try{return localStorage.removeItem(this.dataSettingsCacheKey),!0}catch(t){return c.logger.ULS.An(557114832,s.a.X,n.a.Error,`${this.dataSettingsCacheKey}: Failure trying to Delete data in localStorage: ${Object(o.b)(t)}`),!1}},this.setCache=t=>{if(t&&this.Jn)try{localStorage.setItem(this.dataSettingsCacheKey,JSON.stringify(t))}catch(t){c.logger.ULS.An(557114833,s.a.X,n.a.Error,`${this.dataSettingsCacheKey}: Error while saving settings in cache: ${Object(o.b)(t)}`)}},this.getIntegerSetting=t=>{const e=this.Gn(t);if(null!=e&&"number"==typeof e){const t=e;if(!isNaN(t))return t}return null},this.getBooleanSetting=t=>{const e=this.Gn(t);return null!=e&&"boolean"==typeof e?e:null},this.getStringSetting=t=>{const e=this.Gn(t);return null!=e&&"string"==typeof e?e:null},this.Gn=t=>{if(!this.Jn)return null;try{if(t in this.$n)return this.$n[t];const e=localStorage.getItem(this.dataSettingsCacheKey);if(null!==e){const i=JSON.parse(e)[t];return this.$n[t]=i,i}}catch(e){c.logger.ULS.An(557114834,s.a.X,n.a.Error,`${this.dataSettingsCacheKey}: Failure trying to find ${t} setting in localStorage: ${Object(o.b)(e)}`)}return null},this.dataSettingsCacheKey=t,this.Jn=!1;try{localStorage&&(this.Jn=!0)}catch(t){c.logger.ULS.An(538018719,s.a.X,n.a.Warning,"Local storage not supported: "+Object(o.b)(t))}}}{static get Instance(){return a.zn||(a.zn=new a)}constructor(){super(a.qn)}}a.qn="OneNote_hostUtilsSettingsCache"},function(t,e,i){"use strict";i.d(e,"a",(function(){return f})),i.d(e,"b",(function(){return p}));var s=i(7),n=i(0),o=i(1),r=i(8),c=i(16),a=i(44),h=i(18),d=i(2),u=i(19),l=i(13);class f{GetApplicationType(){return l.a}GetVersion(){return Object(h.a)()}GetSessionId(){return this.Kn}RegisterEventHandler(t,e){switch(t){case d.a.Unloaded:case d.a.Disposed:case d.a.DocumentReboot:case d.a.WopiInfoFromUrl:case d.a.DavUrlFromIds:case d.a.GetAuthToken:case d.a.GetCustomAuthConfig:case d.a.MoveToFolder:case d.a.SharedFilePicker:case d.a.SetOverlayContent:case d.a.FileShare:if(this.Zn[t])throw new Error("Duplicate registration");this.Zn[t]=e;break;default:this.Xn.registerMessagePayloadHandler(t,e)}}RemoveEventHandler(t,e){switch(t){case d.a.Unloaded:case d.a.Disposed:case d.a.DocumentReboot:case d.a.FileShare:case d.a.WopiInfoFromUrl:case d.a.DavUrlFromIds:case d.a.GetAuthToken:case d.a.GetCustomAuthConfig:case d.a.MoveToFolder:case d.a.SharedFilePicker:case d.a.SetOverlayContent:if(this.Zn[t]!==e)throw new Error("The handler requested to be removed does not exist for the eventType");delete this.Zn[t];break;default:this.Xn.removeMessageHandler(t)}}RegisterErrorHandler(t){}RemoveErrorHandler(t){}PostCommand(t,e){this.Xn.postMessageForCommand(this.Qn,t,e)}Dispose(t,e){Object(u.a)(t||!1,this.Yn,this.Xn,this.Qn,()=>{delete this.Qn,this.to(),this.Xn.dispose(),this.eo(d.a.Unloaded,{})},()=>{try{this.eo(d.a.Disposed,{}),this.Zn={}}catch(t){this.Yn.ULS.An(589108815,n.a.X,o.a.Error,"onFrameRemoved error: "+Object(r.b)(t))}},e)}constructor(t,e,i,h,l){this.Zn={},this.io=()=>{this.Xn.registerMessagePayloadHandler(s.a.De,this.so),this.Xn.registerMessagePayloadHandler(s.a.Ae,this.no),this.Xn.registerMessagePayloadHandler(s.a.Ee,this.oo),this.Xn.registerMessagePayloadHandler(s.a.Te,this.ro),this.Xn.registerMessagePayloadHandler(s.a.qe,this.co),this.Xn.registerMessagePayloadHandler(s.a.Ce,this.ao),this.Xn.registerMessagePayloadHandler(s.a.We,this.ho),this.Xn.registerMessagePayloadHandler(s.a.$e,this.do)},this.eo=(t,e)=>{const i=this.Zn[t];if(i)try{i(e||{})}catch(t){this.Yn.ULS.An(593773706,n.a.X,o.a.Error,"Handler error: "+Object(r.b)(t))}},this.so=t=>{t.previousSessionId=this.Kn,this.eo(d.a.DocumentReboot,t)},this.no=t=>{this.eo(d.a.WopiInfoFromUrl,t)},this.oo=t=>{this.eo(d.a.DavUrlFromIds,t)},this.ro=t=>{Promise?this.uo.isResourceTrustedForMessage(t).then(e=>{e?this.eo(d.a.GetAuthToken,t):this.Xn.sendPostMessage(this.Qn,c.a.sn,{AuthToken:"",Error:"accessDenied",RequestId:t.RequestId,IdentityType:t.IdentityType})},()=>{this.Xn.sendPostMessage(this.Qn,c.a.sn,{AuthToken:"",Error:"Exception encountered in AuthTokenTrustValidator.isResourceTrustedForMessage",RequestId:t.RequestId,IdentityType:t.IdentityType})}):this.Xn.sendPostMessage(this.Qn,c.a.sn,{AuthToken:"",Error:'"Promise" does not exist natively in browser',RequestId:t.RequestId,IdentityType:t.IdentityType})},this.co=t=>{this.eo(d.a.FileShare,t)},this.ao=t=>{this.eo(d.a.GetCustomAuthConfig,t)},this.ho=t=>{this.eo(d.a.MoveToFolder,t)},this.do=t=>{this.eo(d.a.SharedFilePicker,t)},this.Kn=t,this.Yn=e,this.Qn=l.innerApplicationFrame,this.Xn=i,this.to=h,this.uo=new a.a(e),this.io(),Object(u.b)()}}function p(t,e,i,s,n){return new f(t,e,i,s,n)}},function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t.Unknown="UNKNOWN",t.Initialized="INITIALIZED",t.Prebooted="PREBOOTED",t.Booting="BOOTING",t.Booted="BOOTED",t.Failed="FAILED",t.Disposing="DISPOSING",t.Disposed="DISPOSED"}(s||(s={}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var s=i(5);function n(t=!1,e){return{shouldPreconnect:t=>o&&(!e||e(t)),preconnect:e=>function(t){const e=document.createElement("link");e.rel="preconnect",e.href=t,e.crossOrigin="anonymous",document.head.appendChild(e)}(t?Object(s.w)(e):e)}}const o=!0},function(t,e,i){"use strict";i.d(e,"a",(function(){return z}));var s=i(0),n=i(1),o=i(5),r=i(18),c=i(54),a=i(55),h=i(15),d=i(63),u=i(7),l=i(20),f=i(8),p=i(41),m=i(16),w=i(62),b=i(19),O=i(12),g=i(13);function v(t,e){e&&e.Diagnostics&&Object.keys(e.Diagnostics).forEach(i=>t[i]=e.Diagnostics[i])}function j(t,e,i){e.ULS.An(596459999,s.a.X,i,"SessionTraces: "+JSON.stringify(t))}function S(t,e){e.stop();const i=e.getVisibilityChangeEvents();null!=i&&i.length>0&&(t.AppInitDiagnostics.documentLoadedWithTabSwitch=!0,t.SessionTraces.tabSwitchDiagnostics=JSON.stringify(i)),e.dispose()}function I(t,e,i){try{const c=function(t,e){const i={...e};delete i.UserId,delete i.OwnerId,delete i.SiteId,delete i.WebId,delete i.Upn,delete i.TenantId,delete i.UiHostTabId,delete i.OriginalWdParam,delete i.WdParams;const s=i,n=e.WdParams?JSON.parse(JSON.stringify(e.WdParams).toLowerCase()):{};s.WdParams={},["wdorigin","wdpreviouscorrelation","wdprevioussession","wdtf"].forEach(t=>{n[t]&&(s.WdParams[t]=n[t])});const r=/^\w{8}(-|%2d)\w{4}(-|%2d)\w{4}(-|%2d)\w{4}(-|%2d)\w{12}$/i;return s.WdParams.wdprevioussession&&!r.test(s.WdParams.wdprevioussession)&&delete s.WdParams.wdprevioussession,s.WdParams.wdpreviouscorrelation&&!r.test(s.WdParams.wdpreviouscorrelation)&&delete s.WdParams.wdpreviouscorrelation,s.UiEmbedMode=Object(o.p)(t,"uiembed"),s.UiHostName=Object(o.k)(t,"uih")||"N/A",s.HostDomain=location?location.hostname:"",s}(e.applicationUrl,e.sessionInformation);c.Build=Object(r.a)(),c.Region=Object(o.m)(e.applicationUrl);const a={...e.rebootOverrideData};delete a.ackExpected,delete a["ui-language"],delete a.wdUserSession,delete a.rebootMode,delete a.documentUrl,c.RebootOverride=a;const h=e.diagnostics.HostInitDiagnostics;h&&(t.ULS.An(596444238,s.a.X,n.a.Info,"HostInitDiagnostics: "+JSON.stringify(e.diagnostics.HostInitDiagnostics)),c.SessionOrigin=h.entryPoint),i&&t.ULS.An(595937313,s.a.X,n.a.Info,JSON.stringify(i));const d=e.wopiInfo;d&&d.AccessToken&&d.AccessTokenExpiry||t.ULS.An(595894553,s.a.X,n.a.Warning,"There are some missing parameters"),d&&(d.AccessToken&&(c.AccessTokenLength=d.AccessToken.length),c.AccessTokenExpiry=d.AccessTokenExpiry,d.WacToken&&(c.WacTokenLength=d.WacToken.length)),"Microsoft Teams"===e.sessionInformation.HostName&&t.ULS.An(507122579,s.a.X,n.a.Important,"Word setting Force View only for Teams WXP Files session."),c.JsApiVersion="v1",t.ULS.An(596444237,s.a.X,n.a.Important,JSON.stringify({session:c,client:e.diagnostics.ClientDiagnostics}))}catch(e){t.ULS.An(558155802,s.a.X,n.a.Error,"Failed to log initialization info: "+Object(f.b)(e))}}var _,T=i(56),C=i(42),y=i(9),A=i(14),E=i(3);function P(t,e,i,r){var c;let a=!1;const h=null===(c=t.container)||void 0===c?void 0:c.baseURI,d=Object(o.q)(h,"embed.aspx"),u=!(!t.isCreateNew||t.wopiInfo),l=!(!t.sessionInformation.WdParams||"1"!==t.sessionInformation.WdParams.wdembedfs),p="docx"===Object(f.a)(t.wopiPrecheckInfo.FileName);if(a=!e&&!i&&!d&&(u||p)&&!l,!a){const t={isUiEmbedModeApplicationUrl:e,isEmbedActionApplicationUrl:i,baseUrlIsForEmbedEndpoint:d,isCreateNewWithoutWopiInfo:u,isEmbeddedFullScreen:l,isFileDocx:p};r.ULS.An(505996418,s.a.X,n.a.Info,"canSupportConsumption is false. DebugInfo: "+JSON.stringify(t))}return a}function U(t,e,i){const o=t.Xi.getValue(A.a.us,!1),r=o&&t.canSupportConsumption&&e;if(e&&!r){const e={canSupportConsumption:!!t.canSupportConsumption,consumptionSettingValue:o};i.ULS.An(505996417,s.a.X,n.a.Info,"Consumption redirection will not happen. DebugInfo: "+JSON.stringify(e))}return r}function W(t,e,i=!1){let s=t.applicationUrl,n={};if("Microsoft Teams"===t.sessionInformation.HostName&&(n.fvo="1",n.readOnly="1"),n.jsApi="1",n.jsapiver="v1",i&&(n.NewSession="1"),n.corrid=t.sessionId,n.usid=t.sessionId,n.sftc="1",t.applicationCustomSettings&&t.applicationCustomSettings.IsCore&&(n.core="1"),t.sessionInformation.HideViewerToolbar&&(n.hvt="1"),t.sessionInformation.DisableFocusOnBoot&&(n.disableFocusOnBoot="1"),t.sessionInformation.HighContrastMode&&(n.hcm=encodeURIComponent(t.sessionInformation.HighContrastMode)),t.sessionInformation.SupportsAtMentions&&(n.sams="1"),t.sessionInformation.SupportsAccessibilityLoop&&(n.accloop="1"),t.sessionInformation.SupportsDocReboot){const e=t.sessionInformation.SupportsDocReboot;n.sdr=!0===e?"1":e.toString()}return t.sessionInformation.SupportsCreateNewDocument&&(n.scnd="1"),t.sessionInformation.SupportsAuthToken&&(n.sat="1"),window.docAspxMsalEnabled&&(t.sessionInformation.AuthTokenStrategy="PairwiseBroker"),t.sessionInformation.AuthTokenStrategy&&(n.ats=t.sessionInformation.AuthTokenStrategy),t.sessionInformation.SupportsCustomAuthConfig&&(n.cac="1"),t.sessionInformation.SupportsMoveToFolder&&(n.mtf="1"),t.sessionInformation.SupportsCommonFilePicker&&(n.sfp="1"),t.sessionInformation.OpenLinksInNewWindow&&(n.onw="1"),t.sessionInformation.UseDarkTheme&&(n.udt="1"),(t.sessionInformation.HideHeader||"DocGen"===t.sessionInformation.ContentAssemblyMode||"Templatization"===t.sessionInformation.ContentAssemblyMode||"ContentAssemblyEdit"===t.sessionInformation.ContentAssemblyMode||"ContentAssemblyView"===t.sessionInformation.ContentAssemblyMode)&&(n.hhdr="1"),t.sessionInformation.HideAppLauncherInHeader&&(n.halh="1"),t.sessionInformation.HideChatInHeader&&(n.hch="1"),t.sessionInformation.HideMeInHeader&&(n.hmh="1"),t.sessionInformation.HideSearchInHeader&&(n.hsh="1"),t.sessionInformation.HideWorkflowInHeader&&(n.hwfh="1"),t.sessionInformation.HideSettingsInHeader&&(n.hsth="1"),t.sessionInformation.ShowAppIconInHeader&&(n.sih="1"),t.sessionInformation.UseNeutralColorInHeader&&(n.unh="1"),t.sessionInformation.HideBreadCrumbInViewer&&(n.hbcv="1"),t.sessionInformation.HideTitleInViewer&&(n.htv="1"),t.sessionInformation.HideWACOneDriveFileLocationPicker&&(n.hodflp="1"),t.sessionInformation.NoBrowserModalDialogs&&(n.nbmd="1"),t.applicationCustomSettings&&t.applicationCustomSettings.FixDiagnosticsJson&&(n.fixdiag="1"),(t.wopiPrecheckInfo.ReadOnly||e.bootFlowType===_.wordViewToUnifiedReadRedirect)&&(n.readOnly="1"),"DocGen"!==t.sessionInformation.ContentAssemblyMode&&"ContentAssemblyView"!==t.sessionInformation.ContentAssemblyMode||(n.readOnly="1"),e.bootFlowType===_.wordViewToUnifiedReadRedirect&&(n.cons="1"),t.canSupportConsumption&&(n.csc="1"),t.sessionInformation.UIEmbed&&(n.uiEmbed="1"),t.sessionInformation.IsSynthetic&&(n.syn="1"),t.sessionInformation.SupportsDirectDownload&&(n.sdd="1"),t.sessionInformation.SupportsDirectPrint&&(n.sdp="1"),t.sessionInformation.DisableOfficeAddins&&(n.doa="1"),t.sessionInformation.UiHostIntegrationType&&(n.uihit=encodeURIComponent(t.sessionInformation.UiHostIntegrationType)),t.sessionInformation.MetaUiHostVersion&&(n.muv=encodeURIComponent(t.sessionInformation.MetaUiHostVersion)),t.applicationCustomSettings&&t.applicationCustomSettings.InAppDocumentPreview&&(n.InAppDocPreview="1"),e.isSingleStepBoot?(e.bootFlowType===_.unifiedSingleFlush&&(t.isCreateNew||(n.instantedit="1",n.wopicomplete="1")),n.wdRedirectionReason=e.bootFlowType):(n.instantedit="1",n.fileSrc=encodeURIComponent(t.sessionInformation.HostName),n.pmOrigin=encodeURIComponent(Object(o.i)(window.location.href)),t.isCreateNew&&(n.new="1",t.wopiPrecheckInfo.IsNewFileFromHostTemplate&&(n.wdTpl="fromhost"))),t.wopiPrecheckInfo.PreseededSessionKey&&(n.preseededSessionKey=encodeURIComponent(t.wopiPrecheckInfo.PreseededSessionKey)),t.wopiPrecheckInfo.PreseededWacSessionId&&(n.preseededWacSessionId=encodeURIComponent(t.wopiPrecheckInfo.PreseededWacSessionId)),t.wopiPrecheckInfo.RequestedCallThrottling&&(n.rct=t.wopiPrecheckInfo.RequestedCallThrottling),t.wopiPrecheckInfo.ClientThrottlingProtection&&(n.ctp=t.wopiPrecheckInfo.ClientThrottlingProtection),t.applicationCustomSettings&&t.applicationCustomSettings.additionalApplicationParameters&&(n={...t.applicationCustomSettings.additionalApplicationParameters,...n}),t.rebootOverrideData&&t.rebootOverrideData.queryOverrides&&(n={...n,...t.rebootOverrideData.queryOverrides}),function(t,e,i,s,n){let r=Object(o.s)(t);("teams"===r.uih&&"UnifiedUiHostTeams"!==e.UiHostIntegrationType&&"TeamsModern"!==e.UiHostIntegrationType||"owa"===r.uih)&&(r.hhdr="1");const c=t.indexOf("?"),a=-1===c?t.concat("?"):t.substring(0,c+1);e.UiLocale&&(r.ui=encodeURIComponent(e.UiLocale)),e.DataLocale&&(r.rs=encodeURIComponent(e.DataLocale)),e.HostSessionId&&(r.hid=encodeURIComponent(e.HostSessionId)),e.DisableChat&&(r.dchat="1"),e.SessionContext&&(r.sc=encodeURIComponent(e.SessionContext)),i&&i.WopiSrc&&(r.wopisrc=encodeURIComponent(i.WopiSrc)),e.CookieCompliant&&(r.mscc="1"),s&&(s.entryPoint&&(r.wdorigin=encodeURI(s.entryPoint)),s.userClickTime&&(r.wdhostclicktime=s.userClickTime.toString())),r={...r,...e.WdParams,...n};const h={};for(const t in r)h[t.toLowerCase()]=r[t];const d=[];for(const t in h)h[t]&&d.push(t.concat("=",h[t]));return a.concat(d.join("&"))}(s,t.sessionInformation,t.wopiInfo,t.diagnostics.HostInitDiagnostics,n)}function R(t){return t.AccessTokenExpiry?t.AccessTokenExpiry.getTime().toString():"0"}!function(t){t.bootWithoutWopiInfo="",t.unifiedSingleFlush="Unified_SingleFlush",t.unifiedIrmEnabled="Unified_IrmEnabled",t.unifiedViewActionUrl="Unified_ViewActionUrl",t.unifiedNotEditOrViewActionUrl="Unified_NotEditOrViewActionUrl",t.forceSingleStepBoot="Force_SingleStepBoot",t.wordUiEmbedReadOnlyEarlyRedirect="WordUiEmbed_ReadOnlyEarlyRedirect",t.wordUiEmbedIrmEnabledEarlyRedirect="WordUiEmbed_IrmEnabledEarlyRedirect",t.wordViewToUnifiedReadRedirect="WordView_UnifiedReadRedirect"}(_||(_={}));var F=i(39),k=i(17);const N={[F.a.blurFocus]:m.a.Ns,[F.a.continueAccessibilityLoop]:m.a.Hs,[F.a.grabFocus]:m.a.Bs,[F.a.moveToFolder]:m.a.We,[F.a.popState]:m.a.zs,[F.a.rename]:m.a.en,[F.a.sendAccessToken]:m.a.in,[F.a.sendAuthToken]:m.a.sn,[F.a.sendCustomAuthConfig]:m.a.nn,[F.a.sendEmbeddedViewUrl]:m.a.rn,[F.a.sendSessionInfo]:m.a.cn,[F.a.sendUserAccessAndPermissions]:m.a.an,[F.a.sendWopiInfo]:m.a.hn,[F.a.sendDavUrl]:m.a.dn,[F.a.completeSharedFilePicker]:m.a.$e,[F.a.switchMode]:m.a.wn,[F.a.signalShared]:m.a.vn};class M{registerMessagePayloadHandler(t,e){if(this.Zn[t])throw new Error("Duplicate registration!");this.Zn[t]=e}removeMessageHandler(t){delete this.Zn[t]}sendPostMessage(t,e,i){if(!t||!t.contentWindow)return void this.Yn.ULS.An(595948308,s.a.X,n.a.Info,"Missing target for SendPostMessage");this.Yn.ULS.An(596464334,s.a.X,n.a.Info,"Sending message: "+e);const o={MessageId:e,SendTime:Object(h.a)(),Values:i};this.lo(t.contentWindow,JSON.stringify(o),this.fo)}activate(t,e){this.Qn=t,this.po=!!e,this.mo||(window.addEventListener("message",this.wo,!1),this.mo=!0)}postMessageForCommand(t,e,i){const o=N[e];o?(this.Yn.ULS.An(595702598,s.a.X,n.a.Info,`Sending message ${o} for command ${e}`),this.sendPostMessage(t,o,i)):this.Yn.ULS.An(595702599,s.a.X,n.a.Warning,"No mapping for command "+e)}dispose(){this.Zn={},this.mo&&(window.removeEventListener("message",this.wo,!1),this.mo=!1)}constructor(t,e){var i;if(this.mo=!1,this.Zn={},this.fo="",this.bo="",this.po=!1,this.Oo=!1,this.vo=!1,this.jo=!1,this.So=[],this.Io=!0,this._o=(t,e,i)=>{if(!t)return void this.Yn.ULS.An(595736136,s.a.X,n.a.Info,"Missing target to send Ack back");const o={MessageId:m.a.Rs,CorrelationId:i,SendTime:Object(h.a)()};this.Yn.ULS.An(595732176,s.a.X,n.a.Info,"Sending Ack back"),t.postMessage(JSON.stringify(o),e)},this.wo=t=>{let e,i=!1,r=!0,c="",a=!1;if(this.Qn&&this.Qn.contentWindow&&(i=!0,r=t.source===this.Qn.contentWindow),t.origin&&(c=Object(o.h)(t.origin,2).toLowerCase(),a=c===this.bo,!a&&this.To&&(c=Object(o.h)(t.origin).toLowerCase(),a=this.To.includes(c))),!this.Oo&&(!this.vo||a&&r)||this.Yn.ULS.An(595730526,s.a.X,n.a.Info,`Window is available: ${i}, window is valid: ${r}, origin is valid: ${a}, expected origin: ${this.bo}, actual origin: ${c}`),!a||this.po&&!r)return;try{e=JSON.parse(t.data)}catch(t){return void this.Yn.ULS.An(596464282,s.a.X,n.a.Info,`Failed to parse event data: ${Object(f.b)(t)}.`)}const h=e.MessageId;if(!h)return void((this.Oo||this.vo)&&this.Yn.ULS.An(595730520,s.a.X,n.a.Info,"Could not find message id"));var d;if(this.Yn.ULS.An(595714715,s.a.X,n.a.Info,`Received messageId: ${h}, correlation: ${e.CorrelationId}`),h!==u.a.oe&&h!==u.a.Pe||this.Co(t.origin),this.jo&&h===u.a.Li)return window._pageTimings=null!==(d=window._pageTimings)&&void 0!==d?d:{},void(window._pageTimings[e.Values.name]=e.Values.time);e.Values&&e.Values.ackExpected&&this._o(t.source,t.origin,e.CorrelationId);const l=this.Zn[h];if(!l)return this.Yn.ULS.An(596464289,s.a.X,n.a.Info,"No handler found for message id: "+h),void(this.Io&&h===u.a.Te&&(this.So.push(e),this.Yn.ULS.An(543207888,s.a.X,n.a.Info,"Kept for later process: "+h)));this.Yn.ULS.An(596464288,s.a.X,n.a.Info,"Processing message: "+h),h===u.a.qe&&(e.Values={...e.Values||{},sendTimeAsClickTime:e.SendTime});try{l(e.Values||{})}catch(t){this.Yn.ULS.An(593773704,s.a.X,n.a.Error,"Handler error: "+Object(f.b)(t))}this.Io&&h===u.a.oe&&this.yo()},this.yo=()=>{this.Io=!1,this.So.forEach(t=>{const e=t.MessageId,i=this.Zn[e];if(i){this.Yn.ULS.An(543207890,s.a.X,n.a.Info,"Processing message after boot complete: "+e);try{i(t.Values||{})}catch(t){this.Yn.ULS.An(543207891,s.a.X,n.a.Error,"Handler error: "+Object(f.b)(t))}}else this.Yn.ULS.An(543207889,s.a.X,n.a.Info,"No handler found after boot complete: "+e)}),this.So=[]},this.lo=(t,e,i)=>{t.postMessage(e,i)},this.Co=t=>{const e=t.toLowerCase();this.fo&&this.fo!==e&&this.Yn.ULS.An(596128131,s.a.X,n.a.Warning,`Updating origin: [${Object(o.g)(this.fo)}]->[${Object(o.g)(e)}]`),this.fo=e,this.bo=Object(o.h)(e,2),this.Oo=Object(o.n)(e),this.vo=Object(o.o)(e)},!t)throw new Error("Missing origin for PostMessageHandler");this.Oo=Object(o.n)(t),this.vo=Object(o.o)(t),this.Yn=e,this.Co(t),this.jo=!(null===(i=window.location)||void 0===i||null===(i=i.search)||void 0===i||!i.match(/wdpa=1/gi))||"1"===Object(k.b)("EnableMetricLogging")}}var x=i(57),D=i(58),V=i(59),H=i(60),B=i(61);class L{Boot(){this.Yn.ULS.An(596444241,s.a.X,n.a.Info,"Initializing WAC frame");const t=W(this.Ao,this.Eo,!0),e=function(t,e){const i={};if(t.wopiInfo&&(i[T.a.Po]=t.wopiInfo.AccessToken,i[T.a.Uo]=R(t.wopiInfo),t.wopiInfo.WacToken&&(i[T.a.Wo]=t.wopiInfo.WacToken)),t.wopiPrecheckInfo.BundleInfo&&t.wopiPrecheckInfo.BundleInfo.Url&&t.wopiPrecheckInfo.BundleInfo.Url.length>0)if(i[T.a.Ro]=t.wopiPrecheckInfo.BundleInfo.Url,null!=t.wopiPrecheckInfo.BundleInfo.BundleStaleness&&void 0!==t.wopiPrecheckInfo.BundleInfo.BundleStaleness){const o=t.wopiPrecheckInfo.BundleInfo.BundleStaleness.toString();e.ULS.An(593503580,s.a.X,n.a.Info,"Content bundle staleness - "+o),i[T.a.Fo]=o}else e.ULS.An(593503581,s.a.X,n.a.Info,"Content bundle staleness does not exist");if(t.wopiPrecheckInfo.FileGetUrl&&(i[T.a.ko]=t.wopiPrecheckInfo.FileGetUrl),t.wopiPrecheckInfo.CustomFontCatalogUrl&&(i[T.a.No]=t.wopiPrecheckInfo.CustomFontCatalogUrl),t.wopiPrecheckInfo.FileName){const e=Object(f.a)(t.wopiPrecheckInfo.FileName);e&&(i[T.a.Mo]=e),i[T.a.xo]=t.wopiPrecheckInfo.FileName}t.newFileTemplateSource&&t.newFileTemplateSource.FileSize?i[T.a.Do]=t.newFileTemplateSource.FileSize.toString():t.wopiPrecheckInfo.FileSize&&(i[T.a.Do]=t.wopiPrecheckInfo.FileSize.toString()),t.sessionInformation.UserId&&(i[T.a.Vo]=t.sessionInformation.UserId),t.sessionInformation.OwnerId&&(i[T.a.Ho]=t.sessionInformation.OwnerId),t.sessionInformation.SessionContext&&(i[T.a.Bo]=t.sessionInformation.SessionContext),void 0!==t.sessionInformation.SupportsZipIt&&(i[T.a.Lo]=t.sessionInformation.SupportsZipIt.toString()),t.diagnostics.HostInitDiagnostics&&(i[T.a.$o]=JSON.stringify({HostInitializeDiagnostics:t.diagnostics.HostInitDiagnostics,ClientDiagnostics:t.diagnostics.ClientDiagnostics})),i[T.a.Jo]=Object(C.b)(t.featureManager,t.sessionInformation.WdParams),t.applicationCustomSettings&&t.applicationCustomSettings.HostUIControls&&(i[T.a.Go]=JSON.stringify(t.applicationCustomSettings.HostUIControls)),i[T.a.zo]=String(window.devicePixelRatio>1.24),i[T.a.qo]=String(Object(y.f)()),i[T.a.Ko]=t.sessionInformation.HostName;const o=t.newFileTemplateSource;o&&o.FileGetUrl&&(i[T.a.Zo]=o.FileGetUrl),o&&o.DocUniqueId?i[T.a.Xo]=o.DocUniqueId:t.wopiPrecheckInfo.DocUniqueId&&(i[T.a.Xo]=t.wopiPrecheckInfo.DocUniqueId),o&&o.ETag?i[T.a.Qo]=o.ETag:t.wopiPrecheckInfo.ETag&&(i[T.a.Qo]=t.wopiPrecheckInfo.ETag),"Templatization"!==t.sessionInformation.ContentAssemblyMode&&"DocGen"!==t.sessionInformation.ContentAssemblyMode&&"ContentAssemblyEdit"!==t.sessionInformation.ContentAssemblyMode&&"ContentAssemblyView"!==t.sessionInformation.ContentAssemblyMode||(i[T.a.Yo]="1"),t.sessionInformation.ContentAssemblyMode&&(i[T.a.tr]=t.sessionInformation.ContentAssemblyMode);const c=t.sessionInformation.Meeting;c&&(c.id&&(i[T.a.er]=c.id),c.title&&(i[T.a.ir]=c.title),c.type&&(i[T.a.sr]=c.type),c.scheduledStartTime&&(i[T.a.nr]=c.scheduledStartTime),c.scheduledEndTime&&(i[T.a.nr]=c.scheduledEndTime),c.joinUrl&&(i[T.a.or]=encodeURIComponent(c.joinUrl)),c.organizerId&&(i[T.a.rr]=c.organizerId),c.isPresenter&&(i[T.a.cr]=c.isPresenter.toString()),c.isMeetingTeamsRoom&&(i[T.a.ar]=c.isMeetingTeamsRoom.toString()));const a=t.sessionInformation.OwlVersion;a&&(i[T.a.hr]=a);const h=t.sessionInformation.OwlRollout;h&&(i[T.a.dr]=h);const d=t.sessionInformation.SupportsInPlaceCreateNew;d&&(i[T.a.ur]=d.toString()),t.sessionInformation.DisableEmbedViewCodeSnippet&&(i[T.a.lr]="1"),t.sessionInformation.DisableCoEditInTeams&&(i[T.a.pr]="1"),i[T.a.mr]=Object(r.a)();const u=t.sessionInformation.TraceParent;if(u){i[T.a.wr]=u;const e=t.sessionInformation.TraceState;e&&(i[T.a.br]=e)}return i}(this.Ao,this.Yn);if(this.Xn.registerMessagePayloadHandler(u.a.ne,this.Or),this.Xn.registerMessagePayloadHandler(u.a.he,this.gr),this.Ao.sessionInformation.SupportsFrameTrustCheck||this.Xn.registerMessagePayloadHandler(u.a.Ie,this.vr),this.Xn.registerMessagePayloadHandler(u.a.ze,this.jr),this.Xn.registerMessagePayloadHandler(u.a.ye,this.Sr),this.Xn.registerMessagePayloadHandler(u.a.Xe,this.Ir),this.Xn.registerMessagePayloadHandler(u.a.qi,this._r),this.Eo.ignoreWacFramePostMessages||this.Tr(Object(o.n)(t)),this.Cr(t,e),this.Eo.ignoreWacFramePostMessages){const t=this.yr();this.Ar(t)}return this.Yn.ULS.An(595661019,s.a.X,n.a.Info,"Created Wac Frame"),this.Qn}constructor(t,e,i,r,c,d){if(this.Er=!1,this.Cr=(t,e)=>{this.Pr.officeFrameCreateTime=Object(h.a)(),this.Ur.frameCreateStartTime=this.Pr.officeFrameCreateTime;const i=this.Ao.applicationCustomSettings&&this.Ao.applicationCustomSettings.appFrameName;this.Qn=function(t,e,i,s,n,r,c){return function(t,e,i,s){Object(T.b)(t,s);const n=e.ownerDocument,o=n.createElement("form");o.id="office_form",o.name="office_form",o.action=i,o.target=t.name,o.method="POST";for(const t in s){const e=n.createElement("input");e.type="hidden",e.name=t,e.value=s[t],o.appendChild(e)}return e.appendChild(o),o.submit(),t}(function(t,e,i){const s=t.ownerDocument.createElement("iframe");s.name=i||"WebApplicationFrame",s.id="WebApplicationFrame",s.src="",s.title="Office Online Frame",s.width="100%",s.height="100%",s.marginWidth="0",s.marginHeight="0",s.style.left="0",s.style.top="0",s.style.right="0",s.style.bottom="0",s.style.display="block",s.style.position="absolute",s.style.backgroundColor="transparent",s.style.border="none",s.frameBorder="0",s.setAttribute("allowfullscreen","true"),s.setAttribute("allowTransparency","true");const n=Object(o.i)(e);return s.setAttribute("allow",`microphone ${n}; autoplay ${n}; camera ${n}; clipboard-read ${n}; clipboard-write ${n}; keyboard-map ${n}; display-capture ${n}`),t.appendChild(s),s}(t,e,c),t,e,i)}(this.Ao.container,t,e,this.Ao.featureManager,this.Yn,this.Ao.sessionId,i),this.Xn.activate(this.Qn)},this.Tr=t=>{this.Xn.registerMessagePayloadHandler(u.a.oe,this.Wr),this.Xn.registerMessagePayloadHandler(u.a.se,this.Rr),this.Fr=window.setTimeout(this.kr,15e3),this.Nr=new x.a(t,this.Ao.Xi,this.Yn,()=>{Object(a.c)(this.Ao.remoteTelemetryUrl,g.a,"bootTimeout")})},this._r=t=>{const e=t.flightKey,i=t.flightValue;this.Yn.ULS.An(507343133,s.a.Pt,n.a.Info,`storeWacFlightKeyValue ${e}: ${i}`);try{Object(D.b)(t)}catch(t){this.Yn.ULS.An(507340380,s.a.Pt,n.a.Error,"Handler error: "+Object(f.b)(t))}},this.Or=t=>{const e=t&&t.state?t.state:"unknown";this.Yn.ULS.An(595714271,s.a.X,n.a.Info,`WAC Boot App state:[${e}]`)},this.vr=t=>{const e=Object(T.f)(this.Yn);this.Yn.ULS.An(595653903,s.a.X,n.a.Info,"Top frame is trusted: "+e),this.Mr(m.a.Ie,{isTopFrameTrusted:e})},this.jr=t=>{const e=Object(V.b)(t&&t.overlayContent);this.Yn.ULS.An(587487432,s.a.X,n.a.Info,"Overlay content: "+e),this.Mr(m.a.pn,void 0)},this.Wr=t=>{if(this.Yn.ULS.An(595986314,s.a.X,n.a.Info,"Received wac complete message"),this.Yn.ULS.flush(),window.clearTimeout(this.Fr),this.Nr&&this.Nr.stop(),this.Er)return void this.Yn.ULS.An(596444234,s.a.X,n.a.Info,"Received multiple wac complete or failure messages");this.Er=!0,this.Mr(m.a.xs,{}),v(this.Pr,t);const e=this.yr();this.Ar(e),this.Ao.Xi.getValue(A.a.ps,!1)&&(this.Ao.diagnostics.HostInitDiagnostics||(this.Ao.diagnostics.HostInitDiagnostics={}),Object(p.a)(this.Ao.diagnostics.HostInitDiagnostics)),this.xr(this.Ao.diagnostics)},this.gr=()=>{this.Yn.ULS.An(579342464,s.a.X,n.a.Info,"Received close tab message");try{window.close()}catch{this.Yn.ULS.An(579213188,s.a.X,n.a.Warning,"Failed to close the browser tab")}},this.yr=()=>({innerApplicationFrame:this.Qn}),this.Rr=t=>{if(this.Yn.ULS.An(595986315,s.a.X,n.a.Error,"Received wac failed message"),this.Yn.ULS.flush(),window.clearTimeout(this.Fr),this.Nr&&this.Nr.stop(),this.Er)return void this.Yn.ULS.An(596444235,s.a.X,n.a.Info,"Received multiple wac complete or failure messages");this.Er=!0,this.Mr(m.a.Ms,{});const e={errorType:O.a.WacFailed,errorObject:{}};t&&(e.errorObject=t.Error,this.Ur.error=e),this.Dr(e)},this.Sr=t=>{const e=t.hostKey;this.Yn.ULS.An(574433173,s.a.X,n.a.Info,"GetHostKeyValue "+e);const i=Object(H.b)(t);null!=i&&this.Mr(m.a.$s,{hostKey:e,hostValue:i})},this.Ir=t=>{const e=t.hostKey,i=t.hostValue;this.Yn.ULS.An(574433174,s.a.X,n.a.Info,`storeHostKeyValue ${e}: ${i}`),Object(B.b)(t)},this.kr=()=>{this.Er||this.Yn.ULS.An(596444236,s.a.X,n.a.Warning,"Timeout. SessionTraces:"+JSON.stringify(this.Ur))},this.xr=t=>{this.Mr(m.a.Js,{HostInitializeDiagnostics:t.HostInitDiagnostics,ClientDiagnostics:t.ClientDiagnostics})},this.Mr=(t,e)=>{this.Qn&&this.Qn.contentWindow?this.Xn.sendPostMessage(this.Qn,t,e):this.Yn.ULS.An(595955718,s.a.X,n.a.Info,"Attempted to send postmessage: "+t)},void 0===e)throw new TypeError("bootFlowInfo");if(e.isSingleStepBoot&&void 0===t.wopiInfo)throw new TypeError("wopiInfo");this.Ao=t,this.Eo=e,this.Yn=i,this.Xn=r,this.Ar=c,this.Dr=d,this.Pr=t.diagnostics.AppInitDiagnostics,this.Ur=t.diagnostics.SessionTraces,this.Ur.wopiInitializeTime=Object(h.a)()}}class ${Complete(t,e){if(this.Vr)this.Yn.ULS.An(596444184,s.a.X,n.a.Warning,"Complete called after Complete/Fail already called");else{this.Yn.ULS.An(596444185,s.a.X,n.a.Info,"Complete called."),this.Ao.diagnostics.HostInitDiagnostics&&(this.Ao.diagnostics.HostInitDiagnostics.hostCompleteCallTime=Object(h.a)()),this.Vr=!0,this.Hr=t,this.Ur.wopiPendingCompleteTime=Object(h.a)();try{this.Eo.isSingleStepBoot?this.Br():this.Lr(),this.$r&&this.Mr(m.a.mn,{}),this.Jr(e)}catch(t){this.Yn.ULS.An(596444186,s.a.X,n.a.Error,"Unexpected script error: "+Object(f.b)(t)),Object(a.c)(this.Ao.remoteTelemetryUrl,g.a,"bootException")}finally{this.Yn.ULS.flush()}}}Fail(t){this.Vr?this.Yn.ULS.An(596444187,s.a.X,n.a.Warning,"Fail called after Complete/Fail already called"):(this.Yn.ULS.An(596444188,s.a.X,n.a.Warning,"Fail called. Reason: "+(t?JSON.stringify(t):"N/A")),this.Vr=!0,this.Eo.isSingleStepBoot?this.Gr():this.zr(t),this.Yn.ULS.flush())}Dispose(t,e,i){Object(b.a)(t||!1,this.Yn,this.Xn,this.Qn,()=>{delete this.Qn,e&&e(),this.qr(),this.Xn.dispose()},void 0,i)}PostWacToken(t,e,i){!function(t,e,i,o,r,c){const a=Object(h.a)();o.ULS.An(507774684,s.a.X,n.a.Important,"postWacToken flow initiated");const d=()=>{c&&c.flush&&c.flush()};r?r.then(r=>{const l=()=>i.sendPostMessage(r,m.a.yn,{wacToken:t,postWacTokenStart:e});l();const f=window.setInterval(l,100);i.registerMessagePayloadHandler(u.a.Ji,t=>{o.ULS.An(507597019,s.a.X,n.a.Info,`postWacToken flow completed in ${Object(h.a)()-a} ms`),window.clearInterval(f),window.clearTimeout(p),c&&(c.PostWacTokenResult="success",c.PostWacTokenEndTime=Object(h.a)(),t&&void 0!==t.TokenAlreadySet&&(c.TokenAlreadySet=t.TokenAlreadySet),d())});const p=window.setTimeout(()=>{o.ULS.An(507597018,s.a.X,n.a.Warning,"postWacToken flow timed out after 60000 ms"),window.clearInterval(f),c&&(c.PostWacTokenResult="timeout",c.PostWacTokenEndTime=Object(h.a)(),d())},6e4)}).catch(t=>{o.ULS.An(507873094,s.a.X,n.a.Warning,"This should never reject, error: "+Object(f.b)(t)),c&&(c.PostWacTokenResult="Unexpected JSAPI V1 error",c.PostWacTokenEndTime=Object(h.a)(),d())}):(o.ULS.An(507846862,s.a.X,n.a.Warning,"`Promise` does not exist natively for this browser."),c&&(c.PostWacTokenResult="JSAPI V1 error: Promise not supported in browser",c.PostWacTokenEndTime=Object(h.a)(),d()))}(t,e,this.Xn,this.Yn,this.Kr,i)}Boot(){this.Eo.isSingleStepBoot||this.Zr(),this.Yn.ULS.flush()}constructor(t,e,i,c,a,d,l){this.$r=!1,this.Xr=!1,this.Vr=!1,this.Qr=null,this.Yr=!0,this.tc=!1,this.ec=!1,this.Zr=()=>{this.Yn.ULS.An(596444231,s.a.X,n.a.Info,"Initializing Office frame WITHOUT WOPI info - first step of two step flow."),window.setTimeout(this.ic,5e3),this.Xn.registerMessagePayloadHandler(u.a.ie,this.nc),this.Xn.registerMessagePayloadHandler(u.a.Ge,this.oc);const t=new L(this.Ao,this.Eo,this.Yn,this.Xn,this.Ar,this.Dr);this.Qn=t.Boot(),this.rc&&this.rc(this.Qn)},this.Lr=()=>{const t={ParallelizeStartSession:this.Yr,WacFrameIsLoaded:this.$r,WacAcceptsStartSessionComplete:this.tc};this.Yn.ULS.An(596444232,s.a.X,n.a.Info,"Completing the initialized application WITH the WOPI info - second step of two step flow. Current app state - "+JSON.stringify(t)),!this.Yr||this.$r&&!this.tc?this.$r&&this.cc():this.hc()},this.Br=()=>{this.Yn.ULS.An(596444233,s.a.X,n.a.Info,"Initializing Office frame WITH WOPI info - single step WOPI boot flow."),this.Ao.wopiInfo=this.Hr;const t=new L(this.Ao,this.Eo,this.Yn,this.Xn,this.Ar,this.Dr);this.Qn=t.Boot(),this.rc(this.Qn)},this.zr=t=>{this.$r?(this.Yn.ULS.An(595968481,s.a.X,n.a.Warning,"Fail called and wacframe is able to accept postmessages"),this.dc(t)):(this.Yn.ULS.An(595968482,s.a.X,n.a.Warning,"Fail was called on the session prior to WacReady."),this.Qr=t)},this.dc=t=>{this.Yn.ULS.An(596444189,s.a.X,n.a.Warning,"Fail called, sending the failure postmessage to IFrame"),this.Mr(m.a.fn,t)},this.Gr=()=>{this.Yn.ULS.An(596444190,s.a.X,n.a.Warning,"Fail called during single step boot, calling host failure callback..."),this.Dr({errorType:O.a.InvalidWopiInfo,errorObject:new TypeError("wopiInfo")})},this.ic=()=>{this.$r||(this.Yn.ULS.An(596444191,s.a.X,n.a.Warning,"Timeout Wac Ready"),this.Dr({errorType:O.a.TimeoutWacReady,errorObject:void 0}))},this.uc=()=>{this.Vr||(this.Ur.timeoutCompleteOrFail=Object(h.a)(),this.Yn.ULS.An(596444192,s.a.X,n.a.Warning,"Timeout Complete or Fail. SessionTraces:"+JSON.stringify(this.Ur)))},this.lc=(t,e,i)=>{this.ec||(this.Yn.ULS.An(596444193,s.a.X,n.a.Info,"SessionCompletion timed out with no ack."),this.fc(t,e,i+1))},this.nc=t=>{if(this.Ur.readyMessageReceiveTime=Object(h.a)(),this.Mr(m.a.Fs,{}),this.$r)return void this.Yn.ULS.An(596444194,s.a.X,n.a.Info,"Received multiple ready messages - frame is already loaded.");this.$r=!0,this.tc=t&&t.CanAcceptStartSessionComplete;const e={AcceptStartSessionComplete:this.tc,ParallelizeStartSession:this.Yr,StartSessionResponseAvailable:!!this.pc,WopiInfoAvailable:!!this.Hr};this.Yn.ULS.An(596444195,s.a.X,n.a.Info,"HandleWacReadyMessage - "+JSON.stringify(e)),this.Vr&&(this.Qr?this.dc(this.Qr):this.Mr(m.a.mn,{})),this.Yr&&this.tc?this.pc&&this.mc():this.Hr&&this.cc(),v(this.Pr,t)},this.oc=t=>{this.ec=!0,this.Ur.sessionCompleteAckReceivedTime=Object(h.a)()},this.Mr=(t,e)=>{this.Xn.sendPostMessage(this.Qn,t,e)},this.wc=(t,e)=>{this.fc(t,e,1)},this.fc=(t,e,i)=>{if(i>3)return void this.Yn.ULS.An(596444224,s.a.X,n.a.Error,"Attempted to call complete, but received no ack from the frame. Time: "+Object(h.a)());this.Yn.ULS.An(596444225,s.a.X,n.a.Info,`Sending completion message to frame. Attempt number: ${i}, Time: ${Object(h.a)()}`);const o=Object(h.a)();1===i&&(this.pc&&this.pc.Diagnostics&&(this.pc.Diagnostics.completeMessageCreateTime=o),this.Ur.completeMessageCreateTime=o),e.Diagnostics.completeMessageSendTime=o,this.Ur.completeMessageSendTime=o,this.Mr(t,e),window.setTimeout(()=>this.lc(t,e,i),1e3)},this.hc=()=>{this.Yn.ULS.An(596444226,s.a.X,n.a.Info,"Making parallelized startSession request.");const t=this.bc(this.Hr),e="access_token="+encodeURIComponent(this.Hr.AccessToken)+"&access_token_ttl="+encodeURIComponent(R(this.Hr));this.Ur.startSessionStartTime=Object(h.a)(),Object(w.a)(t,e,{"Content-Type":"application/x-www-form-urlencoded"},this.Oc)},this.Oc=t=>{if(this.Ur.startSessionCompleteTime=Object(h.a)(),this.Ur.startSessionResponseStatus=t.status,this.pc={StartSessionResponse:{RequestStatus:t.status,ResponseText:t.responseText},Diagnostics:{wopiPendingInitializeTime:this.Ur.wopiPendingInitializeTime,wopiPendingCompleteTime:this.Ur.wopiPendingCompleteTime,startSessionStartTime:this.Ur.startSessionStartTime,startSessionCompleteTime:this.Ur.startSessionCompleteTime,readyMessageReceiveTime:this.Ur.readyMessageReceiveTime}},this.Yn.ULS.An(596444227,s.a.X,n.a.Info,`StartSession request completed with status code: ${this.pc.StartSessionResponse.RequestStatus}, Time: ${Object(h.a)()}`),this.$r&&this.tc)return void this.mc();const e={WacFrameIsLoaded:this.$r,InitializeCompleted:this.Xr};this.Yn.ULS.An(596444228,s.a.X,n.a.Info,"StartSessionCompleted not called - "+JSON.stringify(e))},this.cc=()=>{if(this.Xr)return;this.Xr=!0,this.Yn.ULS.An(596444229,s.a.X,n.a.Info,"Sending wopi info to the frame.");const t={WopiDetails:{WopiSrc:this.Hr.WopiSrc,AccessToken:this.Hr.AccessToken,AccessTokenTtl:R(this.Hr)},Diagnostics:{wopiPendingInitializeTime:this.Ur.wopiPendingInitializeTime,wopiPendingCompleteTime:this.Ur.wopiPendingCompleteTime,readyMessageReceiveTime:this.Ur.readyMessageReceiveTime}};this.Hr.WacToken&&(t.WopiDetails.WacToken=this.Hr.WacToken),this.wc(m.a.Vs,t)},this.mc=()=>{200===this.pc.StartSessionResponse.RequestStatus?this.Xr||(this.Xr=!0,this.wc(m.a.Ds,this.pc)):this.cc()},this.bc=t=>{let e=this.Ao.applicationBasePath+E.h;const i=W(this.Ao,this.Eo,!1);return e+="?"+i.substring(i.indexOf("?")+1),e=Object(o.b)(e,"WOPISrc",encodeURIComponent(t.WopiSrc)),e=Object(o.b)(e,"build",encodeURIComponent(Object(r.a)())),e=Object(o.b)(e,"WacUserType",encodeURIComponent("WOPI")),this.Ao.wopiPrecheckInfo.FileGetUrl&&(e=Object(o.b)(e,"fileGetUrlPresent","1")),e},this.Jr=t=>{if(this.Ao.isCreateNew){if(!t||!t.NewFilePath)return void this.Yn.ULS.An(596444230,s.a.X,n.a.Info,"Either NewFileInfo or NewFilePath are not provided for a new file.");history.replaceState({},"",t.NewFilePath),t.UpdatedPageTitle&&(document.title=t.UpdatedPageTitle)}},this.Ao=t,this.Eo=e,this.Pr=t.diagnostics.AppInitDiagnostics,this.Yn=i,this.Xn=c,this.Ar=d,this.Dr=l,Promise&&(this.Kr=new Promise(t=>this.rc=t)),this.Ur=t.diagnostics.SessionTraces,this.Ur.wopiPendingInitializeTime=Object(h.a)(),this.qr=a,Object(b.b)(),window.setTimeout(this.uc,5e3)}}class J{Complete(t){this.Ao.diagnostics.HostInitDiagnostics&&(this.Ao.diagnostics.HostInitDiagnostics.hostCompleteCallTime=Object(h.a)()),this.gc.Complete(t)}Fail(t){this.gc.Fail(t)}Dispose(t,e,i){Object(b.a)(t||!1,this.Yn,this.Xn,this.Qn,()=>{delete this.Qn,e&&e(),this.qr(),this.Xn.dispose()},void 0,i)}PostWacToken(t,e,i){this.gc.PostWacToken(t,e,i)}Boot(){if(this.vc)return void this.Yn.ULS.An(595932544,s.a.H,n.a.Info,"Mobile Endpoint detected, skipping first page viewer optimization");if(this.Ao.sessionInformation&&this.Ao.sessionInformation.WdParams&&"1"===this.Ao.sessionInformation.WdParams.wdignorefpo)return void this.Yn.ULS.An(507561551,s.a.H,n.a.Info,"wdignorefpo request detected, skipping first page viewer optimization");this.Yn.ULS.An(595989253,s.a.H,n.a.Info,"Boot WordViewer"),this.Xn.registerMessagePayloadHandler(u.a.ii,this.jc),this.Xn.registerMessagePayloadHandler(u.a.Ne,this.Sc),this.Xn.registerMessagePayloadHandler(u.a.ci,this.Ic);const t=this.Ao.rebootOverrideData;t&&t.reason&&"translate"===t.reason.toLowerCase()?this.Yn.ULS.An(591209105,s.a.H,n.a.Info,"Skip first page optimization"):this.Ao.wopiPrecheckInfo.BundleInfo?this._c(this.Ao.wopiPrecheckInfo.BundleInfo,this.Ao.container,()=>{this.Tc=Object(h.a)(),this.Yn.ULS.An(595998873,s.a.H,n.a.Info,"FirstPageFromHostLoadTime: "+this.Tc),this.Pr.documentLoadedTime=this.Pr.documentLoadedTime||this.Tc,this.Qn&&this.Qn.contentWindow&&this.Cc(this.Qn,this.Tc)},t=>{this.yc(),this.Yn.ULS.An(595994571,s.a.H,n.a.Warning,"Cannot load first page from cache"),this.Pr.errorObject=t}):this.Yn.ULS.An(596121033,s.a.H,n.a.Warning,"Missing Bundle Info"),window.setTimeout(this.Ac,6e4)}constructor(t,e,i,o,r,c,a){this.Ec=!1,this.Pc=!1,this.vc=!1,this.Cc=(t,e)=>{this.Xn.sendPostMessage(t,m.a.Ls,{HostCacheLoadTime:e})},this._c=(t,e,i,o)=>{if(this.Yn.ULS.An(595989254,s.a.H,n.a.Info,"Kick off OptimizationView"),this.Ao.applicationCustomSettings&&this.Ao.applicationCustomSettings.ForceAccessibilityMode)return;if(!t.Url)return void this.Yn.ULS.An(595722645,s.a.H,n.a.Info,"Missing Url in provided Bundle Info, from host: "+this.Ao.sessionInformation.HostName);const r=e.ownerDocument;if(!r)return;this.Uc=r.createElement("div"),this.Uc.id="FirstPageContainer",this.Uc.style.left="0",this.Uc.style.textAlign="center",this.Uc.style.width="1px",this.Uc.style.bottom="0",this.Uc.style.zIndex="900",this.Uc.style.height="1px",this.Uc.style.position="absolute",this.Uc.style.padding="0 29px",this.Uc.style.right="0",this.Uc.style.overflow="auto",this.Uc.style.marginLeft="auto",this.Uc.style.marginRight="auto",this.Uc.style.maxWidth="100%",this.Wc?this.Uc.style.top="0":this.Uc.style.top="90px",e.appendChild(this.Uc);const c=r.createElement("img");c.id="FirstPageImage",c.style.marginTop="11px",c.style.marginBottom="11px",c.style.maxWidth="100%",c.style.border="solid 1px #d2d5d8",c.draggable=!1,c.onload=()=>{this.Yn.ULS.An(595989255,s.a.H,n.a.Info,"OptimizationView Loaded"),this.Uc.style.width="",this.Uc.style.height="",i()},c.onerror=t=>{o({errorType:O.a.CannotLoadFirstPage,errorObject:"string"==typeof t?t:t.returnValue})},c.src=t.Url.replace("{0}","p1.img"),this.Uc.appendChild(c)},this.Rc=()=>{if(!this.Pc&&this.Ec&&(!this.Wc||this.Fc&&this.kc&&this.Nc)){this.Xn.removeMessageHandler(u.a.ii),this.Xn.removeMessageHandler(u.a.Ne),this.Xn.removeMessageHandler(u.a.ci);const t={isCore:this.Wc,pageCount:this.kc,currentPage:this.Fc,zoomLevel:this.Nc,innerApplicationFrame:this.Qn};this.Ar(t),this.Yn.ULS.An(595989256,s.a.H,n.a.Info,"Word Viewer Initialize Complete"),this.Pc=!0,this.Yn.ULS.flush()}},this.Mc=t=>{this.Yn.ULS.An(595986312,s.a.H,n.a.Info,"SuccessCallbackProxy called"),this.Qn=t.innerApplicationFrame,this.Tc&&this.Cc(this.Qn,this.Tc),this.yc();const e=this.Pr.documentLoadedTime;e&&this.Tc&&this.Tc<e?(this.Pr.documentLoadedTime=this.Tc,this.Pr.documentLoadedFromWopiPrecheckInfo=!0,this.Yn.ULS.An(595994572,s.a.H,n.a.Info,"First page load from cache was faster")):this.Pr.documentLoadedFromWopiPrecheckInfo=!1,this.xc(),this.Ec=!0,this.Yn.ULS.An(595986313,s.a.H,n.a.Info,"WordViewerInitializer received wac complete message"),this.Rc(),this.Yn.ULS.flush()},this.Dc=t=>{this.Yn.ULS.An(595972122,s.a.H,n.a.Error,"FailureCallbackProxy called"),this.Pc=!0,this.Dr(t)},this.yc=()=>{this.Uc&&this.Uc.parentElement&&this.Uc.parentElement.removeChild(this.Uc)},this.Ac=()=>{if(!this.Pc){this.Ur.timeoutAppInitialize=Object(h.a)();const t="Didn't receive app initialize post messages. {'appComplete': "+this.Ec+", 'currentPage': "+(void 0!==this.Fc)+", 'zoomLevel': "+(void 0!==this.Nc)+", 'pageCount': "+(void 0!==this.kc)+"}";this.Yn.ULS.An(596120771,s.a.H,n.a.Warning,t)}},this.jc=t=>{if(!t||"number"!=typeof t.pageCount)throw new TypeError("values: PageCount not found");this.kc=t.pageCount,this.Mr(m.a.On,{}),this.Rc()},this.Sc=t=>{if(!t||"number"!=typeof t.newPage)throw new TypeError("values: CurrentPage not found");this.Fc=t.newPage,this.Mr(m.a.Gs,{}),this.Rc()},this.Ic=t=>{if(!t||"number"!=typeof t.newLevel)throw new TypeError("values: ZoomLevel not found");this.Nc=t.newLevel,this.Mr(m.a.gn,{}),this.Rc()},this.xc=()=>{this.Fc&&this.Mr(m.a.Gs,{}),this.kc&&this.Mr(m.a.On,{}),this.Nc&&this.Mr(m.a.gn,{})},this.Mr=(t,e)=>{this.Qn&&this.Qn.contentWindow?this.Xn.sendPostMessage(this.Qn,t,e):this.Yn.ULS.An(595955717,s.a.H,n.a.Info,"Attempted to send WordViewer postmessage: "+t)},this.Ao=t,this.Pr=t.diagnostics.AppInitDiagnostics,this.Yn=i,this.Xn=o,this.Ur=t.diagnostics.SessionTraces,this.qr=r;const d=window.navigator.userAgent;d.indexOf("Mobi")>=0&&d.indexOf("iPad")<0&&(this.vc=!0),this.Ar=c,this.Dr=a,this.Vc=this.vc?c:this.Mc,this.Hc=this.vc?a:this.Dc,this.Wc=!(!this.Ao.applicationCustomSettings||!this.Ao.applicationCustomSettings.IsCore),this.Ao.sessionInformation&&this.Ao.sessionInformation.WdParams&&(this.Ao.applicationCustomSettings&&this.Ao.applicationCustomSettings.ForceAccessibilityMode?this.Ao.sessionInformation.WdParams.wdAccPdf="1":this.Wc&&(this.Ao.sessionInformation.WdParams.wdAccPdf="0")),this.gc=new $(this.Ao,e,i,o,r,this.Vc,this.Hc)}}class G{registerEventHandler(t){this.Zn.push(t)}removeEventHandler(t){if(t){const e=this.Zn.indexOf(t);this.Zn.splice(e,1)}}stop(){document.removeEventListener("visibilitychange",this.Bc)}getVisibilityChangeEvents(){return this.Lc}dispose(){this.stop(),this.Zn=[],this.Lc=[]}constructor(){if(this.Lc=[],this.Zn=[],this.Bc=()=>{const t={visibility:document.visibilityState,time:Object(h.a)(),initialState:!1};this.Lc.push(t);for(const e of this.Zn)e&&e(t)},"hidden"===document.visibilityState){const t={visibility:document.visibilityState,time:Object(h.a)(),initialState:!0};this.Lc.push(t)}document.addEventListener("visibilitychange",this.Bc)}}class z{GetVersion(){return Object(r.a)()}GetMinContentVersion(){throw new Error("Not implemented")}Prefetch(t){if(null!=t&&void 0!==t){const e=document.createElement("link");e.rel="prefetch";let i=t.BootstrapperUrl;".js"!==i.toString().slice(-3)&&(i+=".js"),e.href=i;const s=document.getElementsByTagName("head")[0];null!=s&&void 0!==s&&s.appendChild(e)}}InitializeWopiPending(t,e,i,r,m,w){let b,v,T,C,W=!1;try{i?v=i:[v,T]=Object(c.a)(),Object(a.c)(Object(g.d)(t.ApplicationUrl,v),g.a,"init");const O=Object(h.a)();let R;!function(t){if(void 0===t)throw new TypeError("initParams");const e=t.Container;if(void 0===e||void 0===e.appendChild)throw new TypeError("Container");const i=t.SessionInformation;if(void 0===i||void 0===i.HostName||void 0===i.HostSessionId||void 0===i.UserId)throw new TypeError("SessionInformation");const s=t.ApplicationUrl;if(void 0===s||"string"!=typeof s)throw new TypeError("ApplicationUrl");const n=t.WopiPrecheckInfo;if(void 0===n||void 0===n.FileName)throw new TypeError("WopiPrecheckInfo");if(void 0===t.FnOnInitializeSuccess)throw new TypeError("FnOnInitializeSuccess");if(void 0===t.FnOnInitializeFailure)throw new TypeError("FnOnInitializeFailure")}(t),t.ApplicationUrl=Object(o.v)(t.ApplicationUrl,Object(o.k)(t.ApplicationUrl,"region")),t.ApplicationUrl=Object(o.x)(t.ApplicationUrl,"region"),function(t){const e=t.RebootOverrideData;if(e){let i=e.mode;i&&(i=i.toLowerCase(),"view"===i&&Object(E.b)(t.ApplicationUrl)?t.ApplicationUrl=Object(E.d)(t.ApplicationUrl):"edit"===i&&Object(E.c)(t.ApplicationUrl)&&(t.ApplicationUrl=Object(E.e)(t.ApplicationUrl)))}}(t),b=e||Object(d.a)({remoteUlsEndpoint:Object(g.b)(t.ApplicationUrl)+o.u,sessionId:v}),C=Object(g.c)(t,v,b,m,w,this.$c.forceSingleStepBoot),w||(C.Xi.addSettingsChangeListener(b.settingsChangeHandler),C.Xi.initializePeriodicFetch(C.applicationBasePath,v)),C.diagnostics.HostInitDiagnostics&&(C.diagnostics.HostInitDiagnostics.hostInitializeCallTime=O),I(b,C,T),W=!0;const F=t.BootstrapperUrl;F&&(R=this.Jc(F,b));const k=()=>{C.Xi.dispose(),C.pageStateObserver.dispose(),window.clearInterval(R)},N=Object(o.i)(t.ApplicationUrl),x=r||new M(N,b),D=new G,V=function(t,e){let i={isSingleStepBoot:t.forceSingleStepBoot,bootFlowType:t.forceSingleStepBoot?_.forceSingleStepBoot:_.bootWithoutWopiInfo,ignoreWacFramePostMessages:!1};if(t.forceSingleStepBoot){const s=t.applicationUrl,n=Object(E.c)(s),r=Object(o.p)(s,"uiembed"),c=Object(o.p)(s,"embed");t.canSupportConsumption=P(t,r,c,e),U(t,n,e)&&(i={isSingleStepBoot:!0,bootFlowType:_.wordViewToUnifiedReadRedirect,ignoreWacFramePostMessages:!1})}else i=function(t,e){const i=t.applicationUrl,r=Object(E.b)(i),c=Object(E.c)(i),a=Object(o.p)(i,"uiembed"),h=Object(o.p)(i,"embed");return e.ULS.An(595640900,s.a.X,n.a.Info,`gotUiEmbedUrl:${a}, gotEditUrl:${r}, gotViewUrl:${c}`),!r&&t.wopiPrecheckInfo.IrmEnabled?{isSingleStepBoot:!0,bootFlowType:a?_.wordUiEmbedIrmEnabledEarlyRedirect:_.unifiedIrmEnabled,ignoreWacFramePostMessages:!1}:(t.canSupportConsumption=P(t,a,h,e),U(t,c,e)?{isSingleStepBoot:!0,bootFlowType:_.wordViewToUnifiedReadRedirect,ignoreWacFramePostMessages:!1}:r?(e.ULS.An(575980770,s.a.X,n.a.Info,"readOnly:"+t.wopiPrecheckInfo.ReadOnly),t.wopiPrecheckInfo.ReadOnly&&a?{isSingleStepBoot:!0,bootFlowType:_.wordUiEmbedReadOnlyEarlyRedirect,ignoreWacFramePostMessages:!1}:!function(t){return t.Xi.getValue(A.a.ms,!1)?null==t.wopiInfo||null==t.wopiInfo.WopiSrc||""===t.wopiInfo.WopiSrc:null==t.wopiInfo}(t)||Object(y.e)()?{isSingleStepBoot:!0,bootFlowType:_.unifiedSingleFlush,ignoreWacFramePostMessages:!1}:{isSingleStepBoot:!1,bootFlowType:_.bootWithoutWopiInfo,ignoreWacFramePostMessages:!1}):{isSingleStepBoot:!0,bootFlowType:c?_.unifiedViewActionUrl:_.unifiedNotEditOrViewActionUrl,ignoreWacFramePostMessages:!c})}(t,e);if(i.isSingleStepBoot){const o={singleStepBootIsRequired:!0,singleStepBootReason:i.bootFlowType,irmEnabled:t.wopiPrecheckInfo.IrmEnabled,readOnly:t.wopiPrecheckInfo.ReadOnly,ignoreWacFramePostMessages:i.ignoreWacFramePostMessages};e.ULS.An(596444182,s.a.X,o.irmEnabled?n.a.Warning:n.a.Info,JSON.stringify(o))}else e.ULS.An(596444183,s.a.X,n.a.Info,"Received input valid for two step flow");return i}(C,b),H=function(t,e,i,o,r,c,h){return d=>{const u=t.diagnostics;S(u,o),j(u.SessionTraces,i,n.a.Info);const l=K(u);i.ULS.An(596448985,s.a.X,n.a.Important,JSON.stringify(l)),Object(a.c)(t.remoteTelemetryUrl,g.a,"bootSuccess");const m=h(t.sessionId,i,e,r,d);try{c(m,l)}catch(t){i.ULS.An(595719171,s.a.X,n.a.Error,"Exception thrown from host's success callback: "+Object(f.b)(t))}Object(p.f)("word",i),q(i)}}(C,x,b,D,k,t.FnOnInitializeSuccess,this.Gc),B=function(t,e,i,o){return r=>{const c=t.diagnostics;S(c,i),j(c.SessionTraces,e,n.a.Warning);const h=K(c);e.ULS.An(596448986,s.a.X,n.a.Error,JSON.stringify({error:r,appInitDiagnostics:h})),Object(a.c)(t.remoteTelemetryUrl,g.a,"bootFailure");try{o(r,h)}catch(t){e.ULS.An(595719172,s.a.X,n.a.Error,"Exception thrown from host's failure callback: "+Object(f.b)(t))}Object(p.f)("word",e),q(e)}}(C,b,D,t.FnOnInitializeFailure);t.FnOnAppModeSwitched&&x.registerMessagePayloadHandler(u.a.Ue,t.FnOnAppModeSwitched);{const e="Microsoft Teams"===t.SessionInformation.HostName,i=[_.unifiedViewActionUrl,_.wordUiEmbedReadOnlyEarlyRedirect,_.wordUiEmbedIrmEnabledEarlyRedirect];if(e||this.$c.useViewerInitializer||i.includes(V.bootFlowType)){!this.$c.useViewerInitializer&&t.FnOnAppModeSwitched&&t.FnOnAppModeSwitched({NewMode:"view"}),(V.bootFlowType===_.wordUiEmbedReadOnlyEarlyRedirect||e)&&(C.applicationUrl=Object(E.d)(C.applicationUrl,!0)),V.bootFlowType===_.wordViewToUnifiedReadRedirect&&(b.ULS.An(506585945,s.a.X,n.a.Info,"Redirecting Viewer request to unified read"),C.applicationUrl=Object(E.e)(C.applicationUrl)),C.sessionInformation.HideViewerToolbar&&(C.applicationCustomSettings?C.applicationCustomSettings.IsCore=!0:C.applicationCustomSettings={IsCore:!0},delete C.sessionInformation.HideViewerToolbar);const i=new J(C,V,b,x,k,H,B);return i.Boot(),i}V.bootFlowType===_.wordViewToUnifiedReadRedirect&&(b.ULS.An(578324612,s.a.X,n.a.Info,"Redirecting Viewer request to unified read"),C.applicationUrl=Object(E.e)(C.applicationUrl))}t.WopiPrecheckInfo.ReadOnly&&t.FnOnAppModeSwitched&&t.FnOnAppModeSwitched({NewMode:"view"});const L=Object(o.k)(C.applicationUrl,"uih");if(F&&this.$c.preconnector&&this.$c.preconnector.shouldPreconnect(L)&&this.$c.preconnector.preconnect(F),F&&this.$c.preloader&&this.$c.preloader.shouldPreload(C.applicationUrl))try{let t=F;C.featureManager.isFeatureEnabled(l.a.Rn)&&(b.ULS.An(595645891,s.a.X,n.a.Info,"HTTP2 preload enabled"),t=Object(o.w)(F));let e=C.sessionInformation.UiLocale;e||(e=decodeURIComponent(Object(o.k)(C.applicationUrl,"ui"))),this.$c.preloader.preload(t,e,b,C.featureManager)}catch(t){b.ULS.An(595943884,s.a.X,n.a.Error,"Error preloading")}const z=new $(C,V,b,x,k,H,B);return z.Boot(),z}catch(e){return b&&(b.ULS.An(596459925,s.a.X,n.a.Error,`${O.a.AppInitError}: ${Object(f.b)(e)}`),W||I(b,C||Object(g.c)(t,v,b,m,w,this.$c.forceSingleStepBoot),T),b.ULS.flushOnClose()),void(t&&(t.ApplicationUrl&&Object(a.c)(Object(g.d)(t.ApplicationUrl,v),g.a,"bootException"),t.FnOnInitializeFailure&&t.FnOnInitializeFailure({errorType:O.a.AppInitError,errorObject:e})))}}constructor(t,e){this.Jc=(t,e)=>window.setInterval(()=>{this.Prefetch({BootstrapperUrl:t}),e.ULS.An(595895774,s.a.X,n.a.Info,"Prefetching "+Object(o.j)(t))},36e5),this.Gc=t,this.$c=e}}function q(t){t.ULS.An(590914655,s.a.X,n.a.Info,"Time spent logging: "+t.getTimeSpentLogging())}function K(t){return{...t.AppInitDiagnostics,...t.HostInitDiagnostics,SessionTraces:t.SessionTraces}}},,,,,function(t,e,i){"use strict";i.d(e,"a",(function(){return u}));var s=i(7),n=i(16),o=i(0),r=i(1),c=i(27),a=i(2),h=i(12);class d extends c.a{SetCurrentPage(t){this.zc?this.qc({errorType:h.a.ApiDisabledError,errorObject:{isCoreMode:this.Wc}}):(this.Kc=t,this.Xn.sendPostMessage(this.Qn,n.a.un,{newPage:this.Kc}),window.setTimeout(()=>{this.Kc!==this.Zc&&this.Yn.ULS.An(596444179,o.a.H,r.a.Info,'Did not receive the page change update. {"RequestedPage": '+this.Kc+', "CurrentPage": '+this.Zc+"}")},5e3))}GetPageCount(){return this.zc&&this.qc({errorType:h.a.ApiDisabledError,errorObject:{isCoreMode:this.Wc}}),this.kc}GetCurrentPage(){return this.zc&&this.qc({errorType:h.a.ApiDisabledError,errorObject:{isCoreMode:this.Wc}}),this.Zc}SetZoomLevel(t){this.zc?this.qc({errorType:h.a.ApiDisabledError,errorObject:{isCoreMode:this.Wc}}):(this.Xc=Number(t.toFixed(2)),this.Xn.sendPostMessage(this.Qn,n.a.ln,{newLevel:this.Xc}),window.setTimeout(()=>{this.Xc!==this.Nc&&this.Yn.ULS.An(596444180,o.a.H,r.a.Info,'Did not receive the zoom change update. {"RequestedZoom": '+this.Xc+', "CurrentZoom": '+this.Nc+"}")},5e3))}GetZoomLevel(){return this.zc&&this.qc({errorType:h.a.ApiDisabledError,errorObject:{isCoreMode:this.Wc}}),this.Nc}GetIsDisabled(){return this.zc}GetApplicationType(){return"Word Viewer"}RegisterEventHandler(t,e){switch(t){case a.a.ZoomChanged:case a.a.PageChanged:case a.a.IsDisabled:if(this.Zn[t])throw new Error("Duplicate registration");this.Zn[t]=e;break;default:this.Xn.registerMessagePayloadHandler(t,e)}}RemoveEventHandler(t,e){switch(t){case a.a.ZoomChanged:case a.a.PageChanged:case a.a.IsDisabled:if(this.Zn[t]!==e)throw new Error("The handler requested to be removed does not exist for the eventType");delete this.Zn[t];break;default:this.Xn.removeMessageHandler(t)}}RegisterErrorHandler(t){this.Qc=t}RemoveErrorHandler(t){if(this.Qc!==t)throw new Error("The handler requested to be removed does not exist");delete this.Qc}constructor(t,e,i,n,o){super(t,e,i,n,o),this.qc=t=>{const e={errorType:t.errorType,errorObject:t.errorObject};if(!e.errorType||!e.errorObject)throw new TypeError("Error object is missing errorType or errorObject");this.Qc&&this.Qc(e)},this.Yc=t=>{this.Nc=t.newLevel,this.eo(a.a.ZoomChanged,t)},this.ta=t=>{this.Zc=t.newPage,this.eo(a.a.PageChanged,t)},this.ea=t=>{this.zc=t.isDisabled,this.eo(a.a.IsDisabled,t)},this.Qn=o.innerApplicationFrame,this.Xn=i,this.Yn=e,this.Zn={},this.Wc=o.isCore,this.Zc=o.currentPage,this.Nc=o.zoomLevel,this.kc=o.pageCount,this.zc=!this.Wc,this.Xn.registerMessagePayloadHandler(s.a.ci,this.Yc),this.Xn.registerMessagePayloadHandler(s.a.Ne,this.ta),this.Xn.registerMessagePayloadHandler(s.a.Se,this.ea),this.Xn.registerMessagePayloadHandler(s.a.we,this.qc)}}function u(t,e,i,s,n){return new d(t,e,i,s,n)}},function(t,e,i){"use strict";i.d(e,"a",(function(){return bt}));var s=i(81),n=i(7),o=i(51),r=i(0),c=i(1);const a=(t,e,i,s,a)=>t!==n.a.De?Promise.reject("Wrong flow"):new Promise(t=>{i.pendingReboot=!0;let s=void 0;if(e.queryOverrides)try{s=JSON.parse(e.queryOverrides)}catch(t){i.logger.ULS.An(592217694,r.a.X,c.a.Error,"Failed to parse queryOverrides: "+s)}i.raiseEvent(o.a.Reboot,{...e,previousSessionId:i.sessionId,queryOverrides:s}),t({completion:"success"})});var h=i(39),d=i(16);function u(t){return!(!(t&&t.source&&t.accessToken)||!t.expiry&&0!==t.expiry)}var l=i(84),f=i(28),p=i(55),m=i(20),w=i(42),b=i(56),O=i(5),g=i(9),v=i(18),j=i(8);function S(t){const e={};Object(O.a)(e,"jsapi","1"),Object(O.a)(e,"jsapiver","v2"),Object(O.a)(e,"corrid",t.sessionId),Object(O.a)(e,"usid",t.sessionId),Object(O.a)(e,"newsession","1"),Object(O.a)(e,"sftc","1"),t.hostSessionId&&Object(O.a)(e,"hid",encodeURIComponent(t.hostSessionId));const i=t.host;i.uiHostName&&Object(O.a)(e,"uih",i.uiHostName),i.uiHostIntegrationType&&Object(O.a)(e,"uihit",encodeURIComponent(i.uiHostIntegrationType)),i.metaUiHostVersion&&Object(O.a)(e,"muv",encodeURIComponent(i.metaUiHostVersion));const s=i.capabilities;s&&(s.accessibilityLoop&&Object(O.a)(e,"accloop","1"),s.rebootDoc&&Object(O.a)(e,"sdr",s.rebootDoc.toString()),s.createNewDoc&&Object(O.a)(e,"scnd","1"),s.authToken&&Object(O.a)(e,"sat","1"),window.docAspxMsalEnabled&&(s.authTokenStrategy="PairwiseBroker"),s.authTokenStrategy&&Object(O.a)(e,"ats",s.authTokenStrategy),s.customAuthConfig&&Object(O.a)(e,"cac","1"),s.refreshAccessToken&&Object(O.a)(e,"rat","1"),s.atMentions&&Object(O.a)(e,"sams","1"),s.moveToFolder&&Object(O.a)(e,"mtf","1"),s.noBrowserModalDialogs&&Object(O.a)(e,"nbmd","1"),s.commonFilePicker&&Object(O.a)(e,"sfp","1"),s.directDownload&&Object(O.a)(e,"sdd","1"),s.directPrint&&Object(O.a)(e,"sdp","1"),s.disableOfficeAddins&&Object(O.a)(e,"doa","1"));const n=t.ui;n.language&&Object(O.a)(e,"ui",encodeURIComponent(n.language)),n.uiEmbed&&Object(O.a)(e,"uiembed","1"),(n.hideHeader||"DocGen"===n.contentAssemblyMode||"Templatization"===n.contentAssemblyMode||"ContentAssemblyEdit"===n.contentAssemblyMode||"ContentAssemblyView"===n.contentAssemblyMode)&&Object(O.a)(e,"hhdr","1"),n.highContrast&&Object(O.a)(e,"hcm",encodeURIComponent(n.highContrast)),n.hideFileLocationPicker&&Object(O.a)(e,"hodflp","1"),n.hideAppLauncherInHeader&&Object(O.a)(e,"halh","1"),n.hideChatInHeader&&Object(O.a)(e,"hch","1"),n.hideMeInHeader&&Object(O.a)(e,"hmh","1"),n.hideSearchInHeader&&Object(O.a)(e,"hsh","1"),n.hideWorkflowInHeader&&Object(O.a)(e,"hwfh","1"),n.hideSettingsInHeader&&Object(O.a)(e,"hsth","1"),n.showAppIconInHeader&&Object(O.a)(e,"sih","1"),n.useNeutralColorInHeader&&Object(O.a)(e,"unh","1"),n.openLinksInNewWindow&&Object(O.a)(e,"onw","1"),n.useDarkTheme&&Object(O.a)(e,"udt","1"),"DocGen"!==n.contentAssemblyMode&&"ContentAssemblyView"!==n.contentAssemblyMode||Object(O.a)(e,"readOnly","1");const o=t.wopi;o&&o.source&&Object(O.a)(e,"wopisrc",encodeURIComponent(o.source));const r=t.bootParams;r&&(r.dataLanguage&&Object(O.a)(e,"rs",encodeURIComponent(r.dataLanguage)),r.readOnly&&Object(O.a)(e,"readonly","1"),r.disableChat&&Object(O.a)(e,"dchat","1"),r.cookieCompliant&&Object(O.a)(e,"mscc","1"),r.isNewFile&&(Object(O.a)(e,"new","1"),r.isFromHostTemplate&&Object(O.a)(e,"wdtpl","fromhost"))),t.user.isLicensed&&Object(O.a)(e,"islicenseduser","1"),t.user.isSynthetic&&Object(O.a)(e,"syn","1"),t.actNavId&&Object(O.a)(e,"actnavid",t.actNavId),t.sessionContext&&Object(O.a)(e,"sc",encodeURIComponent(t.sessionContext));const c=t.wdParams;if(c)for(const t in c)Object(O.a)(e,t,c[t]);const a=t.preseededSession;a&&(a.key&&Object(O.a)(e,"preseededsessionkey",encodeURIComponent(a.key)),a.id&&Object(O.a)(e,"preseededwacsessionid",encodeURIComponent(a.id)));const h=t.throttling;h&&(h.protection&&Object(O.a)(e,"ctp",h.protection),h.request&&Object(O.a)(e,"rct",h.request));const d=t.hostInitDiagnostics;d&&(d.entryPoint&&Object(O.a)(e,"wdorigin",encodeURI(d.entryPoint)),d.userClickTime&&Object(O.a)(e,"wdhostclicktime",d.userClickTime.toString()));const u=t.rebootOverride;return u&&u.previousSessionId&&Object(O.a)(e,"wdprevioussession",u.previousSessionId),Object(O.r)(e,"region"),e}function I(t,e,i){let s={...Object(O.s)(t.appUrl),...S(t),...i};const n=t.rebootOverride;return n&&n.queryOverrides&&(s={...s,...n.queryOverrides}),Object(O.d)(t.appBasePath,e,s)}var _=i(15),T=i(41),C=i(54),y=i(43),A=i(44),E=i(17),P=i(57),U=i(14);const W=(t,e,i,s,o)=>t!==h.a.boot?Promise.reject("Wrong flow"):new Promise(t=>{const a=Object(_.a)();i.state=f.a.Booting,i.pendingReboot=!1,function(t,e,i=!1){if(!t)throw new TypeError("SessionBootParams");const s=t.appUrl,n=t.appBaseUrl;if(!s&&!n)throw new TypeError("Either appUrl or appBaseUrl should exist");if(s&&"string"!=typeof s)throw new TypeError("AppUrl");if(n&&"string"!=typeof n)throw new TypeError("AppBaseUrl");const o=t.file;if(!o||!i&&!o.name)throw new TypeError("FileInfo");const r=t.container;if(!r||!(r instanceof l.a)&&!r.appendChild)throw new TypeError("Container");if(!e&&!u(t.wopi))throw new TypeError("WopiInfo")}(e,i.skipWopiValidation,i.skipFileNameCheck),i.intent=e.intent,i.file=e.file,i.customFontCatalogUrl=e.customFontCatalogUrl,i.wopi=e.wopi,i.contentBundle=e.contentBundle,i.newFileTemplate=e.newFileTemplate,i.ownerId=e.ownerId,i.sessionContext=e.sessionContext,i.actNavId=e.actNavId,i.preseededSession=e.preseededSession,i.throttling=e.throttling,i.meeting=e.meeting,i.tenantId=e.tenantId,i.wdParams=function(t){return function(t,e){const i={};return e&&Object.keys(e).forEach(t=>{i[t.toLowerCase()]=e[t]}),t.split("&").forEach(t=>{if(/^wd\w+=.+/i.test(t)){const e=t.split("=");i[e[0].toLowerCase()]=e[1]}}),i}(window.location.search.substring(1),t)}(e.wdParams),i.pinnedTarget=e.pinnedTarget,i.rebootOverride=e.rebootOverride,i.bootParams=e.bootParams||{},i.hostInitDiagnostics={...e.diagnostics,hostInitializeCallTime:a};let h=!1;const S=i.preseededSession;i.appInfo.usePreseededSessionId&&S&&S.id&&(i.sessionId=S.id,h=!0);let W=!1;const R=e.hostGeneratedSessionId;if(!h&&R&&(i.sessionId=R,W=!0),i.Xi.getValue(U.a.ps,!1)&&Object(T.a)(i.hostInitDiagnostics),e.appUrl){const t=e.appUrl;i.appUrl=t;const s=i.bootParams;if(Object(O.p)(t,"new")&&(s.isNewFile=!0),!s.dataLanguage){const e=Object(O.l)(t,"rs");e&&(s.dataLanguage=e)}const n=i.ui;if(Object(O.p)(t,"uiembed")&&(n.uiEmbed=!0),!n.language){const e=Object(O.l)(t,"ui");e&&(n.language=e)}if(!i.hostInitDiagnostics.entryPoint){const e=Object(O.l)(t,"wdorigin");e&&(i.hostInitDiagnostics.entryPoint=e)}if(!i.host.uiHostName){const e=Object(O.l)(t,"uih");e&&(i.host.uiHostName=e)}}else i.appUrl="";let F;if(i.appBaseUrl=e.appBaseUrl?e.appBaseUrl.toLowerCase():Object(O.i)(e.appUrl).toLowerCase(),i.appBaseUrl=Object(O.v)(i.appBaseUrl,Object(O.k)(i.appUrl,"region")),i.Xi.updateEnvironment(i.appBaseUrl),s.initializeAppContext(i,t,e),i.appBasePath=s.buildAppBasePath(i),e.rebootOverride&&(h||W||([i.sessionId,F]=Object(C.a)()),i.pageStateObserver=new y.a(i.logger,!0),i.authTokenTrustValidator=new A.a(i.logger)),i.logger.ULS.An(38580693,r.a.X,c.a.Info,`User session id: ${i.sessionId}, is preseeded: ${h}, is host generated: ${W}`),i.remoteTelemetryUrl=s.buildRemoteTelemetryUrl(i),Object(p.c)(i.remoteTelemetryUrl,i.appInfo.name,"init"),!i.isLoggerFromOwl){let t=i.Xi.getValue(U.a.fs,"").toString();t||(t=Object(O.f)(i.appBasePath)),i.logger.configure({remoteUlsEndpoint:t,sessionId:i.sessionId})}if(i.Xi.initializePeriodicFetch(i.appBasePath,i.sessionId),F&&i.logger.ULS.An(590966790,r.a.X,c.a.Info,JSON.stringify(F)),Object(T.e)(i),s.onContextReady&&s.onContextReady(i),i.appInitDiagnostics={officeSessionId:i.sessionId,officeBootstrapperVersion:Object(v.a)(),hostName:i.hostName,documentLoadedWithTabSwitch:"hidden"===document.visibilityState},document.addEventListener("visibilitychange",()=>{i.appInitDiagnostics.documentLoadedWithTabSwitch=!0},{once:!0}),!i.container){const t=e.container;i.container=t instanceof l.a?t:i.application.createContainer(t)}i.container.setMessageHandler(i.onMessage);const k=!!s.ignoreCompletionMessage&&s.ignoreCompletionMessage(i),N=(t,e)=>{i.successTime=Object(_.a)(),k||(i.container.postMessage(d.a.xs,void 0),Object(T.b)(i.appInitDiagnostics,e.Diagnostics)),i.Xi.addSettingsChangeListener(i.logger.settingsChangeHandler),s.onSuccess&&s.onSuccess(i,e),i.logger.ULS.An(596448985,r.a.X,c.a.Important,JSON.stringify(i.diagnostics)),Object(p.c)(i.remoteTelemetryUrl,i.application.name,"bootSuccess"),i.logger.ULS.flush(),i.container.postMessage(d.a.Js,{HostInitializeDiagnostics:i.hostInitDiagnostics,ClientDiagnostics:i.clientDiagnostics}),i.state=f.a.Booted,x({completion:"success"}),Object(T.f)(i.appInfo.name,i.logger)},M=(t,e)=>{var n;i.failureTime=Object(_.a)(),s.onFailure&&s.onFailure(i,e.Error),i.logger.ULS.An(596448986,r.a.X,c.a.Error,JSON.stringify({error:e.Error,diagnostics:i.diagnostics})),Object(p.c)(i.remoteTelemetryUrl,i.application.name,"bootFailure"),i.logger.ULS.flush(),i.state=f.a.Failed,x({completion:"failure",error:e.Error,errorSource:"app",documentLoadedWithTabSwitch:null===(n=i.appInitDiagnostics)||void 0===n?void 0:n.documentLoadedWithTabSwitch}),Object(T.f)(i.appInfo.name,i.logger)},x=e=>{k||(i.bootHeartBeat&&i.bootHeartBeat.stop(),i.removeActionHandler(n.a.oe,N),i.removeActionHandler(n.a.se,M)),t(e)};o&&o.subscribe(()=>{var t;x({completion:o.reason||"cancelled",documentLoadedWithTabSwitch:null===(t=i.appInitDiagnostics)||void 0===t?void 0:t.documentLoadedWithTabSwitch})}),k||(i.addActionHandler(n.a.oe,N),i.addActionHandler(n.a.se,M)),function(t){return"wdjs"in t||"wd1js"in t}(i.wdParams)&&("true"!==window.sessionStorage.getItem("sideLoadingIsEnabled")?Object(E.d)("sideLoadingIsEnabled","false",0):Object(E.a)("sideLoadingIsEnabled",!1)||Object(E.d)("sideLoadingIsEnabled","true",1));const D=s.buildBootRequestParams(i),V=I(i,D.appPageName,D.queryParamsOverrides),H=function(t,e){const i=function(t){const e={};Object(O.a)(e,"highdpi",String(window.devicePixelRatio>1.24)),Object(O.a)(e,"softblockedbrowser",String(Object(g.f)())),Object(O.a)(e,"hostname",t.hostName),Object(O.a)(e,"feature_status",Object(w.b)(t.featureManager,t.wdParams)),Object(O.a)(e,"jsapibuild",Object(v.a)());const i=t.wopi;i&&(Object(O.a)(e,"access_token",i.accessToken),Object(O.a)(e,"access_token_ttl",i.expiry.toString()),i.wacToken&&Object(O.a)(e,"wac_token",i.wacToken));const s=t.customFontCatalogUrl;s&&Object(O.a)(e,"customfontcatalogurl",s);const n=t.contentBundle;if(n){if(n.url){Object(O.a)(e,"bundlesrc",n.url);const i=n.staleness,s=null!=i;s&&Object(O.a)(e,b.a.Fo,i.toString()),t.logger.ULS.An(577783775,r.a.X,c.a.Info,"Content bundle staleness: "+(s?i:"N/A"))}n.bundleUrlNoAuth&&Object(O.a)(e,"bundleurlnoauth",n.bundleUrlNoAuth),n.bundleCode&&Object(O.a)(e,"bundlecode",n.bundleCode)}const o=t.file,a=o.name;if(a){Object(O.a)(e,"filename",a);const t=Object(j.a)(a);t&&Object(O.a)(e,"fileextension",t)}o.getUrl&&Object(O.a)(e,"filegeturl",o.getUrl),o.downloadCode&&Object(O.a)(e,"filedownloadcode",o.downloadCode),o.urlNoAuth&&Object(O.a)(e,"fileurlnoauth",o.urlNoAuth),o.size&&Object(O.a)(e,"filesize",o.size.toString()),o.eTag&&Object(O.a)(e,"etag",o.eTag),o.cTag&&Object(O.a)(e,"revid",o.cTag),o.uniqueId&&Object(O.a)(e,"docid",o.uniqueId),void 0!==o.immutableReason&&Object(O.a)(e,"immutableReason",o.immutableReason.toString()),void 0!==o.supportsZipIt&&Object(O.a)(e,"supports_zipit",o.supportsZipIt.toString());const h=t.newFileTemplate;h&&(h.getUrl&&Object(O.a)(e,"templateurl",h.getUrl),h.size&&Object(O.a)(e,"filesize",h.size.toString()),h.eTag&&Object(O.a)(e,"etag",h.eTag),h.uniqueId&&Object(O.a)(e,"docid",h.uniqueId)),t.user.id&&Object(O.a)(e,"user_id",t.user.id),t.ownerId&&Object(O.a)(e,"owner_id",t.ownerId),t.sessionContext&&Object(O.a)(e,"sc",t.sessionContext);const d=t.ui;d.controls&&Object(O.a)(e,"huictrls",JSON.stringify(d.controls)),"Templatization"!==d.contentAssemblyMode&&"DocGen"!==d.contentAssemblyMode&&"ContentAssemblyEdit"!==d.contentAssemblyMode&&"ContentAssemblyView"!==d.contentAssemblyMode||Object(O.a)(e,"caae","1"),d.contentAssemblyMode&&Object(O.a)(e,"caaemode",d.contentAssemblyMode);const u=t.meeting;u&&(u.id&&Object(O.a)(e,"meetingId",u.id),u.title&&Object(O.a)(e,"meetingTitle",u.title),u.type&&Object(O.a)(e,"meetingType",u.type),u.scheduledStartTime&&Object(O.a)(e,"scheduledStartTime",u.scheduledStartTime),u.scheduledEndTime&&Object(O.a)(e,"scheduledEndTime",u.scheduledEndTime),u.isPresenter&&Object(O.a)(e,"isPresenter",u.isPresenter.toString()),u.organizerId&&Object(O.a)(e,"meetingOrganizerId",u.organizerId),u.joinUrl&&Object(O.a)(e,"meetingJoinUrl",encodeURIComponent(u.joinUrl)),u.isMeetingTeamsRoom&&Object(O.a)(e,"isMeetingTeamsRoom",u.isMeetingTeamsRoom.toString()));const l=t.host;l.owlVersion&&Object(O.a)(e,"owlver",l.owlVersion),l.owlRollout&&Object(O.a)(e,"owlro",l.owlRollout);const f=l.capabilities;return f&&(f.supportsInPlaceCreateNew&&Object(O.a)(e,"sipcn",f.supportsInPlaceCreateNew.toString()),f.disableEmbedViewCodeSnippet&&Object(O.a)(e,"devcs","1"),f.disableCoEditInTeams&&Object(O.a)(e,"dceit","1")),e}(t);return Object.keys(e).forEach(t=>{e[t]?i[t]=e[t]:delete i[t]}),i}(i,D.postDataOverrides);if(i.bootstrapperUrl&&i.preconnector&&i.preconnector.shouldPreconnect(i.hostName)&&i.preconnector.preconnect(i.bootstrapperUrl),i.bootstrapperUrl&&i.preloader&&i.preloader.shouldPreload(V,i.host.origin))try{s.beforePreload&&s.beforePreload(i);let t=i.bootstrapperUrl;i.featureManager.isFeatureEnabled(m.a.Rn)&&(i.logger.ULS.An(590966791,r.a.X,c.a.Info,"HTTP2 preload enabled"),t=Object(O.w)(t)),i.preloader.preload(t,i.ui.language,i.logger,i.featureManager)}catch(t){i.logger.ULS.An(590966792,r.a.X,c.a.Error,"Error preloading")}s.beforeContainerBoot&&s.beforeContainerBoot(i,V),i.container.boot(V,H,i.logger,s.buildContainerBootParams(i),()=>{i.appInitDiagnostics.officeFrameCreateTime=Object(_.a)(),i.appBootState="FrameCreated"},()=>{i.appInitDiagnostics.officeFrameLoadTime=Object(_.a)(),i.logger.ULS.An(506012820,r.a.X,c.a.Important,"Frame loaded"),"FrameCreated"===i.appBootState&&(i.appBootState="FrameLoaded",i.bootHeartBeat&&i.bootHeartBeat.setTimeoutStage(i.appBootState))},()=>{i.appInitDiagnostics.officeFrameErrorTime=Object(_.a)(),i.logger.ULS.An(506012819,r.a.X,c.a.Error,"Frame error"),i.bootHeartBeat&&i.bootHeartBeat.setFrameError()}),k?N(n.a.oe,{Diagnostics:{bootSuccessWithoutCompletionMessage:!0}}):(i.bootHeartBeat=new P.a(Object(O.n)(i.appBaseUrl),i.Xi,i.logger,()=>{i.timeoutTime=Object(_.a)(),s.onTimeout&&s.onTimeout(i),Object(p.c)(i.remoteTelemetryUrl,i.application.name,"bootTimeout"),x({completion:"timeout",error:{documentLoadedWithTabSwitch:i.appInitDiagnostics.documentLoadedWithTabSwitch},timeoutStage:i.appBootState}),o&&o.cancel()},o&&s.overrideBootTimeout?Math.min(o.timeoutInMs,s.overrideBootTimeout(i)):o?o.timeoutInMs:s.overrideBootTimeout?s.overrideBootTimeout(i):void 0),s.beforeBootCompletionMessage&&s.beforeBootCompletionMessage(i))}).catch(t=>{throw i.failureTime=Object(_.a)(),s.onException&&s.onException(i,t),i.remoteTelemetryUrl&&Object(p.c)(i.remoteTelemetryUrl,i.application.name,"bootException"),i.bootHeartBeat&&i.bootHeartBeat.stop(),{error:t.toString(),errorStack:t.stack}}),R=(t,e,i)=>new Promise(e=>{i.logger.ULS.An(590111070,r.a.X,c.a.Error,"Unsupported flow: "+t),e({completion:"failure"})});var F=i(62);const k=(t,e,i,s,o)=>t!==h.a.createNew?Promise.reject("Wrong flow"):new Promise(a=>{const l={wopiPendingInitializeTime:Object(_.a)()},p=!!(s&&s.parallelizeStartSessionRequest&&s.buildStartSessionRequestParams)&&s.parallelizeStartSessionRequest(i);let m=!1,w=!1,b=!1,O=!1,v=void 0,j=void 0,S=!1,C=!1;if(Object(g.e)()||s&&s.fallBackToSingleStepBootFlow&&s.fallBackToSingleStepBootFlow(i,e))return void function(){i.logger.ULS.An(578074079,r.a.X,c.a.Info,"Waiting for WOPI info to start boot");const t=(t,n)=>{if(m)i.logger.ULS.An(578074080,r.a.X,c.a.Warning,"completeCreateNew already called");else{if(m=!0,l.wopiPendingCompleteTime=Object(_.a)(),"failure"===n.state)return V(n.reason),i.state=f.a.Failed,void s({completion:"failure"});N(n.newFile),i.run(h.a.boot,{...e,wopi:n.wopi},o).then(t=>{s(t)})}};i.addActionHandler(h.a.completeCreateNew,t);const s=e=>{i.removeActionHandler(h.a.completeCreateNew,t),a(e)};o&&o.subscribe(()=>{s({completion:"cancelled"})})}();const y=(t,e)=>{m?i.logger.ULS.An(587236372,r.a.X,c.a.Warning,"completeCreateNew already called"):(m=!0,l.wopiPendingCompleteTime=Object(_.a)(),"failure"!==e.state?(v=e.wopi,u(v)?(i.wopi=v,i.logger.ULS.An(587286030,r.a.X,c.a.Info,"WOPI info received. Access token: "+JSON.stringify({length:v.accessToken.length,expiry:v.expiry})+", current state: "+JSON.stringify({parallelizeStartSessionRequest:p,wacFrameLoaded:w,wacCanAcceptStartSessionResponse:b})),!p||w&&!b?w&&R():E(),w&&i.container&&i.container.postMessage(d.a.mn,void 0),N(e.newFile)):A("InvalidWopiInfo")):A(e.reason))},A=t=>{V(t),w&&i.container&&i.container.postMessage(d.a.fn,void 0)},E=()=>{i.logger.ULS.An(587233056,r.a.X,c.a.Info,"Making parallelized StartSession request");const e=s.buildStartSessionRequestParams(i,t,v),n=I(i,e.appPageName,e.queryParamsOverrides),o="access_token="+encodeURIComponent(v.accessToken)+"&access_token_ttl="+encodeURIComponent(v.expiry.toString());l.startSessionStartTime=Object(_.a)(),Object(F.a)(n,o,{"Content-Type":"application/x-www-form-urlencoded"},P)},P=t=>{const e=Object(_.a)();l.startSessionCompleteTime=e,i.logger.ULS.An(587233057,r.a.X,c.a.Info,`StartSession request completed. Status code: ${t.status}, time: ${e}`),j={RequestStatus:t.status,ResponseText:t.responseText},w&&b?W():i.logger.ULS.An(587233058,r.a.X,c.a.Info,"StartSession response not yet sent: "+JSON.stringify({wacFrameLoaded:w,wacCanAcceptStartSessionResponse:b,wopiInfoSent:S,startSessionResponseSent:C}))},U=(t,e)=>{l.readyMessageReceiveTime=Object(_.a)(),i.container&&i.container.postMessage(d.a.Fs,void 0),w||(w=!0,b=e.CanAcceptStartSessionComplete,i.logger.ULS.An(587321567,r.a.X,c.a.Info,"App ready: "+JSON.stringify({parallelizeStartSessionRequest:p,wacCanAcceptStartSessionResponse:b,startSessionResponseAvailable:!!j,wopiInfoAvailable:!!v})),m&&i.container&&i.container.postMessage(v?d.a.mn:d.a.fn,void 0),p&&b?W():R(),Object(T.b)(i.appInitDiagnostics,e.Diagnostics))},W=()=>{C||S||!j||(200===j.RequestStatus?(C=!0,l.completeMessageCreateTime=Object(_.a)(),k(d.a.Ds,{StartSessionResponse:j,Diagnostics:l},3)):R())},R=()=>{C||S||!v||(S=!0,l.completeMessageCreateTime=Object(_.a)(),s&&s.sendCreateNewWopiInfo?s.sendCreateNewWopiInfo(i):k(d.a.Vs,{WopiDetails:{WopiSrc:v.source,AccessToken:v.accessToken,AccessTokenTtl:v.expiry.toString()},Diagnostics:l},3))},k=(t,e,s)=>{const n=Object(_.a)();s<=0?i.logger.ULS.An(587233165,r.a.X,c.a.Error,"Attempted to complete but no ack. Time: "+n):(i.logger.ULS.An(587233166,r.a.X,c.a.Info,`Sending complete message. Retries left: ${s-1}, Time: ${n}`),l.completeMessageSendTime=n,i.container&&i.container.postMessage(t,e),window.setTimeout(M,1e3,t,e,s-1))},M=(t,e,s)=>{O||(i.logger.ULS.An(587233167,r.a.X,c.a.Info,"Timeout session complete ack. Retries left: "+s),k(t,e,s))},x=(t,e)=>{O=!0},D=t=>{i.removeActionHandler(h.a.completeCreateNew,y),i.removeActionHandler(n.a.ie,U),i.removeActionHandler(n.a.Ge,x),a(t)};function V(t){i.logger.ULS.An(596444188,r.a.X,c.a.Warning,"Fail with reason: "+(t?JSON.stringify(t):"N/A"))}i.addActionHandler(h.a.completeCreateNew,y),i.addActionHandler(n.a.ie,U),i.addActionHandler(n.a.Ge,x),o&&o.subscribe(()=>{D({completion:"cancelled"})}),i.skipWopiValidation=!0,i.skipFileNameCheck=!0,i.wopi=void 0,i.run(h.a.boot,e,o).then(t=>{i.skipWopiValidation=!1,i.wopi=v,D(t)})});function N(t){t&&(t.path&&history.replaceState({},"",t.path),t.title&&(document.title=t.title))}var M=i(52);const x=(t,e,i,s,o)=>t!==h.a.dispose?Promise.reject("Wrong flow"):new Promise(t=>{i.logger.ULS.An(595714433,r.a.X,c.a.Important,"start disposing the application");const a=i.host.requireExplicitUnload,h={disposeStartTime:Object(_.a)(),forceAppUnload:a};i.state=f.a.Disposing;const u=()=>{i.state=f.a.Disposed,t({completion:"success"})},l=t=>{s&&s.disposeAppSpecificResources&&s.disposeAppSpecificResources(i,e),i.dispose(),h.disposeEndTime=Object(_.a)(),function(t,e,i){if(i){const t=Number(i.hostMessageReceived);e.appUnloadStartTime&&!isNaN(t)&&(e.hostToAppPostMessageLatency=t-e.appUnloadStartTime);const s=Number(i.appMessageSent);!isNaN(s)&&e.appUnloadEndTime&&(e.appToHostPostMessageLatency=e.appUnloadEndTime-s);const n=Number(i.appUnloadStart),o=Number(i.appUnloadEnd);if(isNaN(n)||isNaN(o)||(e.appUnloadLatency=o-n),i.serverTimings){const t=i.serverTimings;for(const i in t)e["st-"+i.toString()]=t[i]}}t.logger.ULS.An(592524822,r.a.X,c.a.Info,"App disposed: "+JSON.stringify(e)),t.logger.ULS.flushOnClose()}(i,h,t),i.container?i.container.dispose(i.pendingReboot,a).then(u):u()};if(a){h.appUnloadStartTime=Object(_.a)();const t=(t,e)=>{h.appUnloadEndTime=Object(_.a)(),l(e)};i.addActionHandler(n.a.Qe,t),(o||new M.a(5e3)).subscribe(()=>{i.state===f.a.Disposing&&(h.appUnloadTimedOut=!0,l())}),i.container&&i.container.postMessage(d.a.bn,void 0)}else l()}),D=(t,e,i,s,a)=>t!==n.a.Ie?Promise.reject("Wrong flow"):new Promise(t=>{if(i.host.capabilities&&i.host.capabilities.frameTrustCheck)i.raiseEvent(o.a.FrameTrust,e);else{const t=!!i.container&&i.container.isTopFrameTrusted;i.logger.ULS.An(592445957,r.a.X,c.a.Info,"Top frame is trusted: "+t),i.container&&i.container.postMessage(d.a.Ie,{isTopFrameTrusted:t})}t({completion:"success"})}),V=(t,e,i,s,r)=>t!==n.a.Te?Promise.reject("Wrong flow"):new Promise(t=>{i.authTokenTrustValidator.isResourceTrustedForMessage(e).then(s=>{s?i.raiseEvent(o.a.GetAuthToken,e):(i.container.postMessage(d.a.sn,{AuthToken:"",Error:"accessDenied",RequestId:e.RequestId,IdentityType:e.IdentityType}),t({completion:"success"}))},s=>{i.container.postMessage(d.a.sn,{AuthToken:"",Error:"Exception encountered in AuthTokenTrustValidator.isResourceTrustedForMessage",RequestId:e.RequestId,IdentityType:e.IdentityType}),t({completion:"failure",error:s})})});var H=i(60);const B=(t,e,i,s,o)=>t!==n.a.ne?Promise.reject("Wrong flow"):new Promise(t=>{const n=e&&e.state?e.state:"Unknown";i.logger.ULS.An(592839750,r.a.X,c.a.Info,`Boot state: [${n}]`),n!==i.appBootState&&(i.appBootState=n,i.bootHeartBeat&&i.bootHeartBeat.setTimeoutStage(n)),s&&s.beforeComplete&&s.beforeComplete(n),t({completion:"success"})}),L=(t,e,i,s,o)=>{if(t!==h.a.postWacToken)return Promise.reject("Wrong flow");const a=Object(_.b)();return i.logger.ULS.An(507774685,r.a.X,c.a.Important,"postWacToken flow initiated"),new Promise(t=>{const s=(t,e)=>{i.logger.ULS.An(507597017,r.a.X,c.a.Info,`postWacToken flow completed in ${Object(_.b)()-a} ms`),window.clearInterval(u),window.clearTimeout(l);const s={completion:"success"};e&&void 0!==e.TokenAlreadySet&&(s.data={TokenAlreadySet:e.TokenAlreadySet}),o(s)},o=e=>{i.removeActionHandler(n.a.Ji,s),t(e)},h=()=>{var t;return null===(t=i.container)||void 0===t?void 0:t.postMessage(d.a.yn,e)};i.addActionHandler(n.a.Ji,s),h();const u=window.setInterval(h,100),l=window.setTimeout(()=>{window.clearInterval(u),i.logger.ULS.An(507844190,r.a.X,c.a.Warning,"postWacToken flow timed out after 60000 milliseconds"),o({completion:"timeout"})},6e4)})},$=(t,e,i,s,o)=>t!==h.a.rename?Promise.reject("Wrong flow"):new Promise(t=>{const s=(t,i)=>{const s={completion:i.NewName===e.NewName?"success":"failure"};c(s)},r=(t,e)=>{c({completion:"failure"})},c=e=>{i.removeActionHandler(n.a.ge,s),i.removeActionHandler(n.a.ve,r),t(e)};i.addActionHandler(n.a.ge,s),i.addActionHandler(n.a.ve,r),(o||new M.a(5e3)).subscribe(()=>{c({completion:"cancelled"})}),i.container&&i.container.postMessage(d.a.en,e)});var J=i(59),G=i(58),z=i(61);const q=(t,e,i,s,o)=>t!==h.a.switchMode?Promise.reject("Wrong flow"):new Promise(t=>{const s=(t,e)=>{r({completion:"success"})},r=e=>{i.removeActionHandler(n.a.Ue,s),t(e)};i.addActionHandler(n.a.Ue,s),(o||new M.a(5e3)).subscribe(()=>{r({completion:"cancelled"})}),i.container&&i.container.postMessage(d.a.wn,e)});function K(t){const e=t.appContext;e.canSupportConsumption=!1,e.isUnifiedRead=!1}var Z=i(3);function X(t){let e=t.appBaseUrl.indexOf(Z.i)>-1;const i=t.rebootOverride;if(i){let s=i.mode;s&&(s=s.toLowerCase(),"view"===s&&e?t.appBaseUrl=Object(Z.d)(t.appBaseUrl):"edit"!==s||e||(t.appBaseUrl=Object(Z.e)(t.appBaseUrl)))}else{const i=!(!t.ui||!t.ui.uiEmbed),s=i&&!(!t.bootParams||!t.bootParams.readOnly),n=Object(O.p)(t.appUrl,"embed"),a=!(!t.wdParams||"1"!==t.wdParams.wdembedfs),h=!(!t.bootParams||!t.bootParams.isNewFile||t.wopi),d=!(!t.file||"docx"!==Object(j.a)(t.file.name)),u=!n&&(h||d)&&!i&&!a;t.appContext.canSupportConsumption=!!u;const l=t.Xi.getValue(U.a.us,!1);if(l&&u&&!e)t.appBaseUrl=Object(Z.e)(t.appBaseUrl),t.appContext.isUnifiedRead=!0,t.logger.ULS.An(559285716,r.a.X,c.a.Info,"Redirecting Viewer request to unified read");else{if(!e){const e={canSupportConsumption:{canSupportConsumptionValue:u,isEmbedActionApplicationUrl:n,isUiEmbed:i,isUiEmbedReadOnly:s,isEmbeddedFullScreen:a,isCreateNewWithoutWopiInfo:h,isFileDocx:d},consumptionSettingValue:l};t.logger.ULS.An(505996416,r.a.X,c.a.Info,"Consumption redirection will not happen. DebugInfo: "+JSON.stringify(e))}e&&!s||t.raiseEvent(o.a.ModeSwitched,{NewMode:"view"}),e&&s&&(t.appBaseUrl=Object(Z.d)(t.appBaseUrl))}}return e=t.appBaseUrl.indexOf(Z.i)>-1,t.appBaseUrl+(e?Z.f:Z.j)}function Q(t){return Object(O.e)(t.appBasePath,t.sessionId)}function Y(t){if(t.Xi.getValue(U.a.Is,!1))try{var e;if(t.hostInitDiagnostics&&t.hostInitDiagnostics.hostPageNavigationType&&window&&window.localStorage)if(null!==(e=t.file)&&void 0!==e&&e.uniqueId){const e="sessionRefresh_"+t.file.uniqueId;switch(t.hostInitDiagnostics.hostPageNavigationType){case"RELOAD":const i=window.localStorage.getItem(e);null!=i&&(t.logger.ULS.An(507352900,r.a.X,c.a.Warning,"sessionRefreshDiagnostics: "+i),window.localStorage.removeItem(e));const s={previousSessionId:t.sessionId,navigationType:t.hostInitDiagnostics.hostPageNavigationType};window.localStorage.setItem(e,JSON.stringify(s));break;default:window.localStorage.removeItem(e);const n={previousSessionId:t.sessionId,navigationType:t.hostInitDiagnostics.hostPageNavigationType};window.localStorage.setItem(e,JSON.stringify(n))}}else t.logger.ULS.An(507274849,r.a.X,c.a.Warning,"No fileId provided");else t.logger.ULS.An(507274848,r.a.X,c.a.Warning,"hostPageNavigationType not available")}catch(e){t.logger.ULS.An(507340190,r.a.X,c.a.Warning,"Error Thrown during logSessionRefreshDiagnostics with error "+e)}}function tt(t,e,i){const s=t.appBasePath.indexOf(Z.i)>-1,n=s?e===h.a.createNew?Z.h:Z.g:Z.k,o={},r=t.viewMode;r&&(r.hideToolbar&&Object(O.a)(o,s?"hvt":"core","1"),r.hideBreadCrumb&&Object(O.a)(o,"hbcv","1"),r.hideTitle&&Object(O.a)(o,"htv","1"),r.disableFocusOnBoot&&Object(O.a)(o,"disablefocusonboot","1"),r.forceAccessibilityMode&&!r.hideToolbar&&Object(O.a)(o,"wdaccpdf","1"));const c=t.ui;c&&c.inAppDocPreview&&Object(O.a)(o,"inappdocpreview","1");const a=t.wopi,d=t.bootParams;return s&&(a?(t.appContext.canSupportConsumption&&Object(O.a)(o,"csc","1"),d&&d.isNewFile||(t.appContext.isUnifiedRead?(Object(O.a)(o,"cons","1"),Object(O.a)(o,"readonly","1")):Object(O.a)(o,"instantedit","1"),Object(O.a)(o,"wopicomplete","1"))):(Object(O.a)(o,"instantedit","1"),Object(O.a)(o,"filesrc",encodeURIComponent(t.hostName)),Object(O.a)(o,"pmorigin",encodeURIComponent(Object(O.i)(window.location.href)))),e===h.a.createNew&&(Object(O.r)(o,"newsession"),Object(O.a)(o,"build",encodeURIComponent(Object(v.a)())),Object(O.a)(o,"wacusertype","WOPI"),t.file.getUrl&&Object(O.a)(o,"filegeturlpresent","1"),i&&Object(O.a)(o,"wopisrc",encodeURIComponent(i.source)))),a&&Object(O.a)(o,"wdredirectionreason",function(t,e,i,s){return t?"Unified_SingleFlush":e?"Unified_IrmEnabled":i&&s?"Unified_UiEmbedReadOnly":"Unified_ViewActionUrl"}(s,!(!d||!d.irmEnabled),!(!c||!c.uiEmbed),!(!d||!d.readOnly))),{appPageName:n,queryParamsOverrides:o,postDataOverrides:{}}}function et(t,e,i,s,n){if(!t.Xi.getValue(U.a.js,!1))return;const o=function(t,e,i,s,n){var o,r;const c=function(t){var e,i,s,n,o,r,c,a,h,d,u;const l=Object(Z.a)(t);let f=Object(T.d)(t.hostName)||null!==(e=t.wopi)&&void 0!==e&&e.source&&Object(T.d)(null===(i=t.wopi)||void 0===i?void 0:i.source)?"SharePoint Online":null!==(s=t.wopi)&&void 0!==s&&s.source&&function(t){return/\.microsoftpersonalcontent(ppe)?\./i.test(t)}(null===(n=t.wopi)||void 0===n?void 0:n.source)?"SharePoint Online Consumer":t.host.storageHostName;return"OneDrive"===f&&(f="OneDriveWOPI"),{a:t.appInfo.name||"Unknown",b:t.ui.language||"Unknown",c:l.AppMode||"Unknown",d:l.AppModeExtended||"Unknown",e:"",f:t.clientDiagnostics.browser||"Unknown",g:"",h:"",i:"",j:"",k:(null===(o=t.appInitDiagnostics)||void 0===o?void 0:o.officeAppEndpoint)||"Unknown",l:"",m:"",n:f||"Unknown",o:!1,p:t.user.isLicensed||!1,q:!1,r:t.user.isSynthetic||!1,s:t.ownerId||t.user.id||"Unknown",t:t.tenantId||"Unknown",u:(null!==(r=null===(c=t.wdParams)||void 0===c||null===(c=c.wdjs)||void 0===c?void 0:c.length)&&void 0!==r?r:0)>0?"-5":"",v:"",w:t.sessionId||"Unknown",x:(null===(a=t.hostInitDiagnostics)||void 0===a?void 0:a.entryPoint)||"Unknown",y:t.tenantId||"Unknown",z:t.host.uiHostName||"Unknown",aa:(null===(h=t.appInitDiagnostics)||void 0===h?void 0:h.officeServerVersion)||"Unknown",ab:null!==(d=t.file)&&void 0!==d&&d.name?Object(j.a)(null===(u=t.file)||void 0===u?void 0:u.name):"Unknown",ac:t.host.uiHostIntegrationType||"Unknown",ad:"",ae:!1,af:t.clientDiagnostics.netDownlink,ag:t.clientDiagnostics.netDownlinkMax,ah:t.clientDiagnostics.netEffectiveType||"Unknown",ai:t.clientDiagnostics.netRtt,aj:t.clientDiagnostics.netSaveData,ak:t.clientDiagnostics.netType||"Unknown",al:""}}(t),a=function(t,e,i,s,n,o,r,c){const a={AreaName:"Boot",FeatureName:"JSAPI",SkipAria:"True"};return o&&!isNaN(Number(o))&&(a.BsqmErrorCode=o),{n:"Boot",e:s,t:nt.FailureBased,a:!0,f:"wordwebsxfc",k:o?{n:o}:void 0,p:{...a,...r},d:c?Math.round(c):void 0}}(0,0,0,e,0,i,s,n),h={},d=t.appBaseUrl?null===(o=Object(O.m)(t.appBaseUrl))||void 0===o?void 0:o.toUpperCase():void 0;d&&(h.ComplianceRegion=d);const u=function(t){if(!t)return;const e=it.exec(t);return e&&e.length>1?e[1]:void 0}(null===(r=t.wopi)||void 0===r?void 0:r.source);return u&&(h.HostDatacenterHint=u),{d:c,k:[a],a:h}}(t,e,i,s,n);Object(p.b)(t.remoteTelemetryUrl,p.a.H_V2,o)}const it=new RegExp("^[a-z+.-]+://([^/:]*(:[0-9]{1,5})?)","i");var st,nt;function ot(t){let e=0;try{const t=Object.keys(window.localStorage).filter(t=>t.startsWith("sessionRefresh_"));if(t.length>0)for(let i=0;i<t.length;i++){const s=t[i];window.localStorage.removeItem(s),e++}}catch(e){t.logger.ULS.An(506819588,r.a.X,c.a.Warning,"Error Thrown during deleteAllSessionRefreshEntries with error "+e)}return e}let rt,ct;function at(t){var e,i;const s=null!==(e=t.hostInitDiagnostics)&&void 0!==e&&e.hostInitializeCallTime?t.successTime-(null===(i=t.hostInitDiagnostics)||void 0===i?void 0:i.hostInitializeCallTime):0;et(t,st.Success,void 0,void 0,s);const n=t.Xi.getValue(U.a.Is,!1),o=t.Xi.getValue(U.a.Us,!1);if(n&&function(t,e){try{var i;if(function(t){const e=864e5*t.Xi.getValue(U.a.Ws,30);let i=0;try{const s=window.localStorage.getItem("refreshTelemExpiry");null!=s?Date.now()-parseInt(s,10)>=e&&(i=ot(t),window.localStorage.setItem("refreshTelemExpiry",Date.now().toString())):window.localStorage.setItem("refreshTelemExpiry",Date.now().toString())}catch(e){t.logger.ULS.An(506819589,r.a.X,c.a.Warning,"Error Thrown during checkSessionRefreshExpiry with error "+e)}}(t),window.localStorage&&null!==(i=t.file)&&void 0!==i&&i.uniqueId){var s;const i="sessionRefresh_"+(null===(s=t.file)||void 0===s?void 0:s.uniqueId),n=window.localStorage.getItem(i);if(n){const t=JSON.parse(n);t.success=e,window.localStorage.setItem(i,JSON.stringify(t))}}}catch(e){t.logger.ULS.An(506855459,r.a.X,c.a.Warning,"Error Thrown during markSessionAsSuccesful with error "+e)}}(t,s),o&&(ot(t),function(t){try{window.localStorage.removeItem("refreshTelemExpiry")}catch(e){t.logger.ULS.An(506819587,r.a.X,c.a.Warning,"Error Thrown during deleteRefreshTelemExpiryEntry with error "+e)}}(t)),ht(),!ct)return;t.container&&t.container.postMessage(d.a.Ls,{HostCacheLoadTime:ct});const a=t.appInitDiagnostics;a.documentLoadedTime?ct<a.documentLoadedTime?(a.documentLoadedTime=ct,a.documentLoadedFromWopiPrecheckInfo=!0,t.logger.ULS.An(577843782,r.a.X,c.a.Info,"First page loaded from cache was faster")):a.documentLoadedFromWopiPrecheckInfo=!1:a.documentLoadedTime=ct}function ht(){rt&&rt.parentElement&&rt.parentElement.removeChild(rt)}function dt(t,e){!function(t,e){const i={storageHost:t.host.storageHostName||"",uiHost:t.host.uiHostName||Object(O.k)(e,"uih"),wdOrigin:t.hostInitDiagnostics.entryPoint||Object(O.k)(e,"wdorigin")};t.logger.ULS.An(561629318,r.a.X,c.a.Info,JSON.stringify(i))}(t,e),function(t){if(t.appBaseUrl.indexOf(Z.i)>-1)return;t.logger.ULS.An(577843778,r.a.X,c.a.Info,"Boot Word viewer");const e=window.navigator.userAgent;if(e.indexOf("Mobi")>=0&&e.indexOf("iPad")<0)return;const i=t.rebootOverride;if(i&&i.reason&&"translate"===i.reason.toLowerCase())return;const s=t.viewMode;if(s&&s.forceAccessibilityMode)return;const n=t.contentBundle;if(!n||!n.url)return;const o=t.container;if(!o)return;const a=o.element,h=a.ownerDocument;if(!h)return;t.logger.ULS.An(577843779,r.a.X,c.a.Info,"Kick off first page optimization"),rt=h.createElement("div"),rt.id="FirstPageContainer",rt.style.top=s&&s.hideToolbar?"0":"90px",rt.style.left="0",rt.style.textAlign="center",rt.style.width="1px",rt.style.bottom="0",rt.style.zIndex="900",rt.style.height="1px",rt.style.position="absolute",rt.style.padding="0 29px",rt.style.right="0",rt.style.overflow="auto",rt.style.marginLeft="auto",rt.style.marginRight="auto",rt.style.maxWidth="100%",a.appendChild(rt);const d=h.createElement("img");d.id="FirstPageImage",d.style.marginTop="11px",d.style.marginBottom="11px",d.style.maxWidth="100%",d.style.border="solid 1px #d2d5d8",d.draggable=!1,d.onload=()=>{t.logger.ULS.An(577843780,r.a.X,c.a.Info,"First page optimization loaded"),rt.style.width="",rt.style.height="",ct=Object(_.a)()},d.onerror=e=>{ht(),t.logger.ULS.An(577843781,r.a.X,c.a.Warning,"Cannot load first page from cache"),t.appInitDiagnostics.errorObject={errorType:"CannotLoadFirstPage",errorObject:"string"==typeof e?e:e.returnValue}},d.src=n.url.replace("{0}","p1.img"),rt.appendChild(d)}(t),et(t,st.Usage)}function ut(t){let e=t.appBaseUrl;const i=t.appBasePath.indexOf(Z.i)>-1,s=Object(g.c)()===g.a.Firefox&&"OneDrive"===t.hostName&&t.host.origin&&"https://onedrive.live.com"===t.host.origin.toLowerCase();return i&&s&&(e+=" "+(t.host.origin&&t.host.origin.toLowerCase())),{permissionsPolicy:`microphone ${e}; autoplay ${t.appBaseUrl}; camera ${t.appBaseUrl}; clipboard-read ${t.appBaseUrl}; clipboard-write ${t.appBaseUrl}; keyboard-map ${t.appBaseUrl}; display-capture ${t.appBaseUrl}`}}function lt(t){return!(!t||void 0===t.indexOf||!(t.indexOf("Failed to load resource")>-1||t.indexOf("Resource failed to load")>-1))}function ft(t,e){var i,s;const n={WacFailed:"True"};e.errorObject&&(n.ErrorObject=Object(j.b)(e.errorObject));const o=null!==(i=t.hostInitDiagnostics)&&void 0!==i&&i.hostInitializeCallTime?t.failureTime-(null===(s=t.hostInitDiagnostics)||void 0===s?void 0:s.hostInitializeCallTime):0;let a=function(t){const e=t;let i="JsApiUnknownError";return void 0!==t.errorObject&&null!==t.errorObject&&void 0!==t.errorObject.errorCode?i=t.errorObject.errorCode:e.errorCode?i=e.errorCode:void 0!==t.errorObject&&null!==t.errorObject&&void 0!==t.errorObject.errorType?i=t.errorObject.errorType:t.errorType?i=lt(t.errorObject)?"JsApiResourceLoadError":t.errorType:lt(e)&&(i="JsApiResourceLoadError"),i}(e);et(t,st.Failure,a,n,o),t.Xi.getValue(U.a.Is,!1)&&function(t,e){try{var i;if(window.localStorage&&null!==(i=t.file)&&void 0!==i&&i.uniqueId){var s;const i="sessionRefresh_"+(null===(s=t.file)||void 0===s?void 0:s.uniqueId),n=window.localStorage.getItem(i);if(n){const t=JSON.parse(n);t.failureInfo=e,window.localStorage.setItem(i,JSON.stringify(t))}}}catch(e){t.logger.ULS.An(507340189,r.a.X,c.a.Warning,"Error Thrown during logSessionRefreshFailure with error "+e)}}(t,a)}function pt(t){var e;const i=null!==(e=t.hostInitDiagnostics)&&void 0!==e&&e.hostInitializeCallTime?t.timeoutTime-t.hostInitDiagnostics.hostInitializeCallTime:0;et(t,st.Failure,"JsApiTimeout",{TimeoutTime:i},i),t.Xi.getValue(U.a.Is,!1)&&function(t,e){try{var i;if(window.localStorage&&null!==(i=t.file)&&void 0!==i&&i.uniqueId){var s;const i="sessionRefresh_"+(null===(s=t.file)||void 0===s?void 0:s.uniqueId),n=window.localStorage.getItem(i);if(n){const t=JSON.parse(n);t.timeout=e,window.localStorage.setItem(i,JSON.stringify(t))}}}catch(e){t.logger.ULS.An(507274847,r.a.X,c.a.Warning,"Error Thrown during logSessionTimeout with error "+e)}}(t,i)}function mt(t,e){var i,s;const n=e instanceof Error?e.name:"JsApiException",o={ErrorObject:Object(j.b)(e)};e instanceof Error&&(o.ErrorMessage=e.message);const r=null!==(i=t.hostInitDiagnostics)&&void 0!==i&&i.hostInitializeCallTime?t.failureTime-(null===(s=t.hostInitDiagnostics)||void 0===s?void 0:s.hostInitializeCallTime):0;et(t,st.Failure,n,o,r)}function wt(){return!0}!function(t){t[t.Failure=0]="Failure",t[t.ImpliedUsageFailure=1]="ImpliedUsageFailure",t[t.ImpliedUsageSuccess=2]="ImpliedUsageSuccess",t[t.Success=3]="Success",t[t.Usage=4]="Usage"}(st||(st={})),function(t){t[t.FailureBased=0]="FailureBased",t[t.SuccessBased=1]="SuccessBased"}(nt||(nt={}));const bt=()=>[{[s.a.appReboot]:a,[s.a.boot]:W,[s.a.closeTab]:R,[s.a.createNew]:k,[s.a.dispose]:x,[s.a.frameTrust]:D,[s.a.getAuthToken]:V,[s.a.getHostKeyValue]:H.a,[s.a.handleBootState]:B,[s.a.postWacToken]:L,[s.a.rename]:$,[s.a.setOverlayContent]:J.a,[s.a.setWacFlightValue]:G.a,[s.a.storeHostKeyValue]:z.a,[s.a.switchMode]:q,[s.a.updateBootComplete]:R},{[s.a.boot]:{initializeAppContext:K,buildAppBasePath:X,buildRemoteTelemetryUrl:Q,onContextReady:Y,buildBootRequestParams:tt,beforeContainerBoot:dt,buildContainerBootParams:ut,onSuccess:at,onFailure:ft,onTimeout:pt,onException:mt},[s.a.createNew]:{parallelizeStartSessionRequest:wt,buildStartSessionRequestParams:tt}}]},function(t,e,i){"use strict";function s(t,e,i){if(!e)return;const s=window.navigator;if(s&&s.sendBeacon)try{return void s.sendBeacon(e,t)}catch{}!function(t,e,i){const s=new XMLHttpRequest;s.readyState!==XMLHttpRequest.UNSENT&&s.readyState!==XMLHttpRequest.DONE||(s.open("POST",e,i),s.send(t))}(t,e,i)}i.d(e,"a",(function(){return s}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));class s{add(t){t&&this.ia.push(t)}remove(t){if(!t)return;const e=this.ia.indexOf(t);e>-1&&this.ia.splice(e,1)}removeAll(){this.ia=[]}dispatch(t,e){this.ia.forEach(i=>{try{i(t)}catch(t){e&&e(t)}})}constructor(){this.ia=[]}}},function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t.blurFocus="blurFocus",t.boot="boot",t.completeCreateNew="completeCreateNew",t.continueAccessibilityLoop="continueAccessibilityLoop",t.createNew="createNew",t.dispose="dispose",t.grabFocus="grabFocus",t.moveToFolder="moveToFolder",t.popState="popState",t.sendChannelId="sendChannelId",t.sendConvId="sendConvId",t.teamsUsersReply="teamsUsersReply",t.teamsUserMentionReply="teamsUserMentionReply",t.backButtonPressed="backButtonPressed",t.getClientUrl="getClientUrl",t.getWebUrl="getWebUrl",t.rename="rename",t.completeSharedFilePicker="completeSharedFilePicker",t.sendAccessToken="sendAccessToken",t.sendAuthToken="sendAuthToken",t.sendCustomAuthConfig="sendCustomAuthConfig",t.sendEmbeddedViewUrl="sendEmbeddedViewUrl",t.sendFrameTrustResult="sendFrameTrustResult",t.sendHWRTelemetry="sendHWRTelemetry",t.sendSessionInfo="sendSessionInfo",t.sendUserAccessAndPermissions="sendUserAccessAndPermissions",t.sendWopiInfo="sendWopiInfo",t.sendDavUrl="sendDavUrl",t.switchMode="switchMode",t.signalShared="signalShared",t.postWacToken="postWacToken"}(s||(s={}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return d}));var s=i(0),n=i(1),o=i(14),r=i(8),c=i(38),a=i(5),h=i(18);class d{updateEnvironment(t){this.sa=(Object(a.n)(t)?"FF":"Prod")+this.na+"Settings",this.oa()}initializePeriodicFetch(t,e){this.sa=(Object(a.n)(t)?"FF":"Prod")+this.na+"Settings",this.oa(),this.ra=t+a.c+"?app="+this.na+"&usid="+e+"&build="+Object(h.a)(),this.ca||(this.ca=window.setTimeout(this.ha,3e4))}getValue(t,e){if(this.da||this.oa(),!this.da||!this.da.hasOwnProperty(t))return e;const i=this.da[t],s=typeof e;if(typeof i===s)return i;if("string"==typeof i){if("number"===s)return parseInt(i,10);if("boolean"===s)return"true"===i}return e}addSettingsChangeListener(t){this.ua.add(t)}removeSettingsChangeListener(t){this.ua.remove(t)}dispose(){this.ca&&window.clearTimeout(this.ca),this.la&&self.cancelIdleCallback(this.la),this.ca=void 0,this.la=void 0,this.da=void 0,this.ua.removeAll()}constructor(t,e){this.fa=0,this.oa=()=>{try{if(!window||!window.localStorage)return;const t=window.localStorage.getItem(this.sa);if(!t)return;const e=JSON.parse(t);this.pa(e)}catch(t){this.Yn.ULS.An(592836768,s.a.X,n.a.Warning,"Failed to get settings from localStorage: "+Object(r.b)(t))}},this.pa=t=>!!this.ma(t)&&(this.da=t,this.ua.dispatch({Xi:this},t=>{this.Yn.ULS.An(592836769,s.a.X,n.a.Error,"Settings listener error: "+Object(r.b)(t))}),!0),this.ma=t=>{if(t&&"object"==typeof t){if(t.hasOwnProperty(o.a.cs)&&!isNaN(t.timestamp))return!0;this.Yn.ULS.An(592836770,s.a.X,n.a.Error,"Received invalid settings")}return!1},this.ha=()=>{if(!this.ra)return;const t=new XMLHttpRequest;window.location.href.indexOf("wdnetcorerouting=true")>-1?t.setRequestHeader("X-NetCoreRouting","true"):window.location.href.indexOf("wdnetcorerouting=false")>-1&&t.setRequestHeader("X-NetCoreRouting","false"),t.open("GET",this.ra),t.responseType="json",t.timeout=5e3,t.send(),t.onload=()=>{if(200===t.status&&t.response?(this.wa(t.response),this.fa=0):(this.Yn.ULS.An(592836771,s.a.X,n.a.Error,`Fetch settings error. Status: ${t.status}, curErrors: ${this.fa}`),this.fa+=1),this.fa>7)return;let e=this.getValue(o.a.os,3e5);this.fa>3&&(e+=(this.fa-3+1)*(e/2)),this.ca=window.setTimeout(this.ha,e)}},this.wa=t=>{"requestIdleCallback"in window?(this.la&&self.cancelIdleCallback(this.la),this.la=window.requestIdleCallback(()=>this.ba(t),{timeout:1e4})):window.setTimeout(()=>this.ba(t),0)},this.ba=t=>{if(!this.pa(t)||!window||!window.localStorage)return;const e=JSON.stringify(t);try{window.localStorage.setItem(this.sa,e)}catch(t){this.Yn.ULS.An(592836800,s.a.X,n.a.Warning,"Failed to set localStorage: "+Object(r.b)(t))}},this.na=t,this.sa="Prod"+t+"Settings",this.Yn=e,this.ua=new c.a,this.oa()}}},function(t,e,i){"use strict";i.d(e,"b",(function(){return d})),i.d(e,"f",(function(){return u})),i.d(e,"c",(function(){return f})),i.d(e,"e",(function(){return p})),i.d(e,"d",(function(){return m})),i.d(e,"a",(function(){return w}));var s,n=i(0),o=i(1),r=i(9),c=i(18),a=(i(15),i(8)),h=i(5);function d(t,e){e&&Object.keys(e).forEach(i=>{t[i]=e[i]})}function u(t,e){try{if(void 0===window.performance)return void e.ULS.An(595948609,n.a.X,o.a.Info,"Performance not supported");const i=window.performance.getEntriesByType("resource");if(void 0===i||i.length<=0)return void e.ULS.An(595948610,n.a.X,o.a.Info,"No resources under performance");const s=new RegExp(t+"(-boot\\.min|(\\.(app|preview))?\\.boot)(\\.[0-9a-f]{20})?\\.js","i");for(let t=i.length-1;t>=0;t-=1){const r=i[t],c=r.name.match(s);if(c){let t=JSON.stringify(r);return t=t.replace(new RegExp(r.name,"g"),c[0]),void e.ULS.An(595948616,n.a.X,o.a.Info,t)}}e.ULS.An(595948484,n.a.X,o.a.Info,"Could not find JSAPI resource timing entry")}catch(t){e.ULS.An(595948617,n.a.X,o.a.Info,"Could not trace the resource timing: "+Object(a.b)(t))}}function l(t){var e,i;const s={...t.host,sessionId:t.hostSessionId,domain:location?location.host:void 0};delete s.siteId,delete s.webId,delete s.uiHostTabId;const n={};if(t.wdParams){const e=JSON.parse(JSON.stringify(t.wdParams).toLowerCase());["wdorigin","wdpreviouscorrelation","wdprevioussession","wdtf"].forEach(t=>{e[t]&&(n[t]=e[t])});const i=/^\w{8}(-|%2d)\w{4}(-|%2d)\w{4}(-|%2d)\w{4}(-|%2d)\w{12}$/i;n.wdprevioussession&&!i.test(n.wdprevioussession)&&delete n.wdprevioussession,n.wdpreviouscorrelation&&!i.test(n.wdpreviouscorrelation)&&delete n.wdpreviouscorrelation}const o={...t.rebootOverride};delete o.ackExpected,delete o["ui-language"],delete o.wdUserSession,delete o.rebootMode,delete o.documentUrl;const r=t.wopi;return{accessToken:r?{length:r.accessToken.length,expiry:r.expiry}:"N/A",wacToken:r&&r.wacToken?{length:r.wacToken.length}:void 0,bootParams:t.bootParams,build:Object(c.a)(),host:s,intent:t.intent,jsApiVersion:"v2",rebootOverride:o,region:Object(h.m)(t.appBaseUrl),sessionOrigin:t.hostInitDiagnostics?t.hostInitDiagnostics.entryPoint:void 0,sessionContext:t.sessionContext,throttling:t.throttling,ui:t.ui,viewMode:t.viewMode,meeting:t.meeting?{id:null===(e=t.meeting)||void 0===e?void 0:e.id,isPresenter:null===(i=t.meeting)||void 0===i?void 0:i.isPresenter}:void 0,wdParams:n}}function f(){const t={perfNowSupported:!0,browser:r.a[Object(r.c)()],touchMode:Object(r.g)(),highContrast:Object(r.d)(),windows10x:Object(r.h)()};try{const e=window.navigator,i=e.connection||e.mozConnection||e.webkitConnection;i&&(t.netOnline=e.onLine,t.netDownlink=i.downlink,t.netDownlinkMax=i.downlinkMax,t.netEffectiveType=i.effectiveType,t.netRtt=i.rtt,t.netSaveData=i.saveData,t.netType=i.type),t.deviceMemory=e.deviceMemory,t.logicalProcessors=e.hardwareConcurrency}catch{}return t}function p(t){try{const e=t.hostInitDiagnostics;t.logger.ULS.An(558155803,n.a.X,o.a.Info,"HostInitDiagnostics: "+(e?JSON.stringify(e):"N/A")),t.logger.ULS.An(596444237,n.a.X,o.a.Important,JSON.stringify({session:l(t),client:t.clientDiagnostics}))}catch(e){t.logger.ULS.An(558155804,n.a.X,o.a.Error,"Failed to log init info: "+Object(a.b)(e))}}function m(t){return/sharepoint/i.test(t)}function w(t){const e=window.performance.timing;e&&(t.hostPageNavigationStartTime||(t.hostPageNavigationStartTime=e.navigationStart),t.hostPageFetchStartTime||(t.hostPageFetchStartTime=e.fetchStart),t.hostPageRequestStartTime||(t.hostPageRequestStartTime=e.requestStart),t.hostPageResponseStartTime||(t.hostPageResponseStartTime=e.responseStart),t.hostPageResponseEndTime||(t.hostPageResponseEndTime=e.responseEnd),t.hostPageDomCompleteTime||(t.hostPageDomCompleteTime=e.domComplete));const i=window.performance.navigation;if(i&&(void 0===t.hostPageRedirectCount&&(t.hostPageRedirectCount=i.redirectCount),!t.hostPageNavigationType)){let e="UNKNOWN";switch(i.type){case 0:e="NAVIGATE";break;case 1:e="RELOAD";break;case 2:e="BACK_FORWARD";break;case 255:e="RESERVED"}t.hostPageNavigationType=e}}!function(t){t[t.Unknown=0]="Unknown",t[t.Normal=1]="Normal",t[t.Minor=2]="Minor",t[t.Medium=3]="Medium",t[t.Major=4]="Major",t[t.Critical=5]="Critical"}(s||(s={}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return c})),i.d(e,"b",(function(){return a}));var s=i(0),n=i(1),o=i(8),r=i(20);function c(t,e){return{isFeatureEnabled:i=>function(t,e,i){if(e)try{return e(t)}catch(t){i&&i.ULS.An(594883024,s.a.X,n.a.Error,"IsFeatureEnabled callback error: "+Object(o.b)(t))}}(i,t,e)}}function a(t,e){const i={};if(Object.keys(r.a).forEach(e=>{const s=t.isFeatureEnabled(r.a[e]);void 0!==s&&(i[r.a[e]]=s?"1":"0")}),e&&e.wdFlights){const t=e.wdFlights.toLowerCase();for(const e of t.split(","))"et-treatment"!==e&&"et-control"!==e||(i[r.a.En]="et-treatment"===e?"1":"0")}return JSON.stringify(i)}},function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var s=i(0),n=i(1);class o{dispose(){window.removeEventListener("beforeunload",this.Oa,{capture:!0}),window.removeEventListener("pagehide",this.ga,{capture:!0}),window.removeEventListener("visibilitychange",this.va,{capture:!0}),window.removeEventListener("unload",this.ja,{capture:!0})}constructor(t,e){this.Oa=()=>r(t,"OnBeforeUnload",e),this.ga=()=>r(t,"OnPageHide",e),this.va=()=>r(t,"VisibilityChange_"+document.visibilityState,e),this.ja=()=>r(t,"OnUnload",e),window.addEventListener("beforeunload",this.Oa,{capture:!0,once:!0}),window.addEventListener("pagehide",this.ga,{capture:!0}),window.addEventListener("visibilitychange",this.va,{capture:!0}),window.addEventListener("unload",this.ja,{capture:!0,once:!0})}}function r(t,e,i){t.ULS.An(595957843,s.a.X,n.a.Important,`Page lifecycle: ${e} fired`+(i?", flushing logger":"")),i&&t.ULS.flush()}},function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var s=i(0),n=i(1);const o=["https://augloop.office.com/v2","api://visio.officeapps.live.com/va/00695ed2-3202-4156-8da1-69f60065e255","394866fc-eedb-4f01-8536-3ff84b16be2a","https://officescripting.microsoft.com","https://officescripting-int.microsoft.com","https://nleditor.osi.office.net/nleditor","e03a13ee-9730-4cae-8525-47559c8cf18a","https://powerquery.microsoft.com","api://app.powerbi.com/00000009-0000-0000-c000-000000000000"];class r{async isResourceTrustedForMessage(t){if(!t||!t.Resource)return!1;const e=t.Resource,i=t.AddinTrustId,r=function(t){if(!t)return!1;const e=t.toLowerCase();for(const t of o)if(t===e||t+"/"===e)return!0;return!1}(e);if(r||!i)return r;if(this.Sa[i])return c(e,this.Sa[i]);let a;const h=new Promise(t=>{a=(s,n)=>{i===s&&t(c(e,n))},this.Ia.push(a)});let d=-1;const u=new Promise(t=>{d=window.setTimeout(()=>{this.Yn.ULS.An(560754786,s.a.X,n.a.Warning,"isResourceTrustedForMessage - timeout waiting for addinTrustId: "+i),t(!1)},2e3)}),l=await Promise.race([h,u]);return this.Ia=this.Ia.filter(t=>t!==a),window.clearTimeout(d),l}dispose(){this.Sa={},this.Ia=[],window.removeEventListener("message",this._a)}constructor(t){this.Sa={},this.Ia=[],this._a=t=>{if(t&&t.origin)try{const e=t.data;if("string"==typeof e&&e.includes("AddinTrustedOrigin")){const i=JSON.parse(e),o=i.AddinTrustId;o&&"AddinTrustedOrigin"===i.MessageId&&(this.Yn.ULS.An(560754784,s.a.X,n.a.Info,"didReceiveMessage addinTrustId "+o),this.Sa[o]=t.origin,this.Ia.forEach(e=>{e(o,t.origin)}))}}catch(t){this.Yn.ULS.An(560754785,s.a.X,n.a.Error,"AuthTokenTrustValidator didReceiveMessage failed")}},this.Yn=t,window.addEventListener("message",this._a)}}function c(t,e){try{if(!t||!e)return!1;const i=33,s=126,n=/[?&#%\\]/;for(let e=0;e<t.length;e+=1){const o=t.charCodeAt(e);if(o<i||o>s)return!1;const r=t.charAt(e);if(n.test(r))return!1}const o="api:",r="https:";let c=t;c.substring(0,o.length).toLowerCase()===o&&(c=`${r}${c.substring(o.length)}`);const a=new URL(c);return a.protocol===r&&e.toLowerCase()===a.origin.toLowerCase()}catch{return!1}}},,,,,,function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t[t.NotSupported=0]="NotSupported",t[t.SameDocOnly=1]="SameDocOnly",t[t.AnyDoc=2]="AnyDoc",t[t.OtherMode=4]="OtherMode"}(s||(s={}))},function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t.AccessibilityLoopCompleted="AccessibilityLoopCompleted",t.ActionCompleted="ActionCompleted",t.BrowserEvent="BrowserEvent",t.CAAEMessage="CAAEMessage",t.Close="Close",t.InitEnd="InitEnd",t.Conversation="Conversation",t.CopyAndEdit="CopyAndEdit",t.CreateNewDocument="CreateNewDocument",t.Download="Download",t.Edit="Edit",t.Error="Error",t.FileEmbed="FileEmbed",t.FileProperties="FileProperties",t.FileRenamed="FileRenamed",t.FileVersions="FileVersions",t.FrameStateChanged="FrameStateChanged",t.FrameTrust="FrameTrust",t.GetAccessToken="GetAccessToken",t.GetAuthToken="GetAuthToken",t.GetCustomAuthConfig="GetCustomAuthConfig",t.GetWopiInfoFromUrl="GetWopiInfoFromUrl",t.GetDavUrlFromIds="GetDavUrlFromIds",t.ModeSwitched="ModeSwitched",t.MoveToFolder="MoveToFolder",t.OpenInMobileApp="OpenInMobileApp",t.OpenInBrowser="OpenInBrowser",t.OpenInClient="OpenInClient",t.PageChanged="PageChanged",t.PushState="PushState",t.Reboot="Reboot",t.RedeemForCommenting="RedeemForCommenting",t.RefreshSessionInfo="RefreshSessionInfo",t.ReplyWithChanges="ReplyWithChanges",t.ReportAbuse="ReportAbuse",t.SharedFilePicker="SharedFilePicker",t.SaveStatus="SaveStatus",t.Share="Share",t.ShareForm="ShareForm",t.SignIn="SignIn",t.SplashScreenShown="SplashScreenShown",t.UserAccessAndPermissions="UserAccessAndPermissions",t.UserActivity="UserActivity",t.UserEditActivity="UserEditActivity",t.Workflow="Workflow",t.ZoomChanged="ZoomChanged",t.AcquireOAuthTokenTeams="AcquireOAuthTokenTeams",t.LoadingStatus="LoadingStatus",t.SwitchNotebook="SwitchNotebook",t.FailedBootCheckFileInfo="FailedBootCheckFileInfo",t.GetTeamsUsers="GetTeamsUsers",t.SendTeamsUserMention="SendTeamsUserMention",t.NavigateBackToHost="NavigateBackToHost",t.GetClientUrlComplete="GetClientUrlComplete",t.GetWebUrlComplete="GetWebUrlComplete",t.CopyLinkComplete="CopyLinkComplete",t.SendConversationId="SendConversationId",t.CloseTeamsConversation="CloseTeamsConversation",t.PageLoaded="PageLoaded",t.FrameChanged="FrameChanged",t.PrintRedirect="PrintRedirect",t.RequestFullScreen="RequestFullScreen"}(s||(s={}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return n}));class s{get isCancelled(){return this.Ta}get timeoutInMs(){return this.Ca}get reason(){return this.ya}cancel(){this.Aa(!1)}subscribe(t){this.Ta?t():this.Ea.push(t)}constructor(t){this.Ta=!1,this.ya="",this.Ea=[],this.Aa=t=>{this.Ta||(this.Ta=!0,this.ya=t?"timeout":"cancelled",this.Ea.map(t=>t()),this.Ea=[])},this.Ca=t,window.setTimeout(()=>this.Aa(!0),t)}}function n(t){return new s(t)}},function(t,e,i){"use strict";i.d(e,"a",(function(){return C}));var s=i(28),n=i(0),o=i(1),r=i(55),c=i(63),a=i(42),h=i(40),d=i(81),u=i(39),l=i(7),f=i(16),p=i(51);const m={[u.a.boot]:{Pa:d.a.boot},[u.a.createNew]:{Pa:d.a.createNew},[u.a.dispose]:{Pa:d.a.dispose},[u.a.postWacToken]:{Pa:d.a.postWacToken},[u.a.rename]:{Pa:d.a.rename},[u.a.switchMode]:{Pa:d.a.switchMode},[l.a.ne]:{Pa:d.a.handleBootState},[l.a.he]:{Pa:d.a.closeTab},[l.a.Ie]:{Pa:d.a.frameTrust},[l.a.Te]:{Pa:d.a.getAuthToken},[l.a.ye]:{Pa:d.a.getHostKeyValue},[l.a.De]:{Pa:d.a.appReboot},[l.a.qi]:{Pa:d.a.setWacFlightValue},[l.a.ze]:{Pa:d.a.setOverlayContent},[l.a.Xe]:{Pa:d.a.storeHostKeyValue},[l.a.ei]:{Pa:d.a.updateBootComplete},[u.a.blurFocus]:{Ua:f.a.Ns},[u.a.continueAccessibilityLoop]:{Ua:f.a.Hs},[u.a.grabFocus]:{Ua:f.a.Bs},[u.a.moveToFolder]:{Ua:f.a.We},[u.a.popState]:{Ua:f.a.zs},[u.a.sendChannelId]:{Ua:f.a.qs},[u.a.sendConvId]:{Ua:f.a.Ks},[u.a.teamsUsersReply]:{Ua:f.a.Zs},[u.a.teamsUserMentionReply]:{Ua:f.a.Xs},[u.a.backButtonPressed]:{Ua:f.a.Qs},[u.a.getClientUrl]:{Ua:f.a.Ys},[u.a.getWebUrl]:{Ua:f.a.tn},[u.a.sendAccessToken]:{Ua:f.a.in},[u.a.sendAuthToken]:{Ua:f.a.sn},[u.a.sendHWRTelemetry]:{Ua:f.a.jn},[u.a.sendCustomAuthConfig]:{Ua:f.a.nn},[u.a.sendDavUrl]:{Ua:f.a.dn},[u.a.sendEmbeddedViewUrl]:{Ua:f.a.rn},[u.a.sendFrameTrustResult]:{Ua:f.a.Ie},[u.a.sendSessionInfo]:{Ua:f.a.cn},[u.a.sendUserAccessAndPermissions]:{Ua:f.a.an},[u.a.sendWopiInfo]:{Ua:f.a.hn},[u.a.signalShared]:{Ua:f.a.vn},[u.a.completeSharedFilePicker]:{Ua:f.a.$e},[l.a.te]:{Wa:p.a.AccessibilityLoopCompleted},[l.a.ee]:{Wa:p.a.ActionCompleted},[l.a.re]:{Wa:p.a.BrowserEvent},[l.a.hi]:{Wa:p.a.CAAEMessage},[l.a.ce]:{Wa:p.a.Close},[l.a.de]:{Wa:p.a.Conversation},[l.a.ue]:{Wa:p.a.CopyAndEdit},[l.a.le]:{Wa:p.a.CreateNewDocument},[l.a.pe]:{Wa:p.a.Download},[l.a.me]:{Wa:p.a.Edit},[l.a.we]:{Wa:p.a.Error},[l.a.be]:{Wa:p.a.FileEmbed},[l.a.Oe]:{Wa:p.a.FileProperties},[l.a.ge]:{Wa:p.a.FileRenamed},[l.a.je]:{Wa:p.a.FileVersions},[l.a._e]:{Wa:p.a.GetAccessToken},[l.a.Ee]:{Wa:p.a.GetDavUrlFromIds},[l.a.Ce]:{Wa:p.a.GetCustomAuthConfig},[l.a.Ae]:{Wa:p.a.GetWopiInfoFromUrl},[l.a.Se]:{Wa:p.a.FrameStateChanged},[l.a.Ue]:{Wa:p.a.ModeSwitched},[l.a.We]:{Wa:p.a.MoveToFolder},[l.a.Re]:{Wa:p.a.OpenInMobileApp},[l.a.Fe]:{Wa:p.a.OpenInBrowser},[l.a.ke]:{Wa:p.a.OpenInClient},[l.a.Ne]:{Wa:p.a.PageChanged},[l.a.xe]:{Wa:p.a.PushState},[l.a.Ve]:{Wa:p.a.RedeemForCommenting},[l.a.He]:{Wa:p.a.RefreshSessionInfo},[l.a.Be]:{Wa:p.a.ReplyWithChanges},[l.a.$e]:{Wa:p.a.SharedFilePicker},[l.a.Le]:{Wa:p.a.ReportAbuse},[l.a.Je]:{Wa:p.a.SaveStatus},[l.a.qe]:{Wa:p.a.Share},[l.a.Ke]:{Wa:p.a.ShareForm},[l.a.Ze]:{Wa:p.a.SignIn},[l.a.si]:{Wa:p.a.UserAccessAndPermissions},[l.a.ni]:{Wa:p.a.UserActivity},[l.a.oi]:{Wa:p.a.UserEditActivity},[l.a.ri]:{Wa:p.a.Workflow},[l.a.ci]:{Wa:p.a.ZoomChanged},[l.a.gi]:{Wa:p.a.AcquireOAuthTokenTeams},[l.a.Pe]:{Wa:p.a.LoadingStatus},[l.a.vi]:{Wa:p.a.SwitchNotebook},[l.a.ji]:{Wa:p.a.FailedBootCheckFileInfo},[l.a.Si]:{Wa:p.a.GetTeamsUsers},[l.a.Ii]:{Wa:p.a.SendTeamsUserMention},[l.a._i]:{Wa:p.a.NavigateBackToHost},[l.a.Ti]:{Wa:p.a.GetClientUrlComplete},[l.a.Ci]:{Wa:p.a.GetWebUrlComplete},[l.a.yi]:{Wa:p.a.CopyLinkComplete},[l.a.Ai]:{Wa:p.a.SendConversationId},[l.a.Ei]:{Wa:p.a.CloseTeamsConversation},[l.a.Pi]:{Wa:p.a.PageLoaded},[l.a.Gi]:{Wa:p.a.InitEnd},[l.a.zi]:{Wa:p.a.SplashScreenShown},[l.a.Ki]:{Wa:p.a.PrintRedirect},[l.a.Zi]:{Wa:p.a.RequestFullScreen}};var w=i(8),b=i(54),O=i(41),g=i(43),v=i(44);class j{get diagnostics(){return{hostInitDiagnostics:this.hostInitDiagnostics,appInitDiagnostics:this.appInitDiagnostics}}raiseEvent(t,e){this.logger.ULS.An(574654541,n.a.X,o.a.Info,"Raising event: "+t);try{this.Ra(t,e)}catch(t){this.logger.ULS.An(593506838,n.a.X,o.a.Error,"Event handler error: "+Object(w.b)(t))}}addActionHandler(t,e){this.Fa[t]||(this.Fa[t]=[]),this.Fa[t].push(e)}removeActionHandler(t,e){const i=this.Fa[t];if(i&&i.length>0){const t=i.indexOf(e);t>-1&&i.splice(t,1)}}run(t,e,i){if(this.state===s.a.Disposed&&this.backgroundSession)return this.logger.ULS.An(525203609,n.a.X,o.a.Info,"Redirecting to background session: "+t),this.backgroundSession.run(t,e,i);const r=[],c=this.Fa[t];if(c&&c.length>0)r.push(this.ka(t,e));else{const s=m[t];if(s){const c=s.Pa,a=s.Ua;if(c){this.logger.ULS.An(574654542,n.a.X,o.a.Info,"Running flow: "+c);const s=this.Na[c](t,e,this,this.Ma[c],i).catch(t=>(this.xa(c,t),{completion:"failure",errorSource:"jsapi",error:t}));r.push(s)}else a&&(this.container&&this.container.postMessage(a,e),r.push(Promise.resolve({completion:"success"})))}else r.push(Promise.resolve({completion:"failure"})),this.logger.ULS.An(593500189,n.a.X,o.a.Warning,"Unhandled command: "+t)}return Promise.race(r)}dispose(){if(this.successTime=0,this.failureTime=0,this.timeoutTime=0,this.Xi.dispose(),this.pageStateObserver.dispose(),this.authTokenTrustValidator.dispose(),this.Fa={},!this.pendingReboot){const t=this.application.sessions,e=t.indexOf(this.session);e>-1&&t.splice(e,1)}}constructor(t,e,i,d,u,l,f){var j;this.successTime=0,this.failureTime=0,this.timeoutTime=0,this.appBootState="Unknown",this.pendingReboot=!1,this.skipWopiValidation=!1,this.skipFileNameCheck=!1,this.appContext={},this.isLoggerFromOwl=!1,this.appUrl="",this.appBaseUrl="",this.appBasePath="",this.remoteTelemetryUrl="",this.Fa={},this.onMessage=t=>{const e=t.MessageId,i=t.Values||{},s=this.Fa[e];if(s&&s.length>0)this.ka(e,i);else{const s=m[e];if(s){const r=s.Pa,c=s.Wa;r?(this.logger.ULS.An(574654543,n.a.X,o.a.Info,"Running flow: "+r),this.Na[r](e,i,this,this.Ma[r]).catch(t=>{this.xa(r,t)})):c&&(c===p.a.Share&&(i.sendTimeAsClickTime=t.SendTime),this.raiseEvent(c,i))}}},this.xa=(t,e)=>{this.logger.ULS.An(596459925,n.a.X,o.a.Error,`${t} flow error: ${Object(w.b)(e)}`),this.remoteTelemetryUrl&&Object(r.c)(this.remoteTelemetryUrl,this.appInfo.name,"flowException")},this.ka=(t,e)=>{this.logger.ULS.An(574654544,n.a.X,o.a.Info,"Dispatching action: "+t);const i=this.Fa[t].slice().reverse();for(let s=i.length-1;s>-1;s-=1)try{i[s](t,e)}catch(e){this.logger.ULS.An(596444186,n.a.X,o.a.Error,`${t} action handler error: ${Object(w.b)(e)}`)}return Promise.resolve({completion:"success"})},this.state=s.a.Unknown;const[S,I]=Object(b.a)();this.isLoggerFromOwl=!!i.logger,this.logger=null!==(j=i.logger)&&void 0!==j?j:Object(c.a)(),this.logger.ULS.An(593506837,n.a.X,o.a.Info,JSON.stringify(I)),this.sessionId=S,this.hostSessionId=i.hostSessionId,this.host=t.host,this.hostName=this.host.uiHostName||this.host.storageHostName,this.user=t.user,this.bootstrapperUrl=t.bootstrapperUrl,this.ui=t.ui||{},this.viewMode=t.viewMode,this.application=d,this.appInfo=e,this.session=u,this.featureManager=Object(a.a)(t.host.capabilities&&t.host.capabilities.isFeatureEnabledCallback,this.logger),this.Xi=new h.a(e.name,this.logger),this.preloader=e.preloader,[this.Na,this.Ma]=l(this.featureManager),this.Ra=f,this.clientDiagnostics=Object(O.c)(),this.pageStateObserver=new g.a(this.logger,!0),this.authTokenTrustValidator=new v.a(this.logger)}}class S{get id(){return this.Da.sessionId}get diagnostics(){return this.Da.diagnostics}run(t,e,i){return this.Da.run(t,e,i)}boot(t,e){return this.Da.run(u.a.boot,t,e)}dispose(t){return this.Da.run(u.a.dispose,void 0,t)}constructor(t,e,i,n,o,r){!function(t){if(!t)throw new TypeError("SessionInitParams");if(!t.hostSessionId)throw new TypeError("HostSessionId")}(i),this.Da=new j(t,e,i,n,this,r,(t,e)=>o({type:t,data:e,session:this})),this.Da.state=s.a.Initialized}}var I=i(84),_=i(38),T=i(18);class C{get name(){return this.Va.name}get version(){return Object(T.a)()}addEventListener(t){this.Ha.add(t)}removeEventListener(t){this.Ha.remove(t)}createContainer(t){const e=`WacFrame_${this.Va.name}_${this.containers.length}`,i=new I.a(t,e);return this.containers.push(i),i}createSession(t){const e=new S(this.Ba,this.Va,t,this,this.La,this.$a);return this.sessions.push(e),e}dispose(t){const e=this.sessions.map(e=>e.dispose(t).catch(t=>{}));return Promise.all(e).then(t=>(this.Ha.removeAll(),this.sessions=[],this.containers=[],{completion:"success"}))}constructor(t,e,i){this.sessions=[],this.containers=[],this.La=t=>{this.Ha.dispatch(t)},function(t){if(!t)throw new TypeError("ApplicationInitParams");const e=t.host;if(!e||!e.storageHostName)throw new TypeError("HostInfo");const i=t.user;if(!i||null==i.id)throw new TypeError("UserInfo")}(t),this.Ba=t,this.Va=e,this.$a=i,this.Ha=new _.a,Object(T.b)(t.host.owlVersion)}}},function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var s=i(8);function n(){const t=new Uint8Array(31),e=function(t){const e={crypto:!1,perfNow:!1,exceptions:[]},i=window.crypto||window.msCrypto;if(i){e.crypto=!0;try{return i.getRandomValues(t),e}catch(t){e.exceptions.push("crypto: "+Object(s.b)(t))}}e.perfNow=!0;for(let i=0;i<t.length;i+=1){try{let t=Math.floor(100*window.performance.now())%10;(t<0||t>9)&&(t=0);for(let e=0;e<t;e+=1)Math.random()}catch(t){e.exceptions.push("Math.random: "+Object(s.b)(t))}t[i]=Math.floor(16*Math.random())}return e}(t);let i=0;return["xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const s=15&t[i];return i+=1,("x"===e?s:3&s|8).toString(16)}),e]}},function(t,e,i){"use strict";i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return c}));var s,n=i(37),o=i(18);function r(t,e,i,s=!0){const o={type:e.toString(),payloadJson:JSON.stringify(i)};Object(n.a)(JSON.stringify(o),t,s)}function c(t,e,i){r(t,s.JSAPI_STATE,{application:e,build:Object(o.a)(),state:i})}!function(t){t.JSAPI_STATE="JSAPI_STATE",t.H_V2="H_V2"}(s||(s={}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return s})),i.d(e,"d",(function(){return h})),i.d(e,"e",(function(){return d})),i.d(e,"c",(function(){return u})),i.d(e,"b",(function(){return l})),i.d(e,"f",(function(){return f}));var s,n=i(0),o=i(1),r=i(9),c=i(5),a=i(8);function h(t,e,i,s,n,o,r,c,a,h){t.style.top="0",t.style.bottom="0",t.style.left="0",t.style.right="0",t.style.height="100%",t.style.width="100%";const u=t.ownerDocument,l=u.createElement("iframe");if(l.id=e,l.name=e,l.src="",l.title="Office on the web Frame",l.marginWidth="0",l.marginHeight="0",l.style.top="0",l.style.bottom="0",l.style.left="0",l.style.right="0",l.style.height="100%",l.style.width="100%",l.style.display="block",l.style.position="absolute",l.style.backgroundColor="transparent",l.style.border="none",l.frameBorder="0",l.setAttribute("allowfullscreen","true"),l.setAttribute("allowTransparency","true"),l.setAttribute("allow",i),d(l,r),s&&(t.style.minHeight=s,l.style.minHeight=s),n&&(t.style.minWidth=n,l.style.minWidth=n),c&&l.setAttribute("role","none"),o){const e=u.createElement("div");e.style.top="0",e.style.bottom="0",e.style.left="0",e.style.right="0",e.style.height="100%",e.style.width="100%",e.style.backgroundColor="#393a3d",e.style.backfaceVisibility="hidden",s&&(e.style.minHeight=s),n&&(e.style.minWidth=n),e.appendChild(l),t.appendChild(e)}else t.appendChild(l);return a&&l.addEventListener("load",a,{once:!0}),h&&l.addEventListener("error",h,{once:!0}),l}function d(t,e){Object(r.c)()===r.a.Safari?t.style.display=e?"none":"block":t.style.visibility=e?"hidden":"visible"}function u(t,e,i,s,n){const o=t.ownerDocument,r=o.createElement("form");r.id=i,r.name=i,r.action=s,r.target=e,r.method="POST";for(const t in n){const e=o.createElement("input");e.type="hidden",e.name=t,e.value=n[t],r.appendChild(e)}return t.appendChild(r),r}function l(t,e,i){Object(c.a)(e,s.Ja,String(i?window.outerHeight:t.offsetHeight)),Object(c.a)(e,s.Ga,String(i?window.outerWidth:t.offsetWidth)),Object(c.a)(e,s.za,String(Object(r.g)())),Object(c.a)(e,s.qa,String(Object(r.d)())),Object(c.a)(e,s.Ka,String(Object(r.h)())),Object(c.a)(e,s.Za,String(Object(r.j)())),Object(c.a)(e,s.Xa,String(Object(r.i)())),Object(c.a)(e,s.Qa,String(Object(r.b)())),Object(c.a)(e,s.Ya,String(window.innerHeight)),Object(c.a)(e,s.th,String(window.innerWidth))}function f(t){try{return window===window.top||window.parent===window.top&&window.location.origin===window.top.origin}catch(e){return t&&t.ULS.An(591525084,n.a.X,o.a.Info,"Trust check error: "+Object(a.b)(e)),!1}}!function(t){t.Po="access_token",t.Uo="access_token_ttl",t.Wo="wac_token",t.Ro="bundleSrc",t.Fo="bundleStaleness",t.Xo="DocID",t.eh="SiteID",t.ih="WebID",t.Qo="ETag",t.Jo="feature_status",t.Mo="fileExtension",t.ko="fileGetUrl",t.No="customFontCatalogUrl",t.xo="fileName",t.Do="fileSize",t.Ka="forceSLR",t.Ja="frameHeightPx",t.Ga="frameWidthtPx",t.qa="highContrast",t.zo="highDpi",t.$o="host_diagnostics",t.Ko="hostName",t.Go="huictrls",t.Ho="owner_id",t.Bo="sc",t.qo="softBlockedBrowser",t.Zo="templateUrl",t.za="touchMode",t.Vo="user_id",t.sh="hfck",t.nh="hfcv",t.oh="timeZoneId",t.Za="darkCssMedia",t.Qa="forcedColors",t.Xa="prefersContrast",t.Yo="caae",t.er="meetingId",t.ir="meetingTitle",t.sr="meetingType",t.rh="scheduledStartTime",t.nr="scheduledEndTime",t.cr="isPresenter",t.rr="meetingOrganizerId",t.or="meetingJoinUrl",t.ar="isMeetingTeamsRoom",t.mr="jsapibuild",t.hr="owlver",t.dr="owlro",t.tr="caaemode",t.wr="traceparent",t.br="tracestate",t.Lo="supports_zipit",t.ur="sipcn",t.lr="devcs",t.pr="dceit",t.Ya="frameInnerHeightPx",t.th="frameInnerWidthPx"}(s||(s={}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return c}));var s=i(0),n=i(1),o=i(14),r=i(15);class c{setFrameError(){this.hh=!0}setTimeoutStage(t){this.dh=t,this.uh="Boot_HeartBeat_"+t+(this.hh?"_FrameError":"")}restart(){const t=this.lh.getValue(o.a.hs,!1);this.fh=Object(r.b)()+(this.ph?this.ph:this.lh.getValue(o.a.Qi,6e5));const e=this.Oo?3e3:5e3;this.mh=window.setInterval(()=>{t&&this.Yn.ULS.An(595724178,s.a.X,n.a.Info,this.uh),Object(r.b)()>this.fh&&(this.stop(),this.wh(),this.bh&&this.bh())},this.lh.getValue(o.a.as,e)),this.Oh.push(window.setTimeout(this.wh,this.lh.getValue(o.a.Yi,3e4),1)),this.Oh.push(window.setTimeout(this.wh,this.lh.getValue(o.a.ts,12e4),2)),this.Oh.push(window.setTimeout(this.wh,this.lh.getValue(o.a.es,18e4),3))}stop(){this.fh=0,this.mh&&(window.clearInterval(this.mh),this.mh=void 0),this.Oh.forEach(t=>{window.clearTimeout(t)}),this.Oh=[]}constructor(t,e,i,o,r){this.fh=0,this.Oh=[],this.Oo=!1,this.uh="Boot_HeartBeat",this.hh=!1,this.dh="FrameCreated",this.wh=t=>{const e="Boot_NotComplete_"+(t||"Final")+"_"+this.dh+(this.hh?"_FrameError":"");this.Yn.ULS.An(594901218,s.a.X,n.a.Warning,e),this.Yn.ULS.flush()},this.Oo=t,this.lh=e,this.Yn=i,this.bh=o,this.ph=r,this.restart()}}},function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"a",(function(){return c}));var s=i(7),n=i(0),o=i(1);function r(t){localStorage.setItem(t.flightKey,t.flightValue.toString())}const c=(t,e,i,c,a)=>t!==s.a.qi?Promise.reject("Wrong flow"):new Promise(t=>{const s=e.flightKey,c=e.flightValue;i.logger.ULS.An(507343134,n.a.Pt,o.a.Info,`setWacFlightValue ${s}: ${c}`),r(e),t({completion:"success"})})},function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"a",(function(){return r}));var s=i(7),n=i(16);function o(t){const e=window.navigator;if(e&&e.virtualKeyboard&&void 0!==e.virtualKeyboard.overlaysContent&&window===top)return e.virtualKeyboard.overlaysContent=t}const r=(t,e,i,r,c)=>t!==s.a.ze?Promise.reject("Wrong flow"):new Promise(t=>{o(e.overlayContent),i.container&&i.container.postMessage(n.a.pn,void 0),t({completion:"success"})})},function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"a",(function(){return h}));var s=i(7),n=i(16),o=i(0),r=i(1),c=i(17);function a(t){return Object(c.b)(t.hostKey)}const h=(t,e,i,c,h)=>t!==s.a.ye?Promise.reject("Wrong flow"):new Promise(t=>{const s=e.hostKey;i.logger.ULS.An(574408915,o.a.X,r.a.Info,"getHostKeyValue "+s);const c=a(e);i.container&&i.container.postMessage(n.a.$s,{hostKey:s,hostValue:c}),t({completion:"success"})})},function(t,e,i){"use strict";i.d(e,"b",(function(){return c})),i.d(e,"a",(function(){return a}));var s=i(7),n=i(0),o=i(1),r=i(17);function c(t){Object(r.d)(t.hostKey,t.hostValue,r.c)}const a=(t,e,i,r,a)=>t!==s.a.Xe?Promise.reject("Wrong flow"):new Promise(t=>{const s=e.hostKey,r=e.hostValue;i.logger.ULS.An(574408914,n.a.X,o.a.Info,`storeHostKeyValue ${s}: ${r}`),c(e),t({completion:"success"})})},function(t,e,i){"use strict";function s(t,e,i,s){const n=new XMLHttpRequest;n.onreadystatechange=()=>{if(n&&4===n.readyState){if(void 0===n.status||0===n.status)return;try{s&&s(n)}finally{null!=n&&(n.onreadystatechange=()=>{})}}},n.open("POST",t);for(const t in i)n.setRequestHeader(t,i[t]);n.send(e)}i.d(e,"a",(function(){return s}))},function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return l})),function(t){t[t.Trace=0]="Trace",t[t.Assert=1]="Assert"}(s||(s={}));var n=i(1);var o=i(37),r=i(15),c=i(18);class a{getTimeSpentLogging(){return this.gh}addLoggingTime(t){this.gh+=t}configure(t){const e=Object(r.b)();if(t.uploadCadenceInMs&&(this.vh=t.uploadCadenceInMs),t.uploadTriggerSize&&(this.jh=t.uploadTriggerSize),t.sessionId&&(this.Sh=t.sessionId),t.remoteUlsEndpoint){if(!t.sessionId&&this.Ih)throw new Error("Remote ULS endpoint is already set");this.Ih=this._h(t.remoteUlsEndpoint),this.Th=Object(r.a)(),this.Ch()}this.gh+=Object(r.b)()-e}handleTrace(t){const e=Object(r.b)();t.message.length>3072&&(t.message=t.message.substring(0,3072-"... [Trimmed]".length)+"... [Trimmed]"),this.yh.push(t),(this.yh.length>this.jh||t.level===n.a.Error)&&this.Ch(),this.gh+=Object(r.b)()-e}getUserSessionId(){return this.Sh}constructor(t){this.vh=3e4,this.jh=30,this.Ah=0,this.yh=[],this.Th=Object(r.a)(),this.Eh=[],this.Sh="",this.gh=0,this.flushOnClose=()=>{this.Ph(!1,!1)},this.flush=()=>{this.Ch()},this.flushAndSetNewEndpoint=(t,e)=>{var i;const s=this._h(t);s.localeCompare(null!==(i=this.Ih)&&void 0!==i?i:"",void 0,{sensitivity:"accent"})&&(this.Eh.push(()=>{this.Ih=s,e&&e()}),this.Ph(!0,!0))},this.updateEndpointAndFlush=t=>{this.Ih=this._h(t),this.Ph(!0,!0)},this._h=t=>t+"?usid="+this.Sh+"&officeserverversion="+Object(c.a)(),this.Ch=()=>{window.setTimeout(()=>this.Ph(!0,!0),0)},this.Ph=(t,e)=>{const i=Object(r.b)();if(window.clearTimeout(this.Fr),this.Ih){if(this.yh.length>0){this.Ah+=1;const i=function(t,e,i,s){const n=[],o=t.map(t=>function(t,e,i){const s={};if(s.G=t.tag,s.T=t.timestamp-e,s.M=t.message,s.C=t.category,t.correlationId){let e=i.findIndex(e=>e===t.correlationId);e<0&&(e=i.push(t.correlationId)-1),s.I=e}const n=1e3*t.type+t.level;return s.D=n,s}(t,s,n)),r=function(t,e,i,s,n){const o={};return o.T=t,o.L=e,o.S=i,o.I=s,n&&n.length>0&&(o.W=n),o.V=1,o}(s,o,e,i,n);return JSON.stringify(r)}(this.yh.splice(0,t?this.jh:this.yh.length),this.Sh,this.Ah,this.Th);Object(o.a)(i,this.Ih,e),this.Th=Object(r.a)()}0===this.yh.length&&this.Eh.length>0&&(this.Eh.forEach(t=>{"requestIdleCallback"in window?window.requestIdleCallback(t):window.setTimeout(t,0)}),this.Eh=[]),t&&(this.Fr=window.setTimeout(()=>{this.Ch()},this.yh.length>this.jh||this.Eh.length>0?1e3:this.vh)),this.gh+=Object(r.b)()-i}},t&&this.configure(t)}}let h,d=[];var u=i(14);function l(t){const e=new a(t);function i(t,i,n,o){const c=Object(r.b)();if(function(t){return 1===d[t]}(t))return;const a={timestamp:Object(r.a)(),category:i,tag:t,level:n,type:s.Trace,message:o,correlationId:""};e.addLoggingTime(Object(r.b)()-c),e.handleTrace(a)}return{ULS:{An:(t,e,s,n)=>{i(t,e,s,n)},shipAssertTag:(t,e,s,o)=>{s&&i(t,e,n.a.Error,o)},debugAssertTag:(t,e,i,s)=>{throw new Error("Debug Asserts not Implemented in the TypeScript bULS module")},flush:e.flush,flushOnClose:e.flushOnClose,setCorrelationId:()=>{}},configure:t=>{e.configure(t)},settingsChangeHandler:t=>{var i,s;i=t.Xi.getValue(u.a.ns,""),s=t.Xi.getValue(u.a.ss,""),h&&s===h||(d=[],h=s,i&&i.split(",").forEach(t=>{const e=parseInt(t,10);e&&(d[e]=1)})),e.configure({uploadCadenceInMs:t.Xi.getValue(u.a.ds,6e4)});const n=t.Xi.getValue(u.a.fs,"").toString();""!==n&&e.flushAndSetNewEndpoint(n)},getTimeSpentLogging:()=>e.getTimeSpentLogging(),getUserSessionId:()=>e.getUserSessionId(),flushAndSetNewEndpoint:(t,i)=>{e.flushAndSetNewEndpoint(t,i)},updateEndpointAndFlush:t=>{e.updateEndpointAndFlush(t)}}}},,,,,,,,,,,,,,,function(t,e,i){"use strict";i.r(e),i.d(e,"Application",(function(){return p})),i.d(e,"Viewer",(function(){return m})),i.d(e,"createApplication",(function(){return w}));var s=i(29),n=i(53),o=i(30),r=i(27),c=i(35),a=i(36),h=i(2);i.d(e,"ApplicationEvents",(function(){return h.a}));var d=i(50);i.d(e,"DocRebootSupportMode",(function(){return d.a}));var u=i(39);i.d(e,"CommandIds",(function(){return u.a}));var l=i(51);i.d(e,"EventIds",(function(){return l.a}));var f=i(52);i.d(e,"createCancellationToken",(function(){return f.b}));const p=new o.a(r.b,{forceSingleStepBoot:!1,preconnector:Object(s.a)(!0)}),m=new o.a(c.a,{forceSingleStepBoot:!0,useViewerInitializer:!0,preconnector:Object(s.a)(!0)}),w=t=>{const e={name:"Word",preconnector:Object(s.a)(!0)};return new n.a(t,e,a.a)}},,,function(t,e,i){"use strict";var s;i.d(e,"a",(function(){return s})),function(t){t.appReboot="appReboot",t.boot="boot",t.closeTab="closeTab",t.createNew="createNew",t.dispose="dispose",t.frameTrust="frameTrust",t.getAuthToken="getAuthToken",t.getHostKeyValue="getHostKeyValue",t.handleBootState="handleBootState",t.postWacToken="postWacToken",t.rename="rename",t.setOverlayContent="setOverlayContent",t.storeHostKeyValue="storeHostKeyValue",t.switchMode="switchMode",t.updateBootComplete="updateBootComplete",t.setWacFlightValue="setWacFlightValue"}(s||(s={}))},,,function(t,e,i){"use strict";i.d(e,"a",(function(){return f}));var s=i(0),n=i(1),o=i(7),r=i(5),c=i(8),a=i(17),h=i(15),d=i(16);class u{setTargetOrigin(t){const e=Object(r.i)(t).toLowerCase();this.fo&&this.fo!==e&&this.Yn.ULS.An(593232847,s.a.X,n.a.Warning,`Updating origin: [${Object(r.g)(this.fo)}]->[${Object(r.g)(e)}]`),this.fo=e,this.bo=Object(r.h)(e,2),this.Oo=Object(r.n)(e),this.vo=Object(r.o)(e)}setTargetFrame(t,e){this.Uh=t,this.po=!!e}setMessageHandler(t){this.Wh=t}removeMessageHandler(){this.Wh=void 0}postMessage(t,e,i){if(!this.Uh||!this.Uh.contentWindow)return void this.Yn.ULS.An(593232848,s.a.X,n.a.Error,"Missing target to send message: "+t);this.Yn.ULS.An(593232849,s.a.X,n.a.Info,"Sending message: "+t);const o={MessageId:t,SendTime:Object(h.a)(),CorrelationId:i,Values:e};this.Uh.contentWindow.postMessage(JSON.stringify(o),this.fo)}dispose(){window.removeEventListener("message",this.Rh,!1),this.Wh=void 0}constructor(t,e,i,h){var u;this.fo="",this.bo="",this.Oo=!1,this.vo=!1,this.po=!1,this.jo=!1,this.Rh=t=>{let e,i=!1,a=!0,h="",u=!1;if(this.Uh&&this.Uh.contentWindow&&(i=!0,a=t.source===this.Uh.contentWindow),t.origin&&(h=Object(r.h)(t.origin,2).toLowerCase(),u=h===this.bo,!u&&this.To&&(h=Object(r.h)(t.origin).toLowerCase(),u=this.To.includes(h))),!this.Oo&&(!this.vo||u&&a)||this.Yn.ULS.An(593232850,s.a.X,n.a.Info,"Window: available["+i+"] valid["+a+"]; Origin: valid["+u+"] expected["+this.bo+"] actual["+h+"]"),!u||this.po&&!a)return;try{e=JSON.parse(t.data)}catch(t){return void this.Yn.ULS.An(593232851,s.a.X,n.a.Info,"Failed to parse event data: "+Object(c.b)(t))}const l=e.MessageId;if(l){var f;if(this.Yn.ULS.An(593232854,s.a.X,n.a.Info,`Received message: ${l}, correlation: ${e.CorrelationId}`),l!==o.a.oe&&l!==o.a.Pe||this.setTargetOrigin(t.origin),e.Values&&e.Values.ackExpected&&this.postMessage(d.a.Rs,void 0,e.CorrelationId),this.jo&&l===o.a.Li)return window._pageTimings=null!==(f=window._pageTimings)&&void 0!==f?f:{},void(window._pageTimings[e.Values.name]=e.Values.time);if(this.Wh)try{this.Wh(e)}catch(t){this.Yn.ULS.An(594556386,s.a.X,n.a.Error,"Message handler error: "+Object(c.b)(t))}else this.Yn.ULS.An(591933923,s.a.X,n.a.Error,"No message handler")}else(this.Oo||this.vo)&&this.Yn.ULS.An(593232853,s.a.X,n.a.Info,"Missing message id")},this.Yn=e,this.setTargetOrigin(t),this.To=h,i&&this.setMessageHandler(i),this.jo=!(null===(u=window.location)||void 0===u||null===(u=u.search)||void 0===u||!u.match(/wdpa=1/gi))||"1"===Object(a.b)("EnableMetricLogging"),window.addEventListener("message",this.Rh,!1)}}var l=i(56);class f{get element(){return this.Fh}get frameId(){return this.kh}get formId(){return this.Nh}get isTopFrameTrusted(){return this.Mh}boot(t,e,i,o,r,c,a){this.Yn=i,this.xh=new u(t,i,this.Wh,o.additionalReceivingDomainList);const h=o.useAdditionalDiv,d=o.permissionsPolicy;this.Dh&&!h?(this.Dh.setAttribute("allow",d),this.Yn.ULS.An(588793045,s.a.X,n.a.Info,"Wac frame reused")):(this.Dh=Object(l.d)(this.Fh,this.kh,d,o.minHeight,o.minWidth,h,o.isInvisible,o.setNoneRole,c,a),this.Yn.ULS.An(588793046,s.a.X,n.a.Info,"Wac frame created")),r(),this.xh.setTargetFrame(this.Dh,o.enforceSameWindow),h&&(this.Vh=this.Dh.parentElement),o.useFrameFixForTeams&&i.ULS.An(509143245,s.a.X,n.a.Info,"Frame fix enabled for teams uiHost"),Object(l.b)(this.Dh,e,o.useFrameFixForTeams),this.Hh=Object(l.c)(this.Fh,this.kh,this.Nh,t,e),this.Hh.submit()}setVisibility(t){this.Dh&&Object(l.e)(this.Dh,t)}setMessageHandler(t){this.Wh=t,this.xh&&this.xh.setMessageHandler(t)}setWrapperPostMessage(t){this.Bh=t}removeMessageHandler(){this.Wh=void 0,this.xh&&this.xh.removeMessageHandler()}postMessage(t,e){this.Bh?this.Bh(t,e):this.xh&&this.xh.postMessage(t,e)}dispose(t,e){return new Promise(i=>{if(this.Hh&&(this.Fh.removeChild(this.Hh),this.Hh=void 0),this.xh&&(this.xh.dispose(),this.xh=void 0,this.Wh=void 0),this.Bh&&(this.Bh=void 0),this.Yn=void 0,!this.Dh||!this.Vh&&t)i();else{const t=()=>{this.Vh?(this.Vh.removeChild(this.Dh),this.Fh.removeChild(this.Vh)):this.Fh.removeChild(this.Dh),this.Dh=void 0,this.Vh=void 0,i()};e?t():(this.Dh.src="about:blank",window.setTimeout(t,0))}})}constructor(t,e){!function(t){if(!t||!t.appendChild)throw TypeError("Container")}(t),this.Fh=t,this.kh=e,this.Nh=e+"_Form",this.Mh=Object(l.f)()}}}]);
//# sourceMappingURL=word.boot.7d853654a9b1d901b5ef.js.map