Mini Kabibi Habibi
/*
* Office JavaScript API library
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419.
*
* This file also contains the following Promise implementation (with a few small modifications):
* * @overview es6-promise - a tiny implementation of Promises/A+.
* * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* * @license Licensed under MIT license
* * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
* * @version 2.3.0
*/
"undefined"!=typeof OSFPerformance&&(OSFPerformance.hostInitializationStart=OSFPerformance.now())
/*
Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419.
This file also contains the following Promise implementation (with a few small modifications):
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
* @version 2.3.0
*/;var OfficeExt,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){var t=function(){function e(){}return e.prototype.isMsAjaxLoaded=function(){return!!("undefined"!=typeof Sys&&"undefined"!=typeof Type&&Sys.StringBuilder&&"function"==typeof Sys.StringBuilder&&Type.registerNamespace&&"function"==typeof Type.registerNamespace&&Type.registerClass&&"function"==typeof Type.registerClass&&"function"==typeof Function._validateParams&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&"function"==typeof Sys.Serialization.JavaScriptSerializer.serialize)},e.prototype.loadMsAjaxFull=function(e){var t=("https:"===window.location.protocol.toLowerCase()?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,e)},Object.defineProperty(e.prototype,"msAjaxError",{get:function(){return null==this._msAjaxError&&this.isMsAjaxLoaded()&&(this._msAjaxError=Error),this._msAjaxError},set:function(e){this._msAjaxError=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxString",{get:function(){return null==this._msAjaxString&&this.isMsAjaxLoaded()&&(this._msAjaxString=String),this._msAjaxString},set:function(e){this._msAjaxString=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxDebug",{get:function(){return null==this._msAjaxDebug&&this.isMsAjaxLoaded()&&(this._msAjaxDebug=Sys.Debug),this._msAjaxDebug},set:function(e){this._msAjaxDebug=e},enumerable:!0,configurable:!0}),e}();e.MicrosoftAjaxFactory=t}(OfficeExt||(OfficeExt={}));var OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OSFPerfUtil,OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};!function(e){var t=function(){function e(e){this._internalStorage=e}return e.prototype.getItem=function(e){try{return this._internalStorage&&this._internalStorage.getItem(e)}catch(e){return null}},e.prototype.setItem=function(e,t){try{this._internalStorage&&this._internalStorage.setItem(e,t)}catch(e){}},e.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(e){}},e.prototype.removeItem=function(e){try{this._internalStorage&&this._internalStorage.removeItem(e)}catch(e){}},e.prototype.getKeysWithPrefix=function(e){var t=[];try{for(var n=this._internalStorage&&this._internalStorage.length||0,r=0;r<n;r++){var i=this._internalStorage.key(r);0===i.indexOf(e)&&t.push(i)}}catch(e){}return t},e.prototype.isLocalStorageAvailable=function(){return null!=this._internalStorage},e}();e.SafeStorage=t}(OfficeExt||(OfficeExt={})),OSF.XdmFieldName={ConversationUrl:"ConversationUrl",AppId:"AppId"},OSF.TestFlightStart=1e3,OSF.TestFlightEnd=1009,OSF.FlightNames={UseOriginNotUrl:0,AddinEnforceHttps:2,FirstPartyAnonymousProxyReadyCheckTimeout:6,AddinRibbonIdAllowUnknown:9,ManifestParserDevConsoleLog:15,AddinActionDefinitionHybridMode:18,UseActionIdForUILessCommand:20,RequirementSetRibbonApiOnePointTwo:21,SetFocusToTaskpaneIsEnabled:22,ShortcutInfoArrayInUserPreferenceData:23,OSFTestFlight1000:OSF.TestFlightStart,OSFTestFlight1001:OSF.TestFlightStart+1,OSFTestFlight1002:OSF.TestFlightStart+2,OSFTestFlight1003:OSF.TestFlightStart+3,OSFTestFlight1004:OSF.TestFlightStart+4,OSFTestFlight1005:OSF.TestFlightStart+5,OSFTestFlight1006:OSF.TestFlightStart+6,OSFTestFlight1007:OSF.TestFlightStart+7,OSFTestFlight1008:OSF.TestFlightStart+8,OSFTestFlight1009:OSF.TestFlightEnd},OSF.TrustUXFlightValues={TrustUXControlA:0,TrustUXExperimentB:1,TrustUXExperimentC:2},OSF.FlightTreatmentNames={AddinTrustUXImprovement:"Microsoft.Office.SharedOnline.AddinTrustUXImprovement",BlockAutoOpenAddInIfStoreDisabled:"Microsoft.Office.SharedOnline.BlockAutoOpenAddInIfStoreDisabled",Bug7083046KillSwitch:"Microsoft.Office.SharedOnline.Bug7083046KillSwitch",CheckProxyIsReadyRetry:"Microsoft.Office.SharedOnline.OEP.CheckProxyIsReadyRetry",InsertionDialogFixesEnabled:"Microsoft.Office.SharedOnline.InsertionDialogFixesEnabled",TeachingUIForPrivateCatelogEnabled:"Microsoft.Office.SharedOnline.TeachingUIForPrivateCatelogEnabled",WopiPreinstalledAddInsEnabled:"Microsoft.Office.SharedOnline.WopiPreinstalledAddInsEnabled",WopiUseNewActivate:"Microsoft.Office.SharedOnline.WopiUseNewActivate",MosManifestEnabled:"Microsoft.Office.SharedOnline.OEP.MosManifest",RemoveGetTrustNoPrompt:"Microsoft.Office.SharedOnline.removeGetTrustNoPrompt",HostTrustDialog:"Microsoft.Office.SharedOnline.HostTrustDialog",WordEditorAddinThemeSupportEnabled:"Microsoft.Office.WordOnline.WordEditorAddinThemeSupportEnabled"},OSF.Flights=[],OSF.IntFlights={},OSF.Settings={},OSF.WindowNameItemKeys={BaseFrameName:"baseFrameName",HostInfo:"hostInfo",XdmInfo:"xdmInfo",SerializerVersion:"serializerVersion",AppContext:"appContext",Flights:"flights"},OSF.OUtil=function(){var e=-1,t="&_xdm_Info=",n="&_serializer_version=",r="&_flights=",i="_xdm_",o="#",a="class",s={},c=null,l=null,u=(new Date).getTime();function f(){var e=2147483647*Math.random();return(e^=u^(new Date).getMilliseconds()<<Math.floor(21*Math.random())).toString(16)}function p(){if(!c){try{var e=window.sessionStorage}catch(t){e=null}c=new OfficeExt.SafeStorage(e)}return c}function d(e){var t,n,r=[],i=[],o=e.length;for(t=0;t<o;t++)(n=e[t]).tabIndex?n.tabIndex>0?i.push(n):0===n.tabIndex&&r.push(n):r.push(n);return i=i.sort((function(e,t){var n=e.tabIndex-t.tabIndex;return 0===n&&(n=i.indexOf(e)-i.indexOf(t)),n})),[].concat(i,r)}return{set_entropy:function(e){if("string"==typeof e)for(var t=0;t<e.length;t+=4){for(var n=0,r=0;r<4&&t+r<e.length;r++)n=(n<<8)+e.charCodeAt(t+r);u^=n}else u^="number"==typeof e?e:2147483647*Math.random();u&=2147483647},extend:function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.uber=t.prototype,t.prototype.constructor===Object.prototype.constructor&&(t.prototype.constructor=t)},setNamespace:function(e,t){t&&e&&!t[e]&&(t[e]={})},unsetNamespace:function(e,t){t&&e&&t[e]&&delete t[e]},serializeSettings:function(e){var t={};for(var n in e){var r=e[n];try{r=JSON?JSON.stringify(r,(function(e,t){return OSF.OUtil.isDate(this[e])?OSF.DDA.SettingsManager.DateJSONPrefix+this[e].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t})):Sys.Serialization.JavaScriptSerializer.serialize(r),t[n]=r}catch(e){}}return t},deserializeSettings:function(e){var t={};for(var n in e=e||{}){var r=e[n];try{r=JSON?JSON.parse(r,(function(e,t){var n;return"string"==typeof t&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(n=new Date(parseInt(t.slice(5,-1))))?n:t})):Sys.Serialization.JavaScriptSerializer.deserialize(r,!0),t[n]=r}catch(e){}}return t},loadScript:function(e,t,n){if(e&&t){var r=window.document,i=s[e];if(i)i.loaded?t():i.pendingCallbacks.push(t);else{var o=r.createElement("script");o.type="text/javascript",i={loaded:!1,pendingCallbacks:[t],timer:null},s[e]=i;var a=function(){null!=i.timer&&(clearTimeout(i.timer),delete i.timer),i.loaded=!0;for(var e=i.pendingCallbacks.length,t=0;t<e;t++){i.pendingCallbacks.shift()()}},c=function(t){delete s[e],null!=i.timer&&(clearTimeout(i.timer),delete i.timer);for(var n=i.pendingCallbacks.length,r=0;r<n;r++){i.pendingCallbacks.shift()(t)}};o.readyState?o.onreadystatechange=function(){"loaded"!=o.readyState&&"complete"!=o.readyState||(o.onreadystatechange=null,a())}:o.onload=a,o.onerror=c,n=n||3e4,i.timer=setTimeout((function(){window.navigator.userAgent.indexOf("Trident")>0?c(null):c(new Event("Script load timed out"))}),n),o.setAttribute("crossOrigin","anonymous"),o.src=e,r.getElementsByTagName("head")[0].appendChild(o)}}},loadCSS:function(e){if(e){var t=window.document,n=t.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.getElementsByTagName("head")[0].appendChild(n)}},parseEnum:function(e,t){var n=t[e.trim()];if(void 0===n)throw OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+e),OsfMsAjaxFactory.msAjaxError.argument("str");return n},delayExecutionAndCache:function(){var e={calc:arguments[0]};return function(){return e.calc&&(e.val=e.calc.apply(this,arguments),delete e.calc),e.val}},getUniqueId:function(){return(e+=1).toString()},formatString:function(){var e=arguments,t=e[0];return t.replace(/{(\d+)}/gm,(function(t,n){var r=parseInt(n,10)+1;return void 0===e[r]?"{"+n+"}":e[r]}))},generateConversationId:function(){return[f(),f(),(new Date).getTime().toString()].join("_")},getFrameName:function(e){return i+e+this.generateConversationId()},addXdmInfoAsHash:function(e,n){return OSF.OUtil.addInfoAsHash(e,t,n,!1)},addSerializerVersionAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,n,t,!0)},addFlightsAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,r,t,!0)},addInfoAsHash:function(e,t,n,r){var i,a=(e=e.trim()||"").split(o),s=a.shift(),c=a.join(o);return i=r?[t,encodeURIComponent(n),c].join(""):[c,t,n].join(""),[s,o,i].join("")},parseHostInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(e){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(e,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(e,window.name)),t},parseXdmInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(e,n){return OSF.OUtil.parseInfoWithGivenFragment(t,i,!1,e,n)},parseSerializerVersion:function(e){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(e,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(e,window.name)),t},parseSerializerVersionFromWindowName:function(e,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(e,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment(n,"_serializer_version=",!0,e,t))},parseFlights:function(e){var t=OSF.OUtil.parseFlightsWithGivenFragment(e,window.location.hash);return 0==t.length&&(t=OSF.OUtil.parseFlightsFromWindowName(e,window.name)),t},checkFlight:function(e){return OSF.Flights&&OSF.Flights.indexOf(e)>=0},pushFlight:function(e){return OSF.Flights.indexOf(e)<0&&(OSF.Flights.push(e),!0)},getBooleanSetting:function(e){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,e)},getBooleanFromDictionary:function(e,t){var n=e&&t&&void 0!==e[t]&&e[t]&&("string"==typeof e[t]&&"TRUE"===e[t].toUpperCase()||"boolean"==typeof e[t]&&e[t]);return void 0!==n&&n},getIntFromDictionary:function(e,t){return e&&t&&void 0!==e[t]&&"string"==typeof e[t]?parseInt(e[t]):NaN},pushIntFlight:function(e,t){return!(e in OSF.IntFlights)&&(OSF.IntFlights[e]=t,!0)},getIntFlight:function(e){return OSF.IntFlights&&e in OSF.IntFlights?OSF.IntFlights[e]:NaN},parseFlightsFromWindowName:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(r,"_flights=",!0,e,t))},parseArrayWithDefault:function(e){var t=[];try{t=JSON.parse(e)}catch(e){}return Array.isArray(t)||(t=[]),t},parseInfoFromWindowName:function(e,t,n){try{var r=JSON.parse(t),i=null!=r?r[n]:null,o=p();if(!e&&o&&null!=r){var a=r[OSF.WindowNameItemKeys.BaseFrameName]+n;i?o.setItem(a,i):i=o.getItem(a)}return i}catch(e){return null}},parseInfoWithGivenFragment:function(e,t,n,r,i){var o=i.split(e),a=o.length>1?o[o.length-1]:null;n&&null!=a&&(a.indexOf("&")>=0&&(a=a.split("&")[0]),a=decodeURIComponent(a));var s=p();if(!r&&s){var c=window.name.indexOf(t);if(c>-1){var l=window.name.indexOf(";",c);-1==l&&(l=window.name.length);var u=window.name.substring(c,l);a?s.setItem(u,a):a=s.getItem(u)}}return a},getConversationId:function(){var e=window.location.search,t=null;if(e){var n=e.indexOf("&");(t=n>0?e.substring(1,n):e.substr(1))&&"="===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1))&&(t=decodeURIComponent(t))}return t},getInfoItems:function(e){var t=e.split("$");return void 0===t[1]&&(t=e.split("|")),void 0===t[1]&&(t=e.split("%7C")),t},getXdmFieldValue:function(e,t){var n="",r=OSF.OUtil.parseXdmInfo(t);if(r){var i=OSF.OUtil.getInfoItems(r);if(null!=i&&i.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:n=i[2];break;case OSF.XdmFieldName.AppId:n=i[1]}}return n},validateParamObject:function(e,t,n){var r=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:!1},{name:"expectedProperties",type:Object,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0}]);if(r)throw r;for(var i in t)if(r=Function._validateParameter(e[i],t[i],i))throw r},writeProfilerMark:function(e){window.msWriteProfilerMark&&(window.msWriteProfilerMark(e),OsfMsAjaxFactory.msAjaxDebug.trace(e))},outputDebug:function(e){void 0!==OsfMsAjaxFactory&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(e)},defineNondefaultProperty:function(e,t,n,r){for(var i in n=n||{},r){var o=r[i];null==n[o]&&(n[o]=!0)}return Object.defineProperty(e,t,n),e},defineNondefaultProperties:function(e,t,n){for(var r in t=t||{})OSF.OUtil.defineNondefaultProperty(e,r,t[r],n);return e},defineEnumerableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["enumerable"])},defineEnumerableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["enumerable"])},defineMutableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["writable","enumerable","configurable"])},defineMutableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["writable","enumerable","configurable"])},finalizeProperties:function(e,t){t=t||{};for(var n=Object.getOwnPropertyNames(e),r=n.length,i=0;i<r;i++){var o=n[i],a=Object.getOwnPropertyDescriptor(e,o);a.get||a.set||(a.writable=t.writable||!1),a.configurable=t.configurable||!1,a.enumerable=t.enumerable||!0,Object.defineProperty(e,o,a)}return e},mapList:function(e,t){var n=[];if(e)for(var r in e)n.push(t(e[r]));return n},listContainsKey:function(e,t){for(var n in e)if(t==n)return!0;return!1},listContainsValue:function(e,t){for(var n in e)if(t==e[n])return!0;return!1},augmentList:function(e,t){var n=e.push?function(t,n){e.push(n)}:function(t,n){e[t]=n};for(var r in t)n(r,t[r])},redefineList:function(e,t){for(var n in e)delete e[n];for(var r in t)e[r]=t[r]},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.apply(e)},isDate:function(e){return"[object Date]"===Object.prototype.toString.apply(e)},addEventListener:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):Sys.Browser.agent===Sys.Browser.InternetExplorer&&e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},removeEventListener:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):Sys.Browser.agent===Sys.Browser.InternetExplorer&&e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},xhrGet:function(e,t,n){var r;try{(r=new XMLHttpRequest).onreadystatechange=function(){4==r.readyState&&(200==r.status?t(r.responseText):n(r.status))},r.open("GET",e,!0),r.send()}catch(e){n(e)}},encodeBase64:function(e){if(!e)return e;var t,n,r,i,o,a,s,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[],u=[],f=0,p=e.length;do{t=e.charCodeAt(f++),n=e.charCodeAt(f++),r=e.charCodeAt(f++),s=0,i=255&t,o=t>>8,a=255&n,u[s++]=i>>2,u[s++]=(3&i)<<4|o>>4,u[s++]=(15&o)<<2|a>>6,u[s++]=63&a,isNaN(n)||(i=n>>8,o=255&r,a=r>>8,u[s++]=i>>2,u[s++]=(3&i)<<4|o>>4,u[s++]=(15&o)<<2|a>>6,u[s++]=63&a),isNaN(n)?u[s-1]=64:isNaN(r)&&(u[s-2]=64,u[s-1]=64);for(var d=0;d<s;d++)l.push(c.charAt(u[d]))}while(f<p);return l.join("")},getSessionStorage:function(){return p()},getLocalStorage:function(){if(!l){try{var e=window.localStorage}catch(t){e=null}l=new OfficeExt.SafeStorage(e)}return l},convertIntToCssHexColor:function(e){return"#"+(Number(e)+16777216).toString(16).slice(-6)},attachClickHandler:function(e,t){e.onclick=function(e){t()},e.ontouchend=function(e){t(),e.preventDefault()}},getQueryStringParamValue:function(e,t){var n=Function._validateParams(arguments,[{name:"queryString",type:String,mayBeNull:!1},{name:"paramName",type:String,mayBeNull:!1}]);if(n)return OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."),"";var r=new RegExp("[\\?&]"+t+"=([^&#]*)","i");return r.test(e)?r.exec(e)[1]:(OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."),"")},getHostnamePortionForLogging:function(e){var t=Function._validateParams(arguments,[{name:"hostname",type:String,mayBeNull:!1}]);if(t)return"";var n=e.split("."),r=n.length;return r>=2?n[r-2]+"."+n[r-1]:1==r?n[0]:void 0},isiOS:function(){return!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},startsWith:function(e,t,n){return n?e.substr(0,t.length)===t:e.startsWith(t)},containsPort:function(e,t,n,r){return this.startsWith(e,t+"//"+n+":"+r,!0)||this.startsWith(e,n+":"+r,!0)},getRedundandPortString:function(e,t){return e&&t?"https:"==t.protocol&&this.containsPort(e,"https:",t.hostname,"443")?":443":"http:"==t.protocol&&this.containsPort(e,"http:",t.hostname,"80")?":80":"":""},removeChar:function(e,t){return t<e.length-1?e.substring(0,t)+e.substring(t+1):t==e.length-1?e.substring(0,e.length-1):e},cleanUrlOfChar:function(e,t){var n;for(n=0;n<e.length;n++)if(e.charAt(n)===t){if(n+1>=e.length)return this.removeChar(e,n);if("/"===t){if("?"===e.charAt(n+1)||"#"===e.charAt(n+1))return this.removeChar(e,n)}else if("?"===t&&"#"===e.charAt(n+1))return this.removeChar(e,n)}return e},cleanUrl:function(e){if(e=this.cleanUrlOfChar(e,"/"),e=this.cleanUrlOfChar(e,"?"),"https://"==(e=this.cleanUrlOfChar(e,"#")).substr(0,8))-1!=(t=e.indexOf(":443"))&&(t!=e.length-4&&"/"!=e.charAt(t+4)&&"?"!=e.charAt(t+4)&&"#"!=e.charAt(t+4)||(e=e.substring(0,t)+e.substring(t+4)));else if("http://"==e.substr(0,7)){var t;-1!=(t=e.indexOf(":80"))&&(t!=e.length-3&&"/"!=e.charAt(t+3)&&"?"!=e.charAt(t+3)&&"#"!=e.charAt(t+3)||(e=e.substring(0,t)+e.substring(t+3)))}return e},parseUrl:function(e,t){if(void 0===t&&(t=!1),void 0!==e&&e){var n="NotHttps",r=this.isIE(),i={protocol:void 0,hostname:void 0,host:void 0,port:void 0,pathname:void 0,search:void 0,hash:void 0,isPortPartOfUrl:void 0};try{if(r){var o=document.createElement("a");if(o.href=e,!(o&&o.protocol&&o.host&&o.hostname&&o.href&&this.cleanUrl(o.href).toLowerCase()===this.cleanUrl(e).toLowerCase()))throw"InvalidUrl";if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=o.protocol)throw new Error(n);var a=this.getRedundandPortString(e,o);i.protocol=o.protocol,i.hostname=o.hostname,i.port=""==a?o.port:"",i.host=""!=a?o.hostname:o.host,i.pathname=(r?"/":"")+o.pathname,i.search=o.search,i.hash=o.hash,i.isPortPartOfUrl=this.containsPort(e,o.protocol,o.hostname,o.port)}else{var s=new URL(e);if(s&&s.protocol&&s.host&&s.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=s.protocol)throw new Error(n);i.protocol=s.protocol,i.hostname=s.hostname,i.port=s.port,i.host=s.host,i.pathname=s.pathname,i.search=s.search,i.hash=s.hash,i.isPortPartOfUrl=s.host.lastIndexOf(":"+s.port)==s.host.length-s.port.length-1}}}catch(e){if(e.message===n)throw e}return i}},shallowCopy:function(e){if(null==e)return null;if(e instanceof Object){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}var r=e.constructor();for(var i in e)e.hasOwnProperty(i)&&(r[i]=e[i]);return r}return e},createObject:function(e){var t=null;if(e){t={};for(var n=e.length,r=0;r<n;r++)t[e[r].name]=e[r].value}return t},addClass:function(e,t){if(!OSF.OUtil.hasClass(e,t)){var n=e.getAttribute(a);n?e.setAttribute(a,n+" "+t):e.setAttribute(a,t)}},removeClass:function(e,t){if(OSF.OUtil.hasClass(e,t)){var n=e.getAttribute(a),r=new RegExp("(\\s|^)"+t+"(\\s|$)");n=n.replace(r,""),e.setAttribute(a,n)}},hasClass:function(e,t){var n=e.getAttribute(a);return n&&n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},focusToFirstTabbable:function(e,t){var n,r,i=!1,o=function(e){i=!0},a=function(e,t,n){return t<0||t>e||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(e=d(e),n=t?e.length-1:0,0===e.length)return null;for(;!i&&n>=0&&n<e.length;)r=e[n],window.focus(),r.addEventListener("focus",o),r.focus(),r.removeEventListener("focus",o),n=a(e.length,n,t),i||r!==document.activeElement||(i=!0);return i?r:null},focusToNextTabbable:function(e,t,n){var r,i,o,a=!1,s=function(e){a=!0},c=function(e,t,n){return t<0||t>e||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(r=function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}(e=d(e),t),(i=c(e.length,r,n))<0)return null;for(;!a&&i>=0&&i<e.length;)(o=e[i]).addEventListener("focus",s),o.focus(),o.removeEventListener("focus",s),i=c(e.length,i,n),a||o!==document.activeElement||(a=!0);return a?o:null},isNullOrUndefined:function(e){return void 0===e||null===e},stringEndsWith:function(e,t){if(!OSF.OUtil.isNullOrUndefined(e)&&!OSF.OUtil.isNullOrUndefined(t)){if(t.length>e.length)return!1;if(e.substr(e.length-t.length)===t)return!0}return!1},hashCode:function(e){var t=0;if(!OSF.OUtil.isNullOrUndefined(e))for(var n=0,r=e.length;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return t},getValue:function(e,t){return OSF.OUtil.isNullOrUndefined(e)?t:e},externalNativeFunctionExists:function(e){return"unknown"===e||"undefined"!==e}}}(),OSF.OUtil.Guid=function(){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return{generateNewGuid:function(){for(var t="",n=(new Date).getTime(),r=0;r<32&&n>0;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[n%16],n=Math.floor(n/16);for(;r<32;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[Math.floor(16*Math.random())];return t}}}();try{OSF.Flights=OSF.OUtil.parseFlights(!0)}catch(e){}window.OSF=OSF,OSF.OUtil.setNamespace("OSF",window),OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3},OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614,Visio:8388615,OneNoteAndroid:4194305},OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"},OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"},OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39},OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"},OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006},OSF.OfficeAppContext=function(e,t,n,r,i,o,a,s,c,l,u,f,p,d,h,m,g,y,_,b,O,v,S,A,D,P,C){this._id=e,this._appName=t,this._appVersion=n,this._appUILocale=r,this._dataLocale=i,this._docUrl=o,this._clientMode=a,this._settings=s,this._reason=c,this._osfControlType=l,this._eToken=u,this._correlationId=f,this._appInstanceId=p,this._touchEnabled=d,this._commerceAllowed=h,this._appMinorVersion=m,this._requirementMatrix=g,this._hostCustomMessage=y,this._hostFullVersion=_,this._isDialog=!1,this._clientWindowHeight=b,this._clientWindowWidth=O,this._addinName=v,this._appDomains=S,this._dialogRequirementMatrix=A,this._featureGates=D,this._officeTheme=P,this._initialDisplayMode=C,this.get_id=function(){return this._id},this.get_appName=function(){return this._appName},this.get_appVersion=function(){return this._appVersion},this.get_appUILocale=function(){return this._appUILocale},this.get_dataLocale=function(){return this._dataLocale},this.get_docUrl=function(){return this._docUrl},this.get_clientMode=function(){return this._clientMode},this.get_bindings=function(){return this._bindings},this.get_settings=function(){return this._settings},this.get_reason=function(){return this._reason},this.get_osfControlType=function(){return this._osfControlType},this.get_eToken=function(){return this._eToken},this.get_correlationId=function(){return this._correlationId},this.get_appInstanceId=function(){return this._appInstanceId},this.get_touchEnabled=function(){return this._touchEnabled},this.get_commerceAllowed=function(){return this._commerceAllowed},this.get_appMinorVersion=function(){return this._appMinorVersion},this.get_requirementMatrix=function(){return this._requirementMatrix},this.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix},this.get_hostCustomMessage=function(){return this._hostCustomMessage},this.get_hostFullVersion=function(){return this._hostFullVersion},this.get_isDialog=function(){return this._isDialog},this.get_clientWindowHeight=function(){return this._clientWindowHeight},this.get_clientWindowWidth=function(){return this._clientWindowWidth},this.get_addinName=function(){return this._addinName},this.get_appDomains=function(){return this._appDomains},this.get_featureGates=function(){return this._featureGates},this.get_officeTheme=function(){return this._officeTheme},this.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}},OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1},OSF.ClientMode={ReadOnly:0,ReadWrite:1},OSF.OUtil.setNamespace("Microsoft",window),OSF.OUtil.setNamespace("Office",Microsoft),OSF.OUtil.setNamespace("Client",Microsoft.Office),OSF.OUtil.setNamespace("WebExtension",Microsoft.Office),Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",ControlActivation:"controlActivation"},Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"},Microsoft.Office.WebExtension.FilterType={All:"all"},Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"},OSF.OUtil.setNamespace("DDA",OSF),OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0},OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"},OSF.DDA.EventDescriptors={},OSF.DDA.ListDescriptors={},OSF.DDA.UI={},OSF.DDA.getXdmEventName=function(e,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?e+"_"+t:t},OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetAuthContextMethod:99,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidExecuteFeature:146,dispidQueryFeature:147,dispidMethodMax:147},OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidOlkSelectedItemsChangedEvent:53,dispidOlkSensitivityLabelChangedEvent:54,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63},OSF.DDA.ErrorCodeManager=function(){var e={};return{getErrorArgs:function(t){var n=e[t];return n?(n.name||(n.name=e[this.errorCodes.ooeInternalError].name),n.message||(n.message=e[this.errorCodes.ooeInternalError].message)):n=e[this.errorCodes.ooeInternalError],n},addErrorMessage:function(t,n){e[t]=n},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeModalDialogOpen:12012,ooeDocumentIsInactive:12013,ooeDialogParentIsMinimized:12014,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(t){e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:t.L_APICallFailed,message:t.L_WorkbookHiddenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:t.L_APICallFailed,message:t.L_WriteNotSupportedWhenModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_RequestPayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_ResponsePayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen]={name:t.L_DisplayDialogError,message:t.L_ModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive]={name:t.L_DisplayDialogError,message:t.L_DocumentIsInactive},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized]={name:t.L_DisplayDialogError,message:t.L_DialogParentIsMinimized},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:t.L_APINotSupported,message:t.L_SSOUnsupportedPlatform},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:t.L_OperationCancelledError,message:t.L_OperationCancelledErrorMessage}}}}(),function(e){!function(e){var t=function(){};e.RequirementVersion=t;var n=function(e){this.isSetSupported=function(e,t){if(null==e)return!1;null==t&&(t=0);var n=this._setMap._sets;if(n.hasOwnProperty(e.toLowerCase())){var r=n[e.toLowerCase()];try{var i=this._getVersion(r);t+="";var o=this._getVersion(t);if(i.major>0&&i.major>o.major)return!0;if(i.major>0&&i.minor>=0&&i.major==o.major&&i.minor>=o.minor)return!0}catch(e){return!1}}return!1},this._getVersion=function(e){var t=(e+="").split("."),n=0,r=0;if(t.length<2&&isNaN(Number(e)))throw"version format incorrect";if(n=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(n)||isNaN(r))throw"version format incorrect";return{minor:r,major:n}},this._setMap=e,this.isSetSupported=this.isSetSupported.bind(this)};e.RequirementMatrix=n;var r=function(e){this._addSetMap=function(e){for(var t in e)this._sets[t]=e[t]},this._sets=e};e.DefaultSetRequirement=r;var i=function(e){function t(){return e.call(this,{dialogapi:1.1})||this}return __extends(t,e),t}(r);e.DefaultRequiredDialogSetRequirement=i;var o=function(e){function t(){return e.call(this,{dialogorigin:1.1})||this}return __extends(t,e),t}(r);e.DefaultOptionalDialogSetRequirement=o;var a=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,excelapi:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelClientDefaultSetRequirement=a;var s=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(a);e.ExcelClientV1DefaultSetRequirement=s;var c=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookClientDefaultSetRequirement=c;var l=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1,wordapi:1.1})||this}return __extends(t,e),t}(r);e.WordClientDefaultSetRequirement=l;var u=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:1.1}),t}return __extends(t,e),t}(l);e.WordClientV1DefaultSetRequirement=u;var f=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointClientDefaultSetRequirement=f;var p=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(f);e.PowerpointClientV1DefaultSetRequirement=p;var d=function(e){function t(){return e.call(this,{selection:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ProjectClientDefaultSetRequirement=d;var h=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,file:1.1})||this}return __extends(t,e),t}(r);e.ExcelWebDefaultSetRequirement=h;var m=function(e){function t(){return e.call(this,{compressedfile:1.1,documentevents:1.1,file:1.1,imagecoercion:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablecoercion:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordWebDefaultSetRequirement=m;var g=function(e){function t(){return e.call(this,{activeview:1.1,settings:1.1})||this}return __extends(t,e),t}(r);e.PowerpointWebDefaultSetRequirement=g;var y=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookWebDefaultSetRequirement=y;var _=function(e){function t(){return e.call(this,{activeview:1.1,documentevents:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.SwayWebDefaultSetRequirement=_;var b=function(e){function t(){return e.call(this,{bindingevents:1.1,partialtablebindings:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1})||this}return __extends(t,e),t}(r);e.AccessWebDefaultSetRequirement=b;var O=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelIOSDefaultSetRequirement=O;var v=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordIOSDefaultSetRequirement=v;var S=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2}),t}return __extends(t,e),t}(v);e.WordIOSV1DefaultSetRequirement=S;var A=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointIOSDefaultSetRequirement=A;var D=function(e){function t(){return e.call(this,{mailbox:1.1})||this}return __extends(t,e),t}(r);e.OutlookIOSDefaultSetRequirement=D;var P=function(){function e(){}return e.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},e.getDefaultRequirementMatrix=function(t){this.initializeDefaultSetMatrix();var i=void 0,o=t.get_requirementMatrix();if(null!=o&&o.length>0&&"undefined"!=typeof JSON){var a=JSON.parse(t.get_requirementMatrix().toLowerCase());i=new n(new r(a))}else{var s=e.getClientFullVersionString(t);i=null!=e.DefaultSetArrayMatrix&&null!=e.DefaultSetArrayMatrix[s]?new n(e.DefaultSetArrayMatrix[s]):new n(new r({}))}return i},e.getDefaultDialogRequirementMatrix=function(e){var t=void 0,a=e.get_dialogRequirementMatrix();if(null!=a&&a.length>0&&"undefined"!=typeof JSON){var s=JSON.parse(e.get_requirementMatrix().toLowerCase());t=new r(s)}else{t=new i;var c=e.get_requirementMatrix();if(null!=c&&c.length>0&&"undefined"!=typeof JSON){s=JSON.parse(c.toLowerCase());for(var l in t._sets)s.hasOwnProperty(l)&&(t._sets[l]=s[l]);var u=new o;for(var l in u._sets)s.hasOwnProperty(l)&&(t._sets[l]=s[l])}}return new n(t)},e.getClientFullVersionString=function(e){var t=e.get_appMinorVersion(),n="",r="",i=e.get_appName();return(1024==i||4096==i||8192==i||65536==i)&&1==e.get_appVersion()?r=4096==i&&t>=15?"16.00.01":"16.00":64==e.get_appName()?r=e.get_appVersion():(n=t<10?"0"+t:""+t,r=e.get_appVersion()+"."+n),e.get_appName()+"-"+r},e.initializeDefaultSetMatrix=function(){e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1600]=new a,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1600]=new l,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1600]=new f,e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1601]=new s,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1601]=new u,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1601]=new p,e.DefaultSetArrayMatrix[e.Outlook_RCLIENT_1600]=new c,e.DefaultSetArrayMatrix[e.Excel_WAC_1600]=new h,e.DefaultSetArrayMatrix[e.Word_WAC_1600]=new m,e.DefaultSetArrayMatrix[e.Outlook_WAC_1600]=new y,e.DefaultSetArrayMatrix[e.Outlook_WAC_1601]=new y,e.DefaultSetArrayMatrix[e.Project_RCLIENT_1600]=new d,e.DefaultSetArrayMatrix[e.Access_WAC_1600]=new b,e.DefaultSetArrayMatrix[e.PowerPoint_WAC_1600]=new g,e.DefaultSetArrayMatrix[e.Excel_IOS_1600]=new O,e.DefaultSetArrayMatrix[e.SWAY_WAC_1600]=new _,e.DefaultSetArrayMatrix[e.Word_IOS_1600]=new v,e.DefaultSetArrayMatrix[e.Word_IOS_16001]=new S,e.DefaultSetArrayMatrix[e.PowerPoint_IOS_1600]=new A,e.DefaultSetArrayMatrix[e.Outlook_IOS_1600]=new D},e.Excel_RCLIENT_1600="1-16.00",e.Excel_RCLIENT_1601="1-16.01",e.Word_RCLIENT_1600="2-16.00",e.Word_RCLIENT_1601="2-16.01",e.PowerPoint_RCLIENT_1600="4-16.00",e.PowerPoint_RCLIENT_1601="4-16.01",e.Outlook_RCLIENT_1600="8-16.00",e.Excel_WAC_1600="16-16.00",e.Word_WAC_1600="32-16.00",e.Outlook_WAC_1600="64-16.00",e.Outlook_WAC_1601="64-16.01",e.Project_RCLIENT_1600="128-16.00",e.Access_WAC_1600="256-16.00",e.PowerPoint_WAC_1600="512-16.00",e.Excel_IOS_1600="1024-16.00",e.SWAY_WAC_1600="2048-16.00",e.Word_IOS_1600="4096-16.00",e.Word_IOS_16001="4096-16.00.01",e.PowerPoint_IOS_1600="8192-16.00",e.Outlook_IOS_1600="65536-16.00",e.DefaultSetArrayMatrix={},e}();e.RequirementsMatrixFactory=P}(e.Requirement||(e.Requirement={}))}(OfficeExt||(OfficeExt={})),OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"},Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"},OSF.NamespaceManager=function(){var e,t=!1;return{enableShortcut:function(){t||(window.Office?e=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,t=!0)},disableShortcut:function(){t&&(e?window.Office=e:OSF.OUtil.unsetNamespace("Office",window),t=!1)}}}(),OSF.NamespaceManager.enableShortcut(),Microsoft.Office.WebExtension.useShortNamespace=function(e){e?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()},Microsoft.Office.WebExtension.select=function(e,t){var n;if(e&&"string"==typeof e){var r=e.indexOf("#");if(-1!=r){var i=e.substring(0,r),o=e.substring(r+1);switch(i){case"binding":case"bindings":o&&(n=new OSF.DDA.BindingPromise(o))}}}if(n)return n.onFail=t,n;if(t){var a=typeof t;if("function"!=a)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,a);var s={};s[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}},OSF.DDA.Context=function(e,t,n,r,i){if(OSF.OUtil.defineEnumerableProperties(this,{contentLanguage:{value:e.get_dataLocale()},displayLanguage:{value:e.get_appUILocale()},touchEnabled:{value:e.get_touchEnabled()},commerceAllowed:{value:e.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(e.get_hostFullVersion())}}),n&&OSF.OUtil.defineEnumerableProperty(this,"license",{value:n}),e.ui&&OSF.OUtil.defineEnumerableProperty(this,"ui",{value:e.ui}),e.auth&&OSF.OUtil.defineEnumerableProperty(this,"auth",{value:e.auth}),e.webAuth&&OSF.OUtil.defineEnumerableProperty(this,"webAuth",{value:e.webAuth}),e.application&&OSF.OUtil.defineEnumerableProperty(this,"application",{value:e.application}),e.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(this,"extensionLifeCycle",{value:e.extensionLifeCycle}),e.messaging&&OSF.OUtil.defineEnumerableProperty(this,"messaging",{value:e.messaging}),e.ui&&e.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(this,"taskPaneAction",{value:e.ui.taskPaneAction}),e.ui&&e.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(this,"ribbonGallery",{value:e.ui.ribbonGallery}),e.get_isDialog()){var o=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:o})}else{if(t&&OSF.OUtil.defineEnumerableProperty(this,"document",{value:t}),r){var a=r.displayName||"appOM";delete r.displayName,OSF.OUtil.defineEnumerableProperty(this,a,{value:r})}e.get_officeTheme()?OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return e.get_officeTheme()}}):i&&OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return i()}});o=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:o})}},OSF.DDA.OutlookContext=function(e,t,n,r,i){OSF.DDA.OutlookContext.uber.constructor.call(this,e,null,n,r,i),t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t}),e.sensitivityLabelsCatalog&&OSF.OUtil.defineEnumerableProperty(this,"sensitivityLabelsCatalog",{value:e.sensitivityLabelsCatalog()})},OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context),OSF.DDA.OutlookAppOm=function(e,t,n){},OSF.DDA.Application=function(e){},OSF.DDA.Document=function(e,t){var n;switch(e.get_clientMode()){case OSF.ClientMode.ReadOnly:n=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:n=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t}),OSF.OUtil.defineMutableProperties(this,{mode:{value:n},url:{value:e.get_docUrl()}})},OSF.DDA.JsomDocument=function(e,t,n){OSF.DDA.JsomDocument.uber.constructor.call(this,e,n),t&&OSF.OUtil.defineEnumerableProperty(this,"bindings",{get:function(){return t}});var r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetSelectedDataAsync,r.SetSelectedDataAsync]),OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))},OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document),OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var e;return OSF&&OSF._OfficeAppFactory&&(e=OSF._OfficeAppFactory.getContext()),e}}),OSF.DDA.License=function(e){OSF.OUtil.defineEnumerableProperty(this,"value",{value:e})},OSF.DDA.ApiMethodCall=function(e,t,n,r,i){var o=e.length,a=OSF.OUtil.delayExecutionAndCache((function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,i)}));this.verifyArguments=function(e,t){for(var n in e){var r=e[n],i=t[n];if(r.enum)switch(typeof i){case"string":if(OSF.OUtil.listContainsValue(r.enum,i))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw a()}if(r.types&&!OSF.OUtil.listContainsValue(r.types,typeof i))throw a()}},this.extractRequiredArguments=function(t,n,r){if(t.length<o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments);var i,s=[];for(i=0;i<o;i++)s.push(t[i]);this.verifyArguments(e,s);var c={};for(i=0;i<o;i++){var l=e[i],u=s[i];if(l.verify)if(!l.verify(u,n,r))throw a();c[l.name]=u}return c},this.fillOptions=function(e,n,r,i){for(var o in e=e||{},t)if(!OSF.OUtil.listContainsKey(e,o)){var a=void 0,s=t[o];s.calculate&&n&&(a=s.calculate(n,r,i)),a||void 0===s.defaultValue||(a=s.defaultValue),e[o]=a}return e},this.constructCallArgs=function(e,t,i,o){var a={};for(var s in e)a[s]=e[s];for(var c in t)a[c]=t[c];for(var l in n)a[l]=n[l](i,o);return r&&(a=r(a,i,o)),a}},OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA),OSF.DDA.AsyncResultEnum.Properties={Context:"Context",Value:"Value",Status:"Status",Error:"Error"},Microsoft.Office.WebExtension.AsyncResultStatus={Succeeded:"succeeded",Failed:"failed"},OSF.DDA.AsyncResultEnum.ErrorCode={Success:0,Failed:1},OSF.DDA.AsyncResultEnum.ErrorProperties={Name:"Name",Message:"Message",Code:"Code"},OSF.DDA.AsyncMethodNames={},OSF.DDA.AsyncMethodNames.addNames=function(e){for(var t in e){var n={};OSF.OUtil.defineEnumerableProperties(n,{id:{value:t},displayName:{value:e[t]}}),OSF.DDA.AsyncMethodNames[t]=n}},OSF.DDA.AsyncMethodCall=function(e,t,n,r,i,o,a){var s=e.length,c=new OSF.DDA.ApiMethodCall(e,t,n,o,a);this.verifyAndExtractCall=function(e,n,r){var i=c.extractRequiredArguments(e,n,r),o=function(e,n,r,i){if(e.length>s+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,a,l=e.length-1;l>=s;l--){var u=e[l];switch(typeof u){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);o=u;break;case"function":if(a)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);a=u;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}if(o=c.fillOptions(o,n,r,i),a){if(o[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;o[Microsoft.Office.WebExtension.Parameters.Callback]=a}return c.verifyArguments(t,o),o}(e,i,n,r);return c.constructCallArgs(i,o,n,r)},this.processResponse=function(e,t,n,o){return e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,n,o):t:i?i(e,t):OSF.DDA.ErrorCodeManager.getErrorArgs(e)},this.getCallArgs=function(e){for(var t,n,r=e.length-1;r>=s;r--){var i=e[r];switch(typeof i){case"object":t=i;break;case"function":n=i}}return t=t||{},n&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=n),t}},OSF.DDA.AsyncMethodCallFactory={manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[],n=e.privateStateCallbacks?OSF.OUtil.createObject(e.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(e.requiredArguments||[],t,n,e.onSucceeded,e.onFailed,e.checkCallArgs,e.method.displayName)}},OSF.DDA.AsyncMethodCalls={},OSF.DDA.AsyncMethodCalls.define=function(e){OSF.DDA.AsyncMethodCalls[e.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(e)},OSF.DDA.Error=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{name:{value:e},message:{value:t},code:{value:n}})},OSF.DDA.AsyncResult=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:e[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}}),e[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:e[OSF.DDA.AsyncResultEnum.Properties.Context]}),t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})},OSF.DDA.issueAsyncResult=function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Callback];if(r){var i,o={};o[OSF.DDA.AsyncResultEnum.Properties.Context]=e[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?o[OSF.DDA.AsyncResultEnum.Properties.Value]=n:(i={},n=n||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=n.name||n,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=n.message||n),r(new OSF.DDA.AsyncResult(o,i))}},OSF.DDA.SyncMethodNames={},OSF.DDA.SyncMethodNames.addNames=function(e){for(var t in e){var n={};OSF.OUtil.defineEnumerableProperties(n,{id:{value:t},displayName:{value:e[t]}}),OSF.DDA.SyncMethodNames[t]=n}},OSF.DDA.SyncMethodCall=function(e,t,n,r,i){var o=e.length,a=new OSF.DDA.ApiMethodCall(e,t,n,r,i);this.verifyAndExtractCall=function(e,n,r){var i=a.extractRequiredArguments(e,n,r),s=function(e,n,r,i){if(e.length>o+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var s,c=e.length-1;c>=o;c--){var l=e[c];switch(typeof l){case"object":if(s)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);s=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}return s=a.fillOptions(s,n,r,i),a.verifyArguments(t,s),s}(e,i,n,r);return a.constructCallArgs(i,s,n,r)}},OSF.DDA.SyncMethodCallFactory={manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[];return new OSF.DDA.SyncMethodCall(e.requiredArguments||[],t,e.privateStateCallbacks,e.checkCallArgs,e.method.displayName)}},OSF.DDA.SyncMethodCalls={},OSF.DDA.SyncMethodCalls.define=function(e){OSF.DDA.SyncMethodCalls[e.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(e)},OSF.DDA.ListType=function(){var e={};return{setListType:function(t,n){e[t]=n},isListType:function(t){return OSF.OUtil.listContainsKey(e,t)},getDescriptor:function(t){return e[t]}}}(),OSF.DDA.HostParameterMap=function(e,t){var n="toHost",r="fromHost",i="sourceData",o="self",a={};function s(n,i){var o=n?{}:void 0;for(var c in n){var l,u=n[c];if(OSF.DDA.ListType.isListType(c))for(var f in l=[],u)l.push(s(u[f],i));else if(OSF.OUtil.listContainsKey(a,c))l=a[c][i](u);else if(i==r&&e.preserveNesting(c))l=s(u,i);else{var p=t[c];if(p){var d=p[i];d&&void 0===(l=d[u])&&(l=u)}else l=u}o[c]=l}return o}function c(n,r,a){var c,l=t[n][a];if("toHost"==a)c=function n(r,i){var a;for(var s in i){var c;if(null!=(c=e.isComplexType(s)?n(r,t[s].toHost):r[s])){a||(a={});var l=i[s];l==o&&(l=s),a[l]=e.pack(s,c)}}return a}(s(r,a),l);else if("fromHost"==a){c=s(function n(r,a,s){for(var c in s||(s={}),a){var l,u,f=a[c];if(f==o)l=r;else{if(f==i){s[c]=r.toArray();continue}l=r[f]}if(null==l)s[c]=void 0;else if(l=e.unpack(c,l),e.isComplexType(c))u=t[c].fromHost,e.preserveNesting(c)?s[c]=n(l,u):n(l,u,s);else if(OSF.DDA.ListType.isListType(c)){(u={})[OSF.DDA.ListType.getDescriptor(c)]=o;var p=new Array(l.length);for(var d in l)p[d]=n(l[d],u);s[c]=p}else s[c]=l}return s}(r,l),a)}return c}a[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(e){if(null!=e&&void 0!==e.rows){var t={};t[OSF.DDA.TableDataProperties.TableRows]=e.rows,t[OSF.DDA.TableDataProperties.TableHeaders]=e.headers,e=t}return e},fromHost:function(e){return e}},a[Microsoft.Office.WebExtension.Parameters.SampleData]=a[Microsoft.Office.WebExtension.Parameters.Data],t||(t={}),this.addMapping=function(e,n){var r,i;if(n.map)for(var a in i={},r=n.map){var s=r[a];s==o&&(s=a),i[s]=a}else r=n.toHost,i=n.fromHost;var c=t[e];if(c){var l=c.toHost;for(var u in l)r[u]=l[u];for(var f in l=c.fromHost)i[f]=l[f]}else c=t[e]={};c.toHost=r,c.fromHost=i},this.toHost=function(e,t){return c(e,t,n)},this.fromHost=function(e,t){return c(e,t,r)},this.self=o,this.sourceData=i,this.addComplexType=function(t){e.addComplexType(t)},this.getDynamicType=function(t){return e.getDynamicType(t)},this.setDynamicType=function(t,n){e.setDynamicType(t,n)},this.dynamicTypes=a,this.doMapValues=function(e,t){return s(e,t)}},OSF.DDA.SpecialProcessor=function(e,t){this.addComplexType=function(t){e.push(t)},this.getDynamicType=function(e){return t[e]},this.setDynamicType=function(e,n){t[e]=n},this.isComplexType=function(t){return OSF.OUtil.listContainsValue(e,t)},this.isDynamicType=function(e){return OSF.OUtil.listContainsKey(t,e)},this.preserveNesting=function(e){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,e)},this.pack=function(e,n){return this.isDynamicType(e)?t[e].toHost(n):n},this.unpack=function(e,n){return this.isDynamicType(e)?t[e].fromHost(n):n}},OSF.DDA.getDecoratedParameterMap=function(e,t){var n=new OSF.DDA.HostParameterMap(e);n.self;function r(e){var t=null;if(e){t={};for(var n=e.length,r=0;r<n;r++)t[e[r].name]=e[r].value}return t}for(var i in n.define=function(e){var t={},i=r(e.toHost);e.invertible?t.map=i:e.canonical?t.toHost=t.fromHost=i:(t.toHost=i,t.fromHost=r(e.fromHost)),n.addMapping(e.type,t),e.isComplexType&&n.addComplexType(e.type)},t)n.define(t[i]);return n},OSF.OUtil.setNamespace("DispIdHost",OSF.DDA),OSF.DDA.DispIdHost.Methods={InvokeMethod:"invokeMethod",AddEventHandler:"addEventHandler",RemoveEventHandler:"removeEventHandler",OpenDialog:"openDialog",CloseDialog:"closeDialog",MessageParent:"messageParent",SendMessage:"sendMessage"},OSF.DDA.DispIdHost.Delegates={ExecuteAsync:"executeAsync",RegisterEventAsync:"registerEventAsync",UnregisterEventAsync:"unregisterEventAsync",ParameterMap:"parameterMap",OpenDialog:"openDialog",CloseDialog:"closeDialog",MessageParent:"messageParent",SendMessage:"sendMessage"},OSF.DDA.DispIdHost.Facade=function(e,t){var n={},r=OSF.DDA.AsyncMethodNames,i=OSF.DDA.MethodDispId,o={GoToByIdAsync:i.dispidNavigateToMethod,GetSelectedDataAsync:i.dispidGetSelectedDataMethod,SetSelectedDataAsync:i.dispidSetSelectedDataMethod,GetDocumentCopyChunkAsync:i.dispidGetDocumentCopyChunkMethod,ReleaseDocumentCopyAsync:i.dispidReleaseDocumentCopyMethod,GetDocumentCopyAsync:i.dispidGetDocumentCopyMethod,AddFromSelectionAsync:i.dispidAddBindingFromSelectionMethod,AddFromPromptAsync:i.dispidAddBindingFromPromptMethod,AddFromNamedItemAsync:i.dispidAddBindingFromNamedItemMethod,GetAllAsync:i.dispidGetAllBindingsMethod,GetByIdAsync:i.dispidGetBindingMethod,ReleaseByIdAsync:i.dispidReleaseBindingMethod,GetDataAsync:i.dispidGetBindingDataMethod,SetDataAsync:i.dispidSetBindingDataMethod,AddRowsAsync:i.dispidAddRowsMethod,AddColumnsAsync:i.dispidAddColumnsMethod,DeleteAllDataValuesAsync:i.dispidClearAllRowsMethod,RefreshAsync:i.dispidLoadSettingsMethod,SaveAsync:i.dispidSaveSettingsMethod,GetActiveViewAsync:i.dispidGetActiveViewMethod,GetFilePropertiesAsync:i.dispidGetFilePropertiesMethod,GetOfficeThemeAsync:i.dispidGetOfficeThemeMethod,GetDocumentThemeAsync:i.dispidGetDocumentThemeMethod,ClearFormatsAsync:i.dispidClearFormatsMethod,SetTableOptionsAsync:i.dispidSetTableOptionsMethod,SetFormatsAsync:i.dispidSetFormatsMethod,GetAccessTokenAsync:i.dispidGetAccessTokenMethod,GetAuthContextAsync:i.dispidGetAuthContextMethod,ExecuteRichApiRequestAsync:i.dispidExecuteRichApiRequestMethod,AppCommandInvocationCompletedAsync:i.dispidAppCommandInvocationCompletedMethod,CloseContainerAsync:i.dispidCloseContainerMethod,OpenBrowserWindow:i.dispidOpenBrowserWindow,CreateDocumentAsync:i.dispidCreateDocumentMethod,InsertFormAsync:i.dispidInsertFormMethod,ExecuteFeature:i.dispidExecuteFeature,QueryFeature:i.dispidQueryFeature,AddDataPartAsync:i.dispidAddDataPartMethod,GetDataPartByIdAsync:i.dispidGetDataPartByIdMethod,GetDataPartsByNameSpaceAsync:i.dispidGetDataPartsByNamespaceMethod,GetPartXmlAsync:i.dispidGetDataPartXmlMethod,GetPartNodesAsync:i.dispidGetDataPartNodesMethod,DeleteDataPartAsync:i.dispidDeleteDataPartMethod,GetNodeValueAsync:i.dispidGetDataNodeValueMethod,GetNodeXmlAsync:i.dispidGetDataNodeXmlMethod,GetRelativeNodesAsync:i.dispidGetDataNodesMethod,SetNodeValueAsync:i.dispidSetDataNodeValueMethod,SetNodeXmlAsync:i.dispidSetDataNodeXmlMethod,AddDataPartNamespaceAsync:i.dispidAddDataNamespaceMethod,GetDataPartNamespaceAsync:i.dispidGetDataUriByPrefixMethod,GetDataPartPrefixAsync:i.dispidGetDataPrefixByUriMethod,GetNodeTextAsync:i.dispidGetDataNodeTextMethod,SetNodeTextAsync:i.dispidSetDataNodeTextMethod,GetSelectedTask:i.dispidGetSelectedTaskMethod,GetTask:i.dispidGetTaskMethod,GetWSSUrl:i.dispidGetWSSUrlMethod,GetTaskField:i.dispidGetTaskFieldMethod,GetSelectedResource:i.dispidGetSelectedResourceMethod,GetResourceField:i.dispidGetResourceFieldMethod,GetProjectField:i.dispidGetProjectFieldMethod,GetSelectedView:i.dispidGetSelectedViewMethod,GetTaskByIndex:i.dispidGetTaskByIndexMethod,GetResourceByIndex:i.dispidGetResourceByIndexMethod,SetTaskField:i.dispidSetTaskFieldMethod,SetResourceField:i.dispidSetResourceFieldMethod,GetMaxTaskIndex:i.dispidGetMaxTaskIndexMethod,GetMaxResourceIndex:i.dispidGetMaxResourceIndexMethod,CreateTask:i.dispidCreateTaskMethod};for(var a in o)r[a]&&(n[r[a].id]=o[a]);r=OSF.DDA.SyncMethodNames;var s={MessageParent:(i=OSF.DDA.MethodDispId).dispidMessageParentMethod,SendMessage:i.dispidSendMessageMethod};for(var a in s)r[a]&&(n[r[a].id]=s[a]);r=Microsoft.Office.WebExtension.EventType;var c={SettingsChanged:(i=OSF.DDA.EventDispId).dispidSettingsChangedEvent,DocumentSelectionChanged:i.dispidDocumentSelectionChangedEvent,BindingSelectionChanged:i.dispidBindingSelectionChangedEvent,BindingDataChanged:i.dispidBindingDataChangedEvent,ActiveViewChanged:i.dispidActiveViewChangedEvent,OfficeThemeChanged:i.dispidOfficeThemeChangedEvent,DocumentThemeChanged:i.dispidDocumentThemeChangedEvent,AppCommandInvoked:i.dispidAppCommandInvokedEvent,DialogMessageReceived:i.dispidDialogMessageReceivedEvent,DialogParentMessageReceived:i.dispidDialogParentMessageReceivedEvent,ObjectDeleted:i.dispidObjectDeletedEvent,ObjectSelectionChanged:i.dispidObjectSelectionChangedEvent,ObjectDataChanged:i.dispidObjectDataChangedEvent,ContentControlAdded:i.dispidContentControlAddedEvent,RichApiMessage:i.dispidRichApiMessageEvent,ItemChanged:i.dispidOlkItemSelectedChangedEvent,RecipientsChanged:i.dispidOlkRecipientsChangedEvent,AppointmentTimeChanged:i.dispidOlkAppointmentTimeChangedEvent,RecurrenceChanged:i.dispidOlkRecurrenceChangedEvent,AttachmentsChanged:i.dispidOlkAttachmentsChangedEvent,EnhancedLocationsChanged:i.dispidOlkEnhancedLocationsChangedEvent,InfobarClicked:i.dispidOlkInfobarClickedEvent,SelectedItemsChanged:i.dispidOlkSelectedItemsChangedEvent,SensitivityLabelChanged:i.dispidOlkSensitivityLabelChangedEvent,TaskSelectionChanged:i.dispidTaskSelectionChangedEvent,ResourceSelectionChanged:i.dispidResourceSelectionChangedEvent,ViewSelectionChanged:i.dispidViewSelectionChangedEvent,DataNodeInserted:i.dispidDataNodeAddedEvent,DataNodeReplaced:i.dispidDataNodeReplacedEvent,DataNodeDeleted:i.dispidDataNodeDeletedEvent};for(var l in c)r[l]&&(n[r[l]]=c[l]);function u(e){return e==OSF.DDA.EventDispId.dispidObjectDeletedEvent||e==OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent||e==OSF.DDA.EventDispId.dispidObjectDataChangedEvent||e==OSF.DDA.EventDispId.dispidContentControlAddedEvent}function f(e,t,n,r){if("number"!=typeof e)throw e;r||(r=t.getCallArgs(n)),OSF.DDA.issueAsyncResult(r,e,OSF.DDA.ErrorCodeManager.getErrorArgs(e))}this[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function(r,i,o,a){var s;try{var c=r.id,l=OSF.DDA.AsyncMethodCalls[c];s=l.verifyAndExtractCall(i,o,a);var u=n[c],p=e(c),d=null;if(window.Excel&&window.Office.context.requirements.isSetSupported("RedirectV1Api")&&(window.Excel._RedirectV1APIs=!0),window.Excel&&window.Excel._RedirectV1APIs&&(d=window.Excel._V1APIMap[c])){var h=OSF.OUtil.shallowCopy(s);delete h[Microsoft.Office.WebExtension.Parameters.AsyncContext],d.preprocess&&(h=d.preprocess(h));var m=new window.Excel.RequestContext,g=d.call(m,h);m.sync().then((function(){var e=g.value,t=e.status;delete e.status,delete e["@odata.type"],d.postprocess&&(e=d.postprocess(e,h)),0!=t&&(e=OSF.DDA.ErrorCodeManager.getErrorArgs(t)),OSF.DDA.issueAsyncResult(s,t,e)})).catch((function(e){OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null)}))}else{var y;y=t.toHost?t.toHost(u,s):s;var _=(new Date).getTime();p[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:u,hostCallArgs:y,onCalling:function(){},onReceiving:function(){},onComplete:function(e,n){var r;r=e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&t.fromHost?t.fromHost(u,n):n;var i=l.processResponse(e,r,o,s);OSF.DDA.issueAsyncResult(s,e,i),!OSF.AppTelemetry||OSF.ConstantNames&&OSF.ConstantNames.IsCustomFunctionsRuntime||OSF.AppTelemetry.onMethodDone(u,y,Math.abs((new Date).getTime()-_),e)}})}}catch(e){f(e,l,i,s)}},this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function(r,i,o,a){var s,c,l,p=!1;function d(e){var t;e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&((p?i.addObjectEventHandler(c,s[Microsoft.Office.WebExtension.Parameters.Id],l):i.addEventHandler(c,l))||(e=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed));e!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(t=OSF.DDA.ErrorCodeManager.getErrorArgs(e)),OSF.DDA.issueAsyncResult(s,e,t)}try{var h=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id];if(s=h.verifyAndExtractCall(r,o,i),c=s[Microsoft.Office.WebExtension.Parameters.EventType],l=s[Microsoft.Office.WebExtension.Parameters.Handler],a)return void d(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);var m=n[c],g=(p=u(m))?s[Microsoft.Office.WebExtension.Parameters.Id]:o.id||"";if(0==(p?i.getObjectEventHandlerCount(c,g):i.getEventHandlerCount(c)))(0,e(c)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync])({eventType:c,dispId:m,targetId:g,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:d,onEvent:function(e){var n=null;if(OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.WordEditorAddinThemeSupportEnabled)){var r=OSF._OfficeAppFactory.getHostInfo();n=r&&"web"==r.hostPlatform.toLowerCase()&&m==OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent?e:t.fromHost(m,e)}else n=t.fromHost(m,e);p?i.fireObjectEvent(g,OSF.DDA.OMFactory.manufactureEventArgs(c,g,n)):i.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(c,o,n))}});else d(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(e){f(e,h,r,s)}},this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function(t,r,i){var o,a,s,c=!1;function l(e){var t;e!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(t=OSF.DDA.ErrorCodeManager.getErrorArgs(e)),OSF.DDA.issueAsyncResult(o,e,t)}try{var p=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];a=(o=p.verifyAndExtractCall(t,i,r))[Microsoft.Office.WebExtension.Parameters.EventType],s=o[Microsoft.Office.WebExtension.Parameters.Handler];var d,h,m=n[a],g=(c=u(m))?o[Microsoft.Office.WebExtension.Parameters.Id]:i.id||"";null===s?(h=c?r.clearObjectEventHandlers(a,g):r.clearEventHandlers(a),d=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):d=(h=c?r.removeObjectEventHandler(a,g,s):r.removeEventHandler(a,s))?OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist;var y=c?r.getObjectEventHandlerCount(a,g):r.getEventHandlerCount(a);if(h&&0==y)(0,e(a)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync])({eventType:a,dispId:m,targetId:g,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:l});else l(d)}catch(e){f(e,p,t,o)}},this[OSF.DDA.DispIdHost.Methods.OpenDialog]=function(r,i,o,a){var s,c,l=null,u=Microsoft.Office.WebExtension.EventType.DialogMessageReceived,p=Microsoft.Office.WebExtension.EventType.DialogEventReceived;function d(e){if(e!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)n=OSF.DDA.ErrorCodeManager.getErrorArgs(e);else{var t={};t[Microsoft.Office.WebExtension.Parameters.Id]=c,t[Microsoft.Office.WebExtension.Parameters.Data]=i;var n=l.processResponse(e,t,o,s);OSF.DialogShownStatus.hasDialogShown=!0,i.clearEventHandlers(u),i.clearEventHandlers(p)}OSF.DDA.issueAsyncResult(s,e,n)}try{if(null!=u&&null!=p||d(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported),a){if(null==OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync)return void d(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);l=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.id]}else{if(null==OSF.DDA.AsyncMethodNames.DisplayDialogAsync)return void d(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);l=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]}s=l.verifyAndExtractCall(r,o,i);var h=n[u],m=e(u),g=null!=m[OSF.DDA.DispIdHost.Delegates.OpenDialog]?m[OSF.DDA.DispIdHost.Delegates.OpenDialog]:m[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];s.isModal=a,c=JSON.stringify(s),OSF.DialogShownStatus.hasDialogShown||(i.clearQueuedEvent(u),i.clearQueuedEvent(p),i.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived)),g({eventType:u,dispId:h,targetId:c,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:d,onEvent:function(e){var n=t.fromHost(h,e),r=OSF.DDA.OMFactory.manufactureEventArgs(u,o,n);if(r.type==p){var a=OSF.DDA.ErrorCodeManager.getErrorArgs(r.error),s={};s[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,s[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a,s[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a,r.error=new OSF.DDA.Error(s[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],s[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],s[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}i.fireOrQueueEvent(r),n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed&&(i.clearEventHandlers(u),i.clearEventHandlers(p),i.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived),OSF.DialogShownStatus.hasDialogShown=!1)}})}catch(e){f(e,l,r,s)}},this[OSF.DDA.DispIdHost.Methods.CloseDialog]=function(t,r,i,o){var a,s,c,l=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;try{var u=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id];a=u.verifyAndExtractCall(t,o,i),s=Microsoft.Office.WebExtension.EventType.DialogMessageReceived,c=Microsoft.Office.WebExtension.EventType.DialogEventReceived,i.clearEventHandlers(s),i.clearEventHandlers(c);var p=n[s],d=e(s);(null!=d[OSF.DDA.DispIdHost.Delegates.CloseDialog]?d[OSF.DDA.DispIdHost.Delegates.CloseDialog]:d[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync])({eventType:s,dispId:p,targetId:r,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:function(e){l=e,OSF.DialogShownStatus.hasDialogShown=!1}})}catch(e){f(e,u,t,a)}if(l!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,l)},this[OSF.DDA.DispIdHost.Methods.MessageParent]=function(t,r){var i=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id].verifyAndExtractCall(t,r,{});return(0,e(OSF.DDA.SyncMethodNames.MessageParent.id)[OSF.DDA.DispIdHost.Delegates.MessageParent])({dispId:n[OSF.DDA.SyncMethodNames.MessageParent.id],hostCallArgs:i,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})},this[OSF.DDA.DispIdHost.Methods.SendMessage]=function(t,r,i){var o=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id].verifyAndExtractCall(t,i,{});return(0,e(OSF.DDA.SyncMethodNames.SendMessage.id)[OSF.DDA.DispIdHost.Delegates.SendMessage])({dispId:n[OSF.DDA.SyncMethodNames.SendMessage.id],hostCallArgs:o,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})}},OSF.DDA.DispIdHost.addAsyncMethods=function(e,t,n){for(var r in t){var i=t[r],o=i.displayName;e[o]||OSF.OUtil.defineEnumerableProperty(e,o,{value:function(t){return function(){var r=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod];r(t,arguments,e,n)}}(i)})}},OSF.DDA.DispIdHost.addEventSupport=function(e,t,n){var r=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName,i=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;e[r]||OSF.OUtil.defineEnumerableProperty(e,r,{value:function(){var r=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler];r(arguments,t,e,n)}}),e[i]||OSF.OUtil.defineEnumerableProperty(e,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler];n(arguments,t,e)}})},function(e){var t=function(){function e(){}return e.isInstanceOfType=function(e,t){if(null==t)return!1;if(t instanceof e)return!0;var n=t.constructor;return n&&"function"==typeof n&&n.__typeName&&"Object"!==n.__typeName||(n=Object),!(n!==e)||n.__typeName&&e.__typeName&&n.__typeName===e.__typeName},e}();e.MsAjaxTypeHelper=t;var n=function(){function e(){}return e.create=function(e,t){var n=new Error(e);if(n.message=e,t)for(var r in t)n[r]=t[r];return n.popStackFrame(),n},e.parameterCount=function(t){var n="Sys.ParameterCountException: "+(t||"Parameter count mismatch."),r=e.create(n,{name:"Sys.ParameterCountException"});return r.popStackFrame(),r},e.argument=function(t,n){var i="Sys.ArgumentException: "+(n||"Value does not fall within the expected range.");t&&(i+="\n"+r.format("Parameter name: {0}",t));var o=e.create(i,{name:"Sys.ArgumentException",paramName:t});return o.popStackFrame(),o},e.argumentNull=function(t,n){var i="Sys.ArgumentNullException: "+(n||"Value cannot be null.");t&&(i+="\n"+r.format("Parameter name: {0}",t));var o=e.create(i,{name:"Sys.ArgumentNullException",paramName:t});return o.popStackFrame(),o},e.argumentOutOfRange=function(t,n,i){var o="Sys.ArgumentOutOfRangeException: "+(i||"Specified argument was out of the range of valid values.");t&&(o+="\n"+r.format("Parameter name: {0}",t)),null!=n&&(o+="\n"+r.format("Actual value was {0}.",n));var a=e.create(o,{name:"Sys.ArgumentOutOfRangeException",paramName:t,actualValue:n});return a.popStackFrame(),a},e.argumentType=function(t,n,i,o){var a="Sys.ArgumentTypeException: ";a+=o||(n&&i?r.format("Object of type '{0}' cannot be converted to type '{1}'.",n.getName?n.getName():n,i.getName?i.getName():i):"Object cannot be converted to the required type."),t&&(a+="\n"+r.format("Parameter name: {0}",t));var s=e.create(a,{name:"Sys.ArgumentTypeException",paramName:t,actualType:n,expectedType:i});return s.popStackFrame(),s},e.argumentUndefined=function(t,n){var i="Sys.ArgumentUndefinedException: "+(n||"Value cannot be undefined.");t&&(i+="\n"+r.format("Parameter name: {0}",t));var o=e.create(i,{name:"Sys.ArgumentUndefinedException",paramName:t});return o.popStackFrame(),o},e.invalidOperation=function(t){var n="Sys.InvalidOperationException: "+(t||"Operation is not valid due to the current state of the object."),r=e.create(n,{name:"Sys.InvalidOperationException"});return r.popStackFrame(),r},e}();e.MsAjaxError=n;var r=function(){function e(){}return e.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=e;return r.replace(/{(\d+)}/gm,(function(e,n){var r=parseInt(n,10);return void 0===t[r]?"{"+n+"}":t[r]}))},e.startsWith=function(e,t){return e.substr(0,t.length)===t},e}();e.MsAjaxString=r;var i=function(){function e(){}return e.trace=function(e){"undefined"!=typeof Debug&&Debug.writeln&&Debug.writeln(e),window.console&&window.console.log&&window.console.log(e),window.opera&&window.opera.postError&&window.opera.postError(e),window.debugService&&window.debugService.trace&&window.debugService.trace(e);var t=document.getElementById("TraceConsole");t&&"TEXTAREA"===t.tagName.toUpperCase()&&t.appendChild(document.createTextNode(e+"\n"))},e}();if(e.MsAjaxDebug=i,!OsfMsAjaxFactory.isMsAjaxLoaded()){var o=function(e,t,n){void 0!==e.__typeName&&null!==e.__typeName||(e.__typeName=t),void 0!==e.__class&&null!==e.__class||(e.__class=n)};o(Function,"Function",!0),o(Error,"Error",!0),o(Object,"Object",!0),o(String,"String",!0),o(Boolean,"Boolean",!0),o(Date,"Date",!0),o(Number,"Number",!0),o(RegExp,"RegExp",!0),o(Array,"Array",!0),Function.createCallback||(Function.createCallback=function(e,t){var n=Function._validateParams(arguments,[{name:"method",type:Function},{name:"context",mayBeNull:!0}]);if(n)throw n;return function(){var n=arguments.length;if(n>0){for(var r=[],i=0;i<n;i++)r[i]=arguments[i];return r[n]=t,e.apply(this,r)}return e.call(this,t)}}),Function.createDelegate||(Function.createDelegate=function(e,t){var n=Function._validateParams(arguments,[{name:"instance",mayBeNull:!0},{name:"method",type:Function}]);if(n)throw n;return function(){return t.apply(e,arguments)}}),Function._validateParams||(Function._validateParams=function(e,t,n){var r,i=t.length;if(n=n||void 0===n,r=Function._validateParameterCount(e,t,n))return r.popStackFrame(),r;for(var o=0,a=e.length;o<a;o++){var s=t[Math.min(o,i-1)],c=s.name;if(s.parameterArray)c+="["+(o-i+1)+"]";else if(!n&&o>=i)break;if(r=Function._validateParameter(e[o],s,c))return r.popStackFrame(),r}return null}),Function._validateParameterCount||(Function._validateParameterCount=function(e,t,r){var i,o,a=t.length,s=e.length;if(s<a){var c=a;for(i=0;i<a;i++){var l=t[i];(l.optional||l.parameterArray)&&c--}s<c&&(o=!0)}else if(r&&s>a)for(o=!0,i=0;i<a;i++)if(t[i].parameterArray){o=!1;break}if(o){var u=n.parameterCount();return u.popStackFrame(),u}return null}),Function._validateParameter||(Function._validateParameter=function(e,t,n){var r,i=t.type,o=!!t.integer,a=!!t.domElement,s=!!t.mayBeNull;if(r=Function._validateParameterType(e,i,o,a,s,n))return r.popStackFrame(),r;var c=t.elementType,l=!!t.elementMayBeNull;if(i===Array&&null!=e&&(c||!l))for(var u=!!t.elementInteger,f=!!t.elementDomElement,p=0;p<e.length;p++){var d=e[p];if(r=Function._validateParameterType(d,c,u,f,l,n+"["+p+"]"))return r.popStackFrame(),r}return null}),Function._validateParameterType||(Function._validateParameterType=function(t,n,r,i,o,a){var s;return void 0===t?o?null:((s=e.MsAjaxError.argumentUndefined(a)).popStackFrame(),s):null===t?o?null:((s=e.MsAjaxError.argumentNull(a)).popStackFrame(),s):n&&!e.MsAjaxTypeHelper.isInstanceOfType(n,t)?((s=e.MsAjaxError.argumentType(a,typeof t,n)).popStackFrame(),s):null}),window.Type||(window.Type=Function),Type.registerNamespace||(Type.registerNamespace=function(e){for(var t=e.split("."),n=window,r=0;r<t.length;r++)n[t[r]]=n[t[r]]||{},n=n[t[r]]}),Type.prototype.registerClass||(Type.prototype.registerClass=function(e){({})}),"undefined"==typeof Sys&&Type.registerNamespace("Sys"),Error.prototype.popStackFrame||(Error.prototype.popStackFrame=function(){if(0!==arguments.length)throw n.parameterCount();if(void 0!==this.stack&&null!==this.stack&&void 0!==this.fileName&&null!==this.fileName&&void 0!==this.lineNumber&&null!==this.lineNumber){for(var e=this.stack.split("\n"),t=e[0],r=this.fileName+":"+this.lineNumber;null!=t&&-1===t.indexOf(r);)e.shift(),t=e[0];var i=e[1];if(null!=i){var o=i.match(/@(.*):(\d+)$/);null!=o&&(this.fileName=o[1],this.lineNumber=parseInt(o[2]),e.shift(),this.stack=e.join("\n"))}}}),OsfMsAjaxFactory.msAjaxError=n,OsfMsAjaxFactory.msAjaxString=r,OsfMsAjaxFactory.msAjaxDebug=i}}(OfficeExt||(OfficeExt={})),OSF.OUtil.setNamespace("SafeArray",OSF.DDA),OSF.DDA.SafeArray.Response={Status:0,Payload:1},OSF.DDA.SafeArray.UniqueArguments={Offset:"offset",Run:"run",BindingSpecificData:"bindingSpecificData",MergedCellGuid:"{66e7831f-81b2-42e2-823c-89e872d541b3}"},OSF.OUtil.setNamespace("Delegate",OSF.DDA.SafeArray),OSF.DDA.SafeArray.Delegate._onException=function(e,t){var n,r=e.number;if(r)switch(r){case-2146828218:n=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case-2147467259:n=t.dispId==OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent?OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;break;case-2146828283:case-2147209089:n=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam;break;case-2147208704:n=OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests;break;case-2146827850:default:n=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}t.onComplete&&t.onComplete(n||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod=function(e,t){var n,r=e.number;if(r)switch(r){case-2146828218:n=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case-2146827850:default:n=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}return n||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError},OSF.DDA.SafeArray.Delegate.SpecialProcessor=function(){function e(e){var t;try{var n=e.ubound(1),r=e.ubound(2);if(e=e.toArray(),1==n&&1==r)t=[e];else{t=[];for(var i=0;i<n;i++){for(var o=[],a=0;a<r;a++){var s=e[i*r+a];s!=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid&&o.push(s)}o.length>0&&t.push(o)}}}catch(e){}return t}var t={};t[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(e){if(OSF.DDA.TableDataProperties&&"string"!=typeof e&&void 0!==e[OSF.DDA.TableDataProperties.TableRows]){var t=[];t[0]=e[OSF.DDA.TableDataProperties.TableRows],t[1]=e[OSF.DDA.TableDataProperties.TableHeaders],e=t}return e},fromHost:function(t){var n;if(t.toArray)if(2===t.dimensions())n=e(t);else{var r=t.toArray();2===r.length&&(null!=r[0]&&r[0].toArray||null!=r[1]&&r[1].toArray)?((n={})[OSF.DDA.TableDataProperties.TableRows]=e(r[0]),n[OSF.DDA.TableDataProperties.TableHeaders]=e(r[1])):n=r}else n=t;return n}},OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,[],t),this.unpack=function(e,n){var r;this.isComplexType(e)||OSF.DDA.ListType.isListType(e)?r=void 0!==n&&void 0!==n.toArray?n.toArray():n||{}:r=this.isDynamicType(e)?t[e].fromHost(n):n;return r}},OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor),OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]}),OSF.DDA.SafeArray.Delegate.executeAsync=function(e){function t(e){var n=e;if(null!=e&&e.toArray){var r=e.toArray();n=new Array(r.length);for(var i=0;i<r.length;i++)n[i]=t(r[i])}return n}try{e.onCalling&&e.onCalling(),OSF.ClientHostController.execute(e.dispId,function e(t){var n=t;if(OSF.OUtil.isArray(t))for(var r=n.length,i=0;i<r;i++)n[i]=e(n[i]);else if(OSF.OUtil.isDate(t))n=t.getVarDate();else if("object"==typeof t&&!OSF.OUtil.isArray(t))for(var o in n=[],t)OSF.OUtil.isFunction(t[o])||(n[o]=e(t[o]));return n}(e.hostCallArgs),(function(n,r){var i,o;if("number"==typeof n?(i=[],o=n):o=(i=n.toArray())[OSF.DDA.SafeArray.Response.Status],o==OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult)return null!=(a=t(a=i[OSF.DDA.SafeArray.Response.Payload]))&&(e._chunkResultData||(e._chunkResultData=new Array),e._chunkResultData[a[0]]=a[1]),!1;if(e.onReceiving&&e.onReceiving(),e.onComplete){var a;if(o==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){if(i.length>2){a=[];for(var s=1;s<i.length;s++)a[s-1]=i[s]}else a=i[OSF.DDA.SafeArray.Response.Payload];if(e._chunkResultData&&null!=(a=t(a))){var c=a[a.length-1];e._chunkResultData.length==c?a[a.length-1]=e._chunkResultData:o=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}}else a=i[OSF.DDA.SafeArray.Response.Payload];e.onComplete(o,a)}return!0}))}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function(e,t){var n=(new Date).getTime();return function(r){t.onReceiving&&t.onReceiving();var i=r.toArray?r.toArray()[OSF.DDA.SafeArray.Response.Status]:r;t.onComplete&&t.onComplete(i),OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(e,t.dispId,Math.abs((new Date).getTime()-n),i)}},OSF.DDA.SafeArray.Delegate.registerEventAsync=function(e){e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,e);try{OSF.ClientHostController.registerEvent(e.dispId,e.targetId,(function(t,n){e.onEvent&&e.onEvent(n),OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(e.dispId)}),t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function(e){e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,e);try{OSF.ClientHostController.unregisterEvent(e.dispId,e.targetId,t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.ClientMode={ReadWrite:0,ReadOnly:1},OSF.DDA.RichInitializationReason={1:Microsoft.Office.WebExtension.InitializationReason.Inserted,2:Microsoft.Office.WebExtension.InitializationReason.DocumentOpened},OSF.InitializationHelper=function(e,t,n,r,i){this._hostInfo=e,this._webAppState=t,this._context=n,this._settings=r,this._hostFacade=i,this._initializeSettings=this.initializeSettings},OSF.InitializationHelper.prototype.deserializeSettings=function(e,t){var n=OSF.OUtil.getSessionStorage();if(n){var r=n.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());r?e=JSON.parse(r):(r=JSON.stringify(e),n.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))}var i=OSF.DDA.SettingsManager.deserializeSettings(e);return t?new OSF.DDA.RefreshableSettings(i):new OSF.DDA.Settings(i)},OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(e){},OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){},OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(e){this.prepareApiSurface(e),Microsoft.Office.WebExtension.initialize(this.getInitializationReason(e))},OSF.InitializationHelper.prototype.prepareApiSurface=function(e){var t,n,r=new OSF.DDA.License(e.get_eToken()),i=OSF.DDA.OfficeTheme&&OSF.DDA.OfficeTheme.getOfficeTheme?OSF.DDA.OfficeTheme.getOfficeTheme:null;e.get_isDialog()?OSF.DDA.UI.ChildUI&&(e.ui=new OSF.DDA.UI.ChildUI):OSF.DDA.UI.ParentUI&&(e.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(e.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync])),OSF.DDA.OpenBrowser&&OSF.DDA.DispIdHost.addAsyncMethods(e.ui,[OSF.DDA.AsyncMethodNames.OpenBrowserWindow]),OSF.DDA.ExecuteFeature&&OSF.DDA.DispIdHost.addAsyncMethods(e.ui,[OSF.DDA.AsyncMethodNames.ExecuteFeature]),OSF.DDA.QueryFeature&&OSF.DDA.DispIdHost.addAsyncMethods(e.ui,[OSF.DDA.AsyncMethodNames.QueryFeature]),OSF.DDA.Auth&&(e.auth=new OSF.DDA.Auth,OSF.DDA.DispIdHost.addAsyncMethods(e.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync])),OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(e,e.doc,r,null,i)),t=OSF.DDA.DispIdHost.getClientDelegateMethods,n=OSF.DDA.SafeArray.Delegate.ParameterMap,OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(t,n))},OSF.InitializationHelper.prototype.getInitializationReason=function(e){return OSF.DDA.RichInitializationReason[e.get_reason()]},OSF.DDA.DispIdHost.getClientDelegateMethods=function(e){var t={};if(t[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync,t[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync,t[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync,t[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.SafeArray.Delegate.openDialog,t[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.SafeArray.Delegate.closeDialog,t[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.messageParent,t[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.SafeArray.Delegate.sendMessage,OSF.DDA.AsyncMethodNames.RefreshAsync&&e==OSF.DDA.AsyncMethodNames.RefreshAsync.id){t[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod((function(e,t,n){return"function"==typeof OSF.DDA.ClientSettingsManager.refresh?OSF.DDA.ClientSettingsManager.refresh(t,n):OSF.DDA.ClientSettingsManager.read(t,n)}))}if(OSF.DDA.AsyncMethodNames.SaveAsync&&e==OSF.DDA.AsyncMethodNames.SaveAsync.id){t[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod((function(e,t,n){return OSF.DDA.ClientSettingsManager.write(e[OSF.DDA.SettingsManager.SerializedSettings],e[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],t,n)}))}return t},function(e){var t=function(){function e(){}return e.prototype.execute=function(e,t,n){"undefined"!=typeof OsfOMToken&&OsfOMToken?window.external.Execute(e,t,n,OsfOMToken):window.external.Execute(e,t,n)},e.prototype.registerEvent=function(e,t,n,r){"undefined"!=typeof OsfOMToken&&OsfOMToken?window.external.RegisterEvent(e,t,n,r,OsfOMToken):window.external.RegisterEvent(e,t,n,r)},e.prototype.unregisterEvent=function(e,t,n){"undefined"!=typeof OsfOMToken&&OsfOMToken?window.external.UnregisterEvent(e,t,n,OsfOMToken):window.external.UnregisterEvent(e,t,n)},e.prototype.closeSdxDialog=function(e){OSF.OUtil.externalNativeFunctionExists(typeof window.external.closeSdxDialog)&&window.external.closeSdxDialog(e)},e}();e.RichClientHostController=t}(OfficeExt||(OfficeExt={})),function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.messageParent=function(e){if(OSF.OUtil.externalNativeFunctionExists(typeof window.external.MessageParent2)){if(e){var t=e[Microsoft.Office.WebExtension.Parameters.MessageToParent];"boolean"==typeof t&&(!0===t?e[Microsoft.Office.WebExtension.Parameters.MessageToParent]="true":!1===t&&(e[Microsoft.Office.WebExtension.Parameters.MessageToParent]=""))}"undefined"!=typeof OsfOMToken&&OsfOMToken?window.external.MessageParent2(JSON.stringify(e),OsfOMToken):window.external.MessageParent2(JSON.stringify(e))}else{var n=e[Microsoft.Office.WebExtension.Parameters.MessageToParent];window.external.MessageParent(n)}},t.prototype.openDialog=function(e,t,n,r){this.registerEvent(e,t,n,r)},t.prototype.closeDialog=function(e,t,n){this.unregisterEvent(e,t,n)},t.prototype.sendMessage=function(e){if(OSF.OUtil.externalNativeFunctionExists(typeof window.external.MessageChild2))"undefined"!=typeof OsfOMToken&&OsfOMToken?window.external.MessageChild2(JSON.stringify(e),OsfOMToken):window.external.MessageChild2(JSON.stringify(e));else{var t=e[Microsoft.Office.WebExtension.Parameters.MessageContent];window.external.MessageChild(t)}},t}(e.RichClientHostController);e.Win32RichClientHostController=t}(OfficeExt||(OfficeExt={})),function(e){!function(t){var n=function(){function e(){this._osfOfficeTheme=null,this._osfOfficeThemeTimeStamp=null}return e.prototype.getOfficeTheme=function(){if(OSF.DDA._OsfControlContext){if(this._osfOfficeTheme&&this._osfOfficeThemeTimeStamp&&(new Date).getTime()-this._osfOfficeThemeTimeStamp<e._osfOfficeThemeCacheValidPeriod)OSF.AppTelemetry&&OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",0);else{var t=(new Date).getTime(),n=OSF.DDA._OsfControlContext.GetOfficeThemeInfo(),r=(new Date).getTime();for(var i in OSF.AppTelemetry&&OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",Math.abs(r-t)),this._osfOfficeTheme=JSON.parse(n),this._osfOfficeTheme)this._osfOfficeTheme[i]=OSF.OUtil.convertIntToCssHexColor(this._osfOfficeTheme[i]);this._osfOfficeThemeTimeStamp=r}return this._osfOfficeTheme}},e.instance=function(){return null==e._instance&&(e._instance=new e),e._instance},e._osfOfficeThemeCacheValidPeriod=5e3,e._instance=null,e}();t.OfficeThemeManager=n,OSF.OUtil.setNamespace("OfficeTheme",OSF.DDA),OSF.DDA.OfficeTheme.getOfficeTheme=e.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme}(e.OfficeTheme||(e.OfficeTheme={}))}(OfficeExt||(OfficeExt={})),OSF.initializeRichCommon=function(){OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(e){return function(t){var n;try{n=e(t.hostCallArgs,t.onCalling,(function(e,n){t.onReceiving&&t.onReceiving(),t.onComplete&&t.onComplete(e,n)}))}catch(e){var r=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;n={name:Strings.OfficeOM.L_InternalError,message:e},t.onComplete&&t.onComplete(r,n)}}},read:function(e,t){var n=[],r=[];e&&e(),"undefined"!=typeof OsfOMToken&&OsfOMToken?OSF.DDA._OsfControlContext.GetSettings(OsfOMToken).Read(n,r):OSF.DDA._OsfControlContext.GetSettings().Read(n,r);for(var i={},o=0;o<n.length;o++)i[n[o]]=r[o];return t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,i),i},write:function(e,t,n,r){var i,o=[],a=[];for(var s in e)o.push(s),a.push(e[s]);n&&n(),void 0!==(i="undefined"!=typeof OsfOMToken&&OsfOMToken?OSF.DDA._OsfControlContext.GetSettings(OsfOMToken):OSF.DDA._OsfControlContext.GetSettings()).WriteAsync?i.WriteAsync(o,a,r):(i.Write(o,a),r&&r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess))},refresh:function(e,t){var n,r=[],i=[];e&&e(),n="undefined"!=typeof OsfOMToken&&OsfOMToken?OSF.DDA._OsfControlContext.GetSettings(OsfOMToken):OSF.DDA._OsfControlContext.GetSettings();var o=function(){n.Read(r,i);for(var e={},o=0;o<r.length;o++)e[r[o]]=i[o];t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,e)};n.RefreshAsync?n.RefreshAsync((function(){o()})):o()}},OSF.InitializationHelper.prototype.initializeSettings=function(e){var t=OSF.DDA.ClientSettingsManager.read();return this.deserializeSettings(t,e)},OSF.InitializationHelper.prototype.getAppContext=function(e,t){var n,r,i="Warning: Office.js is loaded outside of Office client";try{if(!window.external||!OSF.OUtil.externalNativeFunctionExists(typeof window.external.GetContext))return void OsfMsAjaxFactory.msAjaxDebug.trace(i);r=OSF.DDA._OsfControlContext=window.external.GetContext()}catch(e){return void OsfMsAjaxFactory.msAjaxDebug.trace(i)}var o,a,s,c,l,u,f,p,d,h,m=r.GetAppType(),g=r.GetSolutionRef(),y=r.GetAppVersionMajor(),_=r.GetAppVersionMinor(),b=r.GetAppUILocale(),O=r.GetAppDataLocale(),v=r.GetDocUrl(),S=r.GetAppCapabilities(),A=r.GetActivationMode(),D=r.GetControlIntegrationLevel();try{o=r.GetSolutionToken()}catch(e){}if(OSF.OUtil.externalNativeFunctionExists(typeof r.GetCorrelationId)&&(a=r.GetCorrelationId()),OSF.OUtil.externalNativeFunctionExists(typeof r.GetInstanceId)&&(s=r.GetInstanceId()),OSF.OUtil.externalNativeFunctionExists(typeof r.GetTouchEnabled)&&(c=r.GetTouchEnabled()),OSF.OUtil.externalNativeFunctionExists(typeof r.GetCommerceAllowed)&&(l=r.GetCommerceAllowed()),OSF.OUtil.externalNativeFunctionExists(typeof r.GetSupportedMatrix)&&(u=r.GetSupportedMatrix()),OSF.OUtil.externalNativeFunctionExists(typeof r.GetHostCustomMessage)&&(f=r.GetHostCustomMessage()),OSF.OUtil.externalNativeFunctionExists(typeof r.GetHostFullVersion)&&(p=r.GetHostFullVersion()),OSF.OUtil.externalNativeFunctionExists(typeof r.GetDialogRequirementMatrix)&&(d=r.GetDialogRequirementMatrix()),OSF.OUtil.externalNativeFunctionExists(typeof r.GetFeaturesForSolution))try{var P=r.GetFeaturesForSolution();P&&(h=JSON.parse(P))}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("Exception while creating the SDX FeatureGates object. Details: "+e)}var C=0;OSF.OUtil.externalNativeFunctionExists(typeof r.GetInitialDisplayMode)&&(C=r.GetInitialDisplayMode()),o=o?o.toString():"",n=new OSF.OfficeAppContext(g,m,y,b,O,v,S,[],A,D,o,a,s,c,l,_,u,f,p,void 0,void 0,void 0,void 0,d,h,void 0,C),OSF.AppTelemetry&&OSF.AppTelemetry.initialize(n),t(n)}},OSF.OUtil.setNamespace("ExtensionLifeCycle",OSF),OSF.ExtensionLifeCycle.close=function(e){OSF.ClientHostController.closeSdxDialog(e)},OSF.ClientHostController=new OfficeExt.Win32RichClientHostController,OSF.initializeRichCommon(),function(e){var t=function(){function e(e){this._table=e,this._fields={}}return Object.defineProperty(e.prototype,"Fields",{get:function(){return this._fields},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Table",{get:function(){return this._table},enumerable:!0,configurable:!0}),e.prototype.SerializeFields=function(){},e.prototype.SetSerializedField=function(e,t){null!=t&&(this._serializedFields[e]=t.toString())},e.prototype.SerializeRow=function(){return this._serializedFields={},this.SetSerializedField("Table",this._table),this.SerializeFields(),JSON.stringify(this._serializedFields)},e}();e.BaseUsageData=t;var n=function(e){function t(){return e.call(this,"AppActivated")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppId",{get:function(){return this.Fields.AppId},set:function(e){this.Fields.AppId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppInstanceId",{get:function(){return this.Fields.AppInstanceId},set:function(e){this.Fields.AppInstanceId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppURL",{get:function(){return this.Fields.AppURL},set:function(e){this.Fields.AppURL=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AssetId",{get:function(){return this.Fields.AssetId},set:function(e){this.Fields.AssetId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Browser",{get:function(){return this.Fields.Browser},set:function(e){this.Fields.Browser=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"UserId",{get:function(){return this.Fields.UserId},set:function(e){this.Fields.UserId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Host",{get:function(){return this.Fields.Host},set:function(e){this.Fields.Host=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HostVersion",{get:function(){return this.Fields.HostVersion},set:function(e){this.Fields.HostVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ClientId",{get:function(){return this.Fields.ClientId},set:function(e){this.Fields.ClientId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeWidth",{get:function(){return this.Fields.AppSizeWidth},set:function(e){this.Fields.AppSizeWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeHeight",{get:function(){return this.Fields.AppSizeHeight},set:function(e){this.Fields.AppSizeHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Message",{get:function(){return this.Fields.Message},set:function(e){this.Fields.Message=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"DocUrl",{get:function(){return this.Fields.DocUrl},set:function(e){this.Fields.DocUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OfficeJSVersion",{get:function(){return this.Fields.OfficeJSVersion},set:function(e){this.Fields.OfficeJSVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HostJSVersion",{get:function(){return this.Fields.HostJSVersion},set:function(e){this.Fields.HostJSVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"WacHostEnvironment",{get:function(){return this.Fields.WacHostEnvironment},set:function(e){this.Fields.WacHostEnvironment=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"IsFromWacAutomation",{get:function(){return this.Fields.IsFromWacAutomation},set:function(e){this.Fields.IsFromWacAutomation=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"IsMOS",{get:function(){return this.Fields.IsMOS},set:function(e){this.Fields.IsMOS=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("AppId",this.AppId),this.SetSerializedField("AppInstanceId",this.AppInstanceId),this.SetSerializedField("AppURL",this.AppURL),this.SetSerializedField("AssetId",this.AssetId),this.SetSerializedField("Browser",this.Browser),this.SetSerializedField("UserId",this.UserId),this.SetSerializedField("Host",this.Host),this.SetSerializedField("HostVersion",this.HostVersion),this.SetSerializedField("ClientId",this.ClientId),this.SetSerializedField("AppSizeWidth",this.AppSizeWidth),this.SetSerializedField("AppSizeHeight",this.AppSizeHeight),this.SetSerializedField("Message",this.Message),this.SetSerializedField("DocUrl",this.DocUrl),this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion),this.SetSerializedField("HostJSVersion",this.HostJSVersion),this.SetSerializedField("WacHostEnvironment",this.WacHostEnvironment),this.SetSerializedField("IsFromWacAutomation",this.IsFromWacAutomation),this.SetSerializedField("IsMOS",this.IsMOS)},t}(t);e.AppActivatedUsageData=n;var r=function(e){function t(){return e.call(this,"ScriptLoad")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ScriptId",{get:function(){return this.Fields.ScriptId},set:function(e){this.Fields.ScriptId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"StartTime",{get:function(){return this.Fields.StartTime},set:function(e){this.Fields.StartTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ResponseTime",{get:function(){return this.Fields.ResponseTime},set:function(e){this.Fields.ResponseTime=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("ScriptId",this.ScriptId),this.SetSerializedField("StartTime",this.StartTime),this.SetSerializedField("ResponseTime",this.ResponseTime)},t}(t);e.ScriptLoadUsageData=r;var i=function(e){function t(){return e.call(this,"AppClosed")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"FocusTime",{get:function(){return this.Fields.FocusTime},set:function(e){this.Fields.FocusTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeFinalWidth",{get:function(){return this.Fields.AppSizeFinalWidth},set:function(e){this.Fields.AppSizeFinalWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeFinalHeight",{get:function(){return this.Fields.AppSizeFinalHeight},set:function(e){this.Fields.AppSizeFinalHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OpenTime",{get:function(){return this.Fields.OpenTime},set:function(e){this.Fields.OpenTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"CloseMethod",{get:function(){return this.Fields.CloseMethod},set:function(e){this.Fields.CloseMethod=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("FocusTime",this.FocusTime),this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth),this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight),this.SetSerializedField("OpenTime",this.OpenTime),this.SetSerializedField("CloseMethod",this.CloseMethod)},t}(t);e.AppClosedUsageData=i;var o=function(e){function t(){return e.call(this,"APIUsage")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"APIType",{get:function(){return this.Fields.APIType},set:function(e){this.Fields.APIType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"APIID",{get:function(){return this.Fields.APIID},set:function(e){this.Fields.APIID=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Parameters",{get:function(){return this.Fields.Parameters},set:function(e){this.Fields.Parameters=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ResponseTime",{get:function(){return this.Fields.ResponseTime},set:function(e){this.Fields.ResponseTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ErrorType",{get:function(){return this.Fields.ErrorType},set:function(e){this.Fields.ErrorType=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("APIType",this.APIType),this.SetSerializedField("APIID",this.APIID),this.SetSerializedField("Parameters",this.Parameters),this.SetSerializedField("ResponseTime",this.ResponseTime),this.SetSerializedField("ErrorType",this.ErrorType)},t}(t);e.APIUsageUsageData=o;var a=function(e){function t(){return e.call(this,"AppInitialization")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SuccessCode",{get:function(){return this.Fields.SuccessCode},set:function(e){this.Fields.SuccessCode=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Message",{get:function(){return this.Fields.Message},set:function(e){this.Fields.Message=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("SuccessCode",this.SuccessCode),this.SetSerializedField("Message",this.Message)},t}(t);e.AppInitializationUsageData=a;var s=function(e){function t(){return e.call(this,"CheckWACHost")||this}return __extends(t,e),Object.defineProperty(t.prototype,"isWacKnownHost",{get:function(){return this.Fields.isWacKnownHost},set:function(e){this.Fields.isWacKnownHost=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this.Fields.instanceId},set:function(e){this.Fields.instanceId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostType",{get:function(){return this.Fields.hostType},set:function(e){this.Fields.hostType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostPlatform",{get:function(){return this.Fields.hostPlatform},set:function(e){this.Fields.hostPlatform=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wacDomain",{get:function(){return this.Fields.wacDomain},set:function(e){this.Fields.wacDomain=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLocalStorageAvailable",{get:function(){return this.Fields.isLocalStorageAvailable},set:function(e){this.Fields.isLocalStorageAvailable=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("isWacKnownHost",this.isWacKnownHost),this.SetSerializedField("instanceId",this.instanceId),this.SetSerializedField("hostType",this.hostType),this.SetSerializedField("hostPlatform",this.hostPlatform),this.SetSerializedField("wacDomain",this.wacDomain),this.SetSerializedField("isLocalStorageAvailable",this.isLocalStorageAvailable)},t}(t);e.CheckWACHostUsageData=s}(OSFLog||(OSFLog={})),function(e){"use strict";!function(e){e[e.info=0]="info",e[e.warning=1]="warning",e[e.error=2]="error"}(e.TraceLevel||(e.TraceLevel={})),function(e){e[e.none=0]="none",e[e.flush=1]="flush"}(e.SendFlag||(e.SendFlag={})),e.allowUploadingData=function(){},e.sendLog=function(e,t,n){};var t=function(){function e(){}return e.prototype.writeLog=function(e){},e.prototype.loadProxyFrame=function(){},e}();OSF.Logger||(OSF.Logger=e),e.ulsEndpoint=function(){try{return new t}catch(e){return null}}()}(Logger||(Logger={})),function(e){var t=[{name:"AppActivated",enabled:!0,critical:!0,points:[{name:"Browser",type:"string"},{name:"Message",type:"string"},{name:"Host",type:"string"},{name:"AppSizeWidth",type:"int64"},{name:"AppSizeHeight",type:"int64"},{name:"IsFromWacAutomation",type:"string"},{name:"IsMOS",type:"int64"}]},{name:"ScriptLoad",enabled:!0,critical:!1,points:[{name:"ScriptId",type:"string"},{name:"StartTime",type:"double"},{name:"ResponseTime",type:"double"}]},{name:"APIUsage",enabled:function(){if(!OSF._OfficeAppFactory||!OSF._OfficeAppFactory.getHostInfo)return!1;var e=OSF._OfficeAppFactory.getHostInfo();if(!e)return!1;switch(e.hostType){case"outlook":switch(e.hostPlatform){case"mac":case"web":return!0;default:return!1}default:return!1}}(),critical:!1,points:[{name:"APIType",type:"string"},{name:"APIID",type:"int64"},{name:"Parameters",type:"string"},{name:"ResponseTime",type:"int64"},{name:"ErrorType",type:"int64"}]},{name:"AppInitialization",enabled:!0,critical:!1,points:[{name:"SuccessCode",type:"int64"},{name:"Message",type:"string"}]},{name:"AppClosed",enabled:!0,critical:!1,points:[{name:"FocusTime",type:"int64"},{name:"AppSizeFinalWidth",type:"int64"},{name:"AppSizeFinalHeight",type:"int64"},{name:"OpenTime",type:"int64"}]},{name:"CheckWACHost",enabled:!0,critical:!1,points:[{name:"isWacKnownHost",type:"int64"},{name:"solutionId",type:"string"},{name:"hostType",type:"string"},{name:"hostPlatform",type:"string"},{name:"correlationId",type:"string"},{name:"isLocalStorageAvailable",type:"boolean"}]}];function n(e,t){var n=void 0===t.rename?t.name:t.rename,r=void 0;switch(t.type){case"string":r=oteljs.makeStringDataField(n,e);break;case"double":"string"==typeof e&&(e=parseFloat(e)),r=oteljs.makeDoubleDataField(n,e);break;case"int64":"string"==typeof e&&(e=parseInt(e)),r=oteljs.makeInt64DataField(n,e);break;case"boolean":"string"==typeof e&&(e="true"===e),r=oteljs.makeBooleanDataField(n,e)}return r}function r(e){for(var n=0,r=t;n<r.length;n++){var i=r[n];if(i.name===e)return i}}function i(e,t){(function(e){var t=r(e);return void 0!==t&&t.enabled})(e)&&"undefined"!=typeof OTel&&OTel.OTelLogger.onTelemetryLoaded((function(){var i=function(e,t){var i=r(e);if(void 0!==i){for(var o=[],a=0,s=i.points;a<s.length;a++){var c=s[a],l=t[c.name];if(void 0!==l){var u=n(l,c);void 0!==u&&o.push(u)}}var f={dataCategories:oteljs.DataCategories.ProductServiceUsage};return i.critical&&(f.samplingPolicy=oteljs.SamplingPolicy.CriticalBusinessImpact),f.diagnosticLevel=oteljs.DiagnosticLevel.NecessaryServiceDataEvent,{eventName:"Office.Extensibility.OfficeJs."+e+"X",dataFields:o,eventFlags:f}}}(e,t);void 0!==i&&Microsoft.Office.WebExtension.sendTelemetryEvent(i)}))}var o=function(){function e(){}return e.prototype.getAriaCDNLocation=function(){return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"ariatelemetry/aria-web-telemetry.js"},e.getInstance=function(){return void 0===e.AriaLoggerObj&&(e.AriaLoggerObj=new e),e.AriaLoggerObj},e.prototype.isIUsageData=function(e){return void 0!==e.Fields},e.prototype.shouldSendDirectToAria=function(e,t){var n;if(!e)return!1;if("win32"===e.toLowerCase())n=[16,0,11601];else{if("mac"!==e.toLowerCase())return!0;n=[16,28]}if(!t)return!1;for(var r=t.split("."),i=0;i<n.length&&i<r.length;i++){var o=parseInt(r[i],10);if(isNaN(o))return!1;if(o<n[i])return!0;if(o>n[i])return!1}return!1},e.prototype.isDirectToAriaEnabled=function(){if(void 0===this.EnableDirectToAria||null===this.EnableDirectToAria){var e=void 0,t=void 0;OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&(e=OSF._OfficeAppFactory.getHostInfo().hostPlatform),window.external&&void 0!==window.external.GetContext&&void 0!==window.external.GetContext().GetHostFullVersion&&(t=window.external.GetContext().GetHostFullVersion()),this.EnableDirectToAria=this.shouldSendDirectToAria(e,t)}return this.EnableDirectToAria},e.prototype.sendTelemetry=function(t,n){e.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled()&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),(function(){try{if(!this.ALogger){this.ALogger=AWTLogManager.initialize("db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439")}var e=new AWTEventProperties;for(var r in e.setName("Office.Extensibility.OfficeJS."+t),n)"table"!==r.toLowerCase()&&e.setProperty(r,n[r]);var i=new Date;e.setProperty("Date",i.toISOString()),this.ALogger.logEvent(e)}catch(e){}}),1e3),e.EnableSendingTelemetryWithOTel&&i(t,n)},e.prototype.logData=function(e){this.isIUsageData(e)?this.sendTelemetry(e.Table,e.Fields):this.sendTelemetry(e.Table,e)},e.EnableSendingTelemetryWithOTel=!0,e.EnableSendingTelemetryWithLegacyAria=!1,e}();e.AriaLogger=o}(OSFAriaLogger||(OSFAriaLogger={})),function(e){"use strict";var t,n=OSF.OUtil.Guid.generateNewGuid(),r="",i=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"),o="PRIVATE";e.enableTelemetry=!0;var a=function(){};e.AppInfo=a;var s=function(e,t){this.name=e,this.handler=t},c=function(){function e(){this.clientIDKey="Office API client",this.logIdSetKey="Office App Log Id Set"}return e.prototype.getClientId=function(){var e=this.getValue(this.clientIDKey);return(!e||e.length<=0||e.length>40)&&(e=OSF.OUtil.Guid.generateNewGuid(),this.setValue(this.clientIDKey,e)),e},e.prototype.saveLog=function(e,t){var n=this.getValue(this.logIdSetKey);n=(n&&n.length>0?n+";":"")+e,this.setValue(this.logIdSetKey,n),this.setValue(e,t)},e.prototype.enumerateLog=function(e,t){var n=this.getValue(this.logIdSetKey);if(n){var r=n.split(";");for(var i in r){var o=r[i],a=this.getValue(o);a&&(e&&e(o,a),t&&this.remove(o))}t&&this.remove(this.logIdSetKey)}},e.prototype.getValue=function(e){var t=OSF.OUtil.getLocalStorage(),n="";return t&&(n=t.getItem(e)),n},e.prototype.setValue=function(e,t){var n=OSF.OUtil.getLocalStorage();n&&n.setItem(e,t)},e.prototype.remove=function(e){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(e)}catch(e){}},e}(),l=function(){function t(){}return t.prototype.LogData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(e){}},t.prototype.LogRawData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(e){}},t}();function u(e){return e&&(e=e.replace(/[{}]/g,"").toLowerCase()),e||""}function f(e,t){var i=new OSFLog.AppInitializationUsageData;i.CorrelationId=u(r),i.SessionId=n,i.SuccessCode=e?1:0,i.Message=t,(new l).LogData(i)}function p(){var e=0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.PublicAddin);return e||!!t&&h(OSF._OfficeAppFactory.getHostInfo().hostPlatform,t.hostVersion)}function d(e,t){return p()||t!==e?t:o}function h(e,t){var n=!1,r=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(t);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),a=parseInt(r[3]);"win32"==e?(i<16||16==i&&a<14225)&&(n=!0):"mac"==e&&(i<16||16==i&&(o<52||52==o&&a<808))&&(n=!0)}return n}function m(){return 0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.IsMos)}e.initialize=function(r){if(e.enableTelemetry&&!t){t=new a,r.get_hostFullVersion()?t.hostVersion=r.get_hostFullVersion():t.hostVersion=r.get_appVersion(),t.appId=p()?r.get_id():o,t.marketplaceType=r._marketplaceType,t.browser=window.navigator.userAgent,t.correlationId=u(r.get_correlationId()),t.clientId=(new c).getClientId(),t.appInstanceId=r.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=u(t.appInstanceId),t.appInstanceId=d(r.get_id(),t.appInstanceId)),t.message=r.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="16.0.16121.10000",r._wacHostEnvironment&&(t.wacHostEnvironment=r._wacHostEnvironment),void 0!==r._isFromWacAutomation&&null!==r._isFromWacAutomation&&(t.isFromWacAutomation=r._isFromWacAutomation.toString().toLowerCase());var l=r.get_docUrl();t.docUrl=i.test(l)?l:"";var f=location.href;f&&(f=f.split("?")[0].split("#")[0]),t.isMos=m(),t.appURL="",function(e,t){var n,r;t.assetId="",t.userId="";try{n=decodeURIComponent(e);var i=(r=(new DOMParser).parseFromString(n,"text/xml")).getElementsByTagName("t")[0].attributes.getNamedItem("cid"),o=r.getElementsByTagName("t")[0].attributes.getNamedItem("oid");i&&i.nodeValue?t.userId=i.nodeValue:o&&o.nodeValue&&(t.userId=o.nodeValue),t.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(e){}finally{n=null,r=null,null}}(r.get_eToken(),t),t.sessionId=n,"undefined"!=typeof OTel&&OTel.OTelLogger.initialize(t),function(){var t=new Date,n=null,r=0,i=!1,o=function(){document.hasFocus()?null==n&&(n=new Date):n&&(r+=Math.abs((new Date).getTime()-n.getTime()),n=null)},a=[];a.push(new s("focus",o)),a.push(new s("blur",o)),a.push(new s("focusout",o)),a.push(new s("focusin",o));var c=function(){for(var o=0;o<a.length;o++)OSF.OUtil.removeEventListener(window,a[o].name,a[o].handler);a.length=0,i||(document.hasFocus()&&n&&(r+=Math.abs((new Date).getTime()-n.getTime()),n=null),e.onAppClosed(Math.abs((new Date).getTime()-t.getTime()),r),i=!0)};a.push(new s("beforeunload",c)),a.push(new s("unload",c));for(var l=0;l<a.length;l++)OSF.OUtil.addEventListener(window,a[l].name,a[l].handler);o()}(),e.onAppActivated()}},e.onAppActivated=function(){if(t){(new c).enumerateLog((function(e,t){return(new l).LogRawData(t)}),!0);var e=new OSFLog.AppActivatedUsageData;e.SessionId=n,e.AppId=t.appId,e.AssetId=t.assetId,e.AppURL="",e.UserId="",e.ClientId=t.clientId,e.Browser=t.browser,e.HostVersion=t.hostVersion,e.CorrelationId=u(t.correlationId),e.AppSizeWidth=window.innerWidth,e.AppSizeHeight=window.innerHeight,e.AppInstanceId=t.appInstanceId,e.Message=t.message,e.DocUrl=t.docUrl,e.OfficeJSVersion=t.officeJSVersion,e.HostJSVersion=t.hostJSVersion,t.wacHostEnvironment&&(e.WacHostEnvironment=t.wacHostEnvironment),void 0!==t.isFromWacAutomation&&null!==t.isFromWacAutomation&&(e.IsFromWacAutomation=t.isFromWacAutomation),e.IsMOS=t.isMos?1:0,(new l).LogData(e)}},e.onScriptDone=function(e,t,r,i){var o=new OSFLog.ScriptLoadUsageData;o.CorrelationId=u(i),o.SessionId=n,o.ScriptId=e,o.StartTime=t,o.ResponseTime=r,(new l).LogData(o)},e.onCallDone=function(e,i,o,a,s){if(t&&function(){if(!OSF._OfficeAppFactory||!OSF._OfficeAppFactory.getHostInfo)return!1;var e=OSF._OfficeAppFactory.getHostInfo();if(!e)return!1;switch(e.hostType){case"outlook":switch(e.hostPlatform){case"mac":case"web":return!0;default:return!1}default:return!1}}()&&function(e,t){if("method"===t)switch(e){case 4:case 38:case 37:case 10:case 12:return!0;default:return!1}return!1}(i,e)){var c=new OSFLog.APIUsageUsageData;c.CorrelationId=u(r),c.SessionId=n,c.APIType=e,c.APIID=i,c.Parameters=o,c.ResponseTime=a,c.ErrorType=s,(new l).LogData(c)}},e.onMethodDone=function(e,t,n,r){var i=null;if(t)if("number"==typeof t)i=String(t);else if("object"==typeof t)for(var o in t)null!==i?i+=",":i="","number"==typeof t[o]&&(i+=String(t[o]));else i="";OSF.AppTelemetry.onCallDone("method",e,i,n,r)},e.onPropertyDone=function(e,t){OSF.AppTelemetry.onCallDone("property",-1,e,t)},e.onCheckWACHost=function(e,t,n,r,i,o){var a=new OSFLog.CheckWACHostUsageData;a.isWacKnownHost=e,a.instanceId=t,a.hostType=n,a.hostPlatform=r,a.isLocalStorageAvailable=o,a.wacDomain="",(new l).LogData(a)},e.onEventDone=function(e,t){OSF.AppTelemetry.onCallDone("event",e,null,0,t)},e.onRegisterDone=function(e,t,n,r){OSF.AppTelemetry.onCallDone(e?"registerevent":"unregisterevent",t,null,n,r)},e.onAppClosed=function(e,i){if(t){var o=new OSFLog.AppClosedUsageData;o.CorrelationId=u(r),o.SessionId=n,o.FocusTime=i,o.OpenTime=e,o.AppSizeFinalWidth=window.innerWidth,o.AppSizeFinalHeight=window.innerHeight,(new c).saveLog(n,o.SerializeRow())}},e.setOsfControlAppCorrelationId=function(e){r=u(e)},e.doAppInitializationLogging=f,e.logAppCommonMessage=function(e){f(!1,e)},e.logAppException=function(e){f(!0,e)},e.canSendAddinId=p,e.getCompliantAppInstanceId=d,e._isComplianceExceptedHost=h,e.isMos=m,OSF.AppTelemetry=e}(OSFAppTelemetry||(OSFAppTelemetry={})),function(e){function t(e,t){if(t+="_Resource",void 0!==oteljs)return[oteljs.makeDoubleDataField(t+"_responseEnd",e.responseEnd),oteljs.makeDoubleDataField(t+"_responseStart",e.responseStart),oteljs.makeDoubleDataField(t+"_startTime",e.startTime),oteljs.makeDoubleDataField(t+"_transferSize",e.transferSize)]}e.sendPerformanceTelemetry=function(){var e,n;"undefined"!=typeof OTel&&OSF.AppTelemetry.enableTelemetry&&"undefined"!=typeof OSFPerformance&&"undefined"!=typeof performance&&performance.getEntriesByType&&(performance.getEntriesByType("resource").forEach((function(t){var r=t.name.toLowerCase();OSF.OUtil.stringEndsWith(r,OSFPerformance.hostSpecificFileName)?e=t:(OSF.OUtil.stringEndsWith(r,OSF.ConstantNames.OfficeDebugJS)||OSF.OUtil.stringEndsWith(r,OSF.ConstantNames.OfficeJS))&&(n=t)})),OTel.OTelLogger.onTelemetryLoaded((function(){var r=t(e,"HostJs");r=(r=r.concat(t(n,"OfficeJs"))).concat([oteljs.makeDoubleDataField("officeExecuteStartDate",OSFPerformance.officeExecuteStartDate),oteljs.makeDoubleDataField("officeExecuteStart",OSFPerformance.officeExecuteStart),oteljs.makeDoubleDataField("officeExecuteEnd",OSFPerformance.officeExecuteEnd),oteljs.makeDoubleDataField("hostInitializationStart",OSFPerformance.hostInitializationStart),oteljs.makeDoubleDataField("hostInitializationEnd",OSFPerformance.hostInitializationEnd),oteljs.makeDoubleDataField("totalJSHeapSize",OSFPerformance.totalJSHeapSize),oteljs.makeDoubleDataField("usedJSHeapSize",OSFPerformance.usedJSHeapSize),oteljs.makeDoubleDataField("jsHeapSizeLimit",OSFPerformance.jsHeapSizeLimit),oteljs.makeDoubleDataField("getAppContextStart",OSFPerformance.getAppContextStart),oteljs.makeDoubleDataField("getAppContextEnd",OSFPerformance.getAppContextEnd),oteljs.makeDoubleDataField("createOMEnd",OSFPerformance.createOMEnd),oteljs.makeDoubleDataField("officeOnReady",OSFPerformance.officeOnReady),oteljs.makeBooleanDataField("isSharedRuntime",0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.SharedApp))]),Microsoft.Office.WebExtension.sendTelemetryEvent({eventName:"Office.Extensibility.OfficeJs.JSPerformanceTelemetryV06",dataFields:r,eventFlags:{dataCategories:oteljs.DataCategories.ProductServiceUsage,diagnosticLevel:oteljs.DiagnosticLevel.NecessaryServiceDataEvent}})})))}}(OSFPerfUtil||(OSFPerfUtil={})),Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"},OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"}),OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize},OSF.DDA.File=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/n)}});var r={};r[OSF.DDA.FileProperties.Handle]=e,r[OSF.DDA.FileProperties.SliceSize]=n;var i=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[i.GetDocumentCopyChunkAsync,i.ReleaseDocumentCopyAsync],r)},OSF.DDA.FileSliceOffset="fileSliceoffset",OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,enum:Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.SliceSize];if(r<=0||r>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return e},onSucceeded:function(e,t,n){return new OSF.DDA.File(e[OSF.DDA.FileProperties.Handle],e[OSF.DDA.FileProperties.FileSize],n[Microsoft.Office.WebExtension.Parameters.SliceSize])}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(e,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(e,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return e[OSF.DDA.FileSliceOffset]=parseInt((r*n[OSF.DDA.FileProperties.SliceSize]).toString()),e},onSucceeded:function(e,t,n){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:e[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:n[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:e[OSF.DDA.FileProperties.SliceSize]}}),r}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(e,t){return t[OSF.DDA.FileProperties.Handle]}}]}),Microsoft.Office.WebExtension.EventType={},OSF.EventDispatch=function(e){if(this._eventHandlers={},this._objectEventHandlers={},this._queuedEventsArgs={},null!=e)for(var t=0;t<e.length;t++){var n=e[t];"objectDeleted"==n||"objectSelectionChanged"==n||"objectDataChanged"==n||"contentControlAdded"==n?this._objectEventHandlers[n]={}:this._eventHandlers[n]=[],this._queuedEventsArgs[n]=[]}},OSF.EventDispatch.prototype={getSupportedEvents:function(){var e=[];for(var t in this._eventHandlers)e.push(t);for(var t in this._objectEventHandlers)e.push(t);return e},supportsEvent:function(e){for(var t in this._eventHandlers)if(e==t)return!0;for(var t in this._objectEventHandlers)if(e==t)return!0;return!1},hasEventHandler:function(e,t){var n=this._eventHandlers[e];if(n&&n.length>0)for(var r=0;r<n.length;r++)if(n[r]===t)return!0;return!1},hasObjectEventHandler:function(e,t,n){var r=this._objectEventHandlers[e];if(null!=r)for(var i=r[t],o=0;null!=i&&o<i.length;o++)if(i[o]===n)return!0;return!1},addEventHandler:function(e,t){if("function"!=typeof t)return!1;var n=this._eventHandlers[e];return!(!n||this.hasEventHandler(e,t))&&(n.push(t),!0)},addObjectEventHandler:function(e,t,n){if("function"!=typeof n)return!1;var r=this._objectEventHandlers[e];return!(!r||this.hasObjectEventHandler(e,t,n))&&(null==r[t]&&(r[t]=[]),r[t].push(n),!0)},addEventHandlerAndFireQueuedEvent:function(e,t){var n=0==this._eventHandlers[e].length,r=this.addEventHandler(e,t);return n&&r&&this.fireQueuedEvent(e),r},removeEventHandler:function(e,t){var n=this._eventHandlers[e];if(n&&n.length>0)for(var r=0;r<n.length;r++)if(n[r]===t)return n.splice(r,1),!0;return!1},removeObjectEventHandler:function(e,t,n){var r=this._objectEventHandlers[e];if(null!=r)for(var i=r[t],o=0;null!=i&&o<i.length;o++)if(i[o]===n)return i.splice(o,1),!0;return!1},clearEventHandlers:function(e){return void 0!==this._eventHandlers[e]&&this._eventHandlers[e].length>0&&(this._eventHandlers[e]=[],!0)},clearObjectEventHandlers:function(e,t){return null!=this._objectEventHandlers[e]&&null!=this._objectEventHandlers[e][t]&&(this._objectEventHandlers[e][t]=[],!0)},getEventHandlerCount:function(e){return null!=this._eventHandlers[e]?this._eventHandlers[e].length:-1},getObjectEventHandlerCount:function(e,t){return null==this._objectEventHandlers[e]||null==this._objectEventHandlers[e][t]?0:this._objectEventHandlers[e][t].length},fireEvent:function(e){if(null==e.type)return!1;var t=e.type;if(t&&this._eventHandlers[t]){for(var n=this._eventHandlers[t],r=0;r<n.length;r++)n[r](e);return!0}return!1},fireObjectEvent:function(e,t){if(null==t.type)return!1;var n=t.type;if(n&&this._objectEventHandlers[n]){var r=this._objectEventHandlers[n][e];if(null!=r){for(var i=0;i<r.length;i++)r[i](t);return!0}}return!1},fireOrQueueEvent:function(e){var t=e.type;if(t&&this._eventHandlers[t]){var n=this._eventHandlers[t],r=this._queuedEventsArgs[t];return 0==n.length?r.push(e):this.fireEvent(e),!0}return!1},fireQueuedEvent:function(e){if(e&&this._eventHandlers[e]){var t=this._eventHandlers[e],n=this._queuedEventsArgs[e];if(t.length>0){for(var r=t[0];n.length>0;){r(n.shift())}return!0}}return!1},clearQueuedEvent:function(e){e&&this._eventHandlers[e]&&(this._queuedEventsArgs[e]&&(this._queuedEventsArgs[e]=[]))}},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureEventArgs=function(e,t,n){var r;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(n,t.document),n[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(n,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(n),"outlook"==OSF._OfficeAppFactory.getHostInfo().hostType&&"mac"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&OSF.DDA.convertOlkAppointmentTimeToDateFormat(r);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(e,n[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(e,n);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkItemSelectedChangedEventArgs(n),t.initialize(r.initialData),"win32"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform&&"mac"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform||t.setCurrentItemNumber(r.itemNumber.itemNumber);break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecipientsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecurrenceChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAttachmentsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkInfobarClickedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSelectedItemsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSensitivityLabelChangedEventArgs(n);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return r},OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]}),OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1},OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"}),OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin"}),OSF.DDA.DialogEventType={},OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"}),OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",DisplayModalDialogAsync:"displayModalDialogAsync",CloseAsync:"close"}),OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",MessageChild:"messageChild",SendMessage:"sendMessage",AddMessageHandler:"addEventHandler"}),OSF.DDA.UI.ParentUI=function(){var e;e=null!=Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived?new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]):new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]);var t=this,n=function(n,r){t[n]||OSF.OUtil.defineEnumerableProperty(t,n,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];n(arguments,e,t,r)}})};n(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,!1),Microsoft.Office.WebExtension.FeatureGates.ModalWebDialogAPI&&n(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName,!0),OSF.OUtil.finalizeProperties(this)},OSF.DDA.UI.ChildUI=function(e){var t=OSF.DDA.SyncMethodNames.MessageParent.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return e(arguments,n)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;n[r]||void 0===OSF.DialogParentMessageEventDispatch||OSF.DDA.DispIdHost.addEventSupport(n,OSF.DialogParentMessageEventDispatch,e),OSF.OUtil.finalizeProperties(this)},OSF.DialogHandler=function(){},OSF.DDA.DialogEventArgs=function(e){e[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:e[OSF.DDA.PropertyDescriptors.MessageType]}})},OSF.DDA.DialogParentEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}})};var DialogApiManager=function(){function e(){}return e.defineApi=function(e,t){OSF.DDA.AsyncMethodCalls.define({method:e,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:t,privateStateCallbacks:[],onSucceeded:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Id],i=e[Microsoft.Office.WebExtension.Parameters.Data],o=new OSF.DialogHandler,a=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(o,a,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];e(arguments,r,i,o)}});var s=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;if(OSF.OUtil.defineEnumerableProperty(o,s,{value:function(){var e=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],t=e.verifyAndExtractCall(arguments,o,i),n=t[Microsoft.Office.WebExtension.Parameters.EventType],r=t[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(n,r)}}),!0===OSF.DDA.UI.EnableSendMessageDialogAPI){var c=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(o,c,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,i,o)}})}if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var l=OSF.DDA.SyncMethodNames.MessageChild.displayName;OSF.OUtil.defineEnumerableProperty(o,l,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,i,o)}})}return o},checkCallArgs:function(e,t,n){return e[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Width]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Width]>100&&(e[Microsoft.Office.WebExtension.Parameters.Width]=99),e[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Height]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Height]>100&&(e[Microsoft.Office.WebExtension.Parameters.Height]=99),e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),e}})},e.messageChildRichApiBridge=function(){if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,null,null)}},e.initOnce=function(){e.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync,e.displayDialogAsyncApiSupportedOptions),e.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync,e.displayModalDialogAsyncApiSupportedOptions)},e.displayDialogAsyncApiSupportedOptions=[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.EnforceAppDomain,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo,value:{types:["boolean"],defaultValue:!1}}],e.displayModalDialogAsyncApiSupportedOptions=e.displayDialogAsyncApiSupportedOptions.concat([{name:"abortWhenParentIsMinimized",value:{types:["boolean"],defaultValue:!1}},{name:"abortWhenDocIsInactive",value:{types:["boolean"],defaultValue:!1}}]),e}();DialogApiManager.initOnce(),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}],privateStateCallbacks:[]}),OSF.DDA.SafeArray.Delegate.openDialog=function(e){try{e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,e);OSF.ClientHostController.openDialog(e.dispId,e.targetId,(function(t,n){e.onEvent&&e.onEvent(n),OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(e.dispId)}),t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.closeDialog=function(e){e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,e);try{OSF.ClientHostController.closeDialog(e.dispId,e.targetId,t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.messageParent=function(e){try{e.onCalling&&e.onCalling();var t=(new Date).getTime(),n=OSF.ClientHostController.messageParent(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(e.dispId,e.hostCallArgs,Math.abs((new Date).getTime()-t),n),n}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.sendMessage=function(e){try{e.onCalling&&e.onCalling();(new Date).getTime();var t=OSF.ClientHostController.sendMessage(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),t}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"}),OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0}),OSF.DDA.UI.EnableMessageChildDialogAPI=!0,OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"}),OSF.DDA.FilePropertiesDescriptor={Url:"Url"},OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"}),Microsoft.Office.WebExtension.FileProperties=function(e){OSF.OUtil.defineEnumerableProperties(this,{url:{value:e[OSF.DDA.FilePropertiesDescriptor.Url]}})},OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(e,t,n){return new Microsoft.Office.WebExtension.FileProperties(e)}}),Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"},Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"},Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"},OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,enum:Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{enum:Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]}),OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,enum:Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{enum:Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{enum:Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(null!=r[OSF.DDA.TableDataProperties.TableRows]||null!=r[OSF.DDA.TableDataProperties.TableHeaders])&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),null==(r=OSF.DDA.DataCoercion.coerceData(r,n[Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:r}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:["number","boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:["number","boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:["number","boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:["number","boolean"],defaultValue:!1}}],privateStateCallbacks:[]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]}),OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(e){return OSF.OUtil.serializeSettings(e)},deserializeSettings:function(e){return OSF.OUtil.deserializeSettings(e)}},OSF.DDA.Settings=function(e){e=e||{};var t=function(e){var t=OSF.OUtil.getSessionStorage();if(t){var n=OSF.DDA.SettingsManager.serializeSettings(e),r=JSON?JSON.stringify(n):Sys.Serialization.JavaScriptSerializer.serialize(n);t.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r)}};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(t){var n=Function._validateParams(arguments,[{name:"name",type:String,mayBeNull:!1}]);if(n)throw n;var r=e[t];return void 0===r?null:r}},set:{value:function(n,r){var i=Function._validateParams(arguments,[{name:"name",type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(i)throw i;e[n]=r,t(e)}},remove:{value:function(n){var r=Function._validateParams(arguments,[{name:"name",type:String,mayBeNull:!1}]);if(r)throw r;delete e[n],t(e)}}}),OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],e)},OSF.DDA.RefreshableSettings=function(e){OSF.DDA.RefreshableSettings.uber.constructor.call(this,e),OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],e),OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))},OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"}),OSF.DDA.SettingsChangedEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:e}})},OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(e,t){return t}}],onSucceeded:function(e,t,n){var r=e[OSF.DDA.SettingsManager.SerializedSettings],i=OSF.DDA.SettingsManager.deserializeSettings(r),o=n[OSF.DDA.SettingsManager.RefreshingSettings];for(var a in o)t.remove(a);for(var a in i)t.set(a,i[a]);return t}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(e,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent}),Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"},OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType},OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"}),OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"}),OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties),OSF.DDA.BindingPromise=function(e,t){this._id=e,OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(e){var n=typeof e;if("undefined"!=n&&"function"!=n)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,n);t=e}})},OSF.DDA.BindingPromise.prototype={_fetch:function(e){if(this.binding)e&&e(this.binding);else if(!this._binding){var t=this;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id,(function(n){n.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(t,"binding",{value:n.value}),e&&e(t.binding)):t.onFail&&t.onFail(n)}))}return this},getDataAsync:function(){var e=arguments;return this._fetch((function(t){t.getDataAsync.apply(t,e)})),this},setDataAsync:function(){var e=arguments;return this._fetch((function(t){t.setDataAsync.apply(t,e)})),this},addHandlerAsync:function(){var e=arguments;return this._fetch((function(t){t.addHandlerAsync.apply(t,e)})),this},removeHandlerAsync:function(){var e=arguments;return this._fetch((function(t){t.removeHandlerAsync.apply(t,e)})),this}},OSF.DDA.BindingFacade=function(e){this._eventDispatches=[],OSF.OUtil.defineEnumerableProperty(this,"document",{value:e});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])},OSF.DDA.UnknownBinding=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:e}})},OSF.DDA.Binding=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:e}});var n=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[n.GetDataAsync,n.SetDataAsync]);var r=Microsoft.Office.WebExtension.EventType,i=t.bindings._eventDispatches;i[e]||(i[e]=new OSF.EventDispatch([r.BindingSelectionChanged,r.BindingDataChanged]));var o=i[e];OSF.DDA.DispIdHost.addEventSupport(this,o)},OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureBinding=function(e,t){var n,r=e[OSF.DDA.BindingProperties.Id],i=e[OSF.DDA.BindingProperties.RowCount],o=e[OSF.DDA.BindingProperties.ColumnCount],a=e[OSF.DDA.BindingProperties.HasHeaders];switch(e[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:n=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:n=new OSF.DDA.MatrixBinding(r,t,i,o);break;case Microsoft.Office.WebExtension.BindingType.Table:n=new(OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding)(r,t,i,o,a);break;default:n=new OSF.DDA.UnknownBinding(r,t)}return n},OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function e(e){return OSF.DDA.OMFactory.manufactureBinding(e,Microsoft.Office.WebExtension.context.document)}function t(e){return e.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,enum:Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:e}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,enum:Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:e}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(t){return OSF.OUtil.mapList(t[OSF.DDA.ListDescriptors.BindingList],e)}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(e,t,n){var r=n[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{enum:Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{enum:Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:["object","string"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:["number"],defaultValue:0}}],checkCallArgs:function(e,t,n){if(0==e[Microsoft.Office.WebExtension.Parameters.StartRow]&&0==e[Microsoft.Office.WebExtension.Parameters.StartColumn]&&0==e[Microsoft.Office.WebExtension.Parameters.RowCount]&&0==e[Microsoft.Office.WebExtension.Parameters.ColumnCount]&&(delete e[Microsoft.Office.WebExtension.Parameters.StartRow],delete e[Microsoft.Office.WebExtension.Parameters.StartColumn],delete e[Microsoft.Office.WebExtension.Parameters.RowCount],delete e[Microsoft.Office.WebExtension.Parameters.ColumnCount]),e[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(e[Microsoft.Office.WebExtension.Parameters.StartRow]||e[Microsoft.Office.WebExtension.Parameters.StartColumn]||e[Microsoft.Office.WebExtension.Parameters.RowCount]||e[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return e},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:t}],onSucceeded:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(null!=r[OSF.DDA.TableDataProperties.TableRows]||null!=r[OSF.DDA.TableDataProperties.TableHeaders])&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),null==(r=OSF.DDA.DataCoercion.coerceData(r,n[Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:r}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:["object","string"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:["number"],defaultValue:0}}],checkCallArgs:function(e,t,n){if(0==e[Microsoft.Office.WebExtension.Parameters.StartRow]&&0==e[Microsoft.Office.WebExtension.Parameters.StartColumn]&&(delete e[Microsoft.Office.WebExtension.Parameters.StartRow],delete e[Microsoft.Office.WebExtension.Parameters.StartColumn]),e[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(e[Microsoft.Office.WebExtension.Parameters.StartRow]||e[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return e},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:t}]})}(),OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"}),OSF.DDA.MatrixBinding=function(e,t,n,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,e,t),OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:n||0},columnCount:{value:r||0}})},OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),Microsoft.Office.WebExtension.TableData=function(e,t){function n(e){if(null==e||null==e)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(e,2);t<2;t++)e=[e];return e}catch(e){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(e){t=n(e)}},rows:{get:function(){return e},set:function(t){e=null==t||OSF.OUtil.isArray(t)&&0==t.length?[]:n(t)}}}),this.headers=t,this.rows=e},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureTableData=function(e){return new Microsoft.Office.WebExtension.TableData(e[OSF.DDA.TableDataProperties.TableRows],e[OSF.DDA.TableDataProperties.TableHeaders])},OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"}),OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"}),OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"},OSF.DDA.TableBinding=function(e,t,n,r,i){OSF.DDA.TableBinding.uber.constructor.call(this,e,t),OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:n||0},columnCount:{value:r||0},hasHeaders:{value:i||!1}});var o=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[o.AddRowsAsync,o.AddColumnsAsync,o.DeleteAllDataValuesAsync])},OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding),OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function e(e){return e.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]})}(),OSF.DDA.TextBinding=function(e,t){OSF.DDA.TextBinding.uber.constructor.call(this,e,t),OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})},OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"}),OSF.DDA.DocumentSelectionChangedEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:e}})},OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"}),OSF.DDA.ObjectEventArgs=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:e},object:{value:t}})},OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"}),OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"}),OSF.DDA.BindingSelectionChangedEventArgs=function(e,t){for(var n in OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:e}}),t)OSF.OUtil.defineEnumerableProperty(this,n,{value:t[n]})},OSF.DDA.BindingDataChangedEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:e}})},OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"},OSF.DDA.DataCoercion={findArrayDimensionality:function(e){if(OSF.OUtil.isArray(e)){for(var t=0,n=0;n<e.length;n++)t=Math.max(t,OSF.DDA.DataCoercion.findArrayDimensionality(e[n]));return t+1}return 0},getCoercionDefaultForBinding:function(e){switch(e){case Microsoft.Office.WebExtension.BindingType.Matrix:return Microsoft.Office.WebExtension.CoercionType.Matrix;case Microsoft.Office.WebExtension.BindingType.Table:return Microsoft.Office.WebExtension.CoercionType.Table;case Microsoft.Office.WebExtension.BindingType.Text:default:return Microsoft.Office.WebExtension.CoercionType.Text}},getBindingDefaultForCoercion:function(e){switch(e){case Microsoft.Office.WebExtension.CoercionType.Matrix:return Microsoft.Office.WebExtension.BindingType.Matrix;case Microsoft.Office.WebExtension.CoercionType.Table:return Microsoft.Office.WebExtension.BindingType.Table;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:return Microsoft.Office.WebExtension.BindingType.Text}},determineCoercionType:function(e){if(null==e||null==e)return null;var t=null,n=typeof e;if(void 0!==e.rows)t=Microsoft.Office.WebExtension.CoercionType.Table;else if(OSF.OUtil.isArray(e))t=Microsoft.Office.WebExtension.CoercionType.Matrix;else{if("string"!=n&&"number"!=n&&"boolean"!=n&&!OSF.OUtil.isDate(e))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject;t=Microsoft.Office.WebExtension.CoercionType.Text}return t},coerceData:function(e,t,n){return(n=n||OSF.DDA.DataCoercion.determineCoercionType(e))&&n!=t&&(OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin),e=OSF.DDA.DataCoercion._coerceDataFromTable(t,OSF.DDA.DataCoercion._coerceDataToTable(e,n)),OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd)),e},_matrixToText:function(e){if(1==e.length&&1==e[0].length)return""+e[0][0];for(var t="",n=0;n<e.length;n++)t+=e[n].join("\t")+"\n";return t.substring(0,t.length-1)},_textToMatrix:function(e){for(var t=e.split("\n"),n=0;n<t.length;n++)t[n]=t[n].split("\t");return t},_tableToText:function(e){var t="";null!=e.headers&&(t=OSF.DDA.DataCoercion._matrixToText([e.headers])+"\n");var n=OSF.DDA.DataCoercion._matrixToText(e.rows);return""==n&&(t=t.substring(0,t.length-1)),t+n},_tableToMatrix:function(e){var t=e.rows;return null!=e.headers&&t.unshift(e.headers),t},_coerceDataFromTable:function(e,t){var n;switch(e){case Microsoft.Office.WebExtension.CoercionType.Table:n=t;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:n=OSF.DDA.DataCoercion._tableToMatrix(t);break;case Microsoft.Office.WebExtension.CoercionType.SlideRange:n=null,OSF.DDA.OMFactory.manufactureSlideRange&&(n=OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(t))),null==n&&(n=OSF.DDA.DataCoercion._tableToText(t));break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:n=OSF.DDA.DataCoercion._tableToText(t)}return n},_coerceDataToTable:function(e,t){var n;switch(null==t&&(t=OSF.DDA.DataCoercion.determineCoercionType(e)),t){case Microsoft.Office.WebExtension.CoercionType.Table:n=e;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:n=new Microsoft.Office.WebExtension.TableData(e);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:n=new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(e))}return n}},OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Text,value:0},{name:Microsoft.Office.WebExtension.CoercionType.Matrix,value:1},{name:Microsoft.Office.WebExtension.CoercionType.Table,value:2}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Html:"html"}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Html,value:3}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Ooxml:"ooxml"}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Ooxml,value:4}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{OoxmlPackage:"ooxmlPackage"}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.OoxmlPackage,value:5}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{PdfFile:"pdf"}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.PdfFile,value:6}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType,{OnlyVisible:"onlyVisible"}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.OnlyVisible,value:1}]}),OSF.DDA.DataPartProperties={Id:Microsoft.Office.WebExtension.Parameters.Id,BuiltIn:"DataPartBuiltIn"},OSF.DDA.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"},OSF.DDA.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"},OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"}),OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{DataPartList:"DataPartList",DataNodeList:"DataNodeList"}),OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataPartList,OSF.DDA.PropertyDescriptors.DataPartProperties),OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataNodeList,OSF.DDA.PropertyDescriptors.DataNodeProperties),OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DataNodeInsertedEvent:"DataNodeInsertedEvent",DataNodeReplacedEvent:"DataNodeReplacedEvent",DataNodeDeletedEvent:"DataNodeDeletedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DataNodeDeleted:"nodeDeleted",DataNodeInserted:"nodeInserted",DataNodeReplaced:"nodeReplaced",NodeDeleted:"nodeDeleted",NodeInserted:"nodeInserted",NodeReplaced:"nodeReplaced"}),OSF.DDA.CustomXmlParts=function(){this._eventDispatches=[];var e=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[e.AddDataPartAsync,e.GetDataPartByIdAsync,e.GetDataPartsByNameSpaceAsync])},OSF.DDA.CustomXmlPart=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{builtIn:{value:n},id:{value:t},namespaceManager:{value:new OSF.DDA.CustomXmlPrefixMappings(t)}});var r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.DeleteDataPartAsync,r.GetPartNodesAsync,r.GetPartXmlAsync]);var i=e._eventDispatches,o=i[t];if(!o){var a=Microsoft.Office.WebExtension.EventType;o=new OSF.EventDispatch([a.DataNodeDeleted,a.DataNodeInserted,a.DataNodeReplaced]),i[t]=o}OSF.DDA.DispIdHost.addEventSupport(this,o)},OSF.DDA.CustomXmlPrefixMappings=function(e){var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddDataPartNamespaceAsync,t.GetDataPartNamespaceAsync,t.GetDataPartPrefixAsync],e)},OSF.DDA.CustomXmlNode=function(e,t,n,r){OSF.OUtil.defineEnumerableProperties(this,{baseName:{value:r},namespaceUri:{value:n},nodeType:{value:t}});var i=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[i.GetRelativeNodesAsync,i.GetNodeValueAsync,i.GetNodeXmlAsync,i.SetNodeValueAsync,i.SetNodeXmlAsync,i.GetNodeTextAsync,i.SetNodeTextAsync],e)},OSF.DDA.NodeInsertedEventArgs=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeInserted},newNode:{value:e},inUndoRedo:{value:t}})},OSF.DDA.NodeReplacedEventArgs=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeReplaced},oldNode:{value:e},newNode:{value:t},inUndoRedo:{value:n}})},OSF.DDA.NodeDeletedEventArgs=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeDeleted},oldNode:{value:e},oldNextSibling:{value:t},inUndoRedo:{value:n}})},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureDataNode=function(e){if(e)return new OSF.DDA.CustomXmlNode(e[OSF.DDA.DataNodeProperties.Handle],e[OSF.DDA.DataNodeProperties.NodeType],e[OSF.DDA.DataNodeProperties.NamespaceUri],e[OSF.DDA.DataNodeProperties.BaseName])},OSF.DDA.OMFactory.manufactureDataPart=function(e,t){return new OSF.DDA.CustomXmlPart(t,e[OSF.DDA.DataPartProperties.Id],e[OSF.DDA.DataPartProperties.BuiltIn])},OSF.DDA.AsyncMethodNames.addNames({AddDataPartAsync:"addAsync",GetDataPartByIdAsync:"getByIdAsync",GetDataPartsByNameSpaceAsync:"getByNamespaceAsync",DeleteDataPartAsync:"deleteAsync",GetPartNodesAsync:"getNodesAsync",GetPartXmlAsync:"getXmlAsync",AddDataPartNamespaceAsync:"addNamespaceAsync",GetDataPartNamespaceAsync:"getNamespaceAsync",GetDataPartPrefixAsync:"getPrefixAsync",GetRelativeNodesAsync:"getNodesAsync",GetNodeValueAsync:"getNodeValueAsync",GetNodeXmlAsync:"getXmlAsync",SetNodeValueAsync:"setNodeValueAsync",SetNodeXmlAsync:"setXmlAsync",GetNodeTextAsync:"getTextAsync",SetNodeTextAsync:"setTextAsync"}),function(){function e(e){return OSF.DDA.OMFactory.manufactureDataPart(e,Microsoft.Office.WebExtension.context.document.customXmlParts)}function t(e){return OSF.DDA.OMFactory.manufactureDataNode(e)}function n(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Data];return null==r?null:r}function r(e){return e.id}function i(e,t){return t}function o(e,t){return t}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(t){return OSF.OUtil.mapList(t[OSF.DDA.ListDescriptors.DataPartList],e)}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:r}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:["string"]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:r}],onSucceeded:function(e){return OSF.OUtil.mapList(e[OSF.DDA.ListDescriptors.DataNodeList],t)}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:r}],onSucceeded:n}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:["string"]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:i}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:["string"]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:i}],onSucceeded:n}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:["string"]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:i}],onSucceeded:n}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:["string"]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:o}],onSucceeded:function(e){return OSF.OUtil.mapList(e[OSF.DDA.ListDescriptors.DataNodeList],t)}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:o}],onSucceeded:n}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:o}],onSucceeded:n}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string"]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:o}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:["string"]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:o}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:o}],onSucceeded:n}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeTextAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Text,types:["string"]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:o}]})}(),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataPartProperties,fromHost:[{name:OSF.DDA.DataPartProperties.Id,value:0},{name:OSF.DDA.DataPartProperties.BuiltIn,value:1}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataNodeProperties,fromHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:OSF.DDA.DataNodeProperties.BaseName,value:1},{name:OSF.DDA.DataNodeProperties.NamespaceUri,value:2},{name:OSF.DDA.DataNodeProperties.NodeType,value:3}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:0},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:1}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:0},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:1},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:0},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:1},{name:OSF.DDA.DataNodeEventProperties.NextSiblingNode,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.OldNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NewNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NextSiblingNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataPartMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Xml,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartByIdMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartsByNamespaceMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataPartList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidDeleteDataPartMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeValueMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeValueMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeXmlMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:Microsoft.Office.WebExtension.Parameters.Xml,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataNamespaceMethod,toHost:[{name:OSF.DDA.DataPartProperties.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:1},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:2}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataUriByPrefixMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataPartProperties.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPrefixByUriMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataPartProperties.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeTextMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeTextMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:Microsoft.Office.WebExtension.Parameters.Text,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeAddedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeReplacedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeDeletedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]}),OSF.OUtil.setNamespace("RichApi",OSF.DDA),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RichApiMessage:"richApiMessage"}),OSF.DDA.RichApiMessageEventArgs=function(e,t){var n=t[Microsoft.Office.WebExtension.Parameters.Data],r=[];if(n)for(var i=0;i<n.length;i++){var o=n[i];o.toArray&&(o=o.toArray()),r.push({messageCategory:o[0],messageType:o[1],targetId:o[2],message:o[3],id:o[4],isRemoteOverride:o[5]})}OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.RichApiMessage},entries:{value:r}})},function(e){var t=function(){function e(){this._eventDispatch=null,this._registerHandlers=[],this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.RichApiMessage]),OSF.DDA.DispIdHost.addEventSupport(this,this._eventDispatch)}return e.prototype.register=function(e){var t=this;return this._registerWithHostPromise||(this._registerWithHostPromise=new Office.Promise((function(e,n){t.addHandlerAsync(Microsoft.Office.WebExtension.EventType.RichApiMessage,(function(e){t._registerHandlers.forEach((function(t){t&&t(e)}))}),(function(t){"failed"==t.status?n(t.error):e()}))}))),this._registerWithHostPromise.then((function(){t._registerHandlers.push(e)}))},e}();e.RichApiMessageManager=t}(OfficeExt||(OfficeExt={})),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidRichApiMessageEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{XmlSvg:"xmlSvg"}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Image,value:8},{name:Microsoft.Office.WebExtension.CoercionType.XmlSvg,value:9}]}),function(e){!function(t){var n=function(){function n(){var e=this;this._pseudoDocument=null,this._eventDispatch=null,this._useAssociatedActionsOnly=null,this._processAppCommandInvocation=function(t){var n=e._verifyManifestCallback(t.callbackName);if(n.errorCode==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var r=e._constructEventObjectForCallback(t);r?window.setTimeout((function(){n.callback(r)}),0):e._invokeAppCommandCompletedMethod(t.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}else e._invokeAppCommandCompletedMethod(t.appCommandId,n.errorCode,"")}}return n.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:["string"]}]}),OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"}),OSF.OUtil.setNamespace("AppCommand",OSF.DDA),OSF.DDA.AppCommand.AppCommandInvokedEventArgs=e.AppCommand.AppCommandInvokedEventArgs},n.prototype.initializeAndChangeOnce=function(e){t.registerDdaFacade(),this._pseudoDocument={},OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]),this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch),this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,(function(t){e&&("succeeded"==t.status?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))}))},n.prototype._verifyManifestCallback=function(e){var t={callback:null,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback};e=e.trim();try{var n=this._getCallbackFunc(e);if("function"!=typeof n)return t}catch(e){return t}return{callback:n,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}},n.prototype._getUseAssociatedActionsOnly=function(){if(null==this._useAssociatedActionsOnly){this._useAssociatedActionsOnly=!1;try{!0===window.useAssociatedActionsOnly?this._useAssociatedActionsOnly=!0:this._useAssociatedActionsOnly=OSF._OfficeAppFactory.getLoadScriptHelper().getUseAssociatedActionsOnlyDefined()}catch(e){}}return this._useAssociatedActionsOnly},n.prototype._getCallbackFuncFromWindow=function(e){for(var t=e.split("."),n=window,r=0;r<t.length-1;r++){if(!n[t[r]]||"object"!=typeof n[t[r]]&&"function"!=typeof n[t[r]])return null;n=n[t[r]]}return n[t[t.length-1]]},n.prototype._getCallbackFuncFromActionAssociateTable=function(e){var t=e.toUpperCase();return Office.actions._association.mappings[t]},n.prototype._getCallbackFunc=function(e){var t=this,r=null,i=!1;if(this._getUseAssociatedActionsOnly()||(r=this._getCallbackFuncFromWindow(e)),r||(r=this._getCallbackFuncFromActionAssociateTable(e))&&(i=!0),!n.isTelemetrySubmitted){n.isTelemetrySubmitted=!0;try{OTel&&oteljs&&Microsoft.Office.WebExtension.sendTelemetryEvent&&OTel.OTelLogger.onTelemetryLoaded((function(){var e=[oteljs.makeBooleanDataField("UseAction",!0===t._useAssociatedActionsOnly),oteljs.makeBooleanDataField("UseAssociateTable",i)];Microsoft.Office.WebExtension.sendTelemetryEvent({eventName:"Office.Extensibility.OfficeJs.AppCommandDefinition",dataFields:e,eventFlags:{dataCategories:oteljs.DataCategories.ProductServiceUsage,diagnosticLevel:oteljs.DiagnosticLevel.NecessaryServiceDataEvent}})}))}catch(e){}}return r},n.prototype._invokeAppCommandCompletedMethod=function(e,t,n){this._pseudoDocument.appCommandInvocationCompletedAsync(e,t,n)},n.prototype._constructEventObjectForCallback=function(e){var t=this,n=new i;try{var r=JSON.parse(e.eventObjStr);this._translateEventObjectInternal(r,n),Object.defineProperty(n,"completed",{value:function(r){n.completedContext=r;var i=JSON.stringify(n);t._invokeAppCommandCompletedMethod(e.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,i)},enumerable:!0})}catch(e){n=null}return n},n.prototype._translateEventObjectInternal=function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];"object"==typeof r&&null!=r?(OSF.OUtil.defineEnumerableProperty(t,n,{value:{}}),this._translateEventObjectInternal(r,t[n])):Object.defineProperty(t,n,{value:r,enumerable:!0,writable:!0})}},n.prototype._constructObjectByTemplate=function(e,t){var n={};if(!e||!t)return n;for(var r in e)if(e.hasOwnProperty(r)&&(n[r]=null,null!=t[r])){var i=e[r],o=t[r],a=typeof o;"object"==typeof i&&null!=i?n[r]=this._constructObjectByTemplate(i,o):"number"!=a&&"string"!=a&&"boolean"!=a||(n[r]=o)}return n},n.instance=function(){return null==n._instance&&(n._instance=new n),n._instance},n.isTelemetrySubmitted=!1,n._instance=null,n}();t.AppCommandManager=n;var r=function(){function e(e,t,n){this.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this.appCommandId=e,this.callbackName=t,this.eventObjStr=n}return e.create=function(n){return new e(n[t.AppCommandInvokedEventEnums.AppCommandId],n[t.AppCommandInvokedEventEnums.CallbackName],n[t.AppCommandInvokedEventEnums.EventObjStr])},e}();t.AppCommandInvokedEventArgs=r;var i=function(){};t.AppCommandCallbackEventArgs=i,t.AppCommandInvokedEventEnums={AppCommandId:"appCommandId",CallbackName:"callbackName",EventObjStr:"eventObjStr"}}(e.AppCommand||(e.AppCommand={}))}(OfficeExt||(OfficeExt={})),OfficeExt.AppCommand.AppCommandManager.initializeOsfDda(),function(e){!function(t){t.registerDdaFacade=function(){if(OSF.DDA.SafeArray){var t=OSF.DDA.SafeArray.Delegate.ParameterMap;t.define({type:OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Status,value:1},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,value:2}]}),t.define({type:OSF.DDA.EventDispId.dispidAppCommandInvokedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,value:t.self}],isComplexType:!0}),t.define({type:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,fromHost:[{name:e.AppCommand.AppCommandInvokedEventEnums.AppCommandId,value:0},{name:e.AppCommand.AppCommandInvokedEventEnums.CallbackName,value:1},{name:e.AppCommand.AppCommandInvokedEventEnums.EventObjStr,value:2}],isComplexType:!0})}}}(e.AppCommand||(e.AppCommand={}))}(OfficeExt||(OfficeExt={})),Microsoft.Office.WebExtension.AccountTypeFilter={NoFilter:"noFilter",AAD:"aad",MSA:"msa"},OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync:"getAccessTokenAsync"}),OSF.DDA.Auth=function(){},OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAccessTokenAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:{types:["string"],defaultValue:""}},{name:Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.EnableNewHosts,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.AccountTypeFilter,value:{enum:Microsoft.Office.WebExtension.AccountTypeFilter,defaultValue:Microsoft.Office.WebExtension.AccountTypeFilter.NoFilter}}],checkCallArgs:function(e,t,n){var r,i=OSF._OfficeAppFactory.getInitializationHelper()._appContext;if(i&&i._wopiHostOriginForSingleSignOn){var o=OSF.OUtil.Guid.generateNewGuid();window.parent.parent.postMessage('{"MessageId":"AddinTrustedOrigin","AddinTrustId":"'+o+'"}',i._wopiHostOriginForSingleSignOn),e[Microsoft.Office.WebExtension.Parameters.AddinTrustId]=o}if(window.Office.context.requirements.isSetSupported("JsonPayloadSSO")){for(var a=((r={})[Microsoft.Office.WebExtension.Parameters.ForceConsent]=!1,r[Microsoft.Office.WebExtension.Parameters.ForceAddAccount]=!1,r[Microsoft.Office.WebExtension.Parameters.AuthChallenge]=!0,r[Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt]=!0,r[Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess]=!0,r[Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt]=!0,r[Microsoft.Office.WebExtension.Parameters.EnableNewHosts]=!0,r[Microsoft.Office.WebExtension.Parameters.AccountTypeFilter]=!0,r),s={},c=0,l=Object.keys(a);c<l.length;c++){var u=l[c];a[u]&&(s[u]=e[u]),delete e[u]}e[Microsoft.Office.WebExtension.Parameters.JsonPayload]=JSON.stringify(s)}return e},onSucceeded:function(e,t,n){return e[Microsoft.Office.WebExtension.Parameters.Data]}}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAccessTokenMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.JsonPayload,value:0},{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:0},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:1},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:2},{name:Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt,value:3},{name:Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess,value:4},{name:Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt,value:5}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.AsyncMethodNames.addNames({OpenBrowserWindow:"openBrowserWindow"}),OSF.DDA.OpenBrowser=function(){},OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.OpenBrowserWindow,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Reserved,value:{types:["number"],defaultValue:0}}],privateStateCallbacks:[]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidOpenBrowserWindow,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Reserved,value:0},{name:Microsoft.Office.WebExtension.Parameters.Url,value:1}]}),OSF.DDA.AsyncMethodNames.addNames({ExecuteFeature:"executeFeatureAsync",QueryFeature:"queryFeatureAsync"}),OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FeatureProperties:"FeatureProperties",TcidEnabled:"TcidEnabled",TcidVisible:"TcidVisible"}),OSF.DDA.ExecuteFeature=function(){},OSF.DDA.QueryFeature=function(){},OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteFeature,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Tcid,types:["number"]}],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.QueryFeature,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Tcid,types:["number"]}],privateStateCallbacks:[]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FeatureProperties,fromHost:[{name:OSF.DDA.PropertyDescriptors.TcidEnabled,value:0},{name:OSF.DDA.PropertyDescriptors.TcidVisible,value:1}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteFeature,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Tcid,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidQueryFeature,fromHost:[{name:OSF.DDA.PropertyDescriptors.FeatureProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Tcid,value:0}]}),OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(e){e&&e.get_isDialog()||OfficeExt.AppCommand.AppCommandManager.instance().initializeAndChangeOnce()},OSF.DDA.WordDocument=function(e,t){OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged,Microsoft.Office.WebExtension.EventType.ObjectDeleted,Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged,Microsoft.Office.WebExtension.EventType.ObjectDataChanged,Microsoft.Office.WebExtension.EventType.ContentControlAdded])),OSF.DDA.WordDocument.uber.constructor.call(this,e,new OSF.DDA.BindingFacade(this),t),OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.GoToByIdAsync,OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]),OSF.OUtil.defineEnumerableProperty(this,"customXmlParts",{value:new OSF.DDA.CustomXmlParts}),OSF.OUtil.finalizeProperties(this)},OSF.OUtil.extend(OSF.DDA.WordDocument,OSF.DDA.JsomDocument),OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(e,t,n){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM),e.doc=new OSF.DDA.WordDocument(e,this._initializeSettings(!0)),OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]),e.get_isDialog()||(OSF.DDA.RichApi.richApiMessageManager=new OfficeExt.RichApiMessageManager),t()};var OfficeExtension;__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){var t;!function(e){e.OfficeRequire=null}(e._Internal||(e._Internal={})),function(e){!function(t){t.Init=function(){return function(){"use strict";function t(e){return"function"==typeof e}var n,r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,o=function(e,t){d[i]=e,d[i+1]=t,2===(i+=2)&&(n?n(h):l())};var a=("undefined"!=typeof window?window:void 0)||{},s=(a.MutationObserver||a.WebKitMutationObserver,"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)),c="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;var l,u,f,p,d=new Array(1e3);function h(){for(var e=0;e<i;e+=2){(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0}i=0}function m(){}s?(f=process.nextTick,p=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/),Array.isArray(p)&&"0"===p[1]&&"10"===p[2]&&(f=window.setImmediate),l=function(){f(h)}):c?((u=new MessageChannel).port1.onmessage=h,l=function(){u.port2.postMessage(0)}):l=function(){setTimeout(h,1)};var g=void 0,y=new P;function _(e,n){if(n.constructor===e.constructor)!function(e,t){1===t._state?v(e,t._result):2===t._state?S(e,t._result):A(t,void 0,(function(t){b(e,t)}),(function(t){S(e,t)}))}(e,n);else{var r=function(e){try{return e.then}catch(e){return y.error=e,y}}(n);r===y?S(e,y.error):void 0===r?v(e,n):t(r)?function(e,t,n){o((function(e){var r=!1,i=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?b(e,n):v(e,n))}),(function(t){r||(r=!0,S(e,t))}),e._label);!r&&i&&(r=!0,S(e,i))}),e)}(e,n,r):v(e,n)}}function b(e,t){var n;e===t?S(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(n=t)||"object"==typeof n&&null!==n?_(e,t):v(e,t)}function O(e){e._onerror&&e._onerror(e._result),D(e)}function v(e,t){e._state===g&&(e._result=t,e._state=1,0!==e._subscribers.length&&o(D,e))}function S(e,t){e._state===g&&(e._state=2,e._result=t,o(O,e))}function A(e,t,n,r){var i=e._subscribers,a=i.length;e._onerror=null,i[a]=t,i[a+1]=n,i[a+2]=r,0===a&&e._state&&o(D,e)}function D(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,i,o=e._result,a=0;a<t.length;a+=3)r=t[a],i=t[a+n],r?I(n,r,i,o):i(o);e._subscribers.length=0}}function P(){this.error=null}var C=new P;function I(e,n,r,i){var o,a,s,c,l=t(r);if(l){if((o=function(e,t){try{return e(t)}catch(e){return C.error=e,C}}(r,i))===C?(c=!0,a=o.error,o=null):s=!0,n===o)return void S(n,new TypeError("A promises callback cannot return that same promise."))}else o=i,s=!0;n._state!==g||(l&&s?b(n,o):c?S(n,a):1===e?v(n,o):2===e&&S(n,o))}function F(e,t){var n=this;n._instanceConstructor=e,n.promise=new e(m),n._validateInput(t)?(n._input=t,n.length=t.length,n._remaining=t.length,n._init(),0===n.length?v(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&v(n.promise,n._result))):S(n.promise,n._validationError())}F.prototype._validateInput=function(e){return r(e)},F.prototype._validationError=function(){return new e.Error("Array Methods must be provided an Array")},F.prototype._init=function(){this._result=new Array(this.length)};var R=F;F.prototype._enumerate=function(){for(var e=this,t=e.length,n=e.promise,r=e._input,i=0;n._state===g&&i<t;i++)e._eachEntry(r[i],i)},F.prototype._eachEntry=function(e,t){var n,r=this,i=r._instanceConstructor;"object"==typeof(n=e)&&null!==n?e.constructor===i&&e._state!==g?(e._onerror=null,r._settledAt(e._state,t,e._result)):r._willSettleAt(i.resolve(e),t):(r._remaining--,r._result[t]=e)},F.prototype._settledAt=function(e,t,n){var r=this,i=r.promise;i._state===g&&(r._remaining--,2===e?S(i,n):r._result[t]=n),0===r._remaining&&v(i,r._result)},F.prototype._willSettleAt=function(e,t){var n=this;A(e,void 0,(function(e){n._settledAt(1,t,e)}),(function(e){n._settledAt(2,t,e)}))};var E=function(e){return new R(this,e).promise};var T=function(e){var t=new this(m);if(!r(e))return S(t,new TypeError("You must pass an array to race.")),t;var n=e.length;function i(e){b(t,e)}function o(e){S(t,e)}for(var a=0;t._state===g&&a<n;a++)A(this.resolve(e[a]),void 0,i,o);return t};var x=function(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(m);return b(t,e),t};var N=function(e){var t=new this(m);return S(t,e),t},M=0;var j=w;function w(e){this._id=M++,this._state=void 0,this._result=void 0,this._subscribers=[],m!==e&&(t(e)||function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof w||function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}(),function(e,t){try{t((function(t){b(e,t)}),(function(t){S(e,t)}))}catch(t){S(e,t)}}(this,e))}return w.all=E,w.race=T,w.resolve=x,w.reject=N,w._setScheduler=function(e){n=e},w._setAsap=function(e){o=e},w._asap=o,w.prototype={constructor:w,then:function(e,t){var n=this,r=n._state;if(1===r&&!e||2===r&&!t)return this;var i=new this.constructor(m),a=n._result;if(r){var s=arguments[r-1];o((function(){I(r,i,s,a)}))}else A(n,i,e,t);return i},catch:function(e){return this.then(null,e)}},j}.call(this)}}(e.PromiseImpl||(e.PromiseImpl={}))}(e._Internal||(e._Internal={})),function(e){var t,n;e.OfficePromise="undefined"==typeof window&&"function"==typeof Promise?Promise:"undefined"!=typeof window&&window.Promise?(t=window.navigator.userAgent,(n=t.indexOf("Edge/"))>=0&&(t=t.substring(n+5,t.length))<"14.14393"?e.PromiseImpl.Init():window.Promise):e.PromiseImpl.Init()}(t=e._Internal||(e._Internal={}));var n=t.OfficePromise;e.Promise=n}(OfficeExtension||(OfficeExtension={})),function(e){var t=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return l._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},e.prototype.getEventRegistration=function(e){return null},e}();e.SessionBase=t;var n=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return l.createPromise((function(t,n){var i=new XMLHttpRequest;if(i.open(e.method,e.url),i.onload=function(){var e={statusCode:i.status,headers:l._parseHttpResponseHeaders(i.getAllResponseHeaders()),body:i.responseText};t(e)},i.onerror=function(){n(new r.RuntimeError({code:o.connectionFailure,httpStatusCode:i.status,message:l._getResourceString(a.connectionFailureWithStatus,i.statusText)}))},e.headers)for(var s in e.headers)i.setRequestHeader(s,e.headers[s]);i.send(l._getRequestBodyText(e))}))},e.fetchSendRequestFunc=function(e){var t=l._getRequestBodyText(e);return""===t&&(t=void 0),fetch(e.url,{method:e.method,headers:e.headers,body:t}).then((function(e){return e.text().then((function(t){var n=e.status,r={};return e.headers.forEach((function(e,t){r[t]=e})),{statusCode:n,headers:r,body:t}}))}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n="undefined"!=typeof fetch?e.fetchSendRequestFunc:e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=l._validateLocalDocumentRequest(e);var t=l._buildRequestMessageSafeArray(e);return l.createPromise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:c.getResponseStatusCode(t),headers:c.getResponseHeaders(t),body:c.getResponseBody(t)}:c.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),l.log("Response:"),l.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(l.isNullOrUndefined(e))throw r.RuntimeError._createInvalidArgError({argumentName:"request"});l.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase();var t=!1;if("object"==typeof e.headers&&e.headers[s.testRequestNameHeader]&&(t=!0),!t){var n=u._getCurrentTestNameWithSequenceId();n&&(e.headers||(e.headers={}),e.headers[s.testRequestNameHeader]=n)}},e.logRequest=function(t){if(l._logEnabled){if(l.log("---HTTP Request---"),l.log(t.method+" "+t.url),t.headers)for(var n in t.headers)l.log(n+": "+t.headers[n]);e._logBodyEnabled&&l.log(l._getRequestBodyText(t))}},e.logResponse=function(t){if(l._logEnabled){if(l.log("---HTTP Response---"),l.log(""+t.statusCode),t.headers)for(var n in t.headers)l.log(n+": "+t.headers[n]);e._logBodyEnabled&&l.log(t.body)}},e._logBodyEnabled=!1,e}();e.HttpUtility=n;var r,i=function(){function e(e){var t=this;this.m_bridge=e,this.m_promiseResolver={},this.m_handlers=[],this.m_bridge.onMessageFromHost=function(e){var n=JSON.parse(e);if(3==n.type){var r=n.message;if(r&&r.entries)for(var i=0;i<r.entries.length;i++){var o=r.entries[i];if(Array.isArray(o)){var a={messageCategory:o[0],messageType:o[1],targetId:o[2],message:o[3],id:o[4]};r.entries[i]=a}}}t.dispatchMessage(n)}}return e.init=function(t){if("object"==typeof t&&t){var r=new e(t);e.s_instance=r,n.setCustomSendLocalDocumentRequestFunc((function(t){t=l._validateLocalDocumentRequest(t);var n=0;l.isReadonlyRestRequest(t.method)||(n=1);var i=t.url.indexOf("?");if(i>=0){var o=t.url.substr(i+1),a=l._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);a.flags>=0&&(n=a.flags)}"string"==typeof t.body&&(t.body=JSON.parse(t.body));var s={id:e.nextId(),type:1,flags:n,message:t};return r.sendMessageToHostAndExpectResponse(s).then((function(e){return e.message}))}));for(var i=0;i<e.s_onInitedHandlers.length;i++)e.s_onInitedHandlers[i](r)}},Object.defineProperty(e,"instance",{get:function(){return e.s_instance},enumerable:!0,configurable:!0}),e.prototype.sendMessageToHost=function(e){this.m_bridge.sendMessageToHost(JSON.stringify(e))},e.prototype.sendMessageToHostAndExpectResponse=function(e){var t=this,n=l.createPromise((function(n,r){t.m_promiseResolver[e.id]=n}));return this.m_bridge.sendMessageToHost(JSON.stringify(e)),n},e.prototype.addHostMessageHandler=function(e){this.m_handlers.push(e)},e.prototype.removeHostMessageHandler=function(e){var t=this.m_handlers.indexOf(e);t>=0&&this.m_handlers.splice(t,1)},e.onInited=function(t){e.s_onInitedHandlers.push(t),e.s_instance&&t(e.s_instance)},e.prototype.dispatchMessage=function(e){if("number"==typeof e.id){var t=this.m_promiseResolver[e.id];if(t)return t(e),void delete this.m_promiseResolver[e.id]}for(var n=0;n<this.m_handlers.length;n++)this.m_handlers[n](e)},e.nextId=function(){return e.s_nextId++},e.s_onInitedHandlers=[],e.s_nextId=1,e}();e.HostBridge=i,"object"==typeof _richApiNativeBridge&&_richApiNativeBridge&&i.init(_richApiNativeBridge),function(e){var t=function(t){function n(e){var r=t.call(this,"string"==typeof e?e:e.message)||this;if(Object.setPrototypeOf(r,n.prototype),r.name="RichApi.Error","string"==typeof e?r.message=e:(r.code=e.code,r.message=e.message,r.traceMessages=e.traceMessages||[],r.innerError=e.innerError||null,r.debugInfo=r._createDebugInfo(e.debugInfo||{}),r.httpStatusCode=e.httpStatusCode,r.data=e.data),l.isNullOrUndefined(r.httpStatusCode)||200===r.httpStatusCode){var i={};i[o.accessDenied]=401,i[o.connectionFailure]=500,i[o.generalException]=500,i[o.invalidArgument]=400,i[o.invalidObjectPath]=400,i[o.invalidOrTimedOutSession]=408,i[o.invalidRequestContext]=400,i[o.timeout]=408,i[o.valueNotLoaded]=400,r.httpStatusCode=i[r.code]}return l.isNullOrUndefined(r.httpStatusCode)&&(r.httpStatusCode=500),r}return __extends(n,t),n.prototype.toString=function(){return this.code+": "+this.message},n.prototype._createDebugInfo=function(t){var n={code:this.code,message:this.message,toString:function(){return JSON.stringify(this)}};for(var r in t)n[r]=t[r];return this.innerError&&(this.innerError instanceof e.RuntimeError?n.innerError=this.innerError.debugInfo:n.innerError=this.innerError),n},n._createInvalidArgError=function(t){return new e.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:l.isNullOrEmptyString(t.argumentName)?l._getResourceString(a.invalidArgumentGeneric):l._getResourceString(a.invalidArgument,t.argumentName),debugInfo:t.errorLocation?{errorLocation:t.errorLocation}:{},innerError:t.innerError})},n}(Error);e.RuntimeError=t}(r=e._Internal||(e._Internal={})),e.Error=r.RuntimeError;var o=function(){function e(){}return e.apiNotFound="ApiNotFound",e.accessDenied="AccessDenied",e.generalException="GeneralException",e.activityLimitReached="ActivityLimitReached",e.invalidArgument="InvalidArgument",e.connectionFailure="ConnectionFailure",e.timeout="Timeout",e.invalidOrTimedOutSession="InvalidOrTimedOutSession",e.invalidObjectPath="InvalidObjectPath",e.invalidRequestContext="InvalidRequestContext",e.valueNotLoaded="ValueNotLoaded",e.requestPayloadSizeLimitExceeded="RequestPayloadSizeLimitExceeded",e.responsePayloadSizeLimitExceeded="ResponsePayloadSizeLimitExceeded",e.writeNotSupportedWhenModalDialogOpen="WriteNotSupportedWhenModalDialogOpen",e}();e.CoreErrorCodes=o;var a=function(){function e(){}return e.apiNotFoundDetails="ApiNotFoundDetails",e.connectionFailureWithStatus="ConnectionFailureWithStatus",e.connectionFailureWithDetails="ConnectionFailureWithDetails",e.invalidArgument="InvalidArgument",e.invalidArgumentGeneric="InvalidArgumentGeneric",e.timeout="Timeout",e.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",e.invalidSheetName="InvalidSheetName",e.invalidObjectPath="InvalidObjectPath",e.invalidRequestContext="InvalidRequestContext",e.valueNotLoaded="ValueNotLoaded",e}();e.CoreResourceStrings=a;var s=function(){function e(){}return e.flags="flags",e.sourceLibHeader="SdkVersion",e.processQuery="ProcessQuery",e.localDocument="http://document.localhost/",e.localDocumentApiPrefix="http://document.localhost/_api/",e.customData="customdata",e.testRequestNameHeader="x-test-request-name",e}();e.CoreConstants=s;var c=function(){function e(){}return e.buildMessageArrayForIRequestExecutor=function(t,n,r,i){var o=JSON.stringify(r.Body);l.log("Request:"),l.log(o);var a={};return l._copyHeaders(r.Headers,a),a[s.sourceLibHeader]=i,e.buildRequestMessageSafeArray(t,n,"POST",s.processQuery,a,o)},e.buildResponseOnSuccess=function(e,t){var n={HttpStatusCode:200,ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return n.Body=JSON.parse(e),n.Headers=t,n},e.buildResponseOnError=function(t,n){var r={HttpStatusCode:500,ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return r.ErrorCode=o.generalException,r.ErrorMessage=n,t==e.OfficeJsErrorCode_ooeNoCapability?(r.ErrorCode=o.accessDenied,r.HttpStatusCode=401):t==e.OfficeJsErrorCode_ooeActivityLimitReached?(r.ErrorCode=o.activityLimitReached,r.HttpStatusCode=429):t==e.OfficeJsErrorCode_ooeInvalidOrTimedOutSession?(r.ErrorCode=o.invalidOrTimedOutSession,r.HttpStatusCode=408,r.ErrorMessage=l._getResourceString(a.invalidOrTimedOutSessionMessage)):t==e.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded?(r.ErrorCode=o.requestPayloadSizeLimitExceeded,r.HttpStatusCode=400):t==e.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded?(r.ErrorCode=o.responsePayloadSizeLimitExceeded,r.HttpStatusCode=400):t==e.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen?(r.ErrorCode=o.writeNotSupportedWhenModalDialogOpen,r.HttpStatusCode=400):t==e.OfficeJsErrorCode_ooeInvalidSheetName&&(r.ErrorCode=o.invalidRequestContext,r.HttpStatusCode=400,r.ErrorMessage=l._getResourceString(a.invalidSheetName)),r},e.buildHttpResponseFromOfficeJsError=function(t,n){var r=500,i={error:{}};return i.error.code=o.generalException,i.error.message=n,t===e.OfficeJsErrorCode_ooeNoCapability?(r=403,i.error.code=o.accessDenied):t===e.OfficeJsErrorCode_ooeActivityLimitReached&&(r=429,i.error.code=o.activityLimitReached),{statusCode:r,headers:{},body:JSON.stringify(i)}},e.buildRequestMessageSafeArray=function(e,t,n,r,i,o){var a=[];if(i)for(var s in i)a.push(s),a.push(i[s]);return[e,n,r,a,o,0,t,"","","","","",""]},e.getResponseBody=function(t){return e.getResponseBodyFromSafeArray(t.value.data)},e.getResponseHeaders=function(t){return e.getResponseHeadersFromSafeArray(t.value.data)},e.getResponseBodyFromSafeArray=function(e){var t=e[2];return"string"==typeof t?t:t.join("")},e.getResponseHeadersFromSafeArray=function(e){var t=e[1];if(!t)return null;for(var n={},r=0;r<t.length-1;r+=2)n[t[r]]=t[r+1];return n},e.getResponseStatusCode=function(t){return e.getResponseStatusCodeFromSafeArray(t.value.data)},e.getResponseStatusCodeFromSafeArray=function(e){return e[0]},e.OfficeJsErrorCode_ooeInvalidOrTimedOutSession=5012,e.OfficeJsErrorCode_ooeActivityLimitReached=5102,e.OfficeJsErrorCode_ooeNoCapability=7e3,e.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded=5103,e.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded=5104,e.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen=5016,e.OfficeJsErrorCode_ooeInvalidSheetName=1014,e}();e.RichApiMessageUtility=c,function(e){e.getPromiseType=function(){if("undefined"!=typeof Promise)return Promise;if(void 0!==Office&&Office.Promise)return Office.Promise;if(void 0!==OfficeExtension&&OfficeExtension.Promise)return OfficeExtension.Promise;throw new e.Error("No Promise implementation found")}}(r=e._Internal||(e._Internal={}));var l=function(){function e(){}return e.log=function(t){e._logEnabled&&"undefined"!=typeof console&&console.log&&console.log(t)},e.checkArgumentNull=function(t,n){if(e.isNullOrUndefined(t))throw r.RuntimeError._createInvalidArgError({argumentName:n})},e.isNullOrUndefined=function(e){return null===e||void 0===e},e.isUndefined=function(e){return void 0===e},e.isNullOrEmptyString=function(e){return null===e||(void 0===e||0==e.length)},e.isPlainJsonObject=function(t){if(e.isNullOrUndefined(t))return!1;if("object"!=typeof t)return!1;if("[object Object]"!==Object.prototype.toString.apply(t))return!1;if(t.constructor&&!Object.prototype.hasOwnProperty.call(t,"constructor")&&!Object.prototype.hasOwnProperty.call(t.constructor.prototype,"hasOwnProperty"))return!1;for(var n in t)if(!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0},e.trim=function(e){return e.replace(new RegExp("^\\s+|\\s+$","g"),"")},e.caseInsensitiveCompareString=function(t,n){return e.isNullOrUndefined(t)?e.isNullOrUndefined(n):!e.isNullOrUndefined(n)&&t.toUpperCase()==n.toUpperCase()},e.isReadonlyRestRequest=function(t){return e.caseInsensitiveCompareString(t,"GET")},e._getResourceString=function(t,n){var r;if("undefined"!=typeof window&&window.Strings&&window.Strings.OfficeOM){var i="L_"+t,o=window.Strings.OfficeOM[i];o&&(r=o)}if(r||(r=e.s_resourceStringValues[t]),r||(r=t),!e.isNullOrUndefined(n))if(Array.isArray(n)){var a=n;r=e._formatString(r,a)}else r=r.replace("{0}",n);return r},e._formatString=function(e,t){return e.replace(/\{\d\}/g,(function(e){var n=parseInt(e.substr(1,e.length-2));if(n<t.length)return t[n];throw r.RuntimeError._createInvalidArgError({argumentName:"format"})}))},Object.defineProperty(e,"Promise",{get:function(){return r.getPromiseType()},enumerable:!0,configurable:!0}),e.createPromise=function(t){return new e.Promise(t)},e._createPromiseFromResult=function(t){return e.createPromise((function(e,n){e(t)}))},e._createPromiseFromException=function(t){return e.createPromise((function(e,n){n(t)}))},e._createTimeoutPromise=function(t){return e.createPromise((function(e,n){setTimeout((function(){e(null)}),t)}))},e._createInvalidArgError=function(e){return r.RuntimeError._createInvalidArgError(e)},e._isLocalDocumentUrl=function(t){return e._getLocalDocumentUrlPrefixLength(t)>0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),r=0;r<t.length;r++){if(n===t[r])return t[r].length;if(n.substr(0,t[r].length+1)===t[r]+"/")return t[r].length+1}return 0},e._validateLocalDocumentRequest=function(t){var n=e._getLocalDocumentUrlPrefixLength(t.url);if(n<=0)throw r.RuntimeError._createInvalidArgError({argumentName:"request"});var i=t.url.substr(n),o=i.toLowerCase();return"_api"===o?i="":"_api/"===o.substr(0,"_api/".length)&&(i=i.substr("_api/".length)),{method:t.method,url:i,headers:t.headers,body:t.body}},e._parseRequestFlagsAndCustomDataFromQueryStringIfAny=function(e){for(var t={flags:-1,customData:""},n=e.split("&"),r=0;r<n.length;r++){var i=n[r].split("=");if(i[0].toLowerCase()===s.flags){var o=parseInt(i[1]);o&=8191,t.flags=o}else i[0].toLowerCase()===s.customData&&(t.customData=decodeURIComponent(i[1]))}return t},e._getRequestBodyText=function(e){var t="";return"string"==typeof e.body?t=e.body:e.body&&"object"==typeof e.body&&(t=JSON.stringify(e.body)),t},e._parseResponseBody=function(t){if("string"==typeof t.body){var n=e.trim(t.body);return JSON.parse(n)}return t.body},e._buildRequestMessageSafeArray=function(t){var n=0;e.isReadonlyRestRequest(t.method)||(n=1);var r="";if(t.url.substr(0,s.processQuery.length).toLowerCase()===s.processQuery.toLowerCase()){var i=t.url.indexOf("?");if(i>0){var o=t.url.substr(i+1),a=e._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);a.flags>=0&&(n=a.flags),r=a.customData}}return c.buildRequestMessageSafeArray(r,n,t.method,t.url,t.headers,e._getRequestBodyText(t))},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var r=new RegExp("\r?\n"),i=t.split(r),o=0;o<i.length;o++){var a=i[o];if(null!=a){var s=a.indexOf(":");if(s>0){var c=a.substr(0,s),l=a.substr(s+1);c=e.trim(c),l=e.trim(l),n[c.toUpperCase()]=l}}}return n},e._parseErrorResponse=function(t){var n=e._parseErrorResponseBody(t),r=t.statusCode.toString();if(e.isNullOrUndefined(n)||"object"!=typeof n||!n.error)return e._createDefaultErrorResponse(r);var i=n.error,o=i.innerError;return o&&o.code?e._createErrorResponse(o.code,r,o.message):i.code?e._createErrorResponse(i.code,r,i.message):e._createDefaultErrorResponse(r)},e._parseErrorResponseBody=function(t){if(e.isPlainJsonObject(t.body))return t.body;if(!e.isNullOrEmptyString(t.body)){var n=e.trim(t.body);try{return JSON.parse(n)}catch(t){e.log("Error when parse "+n)}}},e._createDefaultErrorResponse=function(t){return{errorCode:o.connectionFailure,errorMessage:e._getResourceString(a.connectionFailureWithStatus,t)}},e._createErrorResponse=function(t,n,r){return{errorCode:t,errorMessage:e._getResourceString(a.connectionFailureWithDetails,[n,t,r])}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e.addResourceStringValues=function(t){for(var n in t)e.s_resourceStringValues[n]=t[n]},e._logEnabled=!1,e.s_resourceStringValues={ApiNotFoundDetails:"The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",ConnectionFailureWithStatus:"The request failed with status code of {0}.",ConnectionFailureWithDetails:"The request failed with status code of {0}, error code {1} and the following error message: {2}",InvalidArgument:"The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",InvalidObjectPath:'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',InvalidRequestContext:"Cannot use the object across different request contexts.",Timeout:"The operation has timed out.",ValueNotLoaded:'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'},e}();e.CoreUtility=l;var u=function(){function e(){}return e.setMock=function(t){e.s_isMock=t},e.isMock=function(){return e.s_isMock},e._setCurrentTestName=function(t){e.s_currentTestName=t,e.s_currentTestSequenceId=0},e._getCurrentTestNameWithSequenceId=function(){return e.s_currentTestName?(e.s_currentTestSequenceId++,e.s_currentTestName+"."+e.s_currentTestSequenceId):null},e}();e.TestUtility=u,e._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0,appendTypeNameToObjectPathInfo:!1,enablePreviewExecution:!1},e.config={extendedErrorLogging:!1};var f=function(){function t(){}return t.createSetPropertyAction=function(t,n,r,i,o){S.validateObjectPath(n);var a={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:n._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[i],c=S.setMethodArguments(t,a.ArgumentInfo,s);S.validateReferencedObjectPaths(c);var l=new d(a,0,o);if(l.referencedObjectPath=n._objectPath,l.referencedArgumentObjectPaths=c,e._internalConfig.enablePreviewExecution&&0!=(16&o)){var u={Id:t._nextId(),ActionType:4,Name:r,ObjectId:"",ObjectType:"",Arguments:[i]};n._addPreviewExecutionAction(u)}return n._addAction(l)},t.createQueryAction=function(e,t,n,r){S.validateObjectPath(t);var i={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new d(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createQueryAsJsonAction=function(e,t,n,r){S.validateObjectPath(t);var i={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new d(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createUpdateAction=function(e,t,n){S.validateObjectPath(t);var r={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},i=new d(r,0,0);return i.referencedObjectPath=t._objectPath,t._addAction(i)},t}();e.CommonActionFactory=f;var p=function(){function t(e,t){this.m_contextBase=e,this.m_objectPath=t}return Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_contextBase},enumerable:!0,configurable:!0}),t.prototype._addAction=function(e,t){var n=this;return void 0===t&&(t=null),l.createPromise((function(r,i){n._context._addServiceApiAction(e,t,r,i)}))},t.prototype._addPreviewExecutionAction=function(e){},t.prototype._retrieve=function(t,n){var r=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;r||(r=!S.isSetSupported("RichApiRuntime","1.1"));var i=m._parseQueryOption(t);return r?f.createQueryAction(this._context,this,i,n):f.createQueryAsJsonAction(this._context,this,i,n)},t.prototype._recursivelyUpdate=function(t){var n=e._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!S.isSetSupported("RichApiRuntime","1.2"));try{var i=this[v.scalarPropertyNames];i||(i=[]);var s=this[v.scalarPropertyUpdateable];if(!s){s=[];for(var c=0;c<i.length;c++)s.push(!1)}var u=this[v.navigationPropertyNames];u||(u=[]);var p={},d={},h=0;for(var m in t){var g=i.indexOf(m);if(g>=0){if(!s[g])throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:l._getResourceString(A.attemptingToSetReadOnlyProperty,m),debugInfo:{errorLocation:m}});p[m]=t[m],++h}else{if(!(u.indexOf(m)>=0))throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:l._getResourceString(A.propertyDoesNotExist,m),debugInfo:{errorLocation:m}});d[m]=t[m]}}if(h>0)if(n)for(c=0;c<i.length;c++){var y=p[m=i[c]];S.isUndefined(y)||f.createSetPropertyAction(this._context,this,m,y)}else f.createUpdateAction(this._context,this,p);for(var m in d){var _=this[m],b=d[m];_._recursivelyUpdate(b)}}catch(e){throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:l._getResourceString(a.invalidArgument,"properties"),debugInfo:{errorLocation:this._className+".update"},innerError:e})}},t}();e.ClientObjectBase=p;var d=function(){function e(e,t,n){this.m_actionInfo=e,this.m_operationType=t,this.m_flags=n}return Object.defineProperty(e.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"operationType",{get:function(){return this.m_operationType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"flags",{get:function(){return this.m_flags},enumerable:!0,configurable:!0}),e}();e.Action=d;var h=function(){function t(e,t,n,r,i,o){this.m_objectPathInfo=e,this.m_parentObjectPath=t,this.m_isCollection=n,this.m_isInvalidAfterRequest=r,this.m_isValid=!0,this.m_operationType=i,this.m_flags=o}return Object.defineProperty(t.prototype,"id",{get:function(){var e=this.m_objectPathInfo.ArgumentInfo;if(e){var t=e.Arguments;if(t)return t[0]}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this.m_parentObjectPath;if(e)return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentId",{get:function(){return this.parent?this.parent.id:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"operationType",{get:function(){return this.m_operationType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"flags",{get:function(){return this.m_flags},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(e){this.m_argumentObjectPaths=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(e){this.m_isValid=e,!e&&6===this.m_objectPathInfo.ObjectPathType&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalObjectPathInfo",{get:function(){return this.m_originalObjectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(e){this.m_getByIdMethodName=e},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.resetForUpdateUsingObjectData(),this.m_objectPathInfo.ObjectPathType=7,this.m_objectPathInfo.Name="",this.m_parentObjectPath=null},t.prototype.saveOriginalObjectPathInfo=function(){e.config.extendedErrorLogging&&!this.m_originalObjectPathInfo&&(this.m_originalObjectPathInfo={},t.copyObjectPathInfo(this.m_objectPathInfo,this.m_originalObjectPathInfo))},t.prototype.updateUsingObjectData=function(e,n){var r=e[v.referenceId];if(!l.isNullOrEmptyString(r)){if(!this.m_savedObjectPathInfo&&!this.isInvalidAfterRequest&&t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)){var i={};t.copyObjectPathInfo(this.m_objectPathInfo,i),this.m_savedObjectPathInfo={pathInfo:i,parent:this.m_parentObjectPath}}return this.saveOriginalObjectPathInfo(),this.resetForUpdateUsingObjectData(),this.m_objectPathInfo.ObjectPathType=6,this.m_objectPathInfo.Name=r,delete this.m_objectPathInfo.ParentObjectPathId,void(this.m_parentObjectPath=null)}if(n){var o=n[v.collectionPropertyPath];if(!l.isNullOrEmptyString(o)&&n.context){var a=S.tryGetObjectIdFromLoadOrRetrieveResult(e);if(!l.isNullOrUndefined(a)){for(var s=o.split("."),c=n.context[s[0]],u=1;u<s.length;u++)c=c[s[u]];return this.saveOriginalObjectPathInfo(),this.resetForUpdateUsingObjectData(),this.m_parentObjectPath=c._objectPath,this.m_objectPathInfo.ParentObjectPathId=this.m_parentObjectPath.objectPathInfo.Id,this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name="",void(this.m_objectPathInfo.ArgumentInfo.Arguments=[a])}}}var f=this.parentObjectPath&&this.parentObjectPath.isCollection,p=this.getByIdMethodName;if(f||!l.isNullOrEmptyString(p)){a=S.tryGetObjectIdFromLoadOrRetrieveResult(e);if(!l.isNullOrUndefined(a))return this.saveOriginalObjectPathInfo(),this.resetForUpdateUsingObjectData(),l.isNullOrEmptyString(p)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=p),void(this.m_objectPathInfo.ArgumentInfo.Arguments=[a])}},t.prototype.resetForUpdateUsingObjectData=function(){this.m_isInvalidAfterRequest=!1,this.m_isValid=!0,this.m_operationType=1,this.m_flags=4,this.m_objectPathInfo.ArgumentInfo={},this.m_argumentObjectPaths=null,this.m_getByIdMethodName=null},t.isRestorableObjectPath=function(e){return 1===e||5===e||3===e||4===e},t.copyObjectPathInfo=function(e,t){t.Id=e.Id,t.ArgumentInfo=e.ArgumentInfo,t.Name=e.Name,t.ObjectPathType=e.ObjectPathType,t.ParentObjectPathId=e.ParentObjectPathId},t}();e.ObjectPath=h;var m=function(){function e(){this.m_nextId=0}return e.prototype._nextId=function(){return++this.m_nextId},e.prototype._addServiceApiAction=function(e,t,n,r){this.m_serviceApiQueue||(this.m_serviceApiQueue=new b(this)),this.m_serviceApiQueue.add(e,t,n,r)},e._parseQueryOption=function(t){var n={};if("string"==typeof t){var i=t;n.Select=S._parseSelectExpand(i)}else if(Array.isArray(t))n.Select=t;else if("object"==typeof t){var o=t;if(e.isLoadOption(o)){if("string"==typeof o.select)n.Select=S._parseSelectExpand(o.select);else if(Array.isArray(o.select))n.Select=o.select;else if(!S.isNullOrUndefined(o.select))throw r.RuntimeError._createInvalidArgError({argumentName:"option.select"});if("string"==typeof o.expand)n.Expand=S._parseSelectExpand(o.expand);else if(Array.isArray(o.expand))n.Expand=o.expand;else if(!S.isNullOrUndefined(o.expand))throw r.RuntimeError._createInvalidArgError({argumentName:"option.expand"});if("number"==typeof o.top)n.Top=o.top;else if(!S.isNullOrUndefined(o.top))throw r.RuntimeError._createInvalidArgError({argumentName:"option.top"});if("number"==typeof o.skip)n.Skip=o.skip;else if(!S.isNullOrUndefined(o.skip))throw r.RuntimeError._createInvalidArgError({argumentName:"option.skip"})}else n=e.parseStrictLoadOption(t)}else if(!S.isNullOrUndefined(t))throw r.RuntimeError._createInvalidArgError({argumentName:"option"});return n},e.isLoadOption=function(e){if(!S.isUndefined(e.select)&&("string"==typeof e.select||Array.isArray(e.select)))return!0;if(!S.isUndefined(e.expand)&&("string"==typeof e.expand||Array.isArray(e.expand)))return!0;if(!S.isUndefined(e.top)&&"number"==typeof e.top)return!0;if(!S.isUndefined(e.skip)&&"number"==typeof e.skip)return!0;for(var t in e)return!1;return!0},e.parseStrictLoadOption=function(t){var n={Select:[]};return e.parseStrictLoadOptionHelper(n,"","option",t),n},e.combineQueryPath=function(e,t,n){return 0===e.length?t:e+n+t},e.parseStrictLoadOptionHelper=function(t,n,i,o){for(var a in o){var s=o[a];if("$all"===a){if("boolean"!=typeof s)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});s&&t.Select.push(e.combineQueryPath(n,"*","/"))}else if("$top"===a){if("number"!=typeof s||n.length>0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Top=s}else if("$skip"===a){if("number"!=typeof s||n.length>0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Skip=s}else if("boolean"==typeof s)s&&t.Select.push(e.combineQueryPath(n,a,"/"));else{if("object"!=typeof s)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,a,"/"),e.combineQueryPath(i,a,"."),s)}}},e}();e.ClientRequestContextBase=m;var g=function(){function e(e){this.m_objectPath=e}return e.prototype._handleResult=function(e){l.isNullOrUndefined(e)?this.m_objectPath._updateAsNullObject():this.m_objectPath.updateUsingObjectData(e,null)},e}(),y=function(){function t(e){this.m_contextBase=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_preSyncPromises=[],this.m_previewExecutionActions=[]}return t.prototype.addAction=function(e){this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},t.prototype.addPreviewExecutionAction=function(e){this.m_previewExecutionActions.push(e)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new d(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n);var r=new g(e);this.addActionResultHandler(n,r)}}},t.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t<e.length;t++)this.ensureInstantiateObjectPath(e[t])},t.prototype.addReferencedObjectPath=function(e){if(e&&!this.m_referencedObjectPaths[e.objectPathInfo.Id]){if(!e.isValid)throw new r.RuntimeError({code:o.invalidObjectPath,httpStatusCode:400,message:l._getResourceString(a.invalidObjectPath,S.getObjectPathExpression(e)),debugInfo:{errorLocation:S.getObjectPathExpression(e)}});for(;e;)this.m_referencedObjectPaths[e.objectPathInfo.Id]=e,3==e.objectPathInfo.ObjectPathType&&this.addReferencedObjectPaths(e.argumentObjectPaths),e=e.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(e){if(e)for(var t=0;t<e.length;t++)this.addReferencedObjectPath(e[t])},t.prototype.addActionResultHandler=function(e,t){this.m_actionResultHandler[e.actionInfo.Id]=t},t.prototype.aggregrateRequestFlags=function(e,t,n){return 0===t&&(e|=1,0==(2&n)&&(e&=-17),0==(8&n)&&(e&=-257),e&=-5),1&n&&(e|=2),0==(4&n)&&(e&=-5),e},t.prototype.finallyNormalizeFlags=function(t){return 0==(1&t)&&(t&=-17,t&=-257),e._internalConfig.enableConcurrentFlag||(t&=-5),e._internalConfig.enableUndoableFlag||(t&=-17),S.isSetSupported("RichApiRuntimeFlag","1.1")||(t&=-5,t&=-17),S.isSetSupported("RichApiRuntimeFlag","1.2")||(t&=-257),"number"==typeof this.m_flagsForTesting&&(t=this.m_flagsForTesting),t},t.prototype.buildRequestMessageBodyAndRequestFlags=function(){e._internalConfig.enableEarlyDispose&&t._calculateLastUsedObjectPathIds(this.m_actions);var n=276,r={};for(var i in this.m_referencedObjectPaths)n=this.aggregrateRequestFlags(n,this.m_referencedObjectPaths[i].operationType,this.m_referencedObjectPaths[i].flags),r[i]=this.m_referencedObjectPaths[i].objectPathInfo;for(var o=[],a=!1,s=0;s<this.m_actions.length;s++){var c=this.m_actions[s];3===c.actionInfo.ActionType&&c.actionInfo.Name===v.keepReference&&(a=!0),n=this.aggregrateRequestFlags(n,c.operationType,c.flags),o.push(c.actionInfo)}n=this.finallyNormalizeFlags(n);var l={AutoKeepReference:this.m_contextBase._autoCleanup&&a,Actions:o,ObjectPaths:r};return this.m_previewExecutionActions.length>0&&(l.PreviewExecutionActions=this.m_previewExecutionActions,n|=4096),{body:l,flags:n}},t.prototype.processResponse=function(e){if(e)for(var t=0;t<e.length;t++){var n=e[t],r=this.m_actionResultHandler[n.ActionId];r&&r._handleResult(n.Value)}},t.prototype.invalidatePendingInvalidObjectPaths=function(){for(var e in this.m_referencedObjectPaths)this.m_referencedObjectPaths[e].isInvalidAfterRequest&&(this.m_referencedObjectPaths[e].isValid=!1)},t.prototype._addPreSyncPromise=function(e){this.m_preSyncPromises.push(e)},Object.defineProperty(t.prototype,"_preSyncPromises",{get:function(){return this.m_preSyncPromises},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_actions",{get:function(){return this.m_actions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPaths",{get:function(){return this.m_referencedObjectPaths},enumerable:!0,configurable:!0}),t.prototype._removeKeepReferenceAction=function(e){for(var t=this.m_actions.length-1;t>=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===v.keepReference){this.m_actions.splice(t,1);break}}},t._updateLastUsedActionIdOfObjectPathId=function(e,n,r){for(;n;){if(e[n.objectPathInfo.Id])return;e[n.objectPathInfo.Id]=r;var i=n.argumentObjectPaths;if(i)for(var o=i.length,a=0;a<o;a++)t._updateLastUsedActionIdOfObjectPathId(e,i[a],r);n=n.parentObjectPath}},t._calculateLastUsedObjectPathIds=function(e){for(var n={},r=e.length,i=r-1;i>=0;--i){var o=(p=e[i]).actionInfo.Id;p.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(n,p.referencedObjectPath,o);var a=p.referencedArgumentObjectPaths;if(a)for(var s=a.length,c=0;c<s;c++)t._updateLastUsedActionIdOfObjectPathId(n,a[c],o)}var l={};for(var u in n){var f=l[o=n[u]];f||(f=[],l[o]=f),f.push(parseInt(u))}for(i=0;i<r;i++){var p,d=l[(p=e[i]).actionInfo.Id];d&&d.length>0?p.actionInfo.L=d:p.actionInfo.L&&delete p.actionInfo.L}},t}();e.ClientRequestBase=y;var _=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new r.RuntimeError({code:o.valueNotLoaded,httpStatusCode:400,message:l._getResourceString(a.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"==typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=S.adjustToDateTime(e):this.m_value=e)},e}();e.ClientResult=_;var b=function(){function e(e){this.m_context=e,this.m_actions=[]}return e.prototype.add=function(e,t,n,r){var i=this;this.m_actions.push({action:e,resultHandler:t,resolve:n,reject:r}),1===this.m_actions.length&&setTimeout((function(){return i.processActions()}),0)},e.prototype.processActions=function(){var e=this;if(0!==this.m_actions.length){var t=this.m_actions;this.m_actions=[];for(var n=new y(this.m_context),r=0;r<t.length;r++){var i=t[r];n.ensureInstantiateObjectPath(i.action.referencedObjectPath),n.ensureInstantiateObjectPaths(i.action.referencedArgumentObjectPaths),n.addAction(i.action),n.addReferencedObjectPath(i.action.referencedObjectPath),n.addReferencedObjectPaths(i.action.referencedArgumentObjectPaths)}var o=n.buildRequestMessageBodyAndRequestFlags(),a=o.body,c=o.flags,u={Url:s.localDocumentApiPrefix,Headers:null,Body:a};l.log("Request:"),l.log(JSON.stringify(a)),(new O).executeAsync(this.m_context._customData,c,u).then((function(r){e.processResponse(n,t,r)})).catch((function(e){for(var n=0;n<t.length;n++){t[n].reject(e)}}))}},e.prototype.processResponse=function(e,t,n){var r=this.getErrorFromResponse(n),i=null;n.Body.Results?i=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(i=n.Body.ProcessedResults.Results),i||(i=[]),this.processActionResults(e,t,i,r)},e.prototype.getErrorFromResponse=function(e){return l.isNullOrEmptyString(e.ErrorCode)?e.Body&&e.Body.Error?new r.RuntimeError({code:e.Body.Error.Code,httpStatusCode:e.Body.Error.HttpStatusCode,message:e.Body.Error.Message}):null:new r.RuntimeError({code:e.ErrorCode,httpStatusCode:e.HttpStatusCode,message:e.ErrorMessage})},e.prototype.processActionResults=function(e,t,n,r){e.processResponse(n);for(var i=0;i<t.length;i++){for(var o=t[i],a=o.action.actionInfo.Id,s=!1,c=0;c<n.length;c++)if(a==n[c].ActionId){var l=n[c].Value;o.resultHandler&&(o.resultHandler._handleResult(l),l=o.resultHandler.value),o.resolve&&o.resolve(l),s=!0;break}!s&&o.reject&&(r?o.reject(r):o.reject("No response for the action."))}},e}(),O=function(){function e(){}return e.prototype.getRequestUrl=function(e,t){return"/"!=e.charAt(e.length-1)&&(e+="/"),e=(e+=s.processQuery)+"?"+s.flags+"="+t.toString()},e.prototype.executeAsync=function(t,r,i){var o={method:"POST",url:this.getRequestUrl(i.Url,r),headers:{},body:i.Body};if(o.headers[s.sourceLibHeader]=e.SourceLibHeaderValue,o.headers["CONTENT-TYPE"]="application/json",i.Headers)for(var a in i.Headers)o.headers[a]=i.Headers[a];return(l._isLocalDocumentUrl(o.url)?n.sendLocalDocumentRequest:n.sendRequest)(o).then((function(e){var t;if(200===e.statusCode)t={HttpStatusCode:e.statusCode,ErrorCode:null,ErrorMessage:null,Headers:e.headers,Body:l._parseResponseBody(e)};else{l.log("Error Response:"+e.body);var n=l._parseErrorResponse(e);t={HttpStatusCode:e.statusCode,ErrorCode:n.errorCode,ErrorMessage:n.errorMessage,Headers:e.headers,Body:null,RawErrorResponseBody:l._parseErrorResponseBody(e)}}return t}))},e.SourceLibHeaderValue="officejs-rest",e}();e.HttpRequestExecutor=O;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.collectionPropertyPath="_collectionPropertyPath",t.id="Id",t.idLowerCase="id",t.idPrivate="_Id",t.keepReference="_KeepReference",t.objectPathIdPrivate="_ObjectPathId",t.referenceId="_ReferenceId",t.items="_Items",t.itemsLowerCase="items",t.scalarPropertyNames="_scalarPropertyNames",t.scalarPropertyOriginalNames="_scalarPropertyOriginalNames",t.navigationPropertyNames="_navigationPropertyNames",t.scalarPropertyUpdateable="_scalarPropertyUpdateable",t.previewExecutionObjectId="_previewExecutionObjectId",t}(s);e.CommonConstants=v;var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.validateObjectPath=function(e){for(var n=e._objectPath;n;){if(!n.isValid)throw new r.RuntimeError({code:o.invalidObjectPath,httpStatusCode:400,message:l._getResourceString(a.invalidObjectPath,t.getObjectPathExpression(n)),debugInfo:{errorLocation:t.getObjectPathExpression(n)}});n=n.parentObjectPath}},t.validateReferencedObjectPaths=function(e){if(e)for(var n=0;n<e.length;n++)for(var i=e[n];i;){if(!i.isValid)throw new r.RuntimeError({code:o.invalidObjectPath,httpStatusCode:400,message:l._getResourceString(a.invalidObjectPath,t.getObjectPathExpression(i))});i=i.parentObjectPath}},t._toCamelLowerCase=function(e){if(l.isNullOrEmptyString(e))return e;for(var t=0;t<e.length&&e.charCodeAt(t)>=65&&e.charCodeAt(t)<=90;)t++;return t<e.length?e.substr(0,t).toLowerCase()+e.substr(t):e.toLowerCase()},t.adjustToDateTime=function(e){if(l.isNullOrUndefined(e))return null;if("string"==typeof e)return new Date(e);if(Array.isArray(e)){for(var n=e,r=0;r<n.length;r++)n[r]=t.adjustToDateTime(n[r]);return n}throw l._createInvalidArgError({argumentName:"date"})},t.tryGetObjectIdFromLoadOrRetrieveResult=function(e){var t=e[v.id];return l.isNullOrUndefined(t)&&(t=e[v.idLowerCase]),l.isNullOrUndefined(t)&&(t=e[v.idPrivate]),t},t.getObjectPathExpression=function(e){for(var n="";e;){switch(e.objectPathInfo.ObjectPathType){case 1:n=n;break;case 2:n="new()"+(n.length>0?".":"")+n;break;case 3:n=t.normalizeName(e.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=t.normalizeName(e.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}e=e.parentObjectPath}return n},t.setMethodArguments=function(e,n,r){if(l.isNullOrUndefined(r))return null;var i=new Array,o=new Array,a=t.collectObjectPathInfos(e,r,i,o);return n.Arguments=r,a&&(n.ReferencedObjectPathIds=o),i},t.validateContext=function(e,t){if(e&&t&&t._context!==e)throw new r.RuntimeError({code:o.invalidRequestContext,httpStatusCode:400,message:l._getResourceString(a.invalidRequestContext)})},t.isSetSupported=function(e,t){return!("undefined"!=typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,t)},t.throwIfApiNotSupported=function(e,n,i,s){if(t._doApiNotSupportedCheck&&!t.isSetSupported(n,i)){var c=l._getResourceString(a.apiNotFoundDetails,[e,n+" "+i,s]);throw new r.RuntimeError({code:o.apiNotFound,httpStatusCode:404,message:c,debugInfo:{errorLocation:e}})}},t.calculateApiFlags=function(e,n,r){return t.isSetSupported(n,r)||(e&=-3),e},t._parseSelectExpand=function(e){var t=[];if(!l.isNullOrEmptyString(e))for(var n=e.split(","),r=0;r<n.length;r++){var i=n[r];(i=o(i.trim())).length>0&&t.push(i)}return t;function o(e){var t=e.toLowerCase();if("items"===t||"items/"===t)return"*";return("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/")}},t.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var n=[],r=0;r<e.length;r++)n.push(this.changePropertyNameToCamelLowerCase(e[r]));return n}if("object"==typeof e&&null!==e){n={};for(var i in e){var o=e[i];if(i===v.items){(n={})[v.itemsLowerCase]=this.changePropertyNameToCamelLowerCase(o);break}n[t._toCamelLowerCase(i)]=this.changePropertyNameToCamelLowerCase(o)}return n}return e},t.purifyJson=function(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)t.push(this.purifyJson(e[n]));return t}if("object"==typeof e&&null!==e){t={};for(var r in e)if(95!==r.charCodeAt(0)){var i=e[r];"object"==typeof i&&null!==i&&Array.isArray(i.items)&&(i=i.items),t[r]=this.purifyJson(i)}return t}return e},t.collectObjectPathInfos=function(e,n,r,i){for(var o=!1,a=0;a<n.length;a++)if(n[a]instanceof p){var s=n[a];t.validateContext(e,s),n[a]=s._objectPath.objectPathInfo.Id,i.push(s._objectPath.objectPathInfo.Id),r.push(s._objectPath),o=!0}else if(Array.isArray(n[a])){var c=new Array;t.collectObjectPathInfos(e,n[a],r,c)?(i.push(c),o=!0):i.push(0)}else l.isPlainJsonObject(n[a])?(i.push(0),t.replaceClientObjectPropertiesWithObjectPathIds(n[a],r)):i.push(0);return o},t.replaceClientObjectPropertiesWithObjectPathIds=function(e,n){var r,i;for(var o in e){var a=e[o];if(a instanceof p)n.push(a._objectPath),e[o]=((r={})[v.objectPathIdPrivate]=a._objectPath.objectPathInfo.Id,r);else if(Array.isArray(a))for(var s=0;s<a.length;s++)if(a[s]instanceof p){var c=a[s];n.push(c._objectPath),a[s]=((i={})[v.objectPathIdPrivate]=c._objectPath.objectPathInfo.Id,i)}else l.isPlainJsonObject(a[s])&&t.replaceClientObjectPropertiesWithObjectPathIds(a[s],n);else l.isPlainJsonObject(a)&&t.replaceClientObjectPropertiesWithObjectPathIds(a,n)}},t.normalizeName=function(e){return e.substr(0,1).toLowerCase()+e.substr(1)},t._doApiNotSupportedCheck=!1,t}(l);e.CommonUtility=S;var A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.propertyDoesNotExist="PropertyDoesNotExist",t.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",t}(a);e.CommonResourceStrings=A;var D=function(e){function t(t){var n=e.call(this)||this;return n.m_shouldPolyfill=t,n}return __extends(t,e),t.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),this.m_shouldPolyfill&&(this.m_value=S.changePropertyNameToCamelLowerCase(this.m_value)),this.m_value=this.removeItemNodes(this.m_value)},t.prototype.removeItemNodes=function(e){return"object"==typeof e&&null!==e&&e[v.itemsLowerCase]&&(e=e[v.itemsLowerCase]),S.purifyJson(e)},t}(_);e.ClientRetrieveResult=D;var P=function(){function e(e){this.callback=e}return e.prototype._handleResult=function(e){this.callback&&this.callback()},e}(),C=function(e){function t(t){var n=e.call(this)||this;return n.callback=t,n}return __extends(t,e),t.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),this.callback()},t}(_);e.ClientResultCallback=C;var I=function(){function t(){}return t.invokeMethod=function(e,t,n,r,i,o){return void 0===n&&(n=0),void 0===r&&(r=[]),void 0===i&&(i=0),void 0===o&&(o=0),l.createPromise((function(o,a){var s=new _,c={Id:e._context._nextId(),ActionType:3,Name:t,ObjectPathId:e._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=S.setMethodArguments(e._context,c.ArgumentInfo,r),u=new d(c,n,i);u.referencedObjectPath=e._objectPath,u.referencedArgumentObjectPaths=l,e._context._addServiceApiAction(u,s,o,a)}))},t.invokeMethodWithClientResultCallback=function(e,t,n){var r=[];return l.createPromise((function(i,o){var a=new C(e),s={Id:t._context._nextId(),ActionType:3,Name:n,ObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},c=S.setMethodArguments(t._context,s.ArgumentInfo,r),l=new d(s,0,0);l.referencedObjectPath=t._objectPath,l.referencedArgumentObjectPaths=c,t._context._addServiceApiAction(l,a,i,o)}))},t.invokeRetrieve=function(n,r){var i,o=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;if(o||(o=!S.isSetSupported("RichApiRuntime","1.1")),"object"==typeof r[0]&&r[0].hasOwnProperty("$all")){if(!r[0].$all)throw e.Error._createInvalidArgError({});i=r[0]}else i=t._parseSelectOption(r);return n._retrieve(i,new D(o))},t._parseSelectOption=function(n){if(!n||!n[0])throw e.Error._createInvalidArgError({});var r=n[0]&&"string"!=typeof n[0]?n[0]:n;return Array.isArray(r)?r:t.parseRecursiveSelect(r)},t.parseRecursiveSelect=function(e){var t=function(e){return Object.keys(e).reduce((function(n,r){var i=e[r];return"object"==typeof i?n.concat(t(i).map((function(e){return r+"/"+e}))):i?n.concat(r):n}),[])};return t(e)},t.invokeRecursiveUpdate=function(e,t){return l.createPromise((function(n,r){e._recursivelyUpdate(t);var i={Id:e._context._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},o=new d(i,1,4);e._context._addServiceApiAction(o,null,n,r)}))},t.createRootServiceObject=function(e,t){var n={Id:t._nextId(),ObjectPathType:1,Name:""};return new e(t,new h(n,null,!1,!1,1,4))},t.createTopLevelServiceObject=function(e,t,n,r,i){var o={Id:t._nextId(),ObjectPathType:2,Name:n};return new e(t,new h(o,null,r,!1,1,4|i))},t.createPropertyObject=function(e,t,n,r,i){var o={Id:t._context._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id},a=new h(o,t._objectPath,r,!1,1,4|i);return new e(t._context,a)},t.createIndexerObject=function(e,t,n){var r={Id:t._context._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};r.ArgumentInfo.Arguments=n;var i=new h(r,t._objectPath,!1,!1,1,4);return new e(t._context,i)},t.createMethodObject=function(e,t,n,r,i,o,a,s,c){var l={Id:t._context._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u=S.setMethodArguments(t._context,l.ArgumentInfo,i),f=new h(l,t._objectPath,o,a,r,c);return f.argumentObjectPaths=u,f.getByIdMethodName=s,new e(t._context,f)},t.createAndInstantiateMethodObject=function(e,t,n,r,i,o,a,s,c){return l.createPromise((function(l,u){var f={Id:t._context._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},p=S.setMethodArguments(t._context,f.ArgumentInfo,i),m=new h(f,t._objectPath,o,a,r,c);m.argumentObjectPaths=p,m.getByIdMethodName=s;var g=new _,y={Id:t._context._nextId(),ActionType:1,Name:"",ObjectPathId:m.objectPathInfo.Id,QueryInfo:{}},b=new d(y,1,4);b.referencedObjectPath=m,t._context._addServiceApiAction(b,g,(function(){return l(new e(t._context,m))}),u)}))},t.createTraceAction=function(e,t){return l.createPromise((function(n,r){var i={Id:e._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},o=new d(i,1,4),a=new P(t);e._addServiceApiAction(o,a,n,r)}))},t.localDocumentContext=new m,t}();e.OperationalApiHelper=I;var F=function(){function e(e,t,n){this.eventId=e,this.targetId=t,this.eventArgumentTransform=n,this.registeredCallbacks=[]}return e.prototype.add=function(e){this.hasZero()&&V.getGenericEventRegistration("").register(this.eventId,this.targetId,this.registerCallback),this.registeredCallbacks.push(e)},e.prototype.remove=function(e){var t=this.registeredCallbacks.lastIndexOf(e);-1!==t&&this.registeredCallbacks.splice(t,1)},e.prototype.removeAll=function(){this.registeredCallbacks=[],V.getGenericEventRegistration("").unregister(this.eventId,this.targetId,this.registerCallback)},e.prototype.hasZero=function(){return 0===this.registeredCallbacks.length},Object.defineProperty(e.prototype,"registerCallback",{get:function(){var e=this;return this.outsideCallback||(this.outsideCallback=function(t){e.call(t)}),this.outsideCallback},enumerable:!0,configurable:!0}),e.prototype.call=function(t){var n=this;this.eventArgumentTransform(t).then((function(t){var r=n.registeredCallbacks.map((function(n){return e.callCallback(n,t)}));l.Promise.all(r)}))},e.callCallback=function(t,n){return l._createPromiseFromResult(null).then(e.wrapCallbackInFunction(t,n)).catch((function(e){l.log("Error when invoke handler: "+JSON.stringify(e))}))},e.wrapCallbackInFunction=function(e,t){return function(){return e(t)}},e}();e.GenericEventRegistryOperational=F;var R=function(){function e(){this.eventToTargetToHandlerMap={}}return Object.defineProperty(e,"globalEventRegistry",{get:function(){return e.singleton||(e.singleton=new e),e.singleton},enumerable:!0,configurable:!0}),e.getGlobalEventRegistry=function(t,n,r){var i=e.globalEventRegistry.eventToTargetToHandlerMap;i.hasOwnProperty(t)||(i[t]={});var o=i[t];return o.hasOwnProperty(n)||(o[n]=new F(t,n,r)),o[n]},e.singleton=void 0,e}();e.GlobalEventRegistryOperational=R;var E=function(){function e(e){this.genericEventInfo=e}return e.prototype.add=function(e){var t=this,n=void 0,r=l.createPromise((function(e){n=e}));return this.register(),this.createTrace((function(){var r=t.genericEventInfo.eventType,i=t.genericEventInfo.getTargetIdFunc();R.getGlobalEventRegistry(r,i,t.genericEventInfo.eventArgsTransformFunc).add(e),n()})),r},e.prototype.remove=function(e){var t=this;this.register(),this.createTrace((function(){var n=t.genericEventInfo.eventType,r=t.genericEventInfo.getTargetIdFunc();R.getGlobalEventRegistry(n,r,t.genericEventInfo.eventArgsTransformFunc).remove(e)}))},e.prototype.removeAll=function(){var e=this;this.unregister(),this.createTrace((function(){var t=e.genericEventInfo.eventType,n=e.genericEventInfo.getTargetIdFunc();R.getGlobalEventRegistry(t,n,e.genericEventInfo.eventArgsTransformFunc).removeAll()}))},e.prototype.createTrace=function(e){I.createTraceAction(this.genericEventInfo.object._context,e)},e.prototype.register=function(){I.invokeMethod(this.genericEventInfo.object,this.genericEventInfo.register,0,[],0),V.getGenericEventRegistration("").isReady||V.getGenericEventRegistration("").ready()},e.prototype.unregister=function(){I.invokeMethod(this.genericEventInfo.object,this.genericEventInfo.unregister)},e}();e.GenericEventHandlerOperational=E;var T=function(){function e(){}return e.invokeOn=function(e,t,n){var r=void 0,i=l.createPromise((function(e,t){r=e}));return e.add(t).then((function(){r({})})),i},e.invokeOff=function(t,n,r,i){if(!r&&!i){var o=Object.keys(t).map((function(e){return t[e]}));return e.invokeAllOff(o)}return r?(i?n.remove(i):n.removeAll(),l.createPromise((function(e,t){return e()}))):l._createPromiseFromException(r+" must be supplied if handler is supplied.")},e.invokeAllOff=function(e){return e.forEach((function(e){e.removeAll()})),l.createPromise((function(e,t){return e()}))},e}();e.EventHelper=T;var x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.cannotRegisterEvent="CannotRegisterEvent",t.invalidOrTimedOutSession="InvalidOrTimedOutSession",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(o);e.ErrorCodes=x;var N=function(){function e(e){this.m_callback=e}return e.prototype._handleResult=function(e){this.m_callback&&this.m_callback()},e}(),M=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.createMethodAction=function(t,n,r,i,o,a){Z.validateObjectPath(n);var s={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:n._objectPath.objectPathInfo.Id,ArgumentInfo:{}},c=Z.setMethodArguments(t,s.ArgumentInfo,o);Z.validateReferencedObjectPaths(c);var l=Z._fixupApiFlags(a),u=new d(s,i,l);if(u.referencedObjectPath=n._objectPath,u.referencedArgumentObjectPaths=c,n._addAction(u),e._internalConfig.enablePreviewExecution&&0!=(16&l)){var f={Id:t._nextId(),ActionType:3,Name:r,Arguments:o,ObjectId:"",ObjectType:""};n._addPreviewExecutionAction(f)}return u},n.createRecursiveQueryAction=function(e,t,n){Z.validateObjectPath(t);var r={Id:e._nextId(),ActionType:6,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,RecursiveQueryInfo:n},i=new d(r,1,4);return i.referencedObjectPath=t._objectPath,t._addAction(i),i},n.createEnsureUnchangedAction=function(e,t,n){Z.validateObjectPath(t);var r={Id:e._nextId(),ActionType:8,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},i=new d(r,1,4);return i.referencedObjectPath=t._objectPath,t._addAction(i),i},n.createInstantiateAction=function(e,t){Z.validateObjectPath(t),e._pendingRequest.ensureInstantiateObjectPath(t._objectPath.parentObjectPath),e._pendingRequest.ensureInstantiateObjectPaths(t._objectPath.argumentObjectPaths);var n={Id:e._nextId(),ActionType:1,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id},r=new d(n,1,4);return r.referencedObjectPath=t._objectPath,t._addAction(r,new J(t),!0),r},n.createTraceAction=function(e,t,n){var r={Id:e._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},i=new d(r,1,4);return e._pendingRequest.addAction(i),n&&e._pendingRequest.addTrace(r.Id,t),i},n.createTraceMarkerForCallback=function(e,t){var r=n.createTraceAction(e,null,!1);e._pendingRequest.addActionResultHandler(r,new N(t))},n}(f);e.ActionFactory=M;var j=function(t){function n(n,r){var i=t.call(this,n,r)||this;return Z.checkArgumentNull(n,"context"),i.m_context=n,i._objectPath&&(!n._processingResult&&n._pendingRequest&&(M.createInstantiateAction(n,i),n._autoCleanup&&i._KeepReference&&n.trackedObjects._autoAdd(i)),e._internalConfig.appendTypeNameToObjectPathInfo&&i._objectPath.objectPathInfo&&i._className&&(i._objectPath.objectPathInfo.T=i._className)),i}return __extends(n,t),Object.defineProperty(n.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isNull",{get:function(){return(void 0!==this.m_isNull||!u.isMock())&&(Z.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isNullObject",{get:function(){return(void 0!==this.m_isNull||!u.isMock())&&(Z.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(e){this.m_isNull=e,e&&this._objectPath&&this._objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),n.prototype._addAction=function(e,t,n){return void 0===t&&(t=null),n||(this.context._pendingRequest.ensureInstantiateObjectPath(this._objectPath),this.context._pendingRequest.ensureInstantiateObjectPaths(e.referencedArgumentObjectPaths)),this.context._pendingRequest.addAction(e),this.context._pendingRequest.addReferencedObjectPath(this._objectPath),this.context._pendingRequest.addReferencedObjectPaths(e.referencedArgumentObjectPaths),this.context._pendingRequest.addActionResultHandler(e,t),l._createPromiseFromResult(null)},n.prototype._addPreviewExecutionAction=function(e){if(!Z.isUndefined(this._className)){e.ObjectType=this._className;var t=Z._getPropertyValueWithoutCheckLoaded(this,H.idLowerCase);Z.isUndefined(t)&&(t=Z._getPropertyValueWithoutCheckLoaded(this,H.idPrivate)),Z.isUndefined(t)&&(t=Z._getPropertyValueWithoutCheckLoaded(this,H.previewExecutionObjectId)),e.ObjectId=t,this.context._pendingRequest.addPreviewExecutionAction(e)}},n.prototype._handleResult=function(e){this._isNull=Z.isNullOrUndefined(e),this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,e)},n.prototype._handleIdResult=function(e){this._isNull=Z.isNullOrUndefined(e),Z.fixObjectPathIfNecessary(this,e),this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,e)},n.prototype._handleRetrieveResult=function(e,t){this._handleIdResult(e)},n.prototype._recursivelySet=function(e,t,i,s,c){var u=e instanceof n,f=e;if(u){if(Object.getPrototypeOf(this)!==Object.getPrototypeOf(e))throw r.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});e=JSON.parse(JSON.stringify(e))}try{for(var p,d=0;d<i.length;d++)p=i[d],e.hasOwnProperty(p)&&void 0!==e[p]&&(this[p]=e[p]);for(d=0;d<s.length;d++)if(p=s[d],e.hasOwnProperty(p)&&void 0!==e[p]){var h=u?f[p]:e[p];this[p].set(h,t)}var m=!u;t&&!Z.isNullOrUndefined(m)&&(m=t.throwOnReadOnly);for(d=0;d<c.length;d++)if(p=c[d],e.hasOwnProperty(p)&&void 0!==e[p]&&m)throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:l._getResourceString(Y.cannotApplyPropertyThroughSetMethod,p),debugInfo:{errorLocation:p}});for(p in e)if(i.indexOf(p)<0&&s.indexOf(p)<0){var g=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),p);if(!g)throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:l._getResourceString(A.propertyDoesNotExist,p),debugInfo:{errorLocation:p}});if(m&&!g.set)throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:l._getResourceString(A.attemptingToSetReadOnlyProperty,p),debugInfo:{errorLocation:p}})}}catch(e){throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:l._getResourceString(a.invalidArgument,"properties"),debugInfo:{errorLocation:this._className+".set"},innerError:e})}},n}(p);e.ClientObject=j;var w=function(){function e(e){this.m_session=e}return e.prototype.executeAsync=function(e,t,n){var r={url:s.processQuery,method:"POST",headers:n.Headers,body:n.Body},o="";n.Headers&&(o=n.Headers[H.officeControlId]);var a={id:i.nextId(),type:1,flags:t,controlId:o,message:r};return l.log(JSON.stringify(a)),this.m_session.sendMessageToHost(a).then((function(e){l.log("Received response: "+JSON.stringify(e));var t,n=e.message;if(200===n.statusCode)t={HttpStatusCode:n.statusCode,ErrorCode:null,ErrorMessage:null,Headers:n.headers,Body:l._parseResponseBody(n)};else{l.log("Error Response:"+n.body);var r=l._parseErrorResponse(n);t={HttpStatusCode:n.statusCode,ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:n.headers,Body:null}}return t}))},e}(),k=function(e){function t(t){var n=e.call(this)||this;return n.m_bridge=t,n.m_bridge.addHostMessageHandler((function(e){if(3===e.type){var t=e.controlId;if(l.isNullOrEmptyString(t))V.getGenericEventRegistration(t)._handleRichApiMessage(e.message);else{var n=V.peekGenericEventRegistrationOrNull(t);n&&n._handleRichApiMessage(e.message),(n=V.peekGenericEventRegistrationOrNull(""))&&n._handleRichApiMessage(e.message)}}})),n}return __extends(t,e),t.getInstanceIfHostBridgeInited=function(){return i.instance?((l.isNullOrUndefined(t.s_instance)||t.s_instance.m_bridge!==i.instance)&&(t.s_instance=new t(i.instance)),t.s_instance):null},t.prototype._resolveRequestUrlAndHeaderInfo=function(){return l._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return l.log("NativeBridgeSession::CreateRequestExecutor"),new w(this)},t.prototype.getEventRegistration=function(e){return V.getGenericEventRegistration(e)},t.prototype.sendMessageToHost=function(e){return this.m_bridge.sendMessageToHostAndExpectResponse(e)},t}(t);e.HostBridgeSession=k;var L=function(n){function i(e){var o=n.call(this)||this;if(o.m_customRequestHeaders={},o.m_batchMode=0,o._onRunFinishedNotifiers=[],t._overrideSession)o.m_requestUrlAndHeaderInfoResolver=t._overrideSession;else if((Z.isNullOrUndefined(e)||"string"==typeof e&&0===e.length)&&((e=i.defaultRequestUrlAndHeaders)||(e={url:s.localDocument,headers:{}})),"string"==typeof e)o.m_requestUrlAndHeaderInfo={url:e,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(e))o.m_requestUrlAndHeaderInfoResolver=e;else{if(!i.isRequestUrlAndHeaderInfo(e))throw r.RuntimeError._createInvalidArgError({argumentName:"url"});var a=e;o.m_requestUrlAndHeaderInfo={url:a.url,headers:{}},l._copyHeaders(a.headers,o.m_requestUrlAndHeaderInfo.headers)}return!o.m_requestUrlAndHeaderInfoResolver&&o.m_requestUrlAndHeaderInfo&&l._isLocalDocumentUrl(o.m_requestUrlAndHeaderInfo.url)&&k.getInstanceIfHostBridgeInited()&&(o.m_requestUrlAndHeaderInfo=null,o.m_requestUrlAndHeaderInfoResolver=k.getInstanceIfHostBridgeInited()),o.m_requestUrlAndHeaderInfoResolver instanceof t&&(o.m_session=o.m_requestUrlAndHeaderInfoResolver),o._processingResult=!1,o._customData=H.iterativeExecutor,o.sync=o.sync.bind(o),o}return __extends(i,n),Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.getEventRegistration(this._controlId):r.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return null==this.m_pendingRequest&&(this.m_pendingRequest=new B(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_controlId",{get:function(){var e=this.m_customRequestHeaders[H.officeControlId];return l.isNullOrUndefined(e)&&(e=""),e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){return{pendingStatements:new $(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,e._internalConfig.showDisposeInfoInDebugInfo).process()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new Q(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"batchMode",{get:function(){return this.m_batchMode},enumerable:!0,configurable:!0}),i.prototype.ensureInProgressBatchIfBatchMode=function(){if(1===this.m_batchMode&&!this.m_explicitBatchInProgress)throw Z.createRuntimeError(o.generalException,l._getResourceString(Y.notInsideBatch),null)},i.prototype.load=function(e,t){Z.validateContext(this,e);var n=i._parseQueryOption(t);f.createQueryAction(this,e,n,e)},i.prototype.loadRecursive=function(e,t,n){if(!Z.isPlainJsonObject(t))throw r.RuntimeError._createInvalidArgError({argumentName:"options"});var o={};for(var a in t)o[a]=i._parseQueryOption(t[a]);var s=M.createRecursiveQueryAction(this,e,{Queries:o,MaxDepth:n});this._pendingRequest.addActionResultHandler(s,e)},i.prototype.trace=function(e){M.createTraceAction(this,e,!0)},i.prototype._processOfficeJsErrorResponse=function(e,t){},i.prototype.ensureRequestUrlAndHeaderInfo=function(){var e=this;return Z._createPromiseFromResult(null).then((function(){if(!e.m_requestUrlAndHeaderInfo)return e.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then((function(t){if(e.m_requestUrlAndHeaderInfo=t,e.m_requestUrlAndHeaderInfo||(e.m_requestUrlAndHeaderInfo={url:s.localDocument,headers:{}}),Z.isNullOrEmptyString(e.m_requestUrlAndHeaderInfo.url)&&(e.m_requestUrlAndHeaderInfo.url=s.localDocument),e.m_requestUrlAndHeaderInfo.headers||(e.m_requestUrlAndHeaderInfo.headers={}),"function"==typeof e.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull){var n=e.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();n&&(e._requestExecutor=n)}}))}))},i.prototype.syncPrivateMain=function(){var e=this;return this.ensureRequestUrlAndHeaderInfo().then((function(){var t=e._pendingRequest;return e.m_pendingRequest=null,e.processPreSyncPromises(t).then((function(){return e.syncPrivate(t)}))}))},i.prototype.syncPrivate=function(t){var n=this;if(u.isMock())return l._createPromiseFromResult(null);if(!t.hasActions)return this.processPendingEventHandlers(t);var i=t.buildRequestMessageBodyAndRequestFlags(),o=i.body,a=i.flags;this._requestFlagModifier&&(a|=this._requestFlagModifier),this._requestExecutor||(l._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?this._requestExecutor=new X(this):this._requestExecutor=new O);var c=this._requestExecutor,f={};l._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,f),l._copyHeaders(this.m_customRequestHeaders,f),delete this.m_customRequestHeaders[H.officeScriptEventId];var p=u._getCurrentTestNameWithSequenceId();p&&(f[s.testRequestNameHeader]=p);var d={Url:this.m_requestUrlAndHeaderInfo.url,Headers:f,Body:o};t.invalidatePendingInvalidObjectPaths();var h=null,m=null;return this._lastSyncStart="undefined"==typeof performance?Date.now():performance.now(),this._lastRequestFlags=a,c.executeAsync(this._customData,a,d).then((function(r){return n._lastSyncEnd="undefined"==typeof performance?Date.now():performance.now(),e.config.executePerfLogFunc&&e.config.executePerfLogFunc({syncStart:n._lastSyncStart,syncEnd:n._lastSyncEnd}),h=n.processRequestExecutorResponseMessage(t,r),n.processPendingEventHandlers(t).catch((function(e){l.log("Error in processPendingEventHandlers"),l.log(JSON.stringify(e)),m=e}))})).then((function(){if(h)throw l.log("Throw error from response: "+JSON.stringify(h)),h;if(m){l.log("Throw error from ProcessEventHandler: "+JSON.stringify(m));var e=null;if(m instanceof r.RuntimeError)(e=m).traceMessages=t._responseTraceMessages;else{var n=null;n="string"==typeof m?m:m.message,Z.isNullOrEmptyString(n)&&(n=l._getResourceString(Y.cannotRegisterEvent)),e=new r.RuntimeError({code:x.cannotRegisterEvent,httpStatusCode:400,message:n,traceMessages:t._responseTraceMessages})}throw e}}))},i.prototype.processRequestExecutorResponseMessage=function(t,n){n.Body&&n.Body.TraceIds&&t._setResponseTraceIds(n.Body.TraceIds);var i=t._responseTraceMessages,o=null;if(n.Body){if(n.Body.Error&&n.Body.Error.ActionIndex>=0){var a=new $(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!0),s=a.processForDebugStatementInfo(n.Body.Error.ActionIndex);o={statement:s.statement,surroundingStatements:s.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},e.config.extendedErrorLogging&&(a=new $(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!1),o.fullStatements=a.process())}var c=null;if(n.Body.Results?c=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(c=n.Body.ProcessedResults.Results),c){this._processingResult=!0;try{t.processResponse(c)}finally{this._processingResult=!1}}}if(!Z.isNullOrEmptyString(n.ErrorCode))return new r.RuntimeError({code:n.ErrorCode,httpStatusCode:n.HttpStatusCode,message:n.ErrorMessage,traceMessages:i,data:{responseBody:n.RawErrorResponseBody}});if(n.Body&&n.Body.Error){var l={errorLocation:n.Body.Error.Location};return o&&(l.statement=o.statement,l.surroundingStatements=o.surroundingStatements,l.fullStatements=o.fullStatements),new r.RuntimeError({code:n.Body.Error.Code,httpStatusCode:n.Body.Error.HttpStatusCode,message:n.Body.Error.Message,traceMessages:i,debugInfo:l})}return null},i.prototype.processPendingEventHandlers=function(e){for(var t=Z._createPromiseFromResult(null),n=0;n<e._pendingProcessEventHandlers.length;n++){var r=e._pendingProcessEventHandlers[n];t=t.then(this.createProcessOneEventHandlersFunc(r,e))}return t},i.prototype.createProcessOneEventHandlersFunc=function(e,t){return function(){return e._processRegistration(t)}},i.prototype.processPreSyncPromises=function(e){for(var t=Z._createPromiseFromResult(null),n=0;n<e._preSyncPromises.length;n++){var r=e._preSyncPromises[n];t=t.then(this.createProcessOneProSyncFunc(r))}return t},i.prototype.createProcessOneProSyncFunc=function(e){return function(){return e}},i.prototype.sync=function(e){return u.isMock()?l._createPromiseFromResult(e):this.syncPrivateMain().then((function(){return e}))},i.prototype.batch=function(e){var t=this;if(1!==this.m_batchMode)return l._createPromiseFromException(Z.createRuntimeError(o.generalException,null,null));if(this.m_explicitBatchInProgress)return l._createPromiseFromException(Z.createRuntimeError(o.generalException,l._getResourceString(Y.pendingBatchInProgress),null));if(Z.isNullOrUndefined(e))return Z._createPromiseFromResult(null);this.m_explicitBatchInProgress=!0;var n,r,i,a=this.m_pendingRequest;this.m_pendingRequest=new B(this);try{n=e(this._rootObject,this)}catch(e){return this.m_explicitBatchInProgress=!1,this.m_pendingRequest=a,l._createPromiseFromException(e)}return"object"==typeof n&&n&&"function"==typeof n.then?i=Z._createPromiseFromResult(null).then((function(){return n})).then((function(e){return t.m_explicitBatchInProgress=!1,r=t.m_pendingRequest,t.m_pendingRequest=a,e})).catch((function(e){return t.m_explicitBatchInProgress=!1,r=t.m_pendingRequest,t.m_pendingRequest=a,l._createPromiseFromException(e)})):(this.m_explicitBatchInProgress=!1,r=this.m_pendingRequest,this.m_pendingRequest=a,i=Z._createPromiseFromResult(n)),i.then((function(e){return t.ensureRequestUrlAndHeaderInfo().then((function(){return t.syncPrivate(r)})).then((function(){return e}))}))},i._run=function(e,t,n,r,o,a){return void 0===n&&(n=3),void 0===r&&(r=5e3),i._runCommon("run",null,e,0,t,n,r,null,o,a)},i.isValidRequestInfo=function(e){return"string"==typeof e||i.isRequestUrlAndHeaderInfo(e)||i.isRequestUrlAndHeaderInfoResolver(e)},i.isRequestUrlAndHeaderInfo=function(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})&&!Z.isNullOrUndefined(e.url)},i.isRequestUrlAndHeaderInfoResolver=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e._resolveRequestUrlAndHeaderInfo},i._runBatch=function(e,t,n,r,o,a,s,c){return void 0===o&&(o=3),void 0===a&&(a=5e3),i._runBatchCommon(0,e,t,n,o,a,r,s,c)},i._runExplicitBatch=function(e,t,n,r,o,a,s,c){return void 0===o&&(o=3),void 0===a&&(a=5e3),i._runBatchCommon(1,e,t,n,o,a,r,s,c)},i._runBatchCommon=function(e,t,n,r,o,a,s,c,l){var u,f;void 0===o&&(o=3),void 0===a&&(a=5e3);var p=null,d=null,h=0,m=null;if(n.length>0)if(i.isValidRequestInfo(n[0]))p=n[0],h=1;else if(Z.isPlainJsonObject(n[0])){if(null!=(p=(m=n[0]).session)&&!i.isValidRequestInfo(p))return i.createErrorPromise(t);d=m.previousObjects,h=1}if(n.length==h+1)f=n[h+0];else{if(null!=m||n.length!=h+2)return i.createErrorPromise(t);d=n[h+0],f=n[h+1]}if(null!=d)if(d instanceof j)u=function(){return d.context};else if(d instanceof i)u=function(){return d};else{if(!Array.isArray(d))return i.createErrorPromise(t);var g=d;if(0==g.length)return i.createErrorPromise(t);for(var y=0;y<g.length;y++){if(!(g[y]instanceof j))return i.createErrorPromise(t);if(g[y].context!=g[0].context)return i.createErrorPromise(t,Y.invalidRequestContext)}u=function(){return g[0].context}}else u=r;var _=null;return s&&(_=function(e){return s(m||{},e)}),i._runCommon(t,p,u,e,f,o,a,_,c,l)},i.createErrorPromise=function(e,t){return void 0===t&&(t=a.invalidArgument),l._createPromiseFromException(Z.createRuntimeError(t,l._getResourceString(t),e))},i._runCommon=function(n,r,o,a,s,c,u,f,p,d){t._overrideSession&&(r=t._overrideSession);var h,m,g,y=l.createPromise((function(e,t){e()})),_=!1;return y.then((function(){if((h=o(r))._autoCleanup)return new e.Promise((function(e,t){h._onRunFinishedNotifiers.push((function(){h._autoCleanup=!0,e()}))}));h._autoCleanup=!0})).then((function(){return"function"!=typeof s?i.createErrorPromise(n):(g=h.m_batchMode,h.m_batchMode=a,f&&f(h),e=s(1==a?h.batch.bind(h):h),(Z.isNullOrUndefined(e)||"function"!=typeof e.then)&&Z.throwError(Y.runMustReturnPromise),e);var e})).then((function(e){return 1===a?e:h.sync(e)})).then((function(e){_=!0,m=e})).catch((function(e){m=e})).then((function(){var e=h.trackedObjects._retrieveAndClearAutoCleanupList();for(var t in h._autoCleanup=!1,h.m_batchMode=g,e)e[t]._objectPath.isValid=!1;var n=0;if(Z._synchronousCleanup||i.isRequestUrlAndHeaderInfoResolver(r))return o();function o(){n++;var t=h.m_pendingRequest,r=h.m_batchMode,i=new B(h);h.m_pendingRequest=i,h.m_batchMode=0;try{for(var a in e)h.trackedObjects.remove(e[a])}finally{h.m_batchMode=r,h.m_pendingRequest=t}return h.syncPrivate(i).then((function(){p&&p(n)})).catch((function(){d&&d(n),n<c&&setTimeout((function(){o()}),u)}))}o()})).then((function(){h._onRunFinishedNotifiers&&h._onRunFinishedNotifiers.length>0&&h._onRunFinishedNotifiers.shift()();if(_)return m;throw m}))},i}(m);e.ClientRequestContext=L;var U=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[H.scalarPropertyNames],r=e[H.navigationPropertyNames],i=e[H.className],o=e[H.isCollection];if(n)for(var a=0;a<n.length;a++)Z.definePropertyThrowUnloadedException(this,i,n[a]);if(r)for(a=0;a<r.length;a++)Z.definePropertyThrowUnloadedException(this,i,r[a]);o&&Z.definePropertyThrowUnloadedException(this,i,H.itemsLowerCase)}return Object.defineProperty(e.prototype,"$proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$isNullObject",{get:function(){if(!this.m_isLoaded)throw new r.RuntimeError({code:x.valueNotLoaded,httpStatusCode:400,message:l._getResourceString(Y.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.$isNullObject"}});return this.m_isNullObject},enumerable:!0,configurable:!0}),e.prototype.toJSON=function(){if(this.m_isLoaded)return this.m_isNullObject?null:(Z.isUndefined(this.m_json)&&(this.m_json=Z.purifyJson(this.m_value)),this.m_json)},e.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.prototype._handleResult=function(e){this.m_isLoaded=!0,null===e||"object"==typeof e&&e&&e._IsNull?(this.m_isNullObject=!0,e=null):this.m_isNullObject=!1,this.m_shouldPolyfill&&(e=Z.changePropertyNameToCamelLowerCase(e)),this.m_value=e,this.m_proxy._handleRetrieveResult(e,this)},e}(),H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.getItemAt="GetItemAt",t.index="_Index",t.iterativeExecutor="IterativeExecutor",t.isTracked="_IsTracked",t.eventMessageCategory=65536,t.eventWorkbookId="Workbook",t.eventSourceRemote="Remote",t.proxy="$proxy",t.className="_className",t.isCollection="_isCollection",t.collectionPropertyPath="_collectionPropertyPath",t.objectPathInfoDoNotKeepReferenceFieldName="D",t.officeScriptEventId="X-OfficeScriptEventId",t.officeScriptFireRecordingEvent="X-OfficeScriptFireRecordingEvent",t.officeControlId="X-OfficeControlId",t}(v);e.Constants=H;var B=function(e){function t(t){var n=e.call(this,t)||this;return n.m_context=t,n.m_pendingProcessEventHandlers=[],n.m_pendingEventHandlerActions={},n.m_traceInfos={},n.m_responseTraceIds={},n.m_responseTraceMessages=[],n}return __extends(t,e),Object.defineProperty(t.prototype,"traceInfos",{get:function(){return this.m_traceInfos},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_responseTraceMessages",{get:function(){return this.m_responseTraceMessages},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_responseTraceIds",{get:function(){return this.m_responseTraceIds},enumerable:!0,configurable:!0}),t.prototype._setResponseTraceIds=function(e){if(e)for(var t=0;t<e.length;t++){var n=e[t];this.m_responseTraceIds[n]=n;var r=this.m_traceInfos[n];l.isNullOrUndefined(r)||this.m_responseTraceMessages.push(r)}},t.prototype.addTrace=function(e,t){this.m_traceInfos[e]=t},t.prototype._addPendingEventHandlerAction=function(e,t){this.m_pendingEventHandlerActions[e._id]||(this.m_pendingEventHandlerActions[e._id]=[],this.m_pendingProcessEventHandlers.push(e)),this.m_pendingEventHandlerActions[e._id].push(t)},Object.defineProperty(t.prototype,"_pendingProcessEventHandlers",{get:function(){return this.m_pendingProcessEventHandlers},enumerable:!0,configurable:!0}),t.prototype._getPendingEventHandlerActions=function(e){return this.m_pendingEventHandlerActions[e._id]},t}(y);e.ClientRequest=B;var W=function(){function e(e,t,n,r){var i=this;this.m_id=e._nextId(),this.m_context=e,this.m_name=n,this.m_handlers=[],this.m_registered=!1,this.m_eventInfo=r,this.m_callback=function(e){i.m_eventInfo.eventArgsTransformFunc(e).then((function(e){return i.fireEvent(e)}))}}return Object.defineProperty(e.prototype,"_registered",{get:function(){return this.m_registered},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_id",{get:function(){return this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_handlers",{get:function(){return this.m_handlers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_callback",{get:function(){return this.m_callback},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=M.createTraceAction(this.m_context,null,!1);return this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:t.actionInfo.Id,handler:e,operation:0}),new G(this.m_context,this,e)},e.prototype.remove=function(e){var t=M.createTraceAction(this.m_context,null,!1);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:t.actionInfo.Id,handler:e,operation:1})},e.prototype.removeAll=function(){var e=M.createTraceAction(this.m_context,null,!1);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:e.actionInfo.Id,handler:null,operation:2})},e.prototype._processRegistration=function(e){var t=this,n=l._createPromiseFromResult(null),r=e._getPendingEventHandlerActions(this);if(!r)return n;for(var i=[],o=0;o<this.m_handlers.length;o++)i.push(this.m_handlers[o]);var a=!1;for(o=0;o<r.length;o++)if(e._responseTraceIds[r[o].id])switch(a=!0,r[o].operation){case 0:i.push(r[o].handler);break;case 1:for(var s=i.length-1;s>=0;s--)if(i[s]===r[o].handler){i.splice(s,1);break}break;case 2:i=[]}return a&&(!this.m_registered&&i.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==i.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){l.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=i}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n<this.m_handlers.length;n++){var r=this.m_handlers[n],i=l._createPromiseFromResult(null).then(this.createFireOneEventHandlerFunc(r,e)).catch((function(e){l.log("Error when invoke handler: "+JSON.stringify(e))}));t.push(i)}l.Promise.all(t)},e.prototype.createFireOneEventHandlerFunc=function(e,t){return function(){return e(t)}},e}();e.EventHandlers=W;var G=function(){function e(e,t,n){this.m_context=e,this.m_allHandlers=t,this.m_handler=n}return Object.defineProperty(e.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),e.prototype.remove=function(){this.m_allHandlers&&this.m_handler&&(this.m_allHandlers.remove(this.m_handler),this.m_allHandlers=null,this.m_handler=null)},e}();e.EventHandlerResult=G,function(e){var t=function(){function t(){}return t.prototype.register=function(t,n,r){switch(t){case 4:return Z.promisify((function(e){return Office.context.document.bindings.getByIdAsync(n,e)})).then((function(e){return Z.promisify((function(t){return e.addHandlerAsync(Office.EventType.BindingDataChanged,r,t)}))}));case 3:return Z.promisify((function(e){return Office.context.document.bindings.getByIdAsync(n,e)})).then((function(e){return Z.promisify((function(t){return e.addHandlerAsync(Office.EventType.BindingSelectionChanged,r,t)}))}));case 2:return Z.promisify((function(e){return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged,r,e)}));case 1:return Z.promisify((function(e){return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged,r,e)}));case 5:return OSF.DDA.RichApi.richApiMessageManager.register(r);case 13:return Z.promisify((function(e){return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted,r,{id:n},e)}));case 14:return Z.promisify((function(e){return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged,r,{id:n},e)}));case 15:return Z.promisify((function(e){return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged,r,{id:n},e)}));case 16:return Z.promisify((function(e){return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded,r,{id:n},e)}));default:throw e.RuntimeError._createInvalidArgError({argumentName:"eventId"})}},t.prototype.unregister=function(t,n,r){switch(t){case 4:return Z.promisify((function(e){return Office.context.document.bindings.getByIdAsync(n,e)})).then((function(e){return Z.promisify((function(t){return e.removeHandlerAsync(Office.EventType.BindingDataChanged,{handler:r},t)}))}));case 3:return Z.promisify((function(e){return Office.context.document.bindings.getByIdAsync(n,e)})).then((function(e){return Z.promisify((function(t){return e.removeHandlerAsync(Office.EventType.BindingSelectionChanged,{handler:r},t)}))}));case 2:return Z.promisify((function(e){return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged,{handler:r},e)}));case 1:return Z.promisify((function(e){return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged,{handler:r},e)}));case 5:return Z.promisify((function(e){return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage",{handler:r},e)}));case 13:return Z.promisify((function(e){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted,{id:n,handler:r},e)}));case 14:return Z.promisify((function(e){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged,{id:n,handler:r},e)}));case 15:return Z.promisify((function(e){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged,{id:n,handler:r},e)}));case 16:return Z.promisify((function(e){return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded,{id:n,handler:r},e)}));default:throw e.RuntimeError._createInvalidArgError({argumentName:"eventId"})}},t}();e.officeJsEventRegistration=new t}(r=e._Internal||(e._Internal={}));var q=function(){function e(e,t){this.m_handlersByEventByTarget={},this.m_registerEventImpl=e,this.m_unregisterEventImpl=t}return e.getTargetIdOrDefault=function(e){return Z.isNullOrUndefined(e)?"":e},e.prototype.getHandlers=function(t,n){n=e.getTargetIdOrDefault(n);var r=this.m_handlersByEventByTarget[t];r||(r={},this.m_handlersByEventByTarget[t]=r);var i=r[n];return i||(i=[],r[n]=i),i},e.prototype.callHandlers=function(e,t,n){for(var r=this.getHandlers(e,t),i=0;i<r.length;i++)r[i](n)},e.prototype.hasHandlers=function(e,t){return this.getHandlers(e,t).length>0},e.prototype.register=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});var i=this.getHandlers(e,t);return i.push(n),1===i.length?this.m_registerEventImpl(e,t):Z._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var i=this.getHandlers(e,t),o=i.length-1;o>=0;o--)if(i[o]===n){i.splice(o,1);break}return 0===i.length?this.m_unregisterEventImpl(e,t):Z._createPromiseFromResult(null)},e}();e.EventRegistration=q;var V=function(){function e(){this.m_eventRegistration=new q(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):i.instance?this.m_ready=Z._createPromiseFromResult(null).then((function(){t.m_isReady=!0})):this.m_ready=r.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t<e.entries.length;t++){var n=e.entries[t];if(n.messageCategory==H.eventMessageCategory){l._logEnabled&&l.log(JSON.stringify(n));var r=n.messageType,i=n.targetId;if(this.m_eventRegistration.hasHandlers(r,i)){var o=JSON.parse(n.message);n.isRemoteOverride&&(o.source=H.eventSourceRemote),this.m_eventRegistration.callHandlers(r,i,o)}}}},e.getGenericEventRegistration=function(t){l.isNullOrUndefined(t)&&(t="");var n=e.s_genericEventRegistrations[t];return n||(n=new e,e.s_genericEventRegistrations[t]=n),n},e.peekGenericEventRegistrationOrNull=function(t){return l.isNullOrUndefined(t)&&(t=""),e.s_genericEventRegistrations[t]},e.richApiMessageEventCategory=65536,e.s_genericEventRegistrations={},e}();e.GenericEventRegistration=V,e._testSetRichApiMessageReadyImpl=function(e){V._testReadyImpl=e},e._testTriggerRichApiMessageEvent=function(e){V.getGenericEventRegistration("")._handleRichApiMessage(e)};var z=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r,i)||this;return o.m_genericEventInfo=i,o}return __extends(t,e),t.prototype.add=function(e){var t=this;0==this._handlers.length&&this.m_genericEventInfo.registerFunc&&this.m_genericEventInfo.registerFunc();var n=this._context._controlId;return V.getGenericEventRegistration(n).isReady||this._context._pendingRequest._addPreSyncPromise(V.getGenericEventRegistration(n).ready()),M.createTraceMarkerForCallback(this._context,(function(){t._handlers.push(e),1==t._handlers.length&&V.getGenericEventRegistration(n).register(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)})),new G(this._context,this,e)},t.prototype.remove=function(e){var t=this;1==this._handlers.length&&this.m_genericEventInfo.unregisterFunc&&this.m_genericEventInfo.unregisterFunc();var n=this._context._controlId;M.createTraceMarkerForCallback(this._context,(function(){for(var r=t._handlers,i=r.length-1;i>=0;i--)if(r[i]===e){r.splice(i,1);break}0==r.length&&V.getGenericEventRegistration(n).unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(W);e.GenericEventHandlers=z;var J=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}(),K=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new h(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,r){var i={Id:e._nextId(),ObjectPathType:2,Name:t};return new h(i,null,n,!1,1,Z._fixupApiFlags(r))},e.createPropertyObjectPath=function(e,t,n,r,i,o){var a={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new h(a,t._objectPath,r,i,1,Z._fixupApiFlags(o))},e.createIndexerObjectPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,r,i,o,a,s,c){var l={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u=Z.setMethodArguments(e,l.ArgumentInfo,i),f=new h(l,t._objectPath,o,a,r,Z._fixupApiFlags(c));return f.argumentObjectPaths=u,f.getByIdMethodName=s,f},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new h(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,r,i,o){var a=Z.tryGetObjectIdFromLoadOrRetrieveResult(i);return t&&!Z.isNullOrUndefined(a)?e.createChildItemObjectPathUsingIndexer(n,r,i):e.createChildItemObjectPathUsingGetItemAt(n,r,i,o)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var r=Z.tryGetObjectIdFromLoadOrRetrieveResult(n),i=i={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[r],new h(i,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,r){var i=n[H.index];i&&(r=i);var o={Id:e._nextId(),ObjectPathType:3,Name:H.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=[r],new h(o,t._objectPath,!1,!1,1,4)},e}();e.ObjectPathFactory=K;var X=function(){function t(e){this.m_context=e}return t.prototype.executeAsync=function(n,r,i){var o=this,a=c.buildMessageArrayForIRequestExecutor(n,r,i,t.SourceLibHeaderValue);return new e.Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(a,(function(t){var n;l.log("Response:"),l.log(JSON.stringify(t)),"succeeded"==t.status?n=c.buildResponseOnSuccess(c.getResponseBody(t),c.getResponseHeaders(t)):(n=c.buildResponseOnError(t.error.code,t.error.message),o.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},t.SourceLibHeaderValue="officejs",t}(),Q=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[H.isTracked]&&e!==this.m_context._rootObject&&t&&!Z.isNullOrEmptyString(t[H.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[H.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[H.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[H.referenceId];if(e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName])throw Z.createRuntimeError(o.generalException,l._getResourceString(Y.objectIsUntracked),null);Z.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),M.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[H.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[H.referenceId];if(!Z.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[H.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();e.TrackedObjects=Q;var $=function(){function t(e,t,n,r,i){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=r,this.m_removePII=i}return t.prototype.process=function(){this.m_showDispose&&B._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e<this.m_actions.length;e++)this.processOneAction(this.m_actions[e]);return this.m_statements},t.prototype.processForDebugStatementInfo=function(e){this.m_showDispose&&B._calculateLastUsedObjectPathIds(this.m_actions);this.m_statements=[];for(var t=-1,n=0;n<this.m_actions.length&&(this.processOneAction(this.m_actions[n]),e==n&&(t=this.m_statements.length-1),!(t>=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var r=t-5;r<0&&(r=0);var i=t+1+5;i>this.m_statements.length&&(i=this.m_statements.length);var o=[];0!=r&&o.push("...");for(var a=r;a<t;a++)o.push(this.m_statements[a]);o.push("// >>>>>"),o.push(this.m_statements[t]),o.push("// <<<<<");for(var s=t+1;s<i;s++)o.push(this.m_statements[s]);return i<this.m_statements.length&&o.push("..."),{statement:this.m_statements[t],surroundingStatements:o}},t.prototype.processOneAction=function(e){switch(e.actionInfo.ActionType){case 1:this.processInstantiateAction(e);break;case 3:this.processMethodAction(e);break;case 2:this.processQueryAction(e);break;case 7:this.processQueryAsJsonAction(e);break;case 6:this.processRecursiveQueryAction(e);break;case 4:this.processSetPropertyAction(e);break;case 5:this.processTraceAction(e);break;case 8:this.processEnsureUnchangedAction(e);break;case 9:this.processUpdateAction(e)}},t.prototype.processInstantiateAction=function(e){var t=e.actionInfo.ObjectPathId,n=this.m_referencedObjectPaths[t],r=this.getObjVarName(t);if(this.m_declaredObjectPathMap[t]){i="// Instantiate {"+r+"}";i=this.appendDisposeCommentIfRelevant(i,e),this.m_statements.push(i)}else{var i="var "+r+" = "+this.buildObjectPathExpressionWithParent(n)+";";i=this.appendDisposeCommentIfRelevant(i,e),this.m_statements.push(i),this.m_declaredObjectPathMap[t]=r}},t.prototype.processMethodAction=function(t){var n=t.actionInfo.Name;if("_KeepReference"===n){if(!e._internalConfig.showInternalApiInDebugInfo)return;n="track"}var r=this.getObjVarName(t.actionInfo.ObjectPathId)+"."+Z._toCamelLowerCase(n)+"("+this.buildArgumentsExpression(t.actionInfo.ArgumentInfo)+");";r=this.appendDisposeCommentIfRelevant(r,t),this.m_statements.push(r)},t.prototype.processQueryAction=function(e){var t=this.buildQueryExpression(e),n=this.getObjVarName(e.actionInfo.ObjectPathId)+".load("+t+");";n=this.appendDisposeCommentIfRelevant(n,e),this.m_statements.push(n)},t.prototype.processQueryAsJsonAction=function(e){var t=this.buildQueryExpression(e),n=this.getObjVarName(e.actionInfo.ObjectPathId)+".retrieve("+t+");";n=this.appendDisposeCommentIfRelevant(n,e),this.m_statements.push(n)},t.prototype.processRecursiveQueryAction=function(e){var t="";e.actionInfo.RecursiveQueryInfo&&(t=JSON.stringify(e.actionInfo.RecursiveQueryInfo));var n=this.getObjVarName(e.actionInfo.ObjectPathId)+".loadRecursive("+t+");";n=this.appendDisposeCommentIfRelevant(n,e),this.m_statements.push(n)},t.prototype.processSetPropertyAction=function(e){var t=this.getObjVarName(e.actionInfo.ObjectPathId)+"."+Z._toCamelLowerCase(e.actionInfo.Name)+" = "+this.buildArgumentsExpression(e.actionInfo.ArgumentInfo)+";";t=this.appendDisposeCommentIfRelevant(t,e),this.m_statements.push(t)},t.prototype.processTraceAction=function(e){var t="context.trace();";t=this.appendDisposeCommentIfRelevant(t,e),this.m_statements.push(t)},t.prototype.processEnsureUnchangedAction=function(e){var t=this.getObjVarName(e.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(e.actionInfo.ObjectState)+");";t=this.appendDisposeCommentIfRelevant(t,e),this.m_statements.push(t)},t.prototype.processUpdateAction=function(e){var t=this.getObjVarName(e.actionInfo.ObjectPathId)+".update("+JSON.stringify(e.actionInfo.ObjectState)+");";t=this.appendDisposeCommentIfRelevant(t,e),this.m_statements.push(t)},t.prototype.appendDisposeCommentIfRelevant=function(e,t){var n=this;if(this.m_showDispose){var r=t.actionInfo.L;if(r&&r.length>0)return e+" // And then dispose {"+r.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},t.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,void 0===t.top&&void 0===t.skip&&void 0===t.expand?void 0===t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(e){return(5==e.objectPathInfo.ObjectPathType||3==e.objectPathInfo.ObjectPathType||4==e.objectPathInfo.ObjectPathType)&&e.objectPathInfo.ParentObjectPathId?this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e):this.buildObjectPathExpression(e)},t.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},t.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return Z._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return Z._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},t.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return void 0===e.Arguments[0]?t:"...";for(var n=0;n<e.Arguments.length;n++)n>0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},t.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},t.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=Z._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var r=n.objectPathInfo.Name;r.length>3&&"Get"===r.substr(0,3)&&(r=r.substr(3)),t=Z._toCamelLowerCase(r);break;case 5:var i=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===i.charAt(i.length-1)?i.substr(0,i.length-1):i+"Item"}return t},t.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},t}(),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.cannotRegisterEvent="CannotRegisterEvent",t.connectionFailureWithStatus="ConnectionFailureWithStatus",t.connectionFailureWithDetails="ConnectionFailureWithDetails",t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.moreInfoInnerError="MoreInfoInnerError",t.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",t.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",t.objectIsUntracked="ObjectIsUntracked",t.customFunctionDefintionMissing="CustomFunctionDefintionMissing",t.customFunctionImplementationMissing="CustomFunctionImplementationMissing",t.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",t.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",t.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",t.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",t.customFunctionInvalidFunction="CustomFunctionInvalidFunction",t.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping",t.customFunctionWindowMissing="CustomFunctionWindowMissing",t.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow",t.pendingBatchInProgress="PendingBatchInProgress",t.notInsideBatch="NotInsideBatch",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(A);e.ResourceStrings=Y,l.addResourceStringValues({CannotRegisterEvent:"The event handler cannot be registered.",PropertyNotLoaded:"The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",RunMustReturnPromise:'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',InvalidOrTimedOutSessionMessage:"Your Office Online session has expired or is invalid. To continue, refresh the page.",InvalidOperationInCellEditMode:"Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",InvalidSheetName:"The request cannot be processed because the specified worksheet cannot be found. Please try again.",CustomFunctionDefintionMissing:"A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.",CustomFunctionDefintionMissingOnWindow:"A property with the name '{0}' that represents the function's definition must exist on the window object.",CustomFunctionImplementationMissing:"The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",CustomFunctionNameContainsBadChars:"The function name may only contain letters, digits, underscores, and periods.",CustomFunctionNameCannotSplit:"The function name must contain a non-empty namespace and a non-empty short name.",CustomFunctionUnexpectedNumberOfEntriesInResultBatch:"The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",CustomFunctionCancellationHandlerMissing:"The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",CustomFunctionInvalidFunction:"The property with the name '{0}' that represents the function's definition is not a valid function.",CustomFunctionInvalidFunctionMapping:"The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.",CustomFunctionWindowMissing:"The window object was not found.",PendingBatchInProgress:"There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",NotInsideBatch:"Operations may not be invoked outside of a batch method.",CannotUpdateReadOnlyProperty:"The property '{0}' is read-only and it cannot be updated.",ObjectIsUntracked:"The object is untracked."});var Z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},n.load=function(e,t){return e.context.load(e,t),e},n.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},n.retrieve=function(t,r){var i=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;i||(i=!n.isSetSupported("RichApiRuntime","1.1"));var o=new U(t,i);return t._retrieve(r,o),o},n.retrieveAndSync=function(e,t){var r=n.retrieve(e,t);return e.context.sync().then((function(){return r}))},n.toJson=function(e,t,r,i){var o={};for(var a in t){void 0!==(s=t[a])&&(o[a]=s)}for(var a in r){var s;void 0!==(s=r[a])&&(s[n.fieldName_isCollection]&&void 0!==s[n.fieldName_m__items]?o[a]=s.toJSON().items:o[a]=s.toJSON())}return i&&(o.items=i.map((function(e){return e.toJSON()}))),o},n.throwError=function(e,t,n){throw new r.RuntimeError({code:e,httpStatusCode:400,message:l._getResourceString(e,t),debugInfo:n?{errorLocation:n}:void 0})},n.createRuntimeError=function(e,t,n,i,o){return new r.RuntimeError({code:e,httpStatusCode:i,message:t,debugInfo:{errorLocation:n},data:o})},n.throwIfNotLoaded=function(e,t,r,i){if(!i&&l.isUndefined(t)&&e.charCodeAt(0)!=n.s_underscoreCharCode&&!n.s_suppressPropertyNotLoadedException)throw n.createPropertyNotLoadedException(r,e)},n._getPropertyValueWithoutCheckLoaded=function(e,t){n.s_suppressPropertyNotLoadedException=!0;try{return e[t]}finally{n.s_suppressPropertyNotLoadedException=!1}},n.createPropertyNotLoadedException=function(e,t){return new r.RuntimeError({code:x.propertyNotLoaded,httpStatusCode:400,message:l._getResourceString(Y.propertyNotLoaded,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.createCannotUpdateReadOnlyPropertyException=function(e,t){return new r.RuntimeError({code:x.cannotUpdateReadOnlyProperty,httpStatusCode:400,message:l._getResourceString(Y.cannotUpdateReadOnlyProperty,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.promisify=function(t){return new e.Promise((function(e,n){t((function(t){"failed"==t.status?n(t.error):e(t.value)}))}))},n._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},n._handleNavigationPropertyResults=function(e,t,n){for(var r=0;r<n.length-1;r+=2)l.isUndefined(t[n[r+1]])||e[n[r]]._handleResult(t[n[r+1]])},n._fixupApiFlags=function(e){return"boolean"==typeof e&&(e=e?1:0),e},n.definePropertyThrowUnloadedException=function(e,t,r){Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get:function(){throw n.createPropertyNotLoadedException(t,r)},set:function(){throw n.createCannotUpdateReadOnlyPropertyException(t,r)}})},n.defineReadOnlyPropertyWithValue=function(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return r},set:function(){throw n.createCannotUpdateReadOnlyPropertyException(null,t)}})},n.processRetrieveResult=function(e,t,r,i){if(!l.isNullOrUndefined(t))if(i){var o=t[H.itemsLowerCase];if(Array.isArray(o)){for(var a=[],s=0;s<o.length;s++){var c=i(o[s],s),u={};u[H.proxy]=c,c._handleRetrieveResult(o[s],u),a.push(u)}n.defineReadOnlyPropertyWithValue(r,H.itemsLowerCase,a)}}else{var f=e[H.scalarPropertyNames],p=e[H.navigationPropertyNames],d=e[H.className];if(f)for(s=0;s<f.length;s++){var h=t[m=f[s]];l.isUndefined(h)?n.definePropertyThrowUnloadedException(r,d,m):n.defineReadOnlyPropertyWithValue(r,m,h)}if(p)for(s=0;s<p.length;s++){var m;h=t[m=p[s]];if(l.isUndefined(h))n.definePropertyThrowUnloadedException(r,d,m);else{var g=e[m],y={};g._handleRetrieveResult(h,y),y[H.proxy]=g,Array.isArray(y[H.itemsLowerCase])&&(y=y[H.itemsLowerCase]),n.defineReadOnlyPropertyWithValue(r,m,y)}}}},n.setMockData=function(e,t,r,i){if(l.isNullOrUndefined(t))e._handleResult(t);else{if(e[H.scalarPropertyOriginalNames]){for(var o={},a=e[H.scalarPropertyOriginalNames],s=e[H.scalarPropertyNames],c=0;c<s.length;c++)void 0!==t[s[c]]&&(o[a[c]]=t[s[c]]);e._handleResult(o)}if(e[H.navigationPropertyNames]){var u=e[H.navigationPropertyNames];for(c=0;c<u.length;c++)if(void 0!==t[u[c]]){var f=e[u[c]];f.setMockData&&f.setMockData(t[u[c]])}}if(e[H.isCollection]&&r){var p=Array.isArray(t)?t:t[H.itemsLowerCase];if(Array.isArray(p)){var d=[];for(c=0;c<p.length;c++){var h=r(p,c);n.setMockData(h,p[c]),d.push(h)}i(d)}}}},n.applyMixin=function(e,t){Object.getOwnPropertyNames(t.prototype).forEach((function(n){"constructor"!==n&&Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))}))},n.ensureTypeInitialized=function(e){var t=new L;new e(t,K.createNewObjectObjectPath(t,"Temp",!1,0))},n.fieldName_m__items="m__items",n.fieldName_isCollection="_isCollection",n._synchronousCleanup=!1,n.s_underscoreCharCode="_".charCodeAt(0),n.s_suppressPropertyNotLoadedException=!1,n}(S);e.Utility=Z;var ee=function(){function e(){}return e.invokeMethod=function(e,t,n,r,i,o){var a=M.createMethodAction(e.context,e,t,n,r,i),s=new _(o);return Z._addActionResultHandler(e,a,s),s},e.invokeEnsureUnchanged=function(e,t){M.createEnsureUnchangedAction(e.context,e,t)},e.invokeSetProperty=function(e,t,n,r){M.createSetPropertyAction(e.context,e,t,n,r)},e.createRootServiceObject=function(e,t){return new e(t,K.createGlobalObjectObjectPath(t))},e.createObjectFromReferenceId=function(e,t,n){return new e(t,K.createReferenceIdObjectPath(t,n))},e.createTopLevelServiceObject=function(e,t,n,r,i){return new e(t,K.createNewObjectObjectPath(t,n,r,i))},e.createPropertyObject=function(e,t,n,r,i){var o=K.createPropertyObjectPath(t.context,t,n,r,!1,i);return new e(t.context,o)},e.createIndexerObject=function(e,t,n){var r=K.createIndexerObjectPath(t.context,t,n);return new e(t.context,r)},e.createMethodObject=function(e,t,n,r,i,o,a,s,c){var l=K.createMethodObjectPath(t.context,t,n,r,i,o,a,s,c);return new e(t.context,l)},e.createChildItemObject=function(e,t,n,r,i){var o=K.createChildItemObjectPathUsingIndexerOrGetItemAt(t,n.context,n,r,i);return new e(n.context,o)},e}();e.BatchApiHelper=ee;var te=function(){function t(e){if(this.m_namespaceMap={},this.m_namespace=e.metadata.name,this.m_targetNamespaceObject=e.targetNamespaceObject,this.m_namespaceMap[this.m_namespace]=e.targetNamespaceObject,e.namespaceMap)for(var t in e.namespaceMap)this.m_namespaceMap[t]=e.namespaceMap[t];this.m_defaultApiSetName=e.metadata.defaultApiSetName,this.m_hostName=e.metadata.hostName;var n=e.metadata;if(n.enumTypes)for(var r=0;r<n.enumTypes.length;r++)this.buildEnumType(n.enumTypes[r]);if(n.apiSets){for(r=0;r<n.apiSets.length;r++){var i=n.apiSets[r];Array.isArray(i)&&(n.apiSets[r]={version:i[0],name:i[1]||this.m_defaultApiSetName})}this.m_apiSets=n.apiSets}if(this.m_strings=n.strings,n.clientObjectTypes)for(r=0;r<n.clientObjectTypes.length;r++){i=n.clientObjectTypes[r];Array.isArray(i)&&(this.ensureArraySize(i,11),n.clientObjectTypes[r]={name:this.getString(i[0]),behaviorFlags:i[1],collectionPropertyPath:this.getString(i[6]),newObjectServerTypeFullName:this.getString(i[9]),newObjectApiFlags:i[10],childItemTypeFullName:this.getString(i[7]),scalarProperties:i[2],navigationProperties:i[3],scalarMethods:i[4],navigationMethods:i[5],events:i[8]}),this.buildClientObjectType(n.clientObjectTypes[r],e.fullyInitialize)}}return t.prototype.ensureArraySize=function(e,t){for(var n=t-e.length;n>0;)e.push(0),n--},t.prototype.getString=function(e){return"number"==typeof e?e>0?this.m_strings[e-1]:null:e},t.prototype.buildEnumType=function(e){var t;if(Array.isArray(e)){(t={name:e[0],fields:e[2]}).fields||(t.fields={});var n=e[1];if(Array.isArray(n))for(var r=0;r<n.length;r++)t.fields[n[r]]=this.toSimpleCamelUpperCase(n[r])}else t=e;this.m_targetNamespaceObject[t.name]=t.fields},t.prototype.buildClientObjectType=function(n,r){var i=this,o=function(t,r){j.apply(this,arguments),i.m_targetNamespaceObject[n.name]._typeInited||(i.buildPrototype(i.m_targetNamespaceObject[n.name],n),i.m_targetNamespaceObject[n.name]._typeInited=!0),e._internalConfig.appendTypeNameToObjectPathInfo&&this._objectPath&&this._objectPath.objectPathInfo&&this._className&&(this._objectPath.objectPathInfo.T=this._className)};(this.m_targetNamespaceObject[n.name]=o,this.extendsType(o,j),this.buildNewObject(o,n),0!=(2&n.behaviorFlags)&&(o.prototype._KeepReference=function(){ee.invokeMethod(this,"_KeepReference",1,[],0,0)}),0!=(32&n.behaviorFlags))&&this.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_StaticCustomize").call(null,o);r&&(this.buildPrototype(o,n),o._typeInited=!0)},t.prototype.extendsType=function(e,t){function n(){this.constructor=e}e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t.prototype.findObjectUnderPath=function(t,n,r){for(var i=t,o=r;o<n.length;o++){if("object"!=typeof i)throw new e.Error("Cannot find "+n.join("."));i=i[n[o]]}return i},t.prototype.getFunction=function(t){var n=this.resolveObjectByFullName(t);if("function"!=typeof n)throw new e.Error("Cannot find function or type: "+t);return n},t.prototype.resolveObjectByFullName=function(e){var t=e.split(".");if(1===t.length)return this.m_targetNamespaceObject[t[0]];var n=t[0];return n===this.m_namespace?this.findObjectUnderPath(this.m_targetNamespaceObject,t,1):this.m_namespaceMap[n]?this.findObjectUnderPath(this.m_namespaceMap[n],t,1):this.findObjectUnderPath(this.m_targetNamespaceObject,t,0)},t.prototype.evaluateSimpleExpression=function(t,n){if(Z.isNullOrUndefined(t))return null;var r=t.split(".");if(3===r.length&&"OfficeExtension"===r[0]&&"Constants"===r[1])return H[r[2]];if("this"===r[0]){for(var i=n,o=1;o<r.length;o++)i="toString()"==r[o]?i.toString():"()"===r[o].substr(r[o].length-2)?i[r[o].substr(0,r[o].length-2)]():i[r[o]];return i}throw new e.Error("Cannot evaluate: "+t)},t.prototype.evaluateEventTargetId=function(e,t){return Z.isNullOrEmptyString(e)?"":this.evaluateSimpleExpression(e,t)},t.prototype.isAllDigits=function(e){for(var t="0".charCodeAt(0),n="9".charCodeAt(0),r=0;r<e.length;r++)if(e.charCodeAt(r)<t||e.charCodeAt(r)>n)return!1;return!0},t.prototype.evaluateEventType=function(t){if(Z.isNullOrEmptyString(t))return 0;if(this.isAllDigits(t))return parseInt(t);var n=this.resolveObjectByFullName(t);if("number"!=typeof n)throw new e.Error("Invalid event type: "+t);return n},t.prototype.buildPrototype=function(e,t){this.buildScalarProperties(e,t),this.buildNavigationProperties(e,t),this.buildScalarMethods(e,t),this.buildNavigationMethods(e,t),this.buildEvents(e,t),this.buildHandleResult(e,t),this.buildHandleIdResult(e,t),this.buildHandleRetrieveResult(e,t),this.buildLoad(e,t),this.buildRetrieve(e,t),this.buildSetMockData(e,t),this.buildEnsureUnchanged(e,t),this.buildUpdate(e,t),this.buildSet(e,t),this.buildToJSON(e,t),this.buildItems(e,t),this.buildTypeMetadataInfo(e,t),this.buildTrackUntrack(e,t),this.buildMixin(e,t)},t.prototype.toSimpleCamelUpperCase=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)},t.prototype.ensureOriginalName=function(e){null===e.originalName&&(e.originalName=this.toSimpleCamelUpperCase(e.name))},t.prototype.getFieldName=function(e){return"m_"+e.name},t.prototype.throwIfApiNotSupported=function(e,t){if(this.m_apiSets&&t.apiSetInfoOrdinal>0){var n=this.m_apiSets[t.apiSetInfoOrdinal-1];n&&Z.throwIfApiNotSupported(e.name+"."+t.name,n.name,n.version,this.m_hostName)}},t.prototype.buildScalarProperties=function(e,t){if(Array.isArray(t.scalarProperties))for(var n=0;n<t.scalarProperties.length;n++){var r=t.scalarProperties[n];Array.isArray(r)&&(this.ensureArraySize(r,6),t.scalarProperties[n]={name:this.getString(r[0]),behaviorFlags:r[1],apiSetInfoOrdinal:r[2],originalName:this.getString(r[3]),setMethodApiFlags:r[4],undoableApiSetInfoOrdinal:r[5]}),this.buildScalarProperty(e,t,t.scalarProperties[n])}},t.prototype.calculateApiFlags=function(e,t){if(t>0){var n=this.m_apiSets[t-1];n&&(e=S.calculateApiFlags(e,n.name,n.version))}return e},t.prototype.buildScalarProperty=function(e,n,r){this.ensureOriginalName(r);var i=this,o=this.getFieldName(r),a={get:function(){return Z.throwIfNotLoaded(r.name,this[o],n.name,this._isNull),i.throwIfApiNotSupported(n,r),this[o]},enumerable:!0,configurable:!0};0==(2&r.behaviorFlags)&&(a.set=function(e){if(4&r.behaviorFlags&&i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName+"_Set").call(this,this,e).handled)return;this[o]=e;var a=i.calculateApiFlags(r.setMethodApiFlags,r.undoableApiSetInfoOrdinal);ee.invokeSetProperty(this,r.originalName,e,a)}),Object.defineProperty(e.prototype,r.name,a)},t.prototype.buildNavigationProperties=function(e,t){if(Array.isArray(t.navigationProperties))for(var n=0;n<t.navigationProperties.length;n++){var r=t.navigationProperties[n];Array.isArray(r)&&(this.ensureArraySize(r,8),t.navigationProperties[n]={name:this.getString(r[0]),behaviorFlags:r[2],apiSetInfoOrdinal:r[3],originalName:this.getString(r[4]),getMethodApiFlags:r[5],setMethodApiFlags:r[6],propertyTypeFullName:this.getString(r[1]),undoableApiSetInfoOrdinal:r[7]}),this.buildNavigationProperty(e,t,t.navigationProperties[n])}},t.prototype.buildNavigationProperty=function(e,n,r){this.ensureOriginalName(r);var i=this,o=this.getFieldName(r),a={get:function(){(this[i.getFieldName(r)]||(i.throwIfApiNotSupported(n,r),this[o]=ee.createPropertyObject(i.getFunction(r.propertyTypeFullName),this,r.originalName,0!=(16&r.behaviorFlags),r.getMethodApiFlags)),64&r.behaviorFlags)&&i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName+"_Get").call(this,this,this[o]);return this[o]},enumerable:!0,configurable:!0};0==(2&r.behaviorFlags)&&(a.set=function(e){if(4&r.behaviorFlags&&i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName+"_Set").call(this,this,e).handled)return;this[o]=e;var a=i.calculateApiFlags(r.setMethodApiFlags,r.undoableApiSetInfoOrdinal);ee.invokeSetProperty(this,r.originalName,e,a)}),Object.defineProperty(e.prototype,r.name,a)},t.prototype.buildScalarMethods=function(e,t){if(Array.isArray(t.scalarMethods))for(var n=0;n<t.scalarMethods.length;n++){var r=t.scalarMethods[n];Array.isArray(r)&&(this.ensureArraySize(r,7),t.scalarMethods[n]={name:this.getString(r[0]),behaviorFlags:r[2],apiSetInfoOrdinal:r[3],originalName:this.getString(r[5]),apiFlags:r[4],parameterCount:r[1],undoableApiSetInfoOrdinal:r[6]}),this.buildScalarMethod(e,t,t.scalarMethods[n])}},t.prototype.buildScalarMethod=function(e,n,r){this.ensureOriginalName(r);var i=this;e.prototype[r.name]=function(){var e=[];if(64&r.behaviorFlags&&r.parameterCount>0){for(var o=0;o<r.parameterCount-1;o++)e.push(arguments[o]);var a=[];for(o=r.parameterCount-1;o<arguments.length;o++)a.push(arguments[o]);e.push(a)}else for(o=0;o<arguments.length;o++)e.push(arguments[o]);if(1&r.behaviorFlags){var s=i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName),c=[this];for(o=0;o<e.length;o++)c.push(e[o]);var l=s.apply(this,c),u=l.handled,f=l.result;if(u)return f}i.throwIfApiNotSupported(n,r);var p=0;32&r.behaviorFlags&&(p=1);var d=0;2&r.behaviorFlags&&(d=1);var h=i.calculateApiFlags(r.apiFlags,r.undoableApiSetInfoOrdinal);return ee.invokeMethod(this,r.originalName,d,e,h,p)}},t.prototype.buildNavigationMethods=function(e,t){if(Array.isArray(t.navigationMethods))for(var n=0;n<t.navigationMethods.length;n++){var r=t.navigationMethods[n];Array.isArray(r)&&(this.ensureArraySize(r,9),t.navigationMethods[n]={name:this.getString(r[0]),behaviorFlags:r[3],apiSetInfoOrdinal:r[4],originalName:this.getString(r[6]),apiFlags:r[5],parameterCount:r[2],returnTypeFullName:this.getString(r[1]),returnObjectGetByIdMethodName:this.getString(r[7]),undoableApiSetInfoOrdinal:r[8]}),this.buildNavigationMethod(e,t,t.navigationMethods[n])}},t.prototype.buildNavigationMethod=function(e,n,r){this.ensureOriginalName(r);var i=this;e.prototype[r.name]=function(){var e=[];if(64&r.behaviorFlags&&r.parameterCount>0){for(var o=0;o<r.parameterCount-1;o++)e.push(arguments[o]);var a=[];for(o=r.parameterCount-1;o<arguments.length;o++)a.push(arguments[o]);e.push(a)}else for(o=0;o<arguments.length;o++)e.push(arguments[o]);if(1&r.behaviorFlags){var s=i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName),c=[this];for(o=0;o<e.length;o++)c.push(e[o]);var l=s.apply(this,c),u=l.handled,f=l.result;if(u)return f}if(i.throwIfApiNotSupported(n,r),0!=(16&r.behaviorFlags))return ee.createIndexerObject(i.getFunction(r.returnTypeFullName),this,e);var p=0;2&r.behaviorFlags&&(p=1);var d=i.calculateApiFlags(r.apiFlags,r.undoableApiSetInfoOrdinal);return ee.createMethodObject(i.getFunction(r.returnTypeFullName),this,r.originalName,p,e,0!=(4&r.behaviorFlags),0!=(8&r.behaviorFlags),r.returnObjectGetByIdMethodName,d)}},t.prototype.buildHandleResult=function(e,n){var r=this;e.prototype._handleResult=function(e){if(j.prototype._handleResult.call(this,e),!Z.isNullOrUndefined(e)){if(Z.fixObjectPathIfNecessary(this,e),8&n.behaviorFlags)r.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_HandleResult").call(this,this,e);if(n.scalarProperties)for(var i=0;i<n.scalarProperties.length;i++)Z.isUndefined(e[n.scalarProperties[i].originalName])||(0!=(8&n.scalarProperties[i].behaviorFlags)?this[r.getFieldName(n.scalarProperties[i])]=Z.adjustToDateTime(e[n.scalarProperties[i].originalName]):this[r.getFieldName(n.scalarProperties[i])]=e[n.scalarProperties[i].originalName]);if(n.navigationProperties){for(var o=[],a=0;a<n.navigationProperties.length;a++)o.push(n.navigationProperties[a].name),o.push(n.navigationProperties[a].originalName);Z._handleNavigationPropertyResults(this,e,o)}if(0!=(1&n.behaviorFlags)){var s=r.hasIndexMethod(n);if(!Z.isNullOrUndefined(e[H.items])){this.m__items=[];for(var c=e[H.items],l=r.getFunction(n.childItemTypeFullName),u=0;u<c.length;u++){var f=ee.createChildItemObject(l,s,this,c[u],u);f._handleResult(c[u]),this.m__items.push(f)}}}}}},t.prototype.buildHandleRetrieveResult=function(e,t){var n=this;e.prototype._handleRetrieveResult=function(e,r){if(j.prototype._handleRetrieveResult.call(this,e,r),!Z.isNullOrUndefined(e)){if(t.scalarProperties)for(var i=0;i<t.scalarProperties.length;i++)8&t.scalarProperties[i].behaviorFlags&&(Z.isNullOrUndefined(e[t.scalarProperties[i].name])||(e[t.scalarProperties[i].name]=Z.adjustToDateTime(e[t.scalarProperties[i].name])));if(1&t.behaviorFlags){var o=n.hasIndexMethod(t),a=n.getFunction(t.childItemTypeFullName),s=this;Z.processRetrieveResult(s,e,r,(function(e,t){return ee.createChildItemObject(a,o,s,e,t)}))}else Z.processRetrieveResult(this,e,r)}}},t.prototype.buildHandleIdResult=function(e,n){var r=this;e.prototype._handleIdResult=function(e){if(j.prototype._handleIdResult.call(this,e),!Z.isNullOrUndefined(e)){if(16&n.behaviorFlags)r.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_HandleIdResult").call(this,this,e);if(n.scalarProperties)for(var i=0;i<n.scalarProperties.length;i++){var o=n.scalarProperties[i].originalName;"Id"!==o&&"_Id"!==o&&"_ReferenceId"!==o||Z.isNullOrUndefined(e[n.scalarProperties[i].originalName])||(this[r.getFieldName(n.scalarProperties[i])]=e[n.scalarProperties[i].originalName])}}}},t.prototype.buildLoad=function(e,t){e.prototype.load=function(e){return Z.load(this,e)}},t.prototype.buildRetrieve=function(e,t){e.prototype.retrieve=function(e){return Z.retrieve(this,e)}},t.prototype.buildNewObject=function(e,t){Z.isNullOrEmptyString(t.newObjectServerTypeFullName)||(e.newObject=function(n){return ee.createTopLevelServiceObject(e,n,t.newObjectServerTypeFullName,0!=(1&t.behaviorFlags),t.newObjectApiFlags)})},t.prototype.buildSetMockData=function(e,t){var n=this;if(1&t.behaviorFlags){var r=n.hasIndexMethod(t);e.prototype.setMockData=function(e){var i=this;Z.setMockData(i,e,(function(e,o){return ee.createChildItemObject(n.getFunction(t.childItemTypeFullName),r,i,e,o)}),(function(e){i.m__items=e}))}}else e.prototype.setMockData=function(e){Z.setMockData(this,e)}},t.prototype.buildEnsureUnchanged=function(e,t){e.prototype.ensureUnchanged=function(e){ee.invokeEnsureUnchanged(this,e)}},t.prototype.buildUpdate=function(e,t){e.prototype.update=function(e){this._recursivelyUpdate(e)}},t.prototype.buildSet=function(e,t){if(0==(1&t.behaviorFlags)){var n=[],r=[];if(t.scalarProperties)for(var i=0;i<t.scalarProperties.length;i++)0==(2&t.scalarProperties[i].behaviorFlags)&&0!=(1&t.scalarProperties[i].behaviorFlags)?r.push(t.scalarProperties[i].name):n.push(t.scalarProperties[i].name);var o=[];if(t.navigationProperties)for(i=0;i<t.navigationProperties.length;i++)0!=(16&t.navigationProperties[i].behaviorFlags)||0==(1&t.navigationProperties[i].behaviorFlags)||0==(32&t.navigationProperties[i].behaviorFlags)?n.push(t.navigationProperties[i].name):o.push(t.navigationProperties[i].name);0===o.length&&0===r.length||(e.prototype.set=function(e,t){this._recursivelySet(e,t,r,o,n)})}},t.prototype.buildItems=function(e,t){0!=(1&t.behaviorFlags)&&Object.defineProperty(e.prototype,"items",{get:function(){return Z.throwIfNotLoaded("items",this.m__items,t.name,this._isNull),this.m__items},enumerable:!0,configurable:!0})},t.prototype.buildToJSON=function(e,t){var n=this;0==(1&t.behaviorFlags)?e.prototype.toJSON=function(){var e={};if(t.scalarProperties)for(var r=0;r<t.scalarProperties.length;r++)0!=(1&t.scalarProperties[r].behaviorFlags)&&(e[t.scalarProperties[r].name]=this[n.getFieldName(t.scalarProperties[r])]);var i={};if(t.navigationProperties)for(r=0;r<t.navigationProperties.length;r++)0!=(1&t.navigationProperties[r].behaviorFlags)&&(i[t.navigationProperties[r].name]=this[n.getFieldName(t.navigationProperties[r])]);return Z.toJson(this,e,i)}:e.prototype.toJSON=function(){return Z.toJson(this,{},{},this.m__items)}},t.prototype.buildTypeMetadataInfo=function(e,t){Object.defineProperty(e.prototype,"_className",{get:function(){return t.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_isCollection",{get:function(){return 0!=(1&t.behaviorFlags)},enumerable:!0,configurable:!0}),Z.isNullOrEmptyString(t.collectionPropertyPath)||Object.defineProperty(e.prototype,"_collectionPropertyPath",{get:function(){return t.collectionPropertyPath},enumerable:!0,configurable:!0}),t.scalarProperties&&t.scalarProperties.length>0&&(Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return this.m__scalarPropertyNames||(this.m__scalarPropertyNames=t.scalarProperties.map((function(e){return e.name}))),this.m__scalarPropertyNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyOriginalNames",{get:function(){return this.m__scalarPropertyOriginalNames||(this.m__scalarPropertyOriginalNames=t.scalarProperties.map((function(e){return e.originalName}))),this.m__scalarPropertyOriginalNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyUpdateable",{get:function(){return this.m__scalarPropertyUpdateable||(this.m__scalarPropertyUpdateable=t.scalarProperties.map((function(e){return 0==(2&e.behaviorFlags)}))),this.m__scalarPropertyUpdateable},enumerable:!0,configurable:!0})),t.navigationProperties&&t.navigationProperties.length>0&&Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return this.m__navigationPropertyNames||(this.m__navigationPropertyNames=t.navigationProperties.map((function(e){return e.name}))),this.m__navigationPropertyNames},enumerable:!0,configurable:!0})},t.prototype.buildTrackUntrack=function(e,t){2&t.behaviorFlags&&(e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this})},t.prototype.buildMixin=function(e,t){if(4&t.behaviorFlags){var n=this.getFunction(t.name+"Custom");Z.applyMixin(e,n)}},t.prototype.getOnEventName=function(e){return"_"===e[0]?"_on"+e.substr(1):"on"+e},t.prototype.buildEvents=function(e,t){if(t.events)for(var n=0;n<t.events.length;n++){var r=t.events[n];Array.isArray(r)&&(this.ensureArraySize(r,7),t.events[n]={name:this.getString(r[0]),behaviorFlags:r[1],apiSetInfoOrdinal:r[2],typeExpression:this.getString(r[3]),targetIdExpression:this.getString(r[4]),register:this.getString(r[5]),unregister:this.getString(r[6])}),this.buildEvent(e,t,t.events[n])}},t.prototype.buildEvent=function(e,t,n){1&n.behaviorFlags?this.buildV0Event(e,t,n):this.buildV2Event(e,t,n)},t.prototype.buildV2Event=function(e,n,r){var i=this,o=this.getOnEventName(r.name),a=this.getFieldName(r);Object.defineProperty(e.prototype,o,{get:function(){if(!this[a]){i.throwIfApiNotSupported(n,r);var e=this,o=null;"null"!==r.register&&(o=this[r.register].bind(this));var s=null;"null"!==r.unregister&&(s=this[r.unregister].bind(this));var c=null;2&r.behaviorFlags&&(c=i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.name+"_EventArgsTransform"));var l=i.evaluateEventType(r.typeExpression);this[a]=new z(this.context,this,r.name,{eventType:l,getTargetIdFunc:function(){return i.evaluateEventTargetId(r.targetIdExpression,e)},registerFunc:o,unregisterFunc:s,eventArgsTransformFunc:function(t){return c&&(t=c.call(e,e,t)),Z._createPromiseFromResult(t)}})}return this[a]},enumerable:!0,configurable:!0})},t.prototype.buildV0Event=function(e,n,r){var i=this,o=this.getOnEventName(r.name),a=this.getFieldName(r);Object.defineProperty(e.prototype,o,{get:function(){if(!this[a]){i.throwIfApiNotSupported(n,r);var e=this,o=null;if(Z.isNullOrEmptyString(r.register)){var s=i.evaluateEventType(r.typeExpression);o=function(t){var n=i.evaluateEventTargetId(r.targetIdExpression,e);return e.context.eventRegistration.register(s,n,t)}}else if("null"!==r.register){var c=i.getFunction(r.register);o=function(t){return c.call(e,e,t)}}var l=null;if(Z.isNullOrEmptyString(r.unregister)){var u=i.evaluateEventType(r.typeExpression);l=function(t){var n=i.evaluateEventTargetId(r.targetIdExpression,e);return e.context.eventRegistration.unregister(u,n,t)}}else if("null"!==r.unregister){var f=i.getFunction(r.unregister);l=function(t){return f.call(e,e,t)}}var p=null;2&r.behaviorFlags&&(p=i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.name+"_EventArgsTransform"));this[a]=new W(this.context,this,r.name,{registerFunc:o,unregisterFunc:l,eventArgsTransformFunc:function(t){return p&&(t=p.call(e,e,t)),Z._createPromiseFromResult(t)}})}return this[a]},enumerable:!0,configurable:!0})},t.prototype.hasIndexMethod=function(e){var t=!1;if(e.navigationMethods)for(var n=0;n<e.navigationMethods.length;n++)if(0!=(16&e.navigationMethods[n].behaviorFlags)){t=!0;break}return t},t.CustomizationCodeNamespace="_CC",t}();e.LibraryBuilder=te;var ne,re=1,ie=function(e){return e.DdaMethod.Version=re,e},oe=function(e){return re=e.Version,e.Error&&(e.error={},e.error.Code=e.Error),e};!function(e){e.SendingId="sId",e.RespondingId="rId",e.CommandKey="command",e.SessionInfoKey="sessionInfo",e.ParamsKey="params",e.ApiReadyCommand="apiready",e.ExecuteMethodCommand="executeMethod",e.GetAppContextCommand="getAppContext",e.RegisterEventCommand="registerEvent",e.UnregisterEventCommand="unregisterEvent",e.FireEventCommand="fireEvent"}(ne||(ne={}));var ae=function(){function e(){}return e.sessionContext="sc",e.embeddingPageOrigin="EmbeddingPageOrigin",e.embeddingPageSessionInfo="EmbeddingPageSessionInfo",e}();e.EmbeddedConstants=ae;var se=function(e){function t(t,n){var r=e.call(this)||this;return r.m_chosenWindow=null,r.m_chosenOrigin=null,r.m_enabled=!0,r.m_onMessageHandler=r._onMessage.bind(r),r.m_callbackList={},r.m_id=0,r.m_timeoutId=-1,r.m_appContext=null,r.m_url=t,r.m_options=n,r.m_options||(r.m_options={sessionKey:Math.random().toString()}),r.m_options.sessionKey||(r.m_options.sessionKey=Math.random().toString()),r.m_options.container||(r.m_options.container=document.body),r.m_options.timeoutInMilliseconds||(r.m_options.timeoutInMilliseconds=6e4),r.m_options.height||(r.m_options.height="400px"),r.m_options.width||(r.m_options.width="100%"),r.m_options.webApplication&&r.m_options.webApplication.accessToken&&r.m_options.webApplication.accessTokenTtl||(r.m_options.webApplication=null),r}return __extends(t,e),t.prototype._getIFrameSrc=function(){var e=window.location.protocol+"//"+window.location.host,t=ae.embeddingPageOrigin+"="+encodeURIComponent(e)+"&"+ae.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),n=!1;(this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(n=!0);var r=document.createElement("a");if(r.href=this.m_url,this.m_options.webApplication){var i=ae.embeddingPageOrigin+"="+e+"&"+ae.embeddingPageSessionInfo+"="+this.m_options.sessionKey;0===r.search.length||"?"===r.search?r.search="?"+ae.sessionContext+"="+encodeURIComponent(i):r.search=r.search+"&"+ae.sessionContext+"="+encodeURIComponent(i)}else n?0===r.hash.length||"#"===r.hash?r.hash="#"+t:r.hash=r.hash+"&"+t:0===r.search.length||"?"===r.search?r.search="?"+t:r.search=r.search+"&"+t;return r.href},t.prototype.init=function(){var e=this;window.addEventListener("message",this.m_onMessageHandler);var t=this._getIFrameSrc();return l.createPromise((function(n,r){var i=document.createElement("iframe");if(e.m_options.id&&(i.id=e.m_options.id,i.name=e.m_options.id),i.style.height=e.m_options.height,i.style.width=e.m_options.width,e.m_options.webApplication){var s=document.createElement("form");s.setAttribute("action",t),s.setAttribute("method","post"),s.setAttribute("target",i.name),e.m_options.container.appendChild(s);var c=document.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("name","access_token"),c.setAttribute("value",e.m_options.webApplication.accessToken),s.appendChild(c);var u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("name","access_token_ttl"),u.setAttribute("value",e.m_options.webApplication.accessTokenTtl),s.appendChild(u),e.m_options.container.appendChild(i),s.submit()}else i.src=t,e.m_options.container.appendChild(i);e.m_timeoutId=window.setTimeout((function(){e.close();var t=Z.createRuntimeError(o.timeout,l._getResourceString(a.timeout),"EmbeddedSession.init");r(t)}),e.m_options.timeoutInMilliseconds),e.m_promiseResolver=n}))},t.prototype._invoke=function(e,t,n){this.m_enabled?(ie&&(n=ie(n)),this._sendMessageWithCallback(this.m_id++,e,n,(function(e){oe&&(e=oe(e));var n=e.Error;delete e.Error,t(n||0,e)}))):t(5001,null)},t.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler),window.clearTimeout(this.m_timeoutId),this.m_enabled=!1},t.prototype.getEventRegistration=function(e){return this.m_sessionEventManager||(this.m_sessionEventManager=new q(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},t.prototype._createRequestExecutorOrNull=function(){return new ce(this)},t.prototype._resolveRequestUrlAndHeaderInfo=function(){return l._createPromiseFromResult(null)},t.prototype._registerEventImpl=function(e,t){var n=this;return l.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.RegisterEventCommand,{EventId:e,TargetId:t},(function(){r(null)}))}))},t.prototype._unregisterEventImpl=function(e,t){var n=this;return l.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.UnregisterEventCommand,{EventId:e,TargetId:t},(function(){r()}))}))},t.prototype._onMessage=function(e){var t=this;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===e.source&&this.m_chosenOrigin===e.origin)){var n=e.data;if(n&&n[ne.CommandKey]===ne.ApiReadyCommand)!this.m_chosenWindow&&this._isValidDescendant(e.source)&&n[ne.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=e.source,this.m_chosenOrigin=e.origin,this._sendMessageWithCallback(this.m_id++,ne.GetAppContextCommand,null,(function(e){t._setupContext(e),window.clearTimeout(t.m_timeoutId),t.m_promiseResolver()})));else if(n&&n[ne.CommandKey]===ne.FireEventCommand){var r=n[ne.ParamsKey],i=r.EventId,o=r.TargetId,a=r.Data;if(this.m_sessionEventManager)for(var s=this.m_sessionEventManager.getHandlers(i,o),c=0;c<s.length;c++)s[c](a)}else if(n&&n.hasOwnProperty(ne.RespondingId)){var l=n[ne.RespondingId];if(this.m_callbackList.hasOwnProperty(l)){var u=this.m_callbackList[l];"function"==typeof u&&u(n[ne.ParamsKey]),delete this.m_callbackList[l]}}}},t.prototype._sendMessageWithCallback=function(e,t,n,r){this.m_callbackList[e]=r;var i={};i[ne.SendingId]=e,i[ne.CommandKey]=t,i[ne.ParamsKey]=n,this.m_chosenWindow.postMessage(JSON.stringify(i),this.m_chosenOrigin)},t.prototype._isValidDescendant=function(e){function t(n){if(n===e)return!0;for(var r=0,i=n.frames.length;r<i;r++)if(t(n.frames[r]))return!0;return!1}for(var n=(this.m_options.container||document.body).getElementsByTagName("iframe"),r=0,i=n.length;r<i;r++)if(t(n[r].contentWindow))return!0;return!1},t.prototype._setupContext=function(e){this.m_appContext=e},t}(t);e.EmbeddedSession=se;var ce=function(){function e(e){this.m_session=e}return e.prototype.executeAsync=function(t,n,r){var i=this,o=c.buildMessageArrayForIRequestExecutor(t,n,r,e.SourceLibHeaderValue);return l.createPromise((function(t,n){i.m_session._invoke(ne.ExecuteMethodCommand,(function(e,n){var r;l.log("Response:"),l.log(JSON.stringify(n)),r=0==e?c.buildResponseOnSuccess(c.getResponseBodyFromSafeArray(n.Data),c.getResponseHeadersFromSafeArray(n.Data)):c.buildResponseOnError(n.error.Code,n.error.Message),t(r)}),e._transformMessageArrayIntoParams(o))}))},e._transformMessageArrayIntoParams=function(t){return{ArrayData:t,DdaMethod:{DispatchId:e.DispidExecuteRichApiRequestMethod}}},e.DispidExecuteRichApiRequestMethod=93,e.SourceLibHeaderValue="Embedded",e}()}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var OfficeFirstPartyDialog,OfficeFirstPartyAuth,OfficeCore,Office,__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(a,s)}c((r=r.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};!function(e){OfficeExtension.BatchApiHelper.createPropertyObject,OfficeExtension.BatchApiHelper.createMethodObject,OfficeExtension.BatchApiHelper.createIndexerObject,OfficeExtension.BatchApiHelper.createRootServiceObject;var t=OfficeExtension.BatchApiHelper.createTopLevelServiceObject,n=(OfficeExtension.BatchApiHelper.createChildItemObject,OfficeExtension.BatchApiHelper.invokeMethod),r=(OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,OfficeExtension.BatchApiHelper.invokeSetProperty,OfficeExtension.Utility.isNullOrUndefined),i=(OfficeExtension.Utility.isUndefined,OfficeExtension.Utility.throwIfNotLoaded,OfficeExtension.Utility.throwIfApiNotSupported,OfficeExtension.Utility.load,OfficeExtension.Utility.retrieve,OfficeExtension.Utility.toJson),o=OfficeExtension.Utility.fixObjectPathIfNecessary,a=(OfficeExtension.Utility._handleNavigationPropertyResults,OfficeExtension.Utility.adjustToDateTime,OfficeExtension.Utility.processRetrieveResult),s=function(s){function c(){return null!==s&&s.apply(this,arguments)||this}return __extends(c,s),Object.defineProperty(c.prototype,"_className",{get:function(){return"BiShim"},enumerable:!0,configurable:!0}),c.prototype.initialize=function(e){n(this,"Initialize",0,[e],0,0)},c.prototype.getData=function(){return n(this,"getData",1,[],4,0)},c.prototype.setVisualObjects=function(e){n(this,"setVisualObjects",0,[e],2,0)},c.prototype.setVisualObjectsToPersist=function(e){n(this,"setVisualObjectsToPersist",0,[e],2,0)},c.prototype._handleResult=function(e){(s.prototype._handleResult.call(this,e),r(e))||o(this,e)},c.prototype._handleRetrieveResult=function(e,t){s.prototype._handleRetrieveResult.call(this,e,t),a(this,e,t)},c.newObject=function(n){return t(e.BiShim,n,"Microsoft.AgaveVisual.BiShim",!1,4)},c.prototype.toJSON=function(){return i(this,{},{})},c}(OfficeExtension.ClientObject);e.BiShim=s,function(e){e.generalException1="GeneralException"}(e.AgaveVisualErrorCodes||(e.AgaveVisualErrorCodes={}))}(OfficeCore||(OfficeCore={})),function(e){OfficeExtension.BatchApiHelper.createPropertyObject;var t=OfficeExtension.BatchApiHelper.createMethodObject,n=(OfficeExtension.BatchApiHelper.createIndexerObject,OfficeExtension.BatchApiHelper.createRootServiceObject,OfficeExtension.BatchApiHelper.createTopLevelServiceObject),r=(OfficeExtension.BatchApiHelper.createChildItemObject,OfficeExtension.BatchApiHelper.invokeMethod),i=OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,o=(OfficeExtension.BatchApiHelper.invokeSetProperty,OfficeExtension.Utility.isNullOrUndefined),a=OfficeExtension.Utility.isUndefined,s=OfficeExtension.Utility.throwIfNotLoaded,c=(OfficeExtension.Utility.throwIfApiNotSupported,OfficeExtension.Utility.load),l=OfficeExtension.Utility.retrieve,u=OfficeExtension.Utility.toJson,f=OfficeExtension.Utility.fixObjectPathIfNecessary,p=(OfficeExtension.Utility._handleNavigationPropertyResults,OfficeExtension.Utility.adjustToDateTime,OfficeExtension.Utility.processRetrieveResult),d=function(i){function a(){return null!==i&&i.apply(this,arguments)||this}return __extends(a,i),Object.defineProperty(a.prototype,"_className",{get:function(){return"FlightingService"},enumerable:!0,configurable:!0}),a.prototype.getClientSessionId=function(){return r(this,"GetClientSessionId",1,[],4,0)},a.prototype.getDeferredFlights=function(){return r(this,"GetDeferredFlights",1,[],4,0)},a.prototype.getFeature=function(n,r,i,o){return t(e.ABType,this,"GetFeature",1,[n,r,i,o],!1,!1,null,4)},a.prototype.getFeatureGate=function(n,r){return t(e.ABType,this,"GetFeatureGate",1,[n,r],!1,!1,null,4)},a.prototype.resetOverride=function(e){r(this,"ResetOverride",0,[e],0,0)},a.prototype.setOverride=function(e,t,n){r(this,"SetOverride",0,[e,t,n],0,0)},a.prototype._handleResult=function(e){(i.prototype._handleResult.call(this,e),o(e))||f(this,e)},a.prototype._handleRetrieveResult=function(e,t){i.prototype._handleRetrieveResult.call(this,e,t),p(this,e,t)},a.newObject=function(t){return n(e.FlightingService,t,"Microsoft.Experiment.FlightingService",!1,4)},a.prototype.toJSON=function(){return u(this,{},{})},a}(OfficeExtension.ClientObject);e.FlightingService=d;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"ABType"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["value"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return s("value",this._V,"ABType",this._isNull),this._V},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!o(t)){var n=t;f(this,n),a(n.Value)||(this._V=n.Value)}},t.prototype.load=function(e){return c(this,e)},t.prototype.retrieve=function(e){return l(this,e)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),p(this,t,n)},t.prototype.toJSON=function(){return u(this,{value:this._V},{})},t.prototype.ensureUnchanged=function(e){i(this,e)},t}(OfficeExtension.ClientObject);e.ABType=h,function(e){e.boolean="Boolean",e.integer="Integer",e.string="String"}(e.FeatureType||(e.FeatureType={})),function(e){e.generalException="GeneralException"}(e.ExperimentErrorCodes||(e.ExperimentErrorCodes={}))}(OfficeCore||(OfficeCore={})),function(e){var t,n=function(){function e(e){this._dialogService=e}return e.prototype.close=function(){return this._dialogService.close(),this._dialogService.context.sync()},e.prototype.messageChild=function(e,t){DialogApiManager&&DialogApiManager.messageChildRichApiBridge&&DialogApiManager.messageChildRichApiBridge(e,t)},e}();e.Dialog=n,e.displayWebDialog=function(t,n){return void 0===n&&(n={}),new OfficeExtension.CoreUtility.Promise((function(i,o){if(n.width&&n.height&&(!r(n.width)||!r(n.height)))throw new OfficeExtension.Error({code:"InvalidArgument",message:'Dimensions must be "number%" or number.'});var a=new OfficeExtension.ClientRequestContext,s=OfficeCore.FirstPartyDialogService.newObject(a),c=new e.Dialog(s),l=s.onDialogMessage.add((function(e){OfficeExtension.Utility.log("dialogMessageHandler:"+JSON.stringify(e));var t,r,s,u=JSON.parse(e.message),f=u.errorCode?new OfficeExtension.Error((t=u.errorCode,(r={})[12002]={code:"InvalidUrl",message:"Cannot load URL, no such page or bad URL syntax."},r[12003]={code:"InvalidUrl",message:"HTTPS is required."},r[12004]={code:"Untrusted",message:"Domain is not trusted."},r[12005]={code:"InvalidUrl",message:"HTTPS is required."},r[12007]={code:"FailedToOpen",message:"Another dialog is already opened."},(s=r)[t]?s[t]:{code:"Unknown",message:"An unknown error has occured with code: "+t})):null,p=u.type,d=u.origin,h=u.message;switch(p){case 17:f?o(f):i(c);break;case 12:n.onMessage&&n.onMessage(h,c,d);break;case 10:default:12006===u.errorCode?(l&&(l.remove(),a.sync()),n.onClose&&n.onClose()):n.onRuntimeError&&(n.onRuntimeError(f,c),o(f))}return OfficeExtension.CoreUtility.Promise.resolve()}));return a.sync().then((function(){var e={width:n.width?parseInt(n.width):50,height:n.height?parseInt(n.height):50,displayInIFrame:n.displayInIFrame,dialogTitle:n.dialogTitle};return s.displayDialog(t,e),a.sync()})).catch((function(e){o(e)}))}));function r(e){return/^(\-|\+)?([0-9]+)%?$/.test(e)}},function(e){e[e.dialogMessageReceived=0]="dialogMessageReceived",e[e.dialogEventReceived=1]="dialogEventReceived"}(t||(t={}))}(OfficeFirstPartyDialog||(OfficeFirstPartyDialog={})),function(e){e.OfficeOnlineDomainList=["*.dod.online.office365.us","*.gov.online.office365.us","*.officeapps-df.live.com","*.officeapps.live.com","*.online.office.de","*.partner.officewebapps.cn"],e.isHostOriginTrusted=function(){if(void 0===window.external||void 0===window.external.GetContext){var t=OSF.getClientEndPoint()._targetUrl,n=t.split("/")[2].split(":")[0].split("?")[0];return 0!=t.indexOf("https:")||e.OfficeOnlineDomainList.forEach((function(e){if(0==e.indexOf("*.")&&(e=e.substring(2)),n.indexOf(e)==n.length-e.length)return!0})),!1}return!0}}(OfficeCore||(OfficeCore={})),function(e){var t=function(){function t(e){this.context=e}return Object.defineProperty(t.prototype,"roamingSettings",{get:function(){return this.m_roamingSettings||(this.m_roamingSettings=e.AuthenticationService.newObject(this.context).roamingSettings),this.m_roamingSettings},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tap",{get:function(){return this.m_tap||(this.m_tap=e.Tap.newObject(this.context)),this.m_tap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skill",{get:function(){return this.m_skill||(this.m_skill=e.Skill.newObject(this.context)),this.m_skill},enumerable:!0,configurable:!0}),t}();e.FirstPartyApis=t;var n=function(n){function r(e){return n.call(this,e)||this}return __extends(r,n),Object.defineProperty(r.prototype,"firstParty",{get:function(){return this.m_firstPartyApis||(this.m_firstPartyApis=new t(this)),this.m_firstPartyApis},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"flighting",{get:function(){return this.flightingService},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"telemetry",{get:function(){return this.m_telemetry||(this.m_telemetry=e.TelemetryService.newObject(this)),this.m_telemetry},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"ribbon",{get:function(){return this.m_ribbon||(this.m_ribbon=e.DynamicRibbon.newObject(this)),this.m_ribbon},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bi",{get:function(){return this.m_biShim||(this.m_biShim=e.BiShim.newObject(this)),this.m_biShim},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"flightingService",{get:function(){return this.m_flightingService||(this.m_flightingService=e.FlightingService.newObject(this)),this.m_flightingService},enumerable:!0,configurable:!0}),r}(OfficeExtension.ClientRequestContext);e.RequestContext=n,e.run=function(t,n){return OfficeExtension.ClientRequestContext._runBatch("OfficeCore.run",arguments,(function(t){return new e.RequestContext(t)}))}}(OfficeCore||(OfficeCore={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.isFeatureEnabled=function(e,n){return __awaiter(this,void 0,void 0,(function(){var r,i,o;return __generator(this,(function(a){switch(a.label){case 0:return r=t(),i=OfficeCore.License.newObject(r),o=i.isFeatureEnabled(e,n),[4,r.sync()];case 1:return a.sent(),[2,o.value]}}))}))},e.getFeatureTier=function(e,n){return __awaiter(this,void 0,void 0,(function(){var r,i,o;return __generator(this,(function(a){switch(a.label){case 0:return r=t(),i=OfficeCore.License.newObject(r),o=i.getFeatureTier(e,n),[4,r.sync()];case 1:return a.sent(),[2,o.value]}}))}))},e.isFreemiumUpsellEnabled=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,r;return __generator(this,(function(i){switch(i.label){case 0:return e=t(),n=OfficeCore.License.newObject(e),r=n.isFreemiumUpsellEnabled(),[4,e.sync()];case 1:return i.sent(),[2,r.value]}}))}))},e.launchUpsellExperience=function(e){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){switch(r.label){case 0:return n=t(),OfficeCore.License.newObject(n).launchUpsellExperience(e),[4,n.sync()];case 1:return r.sent(),[2]}}))}))},e.onFeatureStateChanged=function(e,n){return __awaiter(this,void 0,void 0,(function(){var r,i,o,a;return __generator(this,(function(s){switch(s.label){case 0:return r=t(),i=OfficeCore.License.newObject(r),(o=i.getLicenseFeature(e)).onStateChanged.add(n),a=function(){return o.onStateChanged.remove(n),null},[4,r.sync()];case 1:return s.sent(),[2,a]}}))}))},e.getMsaDeviceTicket=function(e,n,r){return __awaiter(this,void 0,void 0,(function(){var i,o,a;return __generator(this,(function(s){switch(s.label){case 0:return i=t(),o=OfficeCore.License.newObject(i),a=o.getMsaDeviceTicket(e,n,r),[4,i.sync()];case 1:return s.sent(),[2,a.value]}}))}))}}(e.license||(e.license={}))}(Office||(Office={})),function(e){OfficeExtension.BatchApiHelper.createPropertyObject,OfficeExtension.BatchApiHelper.createMethodObject,OfficeExtension.BatchApiHelper.createIndexerObject,OfficeExtension.BatchApiHelper.createRootServiceObject;var t,n=OfficeExtension.BatchApiHelper.createTopLevelServiceObject,r=(OfficeExtension.BatchApiHelper.createChildItemObject,OfficeExtension.BatchApiHelper.invokeMethod),i=(OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,OfficeExtension.BatchApiHelper.invokeSetProperty,OfficeExtension.Utility.isNullOrUndefined),o=(OfficeExtension.Utility.isUndefined,OfficeExtension.Utility.throwIfNotLoaded,OfficeExtension.Utility.throwIfApiNotSupported,OfficeExtension.Utility.load,OfficeExtension.Utility.retrieve,OfficeExtension.Utility.toJson),a=OfficeExtension.Utility.fixObjectPathIfNecessary,s=(OfficeExtension.Utility._handleNavigationPropertyResults,OfficeExtension.Utility.adjustToDateTime,OfficeExtension.Utility.processRetrieveResult),c=(OfficeExtension.Utility.setMockData,OfficeExtension.CommonUtility.calculateApiFlags,function(c){function l(){return null!==c&&c.apply(this,arguments)||this}return __extends(l,c),Object.defineProperty(l.prototype,"_className",{get:function(){return"Skill"},enumerable:!0,configurable:!0}),l.prototype.executeAction=function(e,t,n){return r(this,"ExecuteAction",1,[e,t,n],5,0)},l.prototype.notifyPaneEvent=function(e,t){r(this,"NotifyPaneEvent",1,[e,t],5,0)},l.prototype.registerHostSkillEvent=function(){r(this,"RegisterHostSkillEvent",0,[],1,0)},l.prototype.testFireEvent=function(){r(this,"TestFireEvent",0,[],1,0)},l.prototype.unregisterHostSkillEvent=function(){r(this,"UnregisterHostSkillEvent",0,[],1,0)},l.prototype._handleResult=function(e){(c.prototype._handleResult.call(this,e),i(e))||a(this,e)},l.prototype._handleRetrieveResult=function(e,t){c.prototype._handleRetrieveResult.call(this,e,t),s(this,e,t)},l.newObject=function(t){return n(e.Skill,t,"Microsoft.SkillApi.Skill",!1,4)},Object.defineProperty(l.prototype,"onHostSkillEvent",{get:function(){var e=this;return this.m_hostSkillEvent||(this.m_hostSkillEvent=new OfficeExtension.GenericEventHandlers(this.context,this,"HostSkillEvent",{eventType:65538,registerFunc:function(){return e.registerHostSkillEvent()},unregisterFunc:function(){return e.unregisterHostSkillEvent()},getTargetIdFunc:function(){return""},eventArgsTransformFunc:function(n){var r=t.Skill_HostSkillEvent_EventArgsTransform(e,n);return OfficeExtension.Utility._createPromiseFromResult(r)}})),this.m_hostSkillEvent},enumerable:!0,configurable:!0}),l.prototype.toJSON=function(){return o(this,{},{})},l}(OfficeExtension.ClientObject));e.Skill=c,function(e){e.Skill_HostSkillEvent_EventArgsTransform=function(e,t){return{type:t.type,data:t.data}}}(t=e._CC||(e._CC={})),function(e){e.generalException="GeneralException"}(e.SkillErrorCodes||(e.SkillErrorCodes={}))}(OfficeCore||(OfficeCore={})),function(e){OfficeExtension.BatchApiHelper.createPropertyObject,OfficeExtension.BatchApiHelper.createMethodObject,OfficeExtension.BatchApiHelper.createIndexerObject,OfficeExtension.BatchApiHelper.createRootServiceObject;var t=OfficeExtension.BatchApiHelper.createTopLevelServiceObject,n=(OfficeExtension.BatchApiHelper.createChildItemObject,OfficeExtension.BatchApiHelper.invokeMethod),r=(OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,OfficeExtension.BatchApiHelper.invokeSetProperty,OfficeExtension.Utility.isNullOrUndefined),i=(OfficeExtension.Utility.isUndefined,OfficeExtension.Utility.throwIfNotLoaded,OfficeExtension.Utility.throwIfApiNotSupported),o=(OfficeExtension.Utility.load,OfficeExtension.Utility.retrieve,OfficeExtension.Utility.toJson),a=OfficeExtension.Utility.fixObjectPathIfNecessary,s=(OfficeExtension.Utility._handleNavigationPropertyResults,OfficeExtension.Utility.adjustToDateTime,OfficeExtension.Utility.processRetrieveResult),c=(OfficeExtension.Utility.setMockData,OfficeExtension.CommonUtility.calculateApiFlags,function(c){function l(){return null!==c&&c.apply(this,arguments)||this}return __extends(l,c),Object.defineProperty(l.prototype,"_className",{get:function(){return"TelemetryService"},enumerable:!0,configurable:!0}),l.prototype.sendCustomerContent=function(e,t,r,o,a){i("TelemetryService.sendCustomerContent","Telemetry","1.3","OfficeCore"),n(this,"SendCustomerContent",1,[e,t,r,o,a],4,0)},l.prototype.sendTelemetryEvent=function(e,t,r,i,o){n(this,"SendTelemetryEvent",1,[e,t,r,i,o],4,0)},l.prototype._handleResult=function(e){(c.prototype._handleResult.call(this,e),r(e))||a(this,e)},l.prototype._handleRetrieveResult=function(e,t){c.prototype._handleRetrieveResult.call(this,e,t),s(this,e,t)},l.newObject=function(n){return t(e.TelemetryService,n,"Microsoft.Telemetry.TelemetryService",!1,4)},l.prototype.toJSON=function(){return o(this,{},{})},l}(OfficeExtension.ClientObject));e.TelemetryService=c,function(e){e.unset="Unset",e.string="String",e.boolean="Boolean",e.int64="Int64",e.double="Double"}(e.DataFieldType||(e.DataFieldType={})),function(e){e.generalException="GeneralException"}(e.TelemetryErrorCodes||(e.TelemetryErrorCodes={}))}(OfficeCore||(OfficeCore={})),function(e){var t="officeWebAuthReplyUrls",n=!1;function r(r,o){return new OfficeExtension.CoreUtility.Promise((function(a,s){if(OSF.WebAuth&&"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform){var c=!1;try{if(!Office||!Office.context||!Office.context.webAuth)return void s({code:"GetAuthContextAsyncMissing",message:"Office:["+!Office+"],Office.context:["+!Office.context+"],Office.context.webAuth:["+!Office.context.webAuth+"]"});Office.context.webAuth.getAuthContextAsync((function(l){if("succeeded"===l.status){c=!0;var u=l.value;if(!u||u.isAnonymous)return void s({code:"CannotGetAuthContext",message:u.Error});var f="msa"===u.authorityType.toLowerCase();if(OSF.WebAuth.config={authFlow:e.authFlow,authVersion:e.authVersion?e.authVersion:null,msal:e.msal,delayWebAuth:e.delay,delayMsal:e.delayMsal,debugging:e.debugging,authority:e.authorityOverride?e.authorityOverride:u.authority,idp:u.authorityType.toLowerCase(),appIds:[f&&u.msaAppId?u.msaAppId:u.appId],redirectUri:r||null,upn:u.upn,puid:u.userId,prefetch:o,telemetryInstance:"otel",autoPopup:e.autoPopup,enableUpnCheck:e.upnCheck,enableConsoleLogging:e.debugging},OSF.WebAuth.load().then((function(e){i(e,n=!0),a()})).catch((function(e){i(e,n),s({code:"PackageNotLoaded",message:e instanceof Event?e.type:e})})),"implicit"===e.authFlow){var p=r||window.location.href.split("?")[0],d=sessionStorage.getItem(t);d||""===d?d=p:d+=", "+p,d&&sessionStorage.setItem(t,d)}}else OSF.WebAuth.config=null,s({code:"CannotGetAuthContext",message:l.status})}))}catch(e){OSF.WebAuth.config=null,OSF.WebAuth.load().then((function(){a()})).catch((function(){s({code:c?"CannotGetAuthContext":"FailedToLoad",message:e})}))}}else a()}))}function i(e,t){"undefined"!=typeof OTel&&OTel.OTelLogger.onTelemetryLoaded((function(){var n=[oteljs.makeStringDataField("IdentityProvider",OSF.WebAuth.config.idp),oteljs.makeStringDataField("AppId",OSF.WebAuth.config.appIds[0]),oteljs.makeStringDataField("Target",{authFlow:OSF.WebAuth.config.authFlow,authVersion:OSF.WebAuth.config.authVersion,msal:OSF.WebAuth.config.msal,autoPopup:OSF.WebAuth.config.autoPopup,enableUpnCheck:OSF.WebAuth.config.upnCheck}),oteljs.makeBooleanDataField("Result",t),oteljs.makeStringDataField("Error",e instanceof Event?e.type:"")];if(e&&!(e instanceof Event)&&e.Telemetry)for(var r in e.Telemetry)if(e.Telemetry[r])switch(r){case"succeeded":n.push(oteljs.makeBooleanDataField(r,e.Telemetry[r]));break;case"loadedApplicationCount":case"timeToLoad":n.push(oteljs.makeInt64DataField(r,e.Telemetry[r]));break;default:n.push(oteljs.makeStringDataField(r,e.Telemetry[r]))}OTel.OTelLogger.sendTelemetryEvent({eventName:"Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.Load",dataFields:n,eventFlags:{dataCategories:oteljs.DataCategories.ProductServiceUsage}})}))}function o(e,t,n){"undefined"!=typeof OTel&&OTel.OTelLogger.onTelemetryLoaded((function(){var r=[oteljs.makeStringDataField("IdentityProvider",OSF.WebAuth.config.idp),oteljs.makeStringDataField("AppId",OSF.WebAuth.config.appIds[0]),oteljs.makeStringDataField("Target",{authFlow:OSF.WebAuth.config.authFlow,authVersion:OSF.WebAuth.config.authVersion,msal:OSF.WebAuth.config.msal,autoPopup:OSF.WebAuth.config.autoPopup,enableUpnCheck:OSF.WebAuth.config.upnCheck}),oteljs.makeBooleanDataField("Popup","boolean"==typeof n&&n),oteljs.makeBooleanDataField("Result",t),oteljs.makeStringDataField("Error",e instanceof Event?e.type:e.ErrorCode)];if(e&&!(e instanceof Event)&&e.Telemetry)for(var i in e.Telemetry)if(e.Telemetry[i])switch(i){case"succeeded":r.push(oteljs.makeBooleanDataField(i,e.Telemetry[i]));break;case"timeToGetToken":r.push(oteljs.makeInt64DataField(i,e.Telemetry[i]));break;default:r.push(oteljs.makeStringDataField(i,e.Telemetry[i]))}OTel.OTelLogger.sendTelemetryEvent({eventName:"Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.GetAccessToken",dataFields:r,eventFlags:{dataCategories:oteljs.DataCategories.ProductServiceUsage}})}))}e.authFlow="authcode",e.autoPopup=!1,e.upnCheck=!0,e.msal="https://alcdn.msauth.net/browser-1p/2.28.1/js/msal-browser-1p.min.js",e.debugging=!1,e.delay=0,e.delayMsal=0,e.load=r,e.getAccessToken=function(e,t){return new OfficeExtension.CoreUtility.Promise((function(r,i){if("web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform)Office.context.webAuth.getAuthContextAsync((function(a){var s,c,l=!1;"succeeded"===a.status&&(a.value.supportsAuthToken&&(l=!0));if(l){var u=new OfficeCore.RequestContext,f=OfficeCore.AuthenticationService.newObject(u);u._customData="WacPartition";var p=f.getAccessToken(e,null);u.sync().then((function(){r(p.value)}))}else OSF.WebAuth&&n?OSF.WebAuth.config.appIds[0]&&OSF.WebAuth.getToken(e.resource,OSF.WebAuth.config.appIds[0],OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId,t&&t.popup?t.popup:null,e&&e.authChallenge?e.authChallenge:null).then((function(e){o(e,!0,!(!t||!t.popup)&&t.popup),r({accessToken:e.Token,tokenIdenityType:"msa"==OSF.WebAuth.config.idp.toLowerCase()?OfficeCore.IdentityType.microsoftAccount:OfficeCore.IdentityType.organizationAccount})})).catch((function(e){o(e,!1,!(!t||!t.popup)&&t.popup),i({code:e.ErrorCode,message:e instanceof Event?e.type:e.ErrorMessage})})):(s=n,c=OSF.WebAuth.loadAttempts,"undefined"!=typeof OTel&&OTel.OTelLogger.onTelemetryLoaded((function(){var e=[oteljs.makeBooleanDataField("Loaded",s),oteljs.makeInt64DataField("LoadAttempts","number"==typeof c?c:0)];OTel.OTelLogger.sendTelemetryEvent({eventName:"Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.UnexpectedAcquire",dataFields:e,eventFlags:{dataCategories:oteljs.DataCategories.ProductServiceUsage}})})))}));else{var a=new OfficeCore.RequestContext,s=OfficeCore.AuthenticationService.newObject(a),c=s.onTokenReceived.add((function(e){if(!OfficeExtension.CoreUtility.isNullOrUndefined(e))if(c.remove(),a.sync().catch((function(){})),0==e.code)r(e.tokenValue);else if(OfficeExtension.CoreUtility.isNullOrUndefined(e.errorInfo))i({code:e.code});else try{i(JSON.parse(e.errorInfo))}catch(t){i({code:e.code,message:e.errorInfo})}return null}));a.sync().then((function(){var t=s.getAccessToken(e,s._targetId);return a.sync().then((function(){if(OfficeExtension.CoreUtility.isNullOrUndefined(t.value))return null;var e=t.value.accessToken;OfficeExtension.CoreUtility.isNullOrUndefined(e)||r(t.value)}))})).catch((function(e){i(e)}))}}))},e.getPrimaryIdentityInfo=function(){var e=new OfficeCore.RequestContext,t=OfficeCore.AuthenticationService.newObject(e);e._customData="WacPartition";var n=t.getPrimaryIdentityInfo();return e.sync().then((function(){return n.value}))},e.getIdentities=function(){var e=new OfficeCore.RequestContext,t=OfficeCore.AuthenticationService.newObject(e).getIdentities();return e.sync().then((function(){return t.value}))},"undefined"!=typeof window&&window.OSF&&function(){try{if("undefined"==typeof window||!window.sessionStorage)return;var e=sessionStorage.getItem(t);null!==e&&-1!==e.indexOf(window.location.origin+window.location.pathname)&&r()}catch(e){console.error(e)}}()}(OfficeFirstPartyAuth||(OfficeFirstPartyAuth={})),function(e){var t="Office",n=OfficeExtension.BatchApiHelper.createPropertyObject,r=OfficeExtension.BatchApiHelper.createMethodObject,i=OfficeExtension.BatchApiHelper.createIndexerObject,o=(OfficeExtension.BatchApiHelper.createRootServiceObject,OfficeExtension.BatchApiHelper.createTopLevelServiceObject),a=OfficeExtension.BatchApiHelper.createChildItemObject,s=OfficeExtension.BatchApiHelper.invokeMethod,c=OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,l=OfficeExtension.BatchApiHelper.invokeSetProperty,u=OfficeExtension.Utility.isNullOrUndefined,f=OfficeExtension.Utility.isUndefined,p=OfficeExtension.Utility.throwIfNotLoaded,d=OfficeExtension.Utility.throwIfApiNotSupported,h=OfficeExtension.Utility.load,m=OfficeExtension.Utility.retrieve,g=OfficeExtension.Utility.toJson,y=OfficeExtension.Utility.fixObjectPathIfNecessary,_=OfficeExtension.Utility._handleNavigationPropertyResults,b=OfficeExtension.Utility.adjustToDateTime,O=OfficeExtension.Utility.processRetrieveResult,v=OfficeExtension.Utility.setMockData,S=OfficeExtension.CommonUtility.calculateApiFlags;!function(e){e.organizationAccount="OrganizationAccount",e.microsoftAccount="MicrosoftAccount",e.unsupported="Unsupported"}(e.IdentityType||(e.IdentityType={}));var A=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return __extends(i,r),Object.defineProperty(i.prototype,"_className",{get:function(){return"AuthenticationService"},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_navigationPropertyNames",{get:function(){return["roamingSettings"]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"roamingSettings",{get:function(){return this._R||(this._R=n(e.RoamingSettingCollection,this,"RoamingSettings",!1,4)),this._R},enumerable:!0,configurable:!0}),i.prototype.getAccessToken=function(e,t){return s(this,"GetAccessToken",1,[e,t],5,0)},i.prototype.getIdentities=function(){return d("AuthenticationService.getIdentities","FirstPartyAuthentication","1.3",t),s(this,"GetIdentities",1,[],5,0)},i.prototype.getPrimaryIdentityInfo=function(){return d("AuthenticationService.getPrimaryIdentityInfo","FirstPartyAuthentication","1.2",t),s(this,"GetPrimaryIdentityInfo",1,[],5,0)},i.prototype._handleResult=function(e){if(r.prototype._handleResult.call(this,e),!u(e)){var t=e;y(this,t),_(this,t,["roamingSettings","RoamingSettings"])}},i.prototype.load=function(e){return h(this,e)},i.prototype.retrieve=function(e){return m(this,e)},i.prototype._handleRetrieveResult=function(e,t){r.prototype._handleRetrieveResult.call(this,e,t),O(this,e,t)},i.newObject=function(t){return o(e.AuthenticationService,t,"Microsoft.Authentication.AuthenticationService",!1,4)},Object.defineProperty(i.prototype,"onTokenReceived",{get:function(){var e=this;return d("AuthenticationService.onTokenReceived","FirstPartyAuthentication","1.2",t),this.m_tokenReceived||(this.m_tokenReceived=new OfficeExtension.GenericEventHandlers(this.context,this,"TokenReceived",{eventType:3001,registerFunc:function(){return OfficeExtension.Utility._createPromiseFromResult(null)},unregisterFunc:function(){return OfficeExtension.Utility._createPromiseFromResult(null)},getTargetIdFunc:function(){return e._targetId},eventArgsTransformFunc:function(t){var n=D.AuthenticationService_TokenReceived_EventArgsTransform(e,t);return OfficeExtension.Utility._createPromiseFromResult(n)}})),this.m_tokenReceived},enumerable:!0,configurable:!0}),i.prototype.toJSON=function(){return g(this,{},{})},i}(OfficeExtension.ClientObject);e.AuthenticationService=A;var D,P=function(){function e(){}return Object.defineProperty(e.prototype,"_targetId",{get:function(){return null==this.m_targetId&&(void 0!==OSF&&OSF.OUtil?this.m_targetId=OSF.OUtil.Guid.generateNewGuid():this.m_targetId=""+this.context._nextId()),this.m_targetId},enumerable:!0,configurable:!0}),e}();e.AuthenticationServiceCustom=P,OfficeExtension.Utility.applyMixin(A,P),function(e){e.AuthenticationService_TokenReceived_EventArgsTransform=function(e,t){var n=t;return{tokenValue:n.tokenValue,code:n.code,errorInfo:n.errorInfo}}}(D=e._CC||(e._CC={}));var C="RoamingSetting",I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"RoamingSetting"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["id","value"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Id","Value"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return p("id",this._I,C,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return p("value",this._V,C,this._isNull),this._V},set:function(e){this._V=e,l(this,"Value",e,0)},enumerable:!0,configurable:!0}),t.prototype.set=function(e,t){this._recursivelySet(e,t,["value"],[],[])},t.prototype.update=function(e){this._recursivelyUpdate(e)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!u(t)){var n=t;y(this,n),f(n.Id)||(this._I=n.Id),f(n.Value)||(this._V=n.Value)}},t.prototype.load=function(e){return h(this,e)},t.prototype.retrieve=function(e){return m(this,e)},t.prototype._handleIdResult=function(t){e.prototype._handleIdResult.call(this,t),u(t)||f(t.Id)||(this._I=t.Id)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),O(this,t,n)},t.prototype.toJSON=function(){return g(this,{id:this._I,value:this._V},{})},t.prototype.setMockData=function(e){v(this,e)},t.prototype.ensureUnchanged=function(e){c(this,e)},t}(OfficeExtension.ClientObject);e.RoamingSetting=I;var F=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"RoamingSettingCollection"},enumerable:!0,configurable:!0}),n.prototype.getItem=function(t){return r(e.RoamingSetting,this,"GetItem",1,[t],!1,!1,null,4)},n.prototype.getItemOrNullObject=function(t){return r(e.RoamingSetting,this,"GetItemOrNullObject",1,[t],!1,!1,null,4)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.RoamingSettingCollection=F;var R=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"BeforeDocumentCloseNotification"},enumerable:!0,configurable:!0}),n.prototype.disable=function(){s(this,"Disable",1,[],4,0)},n.prototype.enable=function(){s(this,"Enable",1,[],4,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.BeforeDocumentCloseNotification,t,"Microsoft.BeforeDocumentCloseNotification.BeforeDocumentCloseNotification",!1,4)},Object.defineProperty(n.prototype,"onBeforeCloseNotificationCancelled",{get:function(){return this.m_beforeCloseNotificationCancelled||(this.m_beforeCloseNotificationCancelled=new OfficeExtension.GenericEventHandlers(this.context,this,"BeforeCloseNotificationCancelled",{eventType:65540,registerFunc:function(){return OfficeExtension.Utility._createPromiseFromResult(null)},unregisterFunc:function(){return OfficeExtension.Utility._createPromiseFromResult(null)},getTargetIdFunc:function(){return""},eventArgsTransformFunc:function(e){return OfficeExtension.Utility._createPromiseFromResult({})}})),this.m_beforeCloseNotificationCancelled},enumerable:!0,configurable:!0}),n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.BeforeDocumentCloseNotification=R,function(e){e.ariaBrowserPipeUrl="AriaBrowserPipeUrl",e.ariaUploadUrl="AriaUploadUrl",e.ariaVNextUploadUrl="AriaVNextUploadUrl",e.lokiAutoDiscoverUrl="LokiAutoDiscoverUrl"}(e.ServiceProvider||(e.ServiceProvider={}));var E=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"ServiceUrlProvider"},enumerable:!0,configurable:!0}),n.prototype.getServiceUrl=function(e,t){return s(this,"GetServiceUrl",1,[e,t],4,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.ServiceUrlProvider,t,"Microsoft.DesktopCompliance.ServiceUrlProvider",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.ServiceUrlProvider=E;var T=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"LinkedIn"},enumerable:!0,configurable:!0}),n.prototype.isEnabledForOffice=function(){return s(this,"IsEnabledForOffice",1,[],4,0)},n.prototype.recordLinkedInSettingsCompliance=function(e,t){s(this,"RecordLinkedInSettingsCompliance",0,[e,t],0,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.LinkedIn,t,"Microsoft.DesktopCompliance.LinkedIn",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.LinkedIn=T;var x=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"NetworkUsage"},enumerable:!0,configurable:!0}),n.prototype.isInDisconnectedMode=function(){return s(this,"IsInDisconnectedMode",1,[],4,0)},n.prototype.isInOnlineMode=function(){return s(this,"IsInOnlineMode",1,[],4,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.NetworkUsage,t,"Microsoft.DesktopCompliance.NetworkUsage",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.NetworkUsage=x;var N=function(i){function a(){return null!==i&&i.apply(this,arguments)||this}return __extends(a,i),Object.defineProperty(a.prototype,"_className",{get:function(){return"DynamicRibbon"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_navigationPropertyNames",{get:function(){return["buttons"]},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"buttons",{get:function(){return this._B||(this._B=n(e.RibbonButtonCollection,this,"Buttons",!0,4)),this._B},enumerable:!0,configurable:!0}),a.prototype.executeRequestCreate=function(e){d("DynamicRibbon.executeRequestCreate","DynamicRibbon","1.2",t),s(this,"ExecuteRequestCreate",1,[e],4,0)},a.prototype.executeRequestUpdate=function(e){s(this,"ExecuteRequestUpdate",1,[e],4,0)},a.prototype.getButton=function(t){return r(e.RibbonButton,this,"GetButton",1,[t],!1,!1,null,4)},a.prototype.getTab=function(t){return r(e.RibbonTab,this,"GetTab",1,[t],!1,!1,null,4)},a.prototype._handleResult=function(e){if(i.prototype._handleResult.call(this,e),!u(e)){var t=e;y(this,t),_(this,t,["buttons","Buttons"])}},a.prototype.load=function(e){return h(this,e)},a.prototype.retrieve=function(e){return m(this,e)},a.prototype._handleRetrieveResult=function(e,t){i.prototype._handleRetrieveResult.call(this,e,t),O(this,e,t)},a.newObject=function(t){return o(e.DynamicRibbon,t,"Microsoft.DynamicRibbon.DynamicRibbon",!1,4)},a.prototype.toJSON=function(){return g(this,{},{buttons:this._B})},a}(OfficeExtension.ClientObject);e.DynamicRibbon=N;var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"RibbonTab"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["id"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Id"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return p("id",this._I,"RibbonTab",this._isNull),this._I},enumerable:!0,configurable:!0}),t.prototype.setVisibility=function(e){s(this,"SetVisibility",0,[e],0,0)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!u(t)){var n=t;y(this,n),f(n.Id)||(this._I=n.Id)}},t.prototype.load=function(e){return h(this,e)},t.prototype.retrieve=function(e){return m(this,e)},t.prototype._handleIdResult=function(t){e.prototype._handleIdResult.call(this,t),u(t)||f(t.Id)||(this._I=t.Id)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),O(this,t,n)},t.prototype.toJSON=function(){return g(this,{id:this._I},{})},t.prototype.setMockData=function(e){v(this,e)},t.prototype.ensureUnchanged=function(e){c(this,e)},t}(OfficeExtension.ClientObject);e.RibbonTab=M;var j="RibbonButton",w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"RibbonButton"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["id","enabled","label"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Id","Enabled","Label"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return p("enabled",this._E,j,this._isNull),this._E},set:function(e){this._E=e,l(this,"Enabled",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return p("id",this._I,j,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return p("label",this._L,j,this._isNull),this._L},enumerable:!0,configurable:!0}),t.prototype.set=function(e,t){this._recursivelySet(e,t,["enabled"],[],[])},t.prototype.update=function(e){this._recursivelyUpdate(e)},t.prototype.setEnabled=function(e){s(this,"SetEnabled",0,[e],0,0)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!u(t)){var n=t;y(this,n),f(n.Enabled)||(this._E=n.Enabled),f(n.Id)||(this._I=n.Id),f(n.Label)||(this._L=n.Label)}},t.prototype.load=function(e){return h(this,e)},t.prototype.retrieve=function(e){return m(this,e)},t.prototype._handleIdResult=function(t){e.prototype._handleIdResult.call(this,t),u(t)||f(t.Id)||(this._I=t.Id)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),O(this,t,n)},t.prototype.toJSON=function(){return g(this,{enabled:this._E,id:this._I,label:this._L},{})},t.prototype.setMockData=function(e){v(this,e)},t.prototype.ensureUnchanged=function(e){c(this,e)},t}(OfficeExtension.ClientObject);e.RibbonButton=w;var k=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"RibbonButtonCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return p("items",this.m__items,"RibbonButtonCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),n.prototype.getCount=function(){return s(this,"GetCount",1,[],4,0)},n.prototype.getItem=function(t){return i(e.RibbonButton,this,[t])},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!u(n)){var r=n;if(y(this,r),!u(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var s=a(e.RibbonButton,!0,this,i[o],o);s._handleResult(i[o]),this.m__items.push(s)}}}},n.prototype.load=function(e){return h(this,e)},n.prototype.retrieve=function(e){return m(this,e)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),O(this,n,r,(function(t,n){return a(e.RibbonButton,!0,i,t,n)}))},n.prototype.toJSON=function(){return g(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;v(this,t,(function(t,r){return a(e.RibbonButton,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.RibbonButtonCollection=k;var L=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"FirstPartyDialogService"},enumerable:!0,configurable:!0}),n.prototype.close=function(){s(this,"Close",1,[],5,0)},n.prototype.displayDialog=function(e,t){s(this,"DisplayDialog",1,[e,t],5,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.FirstPartyDialogService,t,"Microsoft.FirstPartyDialog.FirstPartyDialogService",!1,4)},Object.defineProperty(n.prototype,"onDialogMessage",{get:function(){var e=this;return this.m_dialogMessage||(this.m_dialogMessage=new OfficeExtension.GenericEventHandlers(this.context,this,"DialogMessage",{eventType:65536,registerFunc:function(){return OfficeExtension.Utility._createPromiseFromResult(null)},unregisterFunc:function(){return OfficeExtension.Utility._createPromiseFromResult(null)},getTargetIdFunc:function(){return""},eventArgsTransformFunc:function(t){var n=D.FirstPartyDialogService_DialogMessage_EventArgsTransform(e,t);return OfficeExtension.Utility._createPromiseFromResult(n)}})),this.m_dialogMessage},enumerable:!0,configurable:!0}),n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.FirstPartyDialogService=L,function(e){e.FirstPartyDialogService_DialogMessage_EventArgsTransform=function(e,t){return{message:t.message}}}(D=e._CC||(e._CC={})),function(e){e.shortTime="ShortTime",e.longTime="LongTime",e.shortDate="ShortDate",e.longDate="LongDate"}(e.TimeStringFormat||(e.TimeStringFormat={}));var U=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"LocaleApi"},enumerable:!0,configurable:!0}),n.prototype.formatDateTimeString=function(e,t,n){return s(this,"FormatDateTimeString",1,[e,t,n],4,0)},n.prototype.getLocaleDateTimeFormattingInfo=function(e){return s(this,"GetLocaleDateTimeFormattingInfo",1,[e],4,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.LocaleApi,t,"Microsoft.LocaleApi.LocaleApi",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.LocaleApi=U;var H="Comment",B=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return __extends(i,t),Object.defineProperty(i.prototype,"_className",{get:function(){return"Comment"},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_scalarPropertyNames",{get:function(){return["id","text","created","level","resolved","author","mentions"]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Id","Text","Created","Level","Resolved","Author","Mentions"]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0,!1,!1,!0,!1,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_navigationPropertyNames",{get:function(){return["parent","parentOrNullObject","replies"]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"parent",{get:function(){return this._P||(this._P=n(e.Comment,this,"Parent",!1,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"parentOrNullObject",{get:function(){return this._Pa||(this._Pa=n(e.Comment,this,"ParentOrNullObject",!1,4)),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"replies",{get:function(){return this._R||(this._R=n(e.CommentCollection,this,"Replies",!0,4)),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"author",{get:function(){return p("author",this._A,H,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"created",{get:function(){return p("created",this._C,H,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"id",{get:function(){return p("id",this._I,H,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"level",{get:function(){return p("level",this._L,H,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mentions",{get:function(){return p("mentions",this._M,H,this._isNull),this._M},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"resolved",{get:function(){return p("resolved",this._Re,H,this._isNull),this._Re},set:function(e){this._Re=e,l(this,"Resolved",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"text",{get:function(){return p("text",this._T,H,this._isNull),this._T},set:function(e){this._T=e,l(this,"Text",e,0)},enumerable:!0,configurable:!0}),i.prototype.set=function(e,t){this._recursivelySet(e,t,["text","resolved"],[],["parent","parentOrNullObject","replies"])},i.prototype.update=function(e){this._recursivelyUpdate(e)},i.prototype.delete=function(){s(this,"Delete",0,[],0,0)},i.prototype.getParentOrSelf=function(){return r(e.Comment,this,"GetParentOrSelf",1,[],!1,!1,null,4)},i.prototype.getRichText=function(e){return s(this,"GetRichText",1,[e],4,0)},i.prototype.reply=function(t,n){return r(e.Comment,this,"Reply",0,[t,n],!1,!1,null,0)},i.prototype.setRichText=function(e,t){return s(this,"SetRichText",0,[e,t],0,0)},i.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!u(e)){var n=e;y(this,n),f(n.Author)||(this._A=n.Author),f(n.Created)||(this._C=b(n.Created)),f(n.Id)||(this._I=n.Id),f(n.Level)||(this._L=n.Level),f(n.Mentions)||(this._M=n.Mentions),f(n.Resolved)||(this._Re=n.Resolved),f(n.Text)||(this._T=n.Text),_(this,n,["parent","Parent","parentOrNullObject","ParentOrNullObject","replies","Replies"])}},i.prototype.load=function(e){return h(this,e)},i.prototype.retrieve=function(e){return m(this,e)},i.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),u(e)||f(e.Id)||(this._I=e.Id)},i.prototype._handleRetrieveResult=function(e,n){if(t.prototype._handleRetrieveResult.call(this,e,n),!u(e)){var r=e;f(r.Created)||(r.created=b(r.created)),O(this,e,n)}},i.prototype.toJSON=function(){return g(this,{author:this._A,created:this._C,id:this._I,level:this._L,mentions:this._M,resolved:this._Re,text:this._T},{replies:this._R})},i.prototype.setMockData=function(e){v(this,e)},i.prototype.ensureUnchanged=function(e){c(this,e)},i}(OfficeExtension.ClientObject);e.Comment=B;var W=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"CommentCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return p("items",this.m__items,"CommentCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),n.prototype.getCount=function(){return s(this,"GetCount",1,[],4,0)},n.prototype.getItem=function(t){return i(e.Comment,this,[t])},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!u(n)){var r=n;if(y(this,r),!u(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var s=a(e.Comment,!0,this,i[o],o);s._handleResult(i[o]),this.m__items.push(s)}}}},n.prototype.load=function(e){return h(this,e)},n.prototype.retrieve=function(e){return m(this,e)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),O(this,n,r,(function(t,n){return a(e.Comment,!0,i,t,n)}))},n.prototype.toJSON=function(){return g(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;v(this,t,(function(t,r){return a(e.Comment,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.CommentCollection=W;var G=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"ExtensionLifeCycle"},enumerable:!0,configurable:!0}),n.prototype.launchExtensionComponent=function(e,t,n){s(this,"LaunchExtensionComponent",1,[e,t,n],5,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.ExtensionLifeCycle,t,"Microsoft.OfficeSharedApi.ExtensionLifeCycle",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.ExtensionLifeCycle=G,function(e){e.plain="Plain",e.markdown="Markdown",e.delta="Delta"}(e.CommentTextFormat||(e.CommentTextFormat={})),function(e){e.placeHolderRendered="PlaceHolderRendered",e.initialCardRendered="InitialCardRendered"}(e.PersonaCardPerfPoint||(e.PersonaCardPerfPoint={})),function(e){e.notSet="NotSet",e.free="Free",e.idle="Idle",e.busy="Busy",e.idleBusy="IdleBusy",e.doNotDisturb="DoNotDisturb",e.unalertable="Unalertable",e.unavailable="Unavailable"}(e.UnifiedCommunicationAvailability||(e.UnifiedCommunicationAvailability={})),function(e){e.online="Online",e.notOnline="NotOnline",e.away="Away",e.busy="Busy",e.beRightBack="BeRightBack",e.onThePhone="OnThePhone",e.outToLunch="OutToLunch",e.inAMeeting="InAMeeting",e.outOfOffice="OutOfOffice",e.doNotDisturb="DoNotDisturb",e.inAConference="InAConference",e.getting="Getting",e.notABuddy="NotABuddy",e.disconnected="Disconnected",e.notInstalled="NotInstalled",e.urgentInterruptionsOnly="UrgentInterruptionsOnly",e.mayBeAvailable="MayBeAvailable",e.idle="Idle",e.inPresentation="InPresentation"}(e.UnifiedCommunicationStatus||(e.UnifiedCommunicationStatus={})),function(e){e.free="Free",e.busy="Busy",e.idle="Idle",e.doNotDistrub="DoNotDistrub",e.blocked="Blocked",e.notSet="NotSet",e.outOfOffice="OutOfOffice"}(e.UnifiedCommunicationPresence||(e.UnifiedCommunicationPresence={})),function(e){e.unknown="Unknown",e.free="Free",e.busy="Busy",e.elsewhere="Elsewhere",e.tentative="Tentative",e.outOfOffice="OutOfOffice"}(e.FreeBusyCalendarState||(e.FreeBusyCalendarState={})),function(e){e.unknown="Unknown",e.enterprise="Enterprise",e.contact="Contact",e.bot="Bot",e.phoneOnly="PhoneOnly",e.oneOff="OneOff",e.distributionList="DistributionList",e.personalDistributionList="PersonalDistributionList",e.anonymous="Anonymous",e.unifiedGroup="UnifiedGroup"}(e.PersonaType||(e.PersonaType={})),function(e){e.workPhone="WorkPhone",e.homePhone="HomePhone",e.mobilePhone="MobilePhone",e.businessFax="BusinessFax",e.otherPhone="OtherPhone"}(e.PhoneType||(e.PhoneType={})),function(e){e.workAddress="WorkAddress",e.homeAddress="HomeAddress",e.otherAddress="OtherAddress"}(e.AddressType||(e.AddressType={})),function(e){e.unknown="Unknown",e.individual="Individual",e.group="Group"}(e.MemberType||(e.MemberType={}));var q,V="MemberInfoList",z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"MemberInfoList"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["isWarmedUp","isWarmingUp"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["IsWarmedUp","IsWarmingUp"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWarmedUp",{get:function(){return p("isWarmedUp",this._I,V,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWarmingUp",{get:function(){return p("isWarmingUp",this._Is,V,this._isNull),this._Is},enumerable:!0,configurable:!0}),n.prototype.getPersonaForMember=function(t){return r(e.Persona,this,"GetPersonaForMember",1,[t],!1,!1,null,4)},n.prototype.items=function(){return s(this,"Items",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!u(e)){var n=e;y(this,n),f(n.IsWarmedUp)||(this._I=n.IsWarmedUp),f(n.IsWarmingUp)||(this._Is=n.IsWarmingUp)}},n.prototype.load=function(e){return h(this,e)},n.prototype.retrieve=function(e){return m(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.prototype.toJSON=function(){return g(this,{isWarmedUp:this._I,isWarmingUp:this._Is},{})},n.prototype.setMockData=function(e){v(this,e)},n.prototype.ensureUnchanged=function(e){c(this,e)},n}(OfficeExtension.ClientObject);e.MemberInfoList=z,function(e){e.hostId="HostId",e.type="Type",e.photo="Photo",e.personaInfo="PersonaInfo",e.unifiedCommunicationInfo="UnifiedCommunicationInfo",e.organization="Organization",e.unifiedGroupInfo="UnifiedGroupInfo",e.members="Members",e.membership="Membership",e.capabilities="Capabilities",e.customizations="Customizations",e.viewableSources="ViewableSources",e.placeholder="Placeholder"}(q=e.PersonaDataUpdated||(e.PersonaDataUpdated={}));var J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"PersonaActions"},enumerable:!0,configurable:!0}),t.prototype.addContact=function(){s(this,"AddContact",0,[],0,0)},t.prototype.callPhoneNumber=function(e){s(this,"CallPhoneNumber",0,[e],0,0)},t.prototype.composeEmail=function(e){s(this,"ComposeEmail",0,[e],0,0)},t.prototype.composeInstantMessage=function(e){s(this,"ComposeInstantMessage",0,[e],0,0)},t.prototype.editContact=function(){s(this,"EditContact",0,[],0,0)},t.prototype.editContactByIdentifier=function(e){s(this,"EditContactByIdentifier",0,[e],0,0)},t.prototype.editUnifiedGroup=function(){s(this,"EditUnifiedGroup",0,[],0,0)},t.prototype.getChangePhotoUrlAndOpenInBrowser=function(){s(this,"GetChangePhotoUrlAndOpenInBrowser",0,[],0,0)},t.prototype.hideHoverCardForPersona=function(){s(this,"HideHoverCardForPersona",0,[],0,0)},t.prototype.joinUnifiedGroup=function(){s(this,"JoinUnifiedGroup",0,[],0,0)},t.prototype.leaveUnifiedGroup=function(){s(this,"LeaveUnifiedGroup",0,[],0,0)},t.prototype.openGroupCalendar=function(){s(this,"OpenGroupCalendar",0,[],0,0)},t.prototype.openLinkContactUx=function(){s(this,"OpenLinkContactUx",0,[],0,0)},t.prototype.openOutlookProperties=function(){s(this,"OpenOutlookProperties",0,[],0,0)},t.prototype.pinPersonaToQuickContacts=function(){s(this,"PinPersonaToQuickContacts",0,[],0,0)},t.prototype.scheduleMeeting=function(){s(this,"ScheduleMeeting",0,[],0,0)},t.prototype.showContactCard=function(e,t,n,r,i,o){s(this,"ShowContactCard",0,[e,t,n,r,i,o],0,0)},t.prototype.showContextMenu=function(e,t,n,r,i,o){s(this,"ShowContextMenu",0,[e,t,n,r,i,o],0,0)},t.prototype.showExpandedCard=function(e,t,n,r,i,o){s(this,"ShowExpandedCard",0,[e,t,n,r,i,o],0,0)},t.prototype.showHoverCardForPersona=function(e,t,n,r,i,o){s(this,"ShowHoverCardForPersona",0,[e,t,n,r,i,o],0,0)},t.prototype.startAudioCall=function(){s(this,"StartAudioCall",0,[],0,0)},t.prototype.startVideoCall=function(){s(this,"StartVideoCall",0,[],0,0)},t.prototype.subscribeToGroup=function(){s(this,"SubscribeToGroup",0,[],0,0)},t.prototype.toggleTagForAlerts=function(){s(this,"ToggleTagForAlerts",0,[],0,0)},t.prototype.unsubscribeFromGroup=function(){s(this,"UnsubscribeFromGroup",0,[],0,0)},t.prototype._handleResult=function(t){(e.prototype._handleResult.call(this,t),u(t))||y(this,t)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),O(this,t,n)},t.prototype.toJSON=function(){return g(this,{},{})},t}(OfficeExtension.ClientObject);e.PersonaActions=J;var K="PersonaInfoSource",X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"PersonaInfoSource"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["displayName","email","emailAddresses","sipAddresses","birthday","birthdays","title","jobInfoDepartment","companyName","office","linkedTitles","linkedDepartments","linkedCompanyNames","linkedOffices","phones","addresses","webSites","notes"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["DisplayName","Email","EmailAddresses","SipAddresses","Birthday","Birthdays","Title","JobInfoDepartment","CompanyName","Office","LinkedTitles","LinkedDepartments","LinkedCompanyNames","LinkedOffices","Phones","Addresses","WebSites","Notes"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"addresses",{get:function(){return p("addresses",this._A,K,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"birthday",{get:function(){return p("birthday",this._B,K,this._isNull),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"birthdays",{get:function(){return p("birthdays",this._Bi,K,this._isNull),this._Bi},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"companyName",{get:function(){return p("companyName",this._C,K,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"displayName",{get:function(){return p("displayName",this._D,K,this._isNull),this._D},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"email",{get:function(){return p("email",this._E,K,this._isNull),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"emailAddresses",{get:function(){return p("emailAddresses",this._Em,K,this._isNull),this._Em},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"jobInfoDepartment",{get:function(){return p("jobInfoDepartment",this._J,K,this._isNull),this._J},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"linkedCompanyNames",{get:function(){return p("linkedCompanyNames",this._L,K,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"linkedDepartments",{get:function(){return p("linkedDepartments",this._Li,K,this._isNull),this._Li},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"linkedOffices",{get:function(){return p("linkedOffices",this._Lin,K,this._isNull),this._Lin},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"linkedTitles",{get:function(){return p("linkedTitles",this._Link,K,this._isNull),this._Link},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"notes",{get:function(){return p("notes",this._N,K,this._isNull),this._N},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"office",{get:function(){return p("office",this._O,K,this._isNull),this._O},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"phones",{get:function(){return p("phones",this._P,K,this._isNull),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sipAddresses",{get:function(){return p("sipAddresses",this._S,K,this._isNull),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return p("title",this._T,K,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"webSites",{get:function(){return p("webSites",this._W,K,this._isNull),this._W},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!u(t)){var n=t;y(this,n),f(n.Addresses)||(this._A=n.Addresses),f(n.Birthday)||(this._B=n.Birthday),f(n.Birthdays)||(this._Bi=n.Birthdays),f(n.CompanyName)||(this._C=n.CompanyName),f(n.DisplayName)||(this._D=n.DisplayName),f(n.Email)||(this._E=n.Email),f(n.EmailAddresses)||(this._Em=n.EmailAddresses),f(n.JobInfoDepartment)||(this._J=n.JobInfoDepartment),f(n.LinkedCompanyNames)||(this._L=n.LinkedCompanyNames),f(n.LinkedDepartments)||(this._Li=n.LinkedDepartments),f(n.LinkedOffices)||(this._Lin=n.LinkedOffices),f(n.LinkedTitles)||(this._Link=n.LinkedTitles),f(n.Notes)||(this._N=n.Notes),f(n.Office)||(this._O=n.Office),f(n.Phones)||(this._P=n.Phones),f(n.SipAddresses)||(this._S=n.SipAddresses),f(n.Title)||(this._T=n.Title),f(n.WebSites)||(this._W=n.WebSites)}},t.prototype.load=function(e){return h(this,e)},t.prototype.retrieve=function(e){return m(this,e)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),O(this,t,n)},t.prototype.toJSON=function(){return g(this,{addresses:this._A,birthday:this._B,birthdays:this._Bi,companyName:this._C,displayName:this._D,email:this._E,emailAddresses:this._Em,jobInfoDepartment:this._J,linkedCompanyNames:this._L,linkedDepartments:this._Li,linkedOffices:this._Lin,linkedTitles:this._Link,notes:this._N,office:this._O,phones:this._P,sipAddresses:this._S,title:this._T,webSites:this._W},{})},t.prototype.setMockData=function(e){v(this,e)},t.prototype.ensureUnchanged=function(e){c(this,e)},t}(OfficeExtension.ClientObject);e.PersonaInfoSource=X;var Q="PersonaInfo",$=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return __extends(r,t),Object.defineProperty(r.prototype,"_className",{get:function(){return"PersonaInfo"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_scalarPropertyNames",{get:function(){return["displayName","email","emailAddresses","sipAddresses","birthday","birthdays","title","jobInfoDepartment","companyName","office","linkedTitles","linkedDepartments","linkedCompanyNames","linkedOffices","webSites","notes","isPersonResolved"]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_scalarPropertyOriginalNames",{get:function(){return["DisplayName","Email","EmailAddresses","SipAddresses","Birthday","Birthdays","Title","JobInfoDepartment","CompanyName","Office","LinkedTitles","LinkedDepartments","LinkedCompanyNames","LinkedOffices","WebSites","Notes","IsPersonResolved"]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_navigationPropertyNames",{get:function(){return["sources"]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"sources",{get:function(){return this._So||(this._So=n(e.PersonaInfoSource,this,"Sources",!1,4)),this._So},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"birthday",{get:function(){return p("birthday",this._B,Q,this._isNull),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"birthdays",{get:function(){return p("birthdays",this._Bi,Q,this._isNull),this._Bi},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"companyName",{get:function(){return p("companyName",this._C,Q,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"displayName",{get:function(){return p("displayName",this._D,Q,this._isNull),this._D},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"email",{get:function(){return p("email",this._E,Q,this._isNull),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"emailAddresses",{get:function(){return p("emailAddresses",this._Em,Q,this._isNull),this._Em},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isPersonResolved",{get:function(){return p("isPersonResolved",this._I,Q,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"jobInfoDepartment",{get:function(){return p("jobInfoDepartment",this._J,Q,this._isNull),this._J},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"linkedCompanyNames",{get:function(){return p("linkedCompanyNames",this._L,Q,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"linkedDepartments",{get:function(){return p("linkedDepartments",this._Li,Q,this._isNull),this._Li},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"linkedOffices",{get:function(){return p("linkedOffices",this._Lin,Q,this._isNull),this._Lin},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"linkedTitles",{get:function(){return p("linkedTitles",this._Link,Q,this._isNull),this._Link},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"notes",{get:function(){return p("notes",this._N,Q,this._isNull),this._N},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"office",{get:function(){return p("office",this._O,Q,this._isNull),this._O},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"sipAddresses",{get:function(){return p("sipAddresses",this._S,Q,this._isNull),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"title",{get:function(){return p("title",this._T,Q,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"webSites",{get:function(){return p("webSites",this._W,Q,this._isNull),this._W},enumerable:!0,configurable:!0}),r.prototype.getAddresses=function(){return s(this,"GetAddresses",1,[],4,0)},r.prototype.getPhones=function(){return s(this,"GetPhones",1,[],4,0)},r.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!u(e)){var n=e;y(this,n),f(n.Birthday)||(this._B=b(n.Birthday)),f(n.Birthdays)||(this._Bi=b(n.Birthdays)),f(n.CompanyName)||(this._C=n.CompanyName),f(n.DisplayName)||(this._D=n.DisplayName),f(n.Email)||(this._E=n.Email),f(n.EmailAddresses)||(this._Em=n.EmailAddresses),f(n.IsPersonResolved)||(this._I=n.IsPersonResolved),f(n.JobInfoDepartment)||(this._J=n.JobInfoDepartment),f(n.LinkedCompanyNames)||(this._L=n.LinkedCompanyNames),f(n.LinkedDepartments)||(this._Li=n.LinkedDepartments),f(n.LinkedOffices)||(this._Lin=n.LinkedOffices),f(n.LinkedTitles)||(this._Link=n.LinkedTitles),f(n.Notes)||(this._N=n.Notes),f(n.Office)||(this._O=n.Office),f(n.SipAddresses)||(this._S=n.SipAddresses),f(n.Title)||(this._T=n.Title),f(n.WebSites)||(this._W=n.WebSites),_(this,n,["sources","Sources"])}},r.prototype.load=function(e){return h(this,e)},r.prototype.retrieve=function(e){return m(this,e)},r.prototype._handleRetrieveResult=function(e,n){if(t.prototype._handleRetrieveResult.call(this,e,n),!u(e)){var r=e;f(r.Birthday)||(r.birthday=b(r.birthday)),f(r.Birthdays)||(r.birthdays=b(r.birthdays)),O(this,e,n)}},r.prototype.toJSON=function(){return g(this,{birthday:this._B,birthdays:this._Bi,companyName:this._C,displayName:this._D,email:this._E,emailAddresses:this._Em,isPersonResolved:this._I,jobInfoDepartment:this._J,linkedCompanyNames:this._L,linkedDepartments:this._Li,linkedOffices:this._Lin,linkedTitles:this._Link,notes:this._N,office:this._O,sipAddresses:this._S,title:this._T,webSites:this._W},{sources:this._So})},r.prototype.setMockData=function(e){v(this,e)},r.prototype.ensureUnchanged=function(e){c(this,e)},r}(OfficeExtension.ClientObject);e.PersonaInfo=$;var Y="PersonaUnifiedCommunicationInfo",Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"PersonaUnifiedCommunicationInfo"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["availability","status","isSelf","isTagged","customStatusString","isBlocked","presenceTooltip","isOutOfOffice","outOfOfficeNote","timezone","meetingLocation","meetingSubject","timezoneBias","idleStartTime","overallCapability","isOnBuddyList","presenceNote","voiceMailUri","availabilityText","availabilityTooltip","isDurationInAvailabilityText","freeBusyStatus","calendarState","presence"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Availability","Status","IsSelf","IsTagged","CustomStatusString","IsBlocked","PresenceTooltip","IsOutOfOffice","OutOfOfficeNote","Timezone","MeetingLocation","MeetingSubject","TimezoneBias","IdleStartTime","OverallCapability","IsOnBuddyList","PresenceNote","VoiceMailUri","AvailabilityText","AvailabilityTooltip","IsDurationInAvailabilityText","FreeBusyStatus","CalendarState","Presence"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"availability",{get:function(){return p("availability",this._A,Y,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"availabilityText",{get:function(){return p("availabilityText",this._Av,Y,this._isNull),this._Av},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"availabilityTooltip",{get:function(){return p("availabilityTooltip",this._Ava,Y,this._isNull),this._Ava},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"calendarState",{get:function(){return p("calendarState",this._C,Y,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"customStatusString",{get:function(){return p("customStatusString",this._Cu,Y,this._isNull),this._Cu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"freeBusyStatus",{get:function(){return p("freeBusyStatus",this._F,Y,this._isNull),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"idleStartTime",{get:function(){return p("idleStartTime",this._I,Y,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBlocked",{get:function(){return p("isBlocked",this._Is,Y,this._isNull),this._Is},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDurationInAvailabilityText",{get:function(){return p("isDurationInAvailabilityText",this._IsD,Y,this._isNull),this._IsD},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isOnBuddyList",{get:function(){return p("isOnBuddyList",this._IsO,Y,this._isNull),this._IsO},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isOutOfOffice",{get:function(){return p("isOutOfOffice",this._IsOu,Y,this._isNull),this._IsOu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSelf",{get:function(){return p("isSelf",this._IsS,Y,this._isNull),this._IsS},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTagged",{get:function(){return p("isTagged",this._IsT,Y,this._isNull),this._IsT},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"meetingLocation",{get:function(){return p("meetingLocation",this._M,Y,this._isNull),this._M},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"meetingSubject",{get:function(){return p("meetingSubject",this._Me,Y,this._isNull),this._Me},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outOfOfficeNote",{get:function(){return p("outOfOfficeNote",this._O,Y,this._isNull),this._O},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"overallCapability",{get:function(){return p("overallCapability",this._Ov,Y,this._isNull),this._Ov},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"presence",{get:function(){return p("presence",this._P,Y,this._isNull),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"presenceNote",{get:function(){return p("presenceNote",this._Pr,Y,this._isNull),this._Pr},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"presenceTooltip",{get:function(){return p("presenceTooltip",this._Pre,Y,this._isNull),this._Pre},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return p("status",this._S,Y,this._isNull),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"timezone",{get:function(){return p("timezone",this._T,Y,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"timezoneBias",{get:function(){return p("timezoneBias",this._Ti,Y,this._isNull),this._Ti},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"voiceMailUri",{get:function(){return p("voiceMailUri",this._V,Y,this._isNull),this._V},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!u(t)){var n=t;y(this,n),f(n.Availability)||(this._A=n.Availability),f(n.AvailabilityText)||(this._Av=n.AvailabilityText),f(n.AvailabilityTooltip)||(this._Ava=n.AvailabilityTooltip),f(n.CalendarState)||(this._C=n.CalendarState),f(n.CustomStatusString)||(this._Cu=n.CustomStatusString),f(n.FreeBusyStatus)||(this._F=n.FreeBusyStatus),f(n.IdleStartTime)||(this._I=b(n.IdleStartTime)),f(n.IsBlocked)||(this._Is=n.IsBlocked),f(n.IsDurationInAvailabilityText)||(this._IsD=n.IsDurationInAvailabilityText),f(n.IsOnBuddyList)||(this._IsO=n.IsOnBuddyList),f(n.IsOutOfOffice)||(this._IsOu=n.IsOutOfOffice),f(n.IsSelf)||(this._IsS=n.IsSelf),f(n.IsTagged)||(this._IsT=n.IsTagged),f(n.MeetingLocation)||(this._M=n.MeetingLocation),f(n.MeetingSubject)||(this._Me=n.MeetingSubject),f(n.OutOfOfficeNote)||(this._O=n.OutOfOfficeNote),f(n.OverallCapability)||(this._Ov=n.OverallCapability),f(n.Presence)||(this._P=n.Presence),f(n.PresenceNote)||(this._Pr=n.PresenceNote),f(n.PresenceTooltip)||(this._Pre=n.PresenceTooltip),f(n.Status)||(this._S=n.Status),f(n.Timezone)||(this._T=n.Timezone),f(n.TimezoneBias)||(this._Ti=n.TimezoneBias),f(n.VoiceMailUri)||(this._V=n.VoiceMailUri)}},t.prototype.load=function(e){return h(this,e)},t.prototype.retrieve=function(e){return m(this,e)},t.prototype._handleRetrieveResult=function(t,n){if(e.prototype._handleRetrieveResult.call(this,t,n),!u(t)){var r=t;f(r.IdleStartTime)||(r.idleStartTime=b(r.idleStartTime)),O(this,t,n)}},t.prototype.toJSON=function(){return g(this,{availability:this._A,availabilityText:this._Av,availabilityTooltip:this._Ava,calendarState:this._C,customStatusString:this._Cu,freeBusyStatus:this._F,idleStartTime:this._I,isBlocked:this._Is,isDurationInAvailabilityText:this._IsD,isOnBuddyList:this._IsO,isOutOfOffice:this._IsOu,isSelf:this._IsS,isTagged:this._IsT,meetingLocation:this._M,meetingSubject:this._Me,outOfOfficeNote:this._O,overallCapability:this._Ov,presence:this._P,presenceNote:this._Pr,presenceTooltip:this._Pre,status:this._S,timezone:this._T,timezoneBias:this._Ti,voiceMailUri:this._V},{})},t.prototype.setMockData=function(e){v(this,e)},t.prototype.ensureUnchanged=function(e){c(this,e)},t}(OfficeExtension.ClientObject);e.PersonaUnifiedCommunicationInfo=Z;var ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"PersonaPhotoInfo"},enumerable:!0,configurable:!0}),t.prototype.getImageUri=function(e){return s(this,"getImageUri",1,[e],4,0)},t.prototype.getImageUriWithMetadata=function(e){return s(this,"getImageUriWithMetadata",1,[e],4,0)},t.prototype.getPlaceholderUri=function(e){return s(this,"getPlaceholderUri",1,[e],4,0)},t.prototype.setPlaceholderColor=function(e){s(this,"setPlaceholderColor",0,[e],0,0)},t.prototype._handleResult=function(t){(e.prototype._handleResult.call(this,t),u(t))||y(this,t)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),O(this,t,n)},t.prototype.toJSON=function(){return g(this,{},{})},t}(OfficeExtension.ClientObject);e.PersonaPhotoInfo=ee;var te=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"PersonaCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return p("items",this.m__items,"PersonaCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),n.prototype.getCount=function(){return s(this,"GetCount",1,[],4,0)},n.prototype.getItem=function(t){return i(e.Persona,this,[t])},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!u(n)){var r=n;if(y(this,r),!u(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var s=a(e.Persona,!0,this,i[o],o);s._handleResult(i[o]),this.m__items.push(s)}}}},n.prototype.load=function(e){return h(this,e)},n.prototype.retrieve=function(e){return m(this,e)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),O(this,n,r,(function(t,n){return a(e.Persona,!0,i,t,n)}))},n.prototype.toJSON=function(){return g(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;v(this,t,(function(t,r){return a(e.Persona,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.PersonaCollection=te;var ne="PersonaOrganizationInfo",re=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return __extends(r,t),Object.defineProperty(r.prototype,"_className",{get:function(){return"PersonaOrganizationInfo"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_scalarPropertyNames",{get:function(){return["isWarmedUp","isWarmingUp"]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_scalarPropertyOriginalNames",{get:function(){return["IsWarmedUp","IsWarmingUp"]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_navigationPropertyNames",{get:function(){return["hierarchy","manager","directReports"]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"directReports",{get:function(){return this._D||(this._D=n(e.PersonaCollection,this,"DirectReports",!0,4)),this._D},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"hierarchy",{get:function(){return this._H||(this._H=n(e.PersonaCollection,this,"Hierarchy",!0,4)),this._H},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"manager",{get:function(){return this._M||(this._M=n(e.Persona,this,"Manager",!1,4)),this._M},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isWarmedUp",{get:function(){return p("isWarmedUp",this._I,ne,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isWarmingUp",{get:function(){return p("isWarmingUp",this._Is,ne,this._isNull),this._Is},enumerable:!0,configurable:!0}),r.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!u(e)){var n=e;y(this,n),f(n.IsWarmedUp)||(this._I=n.IsWarmedUp),f(n.IsWarmingUp)||(this._Is=n.IsWarmingUp),_(this,n,["directReports","DirectReports","hierarchy","Hierarchy","manager","Manager"])}},r.prototype.load=function(e){return h(this,e)},r.prototype.retrieve=function(e){return m(this,e)},r.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},r.prototype.toJSON=function(){return g(this,{isWarmedUp:this._I,isWarmingUp:this._Is},{})},r.prototype.setMockData=function(e){v(this,e)},r.prototype.ensureUnchanged=function(e){c(this,e)},r}(OfficeExtension.ClientObject);e.PersonaOrganizationInfo=re,function(e){e.email="Email",e.workPhone="WorkPhone",e.workPhone2="WorkPhone2",e.workFax="WorkFax",e.mobilePhone="MobilePhone",e.homePhone="HomePhone",e.homePhone2="HomePhone2",e.otherPhone="OtherPhone",e.sipAddress="SipAddress",e.profile="Profile",e.office="Office",e.company="Company",e.workAddress="WorkAddress",e.homeAddress="HomeAddress",e.otherAddress="OtherAddress",e.birthday="Birthday"}(e.CustomizedData||(e.CustomizedData={}));var ie="UnifiedGroupInfo",oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"UnifiedGroupInfo"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["description","oneDrive","oneNote","isPublic","amIOwner","amIMember","amISubscribed","memberCount","ownerCount","hasGuests","site","planner","classification","subscriptionEnabled"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Description","OneDrive","OneNote","IsPublic","AmIOwner","AmIMember","AmISubscribed","MemberCount","OwnerCount","HasGuests","Site","Planner","Classification","SubscriptionEnabled"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyUpdateable",{get:function(){return[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"amIMember",{get:function(){return p("amIMember",this._A,ie,this._isNull),this._A},set:function(e){this._A=e,l(this,"AmIMember",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"amIOwner",{get:function(){return p("amIOwner",this._Am,ie,this._isNull),this._Am},set:function(e){this._Am=e,l(this,"AmIOwner",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"amISubscribed",{get:function(){return p("amISubscribed",this._AmI,ie,this._isNull),this._AmI},set:function(e){this._AmI=e,l(this,"AmISubscribed",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classification",{get:function(){return p("classification",this._C,ie,this._isNull),this._C},set:function(e){this._C=e,l(this,"Classification",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return p("description",this._D,ie,this._isNull),this._D},set:function(e){this._D=e,l(this,"Description",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasGuests",{get:function(){return p("hasGuests",this._H,ie,this._isNull),this._H},set:function(e){this._H=e,l(this,"HasGuests",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPublic",{get:function(){return p("isPublic",this._I,ie,this._isNull),this._I},set:function(e){this._I=e,l(this,"IsPublic",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"memberCount",{get:function(){return p("memberCount",this._M,ie,this._isNull),this._M},set:function(e){this._M=e,l(this,"MemberCount",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"oneDrive",{get:function(){return p("oneDrive",this._O,ie,this._isNull),this._O},set:function(e){this._O=e,l(this,"OneDrive",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"oneNote",{get:function(){return p("oneNote",this._On,ie,this._isNull),this._On},set:function(e){this._On=e,l(this,"OneNote",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ownerCount",{get:function(){return p("ownerCount",this._Ow,ie,this._isNull),this._Ow},set:function(e){this._Ow=e,l(this,"OwnerCount",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"planner",{get:function(){return p("planner",this._P,ie,this._isNull),this._P},set:function(e){this._P=e,l(this,"Planner",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"site",{get:function(){return p("site",this._S,ie,this._isNull),this._S},set:function(e){this._S=e,l(this,"Site",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subscriptionEnabled",{get:function(){return p("subscriptionEnabled",this._Su,ie,this._isNull),this._Su},set:function(e){this._Su=e,l(this,"SubscriptionEnabled",e,0)},enumerable:!0,configurable:!0}),t.prototype.set=function(e,t){this._recursivelySet(e,t,["description","oneDrive","oneNote","isPublic","amIOwner","amIMember","amISubscribed","memberCount","ownerCount","hasGuests","site","planner","classification","subscriptionEnabled"],[],[])},t.prototype.update=function(e){this._recursivelyUpdate(e)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!u(t)){var n=t;y(this,n),f(n.AmIMember)||(this._A=n.AmIMember),f(n.AmIOwner)||(this._Am=n.AmIOwner),f(n.AmISubscribed)||(this._AmI=n.AmISubscribed),f(n.Classification)||(this._C=n.Classification),f(n.Description)||(this._D=n.Description),f(n.HasGuests)||(this._H=n.HasGuests),f(n.IsPublic)||(this._I=n.IsPublic),f(n.MemberCount)||(this._M=n.MemberCount),f(n.OneDrive)||(this._O=n.OneDrive),f(n.OneNote)||(this._On=n.OneNote),f(n.OwnerCount)||(this._Ow=n.OwnerCount),f(n.Planner)||(this._P=n.Planner),f(n.Site)||(this._S=n.Site),f(n.SubscriptionEnabled)||(this._Su=n.SubscriptionEnabled)}},t.prototype.load=function(e){return h(this,e)},t.prototype.retrieve=function(e){return m(this,e)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),O(this,t,n)},t.prototype.toJSON=function(){return g(this,{amIMember:this._A,amIOwner:this._Am,amISubscribed:this._AmI,classification:this._C,description:this._D,hasGuests:this._H,isPublic:this._I,memberCount:this._M,oneDrive:this._O,oneNote:this._On,ownerCount:this._Ow,planner:this._P,site:this._S,subscriptionEnabled:this._Su},{})},t.prototype.setMockData=function(e){v(this,e)},t.prototype.ensureUnchanged=function(e){c(this,e)},t}(OfficeExtension.ClientObject);e.UnifiedGroupInfo=oe;var ae,se="Persona";!function(e){e[e.immediate=0]="immediate",e[e.load=3]="load"}(ae=e.PersonaPromiseType||(e.PersonaPromiseType={}));var ce=function(){};e.PersonaInfoAndSource=ce;var le=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return __extends(i,t),Object.defineProperty(i.prototype,"_className",{get:function(){return"Persona"},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_scalarPropertyNames",{get:function(){return["hostId","type","capabilities","diagnosticId","instanceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_scalarPropertyOriginalNames",{get:function(){return["HostId","Type","Capabilities","DiagnosticId","InstanceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_navigationPropertyNames",{get:function(){return["photo","personaInfo","unifiedCommunicationInfo","organization","unifiedGroupInfo","actions"]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"actions",{get:function(){return this._A||(this._A=n(e.PersonaActions,this,"Actions",!1,4)),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"organization",{get:function(){return this._O||(this._O=n(e.PersonaOrganizationInfo,this,"Organization",!1,4)),this._O},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"personaInfo",{get:function(){return this._P||(this._P=n(e.PersonaInfo,this,"PersonaInfo",!1,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"photo",{get:function(){return this._Ph||(this._Ph=n(e.PersonaPhotoInfo,this,"Photo",!1,4)),this._Ph},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"unifiedCommunicationInfo",{get:function(){return this._U||(this._U=n(e.PersonaUnifiedCommunicationInfo,this,"UnifiedCommunicationInfo",!1,4)),this._U},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"unifiedGroupInfo",{get:function(){return this._Un||(this._Un=n(e.UnifiedGroupInfo,this,"UnifiedGroupInfo",!1,4)),this._Un},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"capabilities",{get:function(){return p("capabilities",this._C,se,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"diagnosticId",{get:function(){return p("diagnosticId",this._D,se,this._isNull),this._D},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hostId",{get:function(){return p("hostId",this._H,se,this._isNull),this._H},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"instanceId",{get:function(){return p("instanceId",this._I,se,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"type",{get:function(){return p("type",this._T,se,this._isNull),this._T},enumerable:!0,configurable:!0}),i.prototype.set=function(e,t){this._recursivelySet(e,t,[],["unifiedGroupInfo"],["actions","organization","personaInfo","photo","unifiedCommunicationInfo"])},i.prototype.update=function(e){this._recursivelyUpdate(e)},i.prototype.dispose=function(){s(this,"Dispose",0,[],0,0)},i.prototype.getCustomizations=function(){return s(this,"GetCustomizations",1,[],4,0)},i.prototype.getMembers=function(){return r(e.MemberInfoList,this,"GetMembers",1,[],!1,!1,null,4)},i.prototype.getMembership=function(){return r(e.MemberInfoList,this,"GetMembership",1,[],!1,!1,null,4)},i.prototype.getViewableSources=function(){return s(this,"GetViewableSources",1,[],4,0)},i.prototype.reportTimeForRender=function(e,t){s(this,"ReportTimeForRender",0,[e,t],0,0)},i.prototype.warmup=function(e){s(this,"Warmup",0,[e],0,0)},i.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!u(e)){var n=e;y(this,n),f(n.Capabilities)||(this._C=n.Capabilities),f(n.DiagnosticId)||(this._D=n.DiagnosticId),f(n.HostId)||(this._H=n.HostId),f(n.InstanceId)||(this._I=n.InstanceId),f(n.Type)||(this._T=n.Type),_(this,n,["actions","Actions","organization","Organization","personaInfo","PersonaInfo","photo","Photo","unifiedCommunicationInfo","UnifiedCommunicationInfo","unifiedGroupInfo","UnifiedGroupInfo"])}},i.prototype.load=function(e){return h(this,e)},i.prototype.retrieve=function(e){return m(this,e)},i.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},i.prototype.toJSON=function(){return g(this,{capabilities:this._C,diagnosticId:this._D,hostId:this._H,instanceId:this._I,type:this._T},{organization:this._O,personaInfo:this._P,unifiedCommunicationInfo:this._U,unifiedGroupInfo:this._Un})},i.prototype.setMockData=function(e){v(this,e)},i.prototype.ensureUnchanged=function(e){c(this,e)},i}(OfficeExtension.ClientObject);e.Persona=le;var ue=function(){function t(){}return t.prototype.performAsyncOperation=function(e,t,n,r){var i=this;e!=ae.immediate?r().then((function(e){if(e)n();else{var o=i;o.load("hostId"),o.context.sync().then((function(){var e=o.hostId;i.getPersonaLifetime().then((function(i){var a=function(s){return new OfficeExtension.CoreUtility.Promise((function(c,l){if(s.sendingPersonaHostId==e)for(var u=0;u<s.dataUpdated.length;++u){var f=s.dataUpdated[u];if(t==f)return void r().then((function(e){e&&(n(),i.onPersonaUpdated.remove(a),o.context.sync()),c(e)}))}c(!1)}))};i.onPersonaUpdated.add(a),o.context.sync()}))}))}})):n()},t.prototype.getOrganizationAsync=function(e){var t=this;return new OfficeExtension.CoreUtility.Promise((function(n,r){var i=t;t.performAsyncOperation(e,q.organization,(function(){var e=i.organization;e.load("*"),i.context.sync().then((function(){n(e)}))}),(function(){return new OfficeExtension.CoreUtility.Promise((function(e,t){var n=i.organization;n.load("isWarmedUp"),i.context.sync().then((function(){e(n.isWarmedUp)}))}))}))}))},t.prototype.getIsPersonaInfoResolvedCheck=function(){var e=this;return new OfficeExtension.CoreUtility.Promise((function(t,n){var r=e.personaInfo;r.load("isPersonResolved"),e.context.sync().then((function(){t(r.isPersonResolved)}))}))},t.prototype.getPersonaInfoAsync=function(e){var t=this;return new OfficeExtension.CoreUtility.Promise((function(n,r){var i=t;t.performAsyncOperation(e,q.personaInfo,(function(){var e=i.personaInfo;e.load(),i.context.sync().then((function(){n(e)}))}),(function(){return t.getIsPersonaInfoResolvedCheck()}))}))},t.prototype.getPersonaInfoWithSourceAsync=function(e){var t=this;return new OfficeExtension.CoreUtility.Promise((function(n,r){var i=t;t.performAsyncOperation(e,q.personaInfo,(function(){var e=new ce;e.info=i.personaInfo,e.info.load(),e.source=i.personaInfo.sources,e.source.load(),i.context.sync().then((function(){n(e)}))}),(function(){return t.getIsPersonaInfoResolvedCheck()}))}))},t.prototype.getUnifiedCommunicationInfo=function(e){var t=this;return new OfficeExtension.CoreUtility.Promise((function(n,r){var i=t;t.performAsyncOperation(e,q.personaInfo,(function(){var e=i.unifiedCommunicationInfo;e.load("*"),i.context.sync().then((function(){n(e)}))}),(function(){return t.getIsPersonaInfoResolvedCheck()}))}))},t.prototype.getUnifiedGroupInfoAsync=function(e){var t=this;return new OfficeExtension.CoreUtility.Promise((function(n,r){var i=t;t.performAsyncOperation(e,q.personaInfo,(function(){var e=i.unifiedGroupInfo;e.load("*"),i.context.sync().then((function(){n(e)}))}),(function(){return t.getIsPersonaInfoResolvedCheck()}))}))},t.prototype.getTypeAsync=function(t){var n=this;return new OfficeExtension.CoreUtility.Promise((function(r,i){var o=n;n.performAsyncOperation(t,q.personaInfo,(function(){o.load("type"),o.context.sync().then((function(){r(e.PersonaType[o.type.valueOf()])}))}),(function(){return n.getIsPersonaInfoResolvedCheck()}))}))},t.prototype.getCustomizationsAsync=function(e){var t=this;return new OfficeExtension.CoreUtility.Promise((function(n,r){var i=t;t.performAsyncOperation(e,q.personaInfo,(function(){var e=i.getCustomizations();i.context.sync().then((function(){n(e.value)}))}),(function(){return t.getIsPersonaInfoResolvedCheck()}))}))},t.prototype.getMembersAsync=function(e){var t=this;return new OfficeExtension.CoreUtility.Promise((function(n,r){var i=t;t.performAsyncOperation(e,q.members,(function(){var e=i.getMembers();e.load("isWarmedUp"),i.context.sync().then((function(){n(e)}))}),(function(){return new OfficeExtension.CoreUtility.Promise((function(e,t){var n=i.getMembers();n.load("isWarmedUp"),i.context.sync().then((function(){e(n.isWarmedUp)}))}))}))}))},t.prototype.getMembershipAsync=function(e){var t=this;return new OfficeExtension.CoreUtility.Promise((function(n,r){var i=t;t.performAsyncOperation(e,q.membership,(function(){var e=i.getMembership();e.load("*"),i.context.sync().then((function(){n(e)}))}),(function(){return new OfficeExtension.CoreUtility.Promise((function(e){var t=i.getMembership();t.load("isWarmedUp"),i.context.sync().then((function(){e(t.isWarmedUp)}))}))}))}))},t.prototype.getPersonaLifetime=function(){var e=this;return new OfficeExtension.CoreUtility.Promise((function(t,n){var r=e;r.load("instanceId"),r.context.sync().then((function(){new me(r.context,r.instanceId).getPersonaLifetime().then((function(e){t(e)}))}))}))},t}();e.PersonaCustom=ue,OfficeExtension.Utility.applyMixin(le,ue);var fe=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"PersonaLifetime"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["instanceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["InstanceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"instanceId",{get:function(){return p("instanceId",this._I,"PersonaLifetime",this._isNull),this._I},enumerable:!0,configurable:!0}),n.prototype.getPersona=function(t){return r(e.Persona,this,"GetPersona",1,[t],!1,!1,null,4)},n.prototype.getPersonaForOrgByEntryId=function(t,n,i,o){return r(e.Persona,this,"GetPersonaForOrgByEntryId",1,[t,n,i,o],!1,!1,null,4)},n.prototype.getPersonaForOrgEntry=function(t,n,i,o){return r(e.Persona,this,"GetPersonaForOrgEntry",1,[t,n,i,o],!1,!1,null,4)},n.prototype.getPolicies=function(){return s(this,"GetPolicies",1,[],4,0)},n.prototype.getTextScaleFactor=function(){return s(this,"GetTextScaleFactor",1,[],4,0)},n.prototype._RegisterPersonaUpdatedEvent=function(){s(this,"_RegisterPersonaUpdatedEvent",0,[],0,0)},n.prototype._UnregisterPersonaUpdatedEvent=function(){s(this,"_UnregisterPersonaUpdatedEvent",0,[],0,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!u(e)){var n=e;y(this,n),f(n.InstanceId)||(this._I=n.InstanceId)}},n.prototype.load=function(e){return h(this,e)},n.prototype.retrieve=function(e){return m(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},Object.defineProperty(n.prototype,"onPersonaUpdated",{get:function(){var e=this;return this.m_personaUpdated||(this.m_personaUpdated=new OfficeExtension.GenericEventHandlers(this.context,this,"PersonaUpdated",{eventType:3502,registerFunc:function(){return e._RegisterPersonaUpdatedEvent()},unregisterFunc:function(){return e._UnregisterPersonaUpdatedEvent()},getTargetIdFunc:function(){return e.instanceId},eventArgsTransformFunc:function(e){var t={dataUpdated:e.dataUpdated,sendingPersonaHostId:e.sendingPersonaHostId};return OfficeExtension.Utility._createPromiseFromResult(t)}})),this.m_personaUpdated},enumerable:!0,configurable:!0}),n.prototype.toJSON=function(){return g(this,{instanceId:this._I},{})},n.prototype.setMockData=function(e){v(this,e)},n.prototype.ensureUnchanged=function(e){c(this,e)},n}(OfficeExtension.ClientObject);e.PersonaLifetime=fe;var pe="LokiTokenProvider",de=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"LokiTokenProvider"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["emailOrUpn","instanceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["EmailOrUpn","InstanceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"emailOrUpn",{get:function(){return p("emailOrUpn",this._E,pe,this._isNull),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return p("instanceId",this._I,pe,this._isNull),this._I},enumerable:!0,configurable:!0}),t.prototype.requestClientAccessToken=function(){s(this,"RequestClientAccessToken",0,[],0,0)},t.prototype.requestIdentityUniqueId=function(){s(this,"RequestIdentityUniqueId",0,[],0,0)},t.prototype.requestToken=function(){s(this,"RequestToken",0,[],0,0)},t.prototype._RegisterClientAccessTokenAvailableEvent=function(){s(this,"_RegisterClientAccessTokenAvailableEvent",0,[],0,0)},t.prototype._RegisterIdentityUniqueIdAvailableEvent=function(){s(this,"_RegisterIdentityUniqueIdAvailableEvent",0,[],0,0)},t.prototype._RegisterLokiTokenAvailableEvent=function(){s(this,"_RegisterLokiTokenAvailableEvent",0,[],0,0)},t.prototype._UnregisterClientAccessTokenAvailableEvent=function(){s(this,"_UnregisterClientAccessTokenAvailableEvent",0,[],0,0)},t.prototype._UnregisterIdentityUniqueIdAvailableEvent=function(){s(this,"_UnregisterIdentityUniqueIdAvailableEvent",0,[],0,0)},t.prototype._UnregisterLokiTokenAvailableEvent=function(){s(this,"_UnregisterLokiTokenAvailableEvent",0,[],0,0)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!u(t)){var n=t;y(this,n),f(n.EmailOrUpn)||(this._E=n.EmailOrUpn),f(n.InstanceId)||(this._I=n.InstanceId)}},t.prototype.load=function(e){return h(this,e)},t.prototype.retrieve=function(e){return m(this,e)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),O(this,t,n)},Object.defineProperty(t.prototype,"onClientAccessTokenAvailable",{get:function(){var e=this;return this.m_clientAccessTokenAvailable||(this.m_clientAccessTokenAvailable=new OfficeExtension.GenericEventHandlers(this.context,this,"ClientAccessTokenAvailable",{eventType:3505,registerFunc:function(){return e._RegisterClientAccessTokenAvailableEvent()},unregisterFunc:function(){return e._UnregisterClientAccessTokenAvailableEvent()},getTargetIdFunc:function(){return e.instanceId},eventArgsTransformFunc:function(e){var t={clientAccessToken:e.clientAccessToken,isAvailable:e.isAvailable,tokenTTLInSeconds:e.tokenTTLInSeconds};return OfficeExtension.Utility._createPromiseFromResult(t)}})),this.m_clientAccessTokenAvailable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onIdentityUniqueIdAvailable",{get:function(){var e=this;return this.m_identityUniqueIdAvailable||(this.m_identityUniqueIdAvailable=new OfficeExtension.GenericEventHandlers(this.context,this,"IdentityUniqueIdAvailable",{eventType:3504,registerFunc:function(){return e._RegisterIdentityUniqueIdAvailableEvent()},unregisterFunc:function(){return e._UnregisterIdentityUniqueIdAvailableEvent()},getTargetIdFunc:function(){return e.instanceId},eventArgsTransformFunc:function(e){var t={isAvailable:e.isAvailable,uniqueId:e.uniqueId};return OfficeExtension.Utility._createPromiseFromResult(t)}})),this.m_identityUniqueIdAvailable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onLokiTokenAvailable",{get:function(){var e=this;return this.m_lokiTokenAvailable||(this.m_lokiTokenAvailable=new OfficeExtension.GenericEventHandlers(this.context,this,"LokiTokenAvailable",{eventType:3503,registerFunc:function(){return e._RegisterLokiTokenAvailableEvent()},unregisterFunc:function(){return e._UnregisterLokiTokenAvailableEvent()},getTargetIdFunc:function(){return e.instanceId},eventArgsTransformFunc:function(e){var t={isAvailable:e.isAvailable,lokiAutoDiscoverUrl:e.lokiAutoDiscoverUrl,lokiToken:e.lokiToken};return OfficeExtension.Utility._createPromiseFromResult(t)}})),this.m_lokiTokenAvailable},enumerable:!0,configurable:!0}),t.prototype.toJSON=function(){return g(this,{emailOrUpn:this._E,instanceId:this._I},{})},t.prototype.setMockData=function(e){v(this,e)},t.prototype.ensureUnchanged=function(e){c(this,e)},t}(OfficeExtension.ClientObject);e.LokiTokenProvider=de;var he=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"LokiTokenProviderFactory"},enumerable:!0,configurable:!0}),n.prototype.getLokiTokenProvider=function(t){return r(e.LokiTokenProvider,this,"GetLokiTokenProvider",1,[t],!1,!1,null,4)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.LokiTokenProviderFactory,t,"Microsoft.People.LokiTokenProviderFactory",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.LokiTokenProviderFactory=he;var me=function(){function t(e,t){this.context=e,this.instanceId=t}return Object.defineProperty(t.prototype,"serviceContext",{get:function(){return this.m_serviceConext||(this.m_serviceConext=e.ServiceContext.newObject(this.context)),this.m_serviceConext},enumerable:!0,configurable:!0}),t.prototype.getPersonaLifetime=function(){var e=this;return new OfficeExtension.CoreUtility.Promise((function(t,n){var r=e.serviceContext.getPersonaLifetime(e.instanceId);e.context.sync().then((function(){r.load("instanceId"),e.context.sync().then((function(){t(r)}))}))}))},t.prototype.getInitialPersona=function(){var e=this;return new OfficeExtension.CoreUtility.Promise((function(t,n){var r=e.serviceContext.getInitialPersona(e.instanceId);e.context.sync().then((function(){t(r)}))}))},t.prototype.getLokiTokenProvider=function(){var e=this;return new OfficeExtension.CoreUtility.Promise((function(t,n){var r=e.serviceContext.getLokiTokenProvider(e.instanceId);e.context.sync().then((function(){r.load("instanceId"),e.context.sync().then((function(){t(r)}))}))}))},t}();e.PeopleApiContext=me;var ge=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"ServiceContext"},enumerable:!0,configurable:!0}),n.prototype.accountEmailOrUpn=function(e){return s(this,"AccountEmailOrUpn",1,[e],4,0)},n.prototype.dispose=function(e){s(this,"Dispose",0,[e],0,0)},n.prototype.getInitialPersona=function(t){return r(e.Persona,this,"GetInitialPersona",1,[t],!1,!1,null,4)},n.prototype.getLokiTokenProvider=function(t){return r(e.LokiTokenProvider,this,"GetLokiTokenProvider",1,[t],!1,!1,null,4)},n.prototype.getPersonaLifetime=function(t){return r(e.PersonaLifetime,this,"GetPersonaLifetime",1,[t],!1,!1,null,4)},n.prototype.getPersonaPolicies=function(){return s(this,"GetPersonaPolicies",1,[],4,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.ServiceContext,t,"Microsoft.People.ServiceContext",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.ServiceContext=ge;var ye=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"RichapiPcxFeatureChecks"},enumerable:!0,configurable:!0}),n.prototype.isAddChangePhotoLinkOnLpcPersonaImageFlightEnabled=function(){return s(this,"IsAddChangePhotoLinkOnLpcPersonaImageFlightEnabled",1,[],4,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.RichapiPcxFeatureChecks,t,"Microsoft.People.RichapiPcxFeatureChecks",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.RichapiPcxFeatureChecks=ye;var _e=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"Tap"},enumerable:!0,configurable:!0}),n.prototype.getEnterpriseUserInfo=function(){return s(this,"GetEnterpriseUserInfo",1,[],5,0)},n.prototype.getMruFriendlyPath=function(e){return s(this,"GetMruFriendlyPath",1,[e],5,0)},n.prototype.launchFileUrlInOfficeApp=function(e,t){return s(this,"LaunchFileUrlInOfficeApp",1,[e,t],5,0)},n.prototype.performLocalSearch=function(e,t,n,r){return s(this,"PerformLocalSearch",1,[e,t,n,r],5,0)},n.prototype.readSearchCache=function(e,t,n){return s(this,"ReadSearchCache",1,[e,t,n],5,0)},n.prototype.writeSearchCache=function(e,t,n){return s(this,"WriteSearchCache",1,[e,t,n],5,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.Tap,t,"Microsoft.TapRichApi.Tap",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.Tap=_e,function(e){e.unknown="Unknown",e.chart="Chart",e.smartArt="SmartArt",e.table="Table",e.image="Image",e.slide="Slide",e.ole="OLE",e.text="Text"}(e.ObjectType||(e.ObjectType={}));var be=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"AppRuntimePersistenceService"},enumerable:!0,configurable:!0}),n.prototype.getAppRuntimeStartState=function(){return s(this,"GetAppRuntimeStartState",1,[],4,0)},n.prototype.setAppRuntimeStartState=function(e){s(this,"SetAppRuntimeStartState",0,[e],S(2,"SharedRuntimeInternal","1.2"),0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.AppRuntimePersistenceService,t,"Microsoft.AppRuntime.AppRuntimePersistenceService",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.AppRuntimePersistenceService=be;var Oe,ve=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"AppRuntimeService"},enumerable:!0,configurable:!0}),n.prototype.getAppRuntimeState=function(){return s(this,"GetAppRuntimeState",1,[],4,0)},n.prototype.setAppRuntimeState=function(e){s(this,"SetAppRuntimeState",0,[e],S(2,"SharedRuntimeInternal","1.2"),0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.AppRuntimeService,t,"Microsoft.AppRuntime.AppRuntimeService",!1,4)},Object.defineProperty(n.prototype,"onVisibilityChanged",{get:function(){return this.m_visibilityChanged||(this.m_visibilityChanged=new OfficeExtension.GenericEventHandlers(this.context,this,"VisibilityChanged",{eventType:65539,registerFunc:function(){return OfficeExtension.Utility._createPromiseFromResult(null)},unregisterFunc:function(){return OfficeExtension.Utility._createPromiseFromResult(null)},getTargetIdFunc:function(){return""},eventArgsTransformFunc:function(e){var t={visibility:e.visibility};return OfficeExtension.Utility._createPromiseFromResult(t)}})),this.m_visibilityChanged},enumerable:!0,configurable:!0}),n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.AppRuntimeService=ve,function(e){e.inactive="Inactive",e.background="Background",e.visible="Visible"}(e.AppRuntimeState||(e.AppRuntimeState={})),function(e){e.hidden="Hidden",e.visible="Visible"}(e.Visibility||(e.Visibility={})),function(e){e.unknown="Unknown",e.basic="Basic",e.premium="Premium"}(Oe=e.LicenseFeatureTier||(e.LicenseFeatureTier={}));var Se=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"License"},enumerable:!0,configurable:!0}),n.prototype.getFeatureTier=function(e,t){return s(this,"GetFeatureTier",1,[e,t],4,0)},n.prototype.getLicenseFeature=function(t){return r(e.LicenseFeature,this,"GetLicenseFeature",1,[t],!1,!1,null,4)},n.prototype.getMsaDeviceTicket=function(e,t,n){return s(this,"GetMsaDeviceTicket",1,[e,t,n],5,0)},n.prototype.isFeatureEnabled=function(e,t){return s(this,"IsFeatureEnabled",1,[e,t],4,0)},n.prototype.isFreemiumUpsellEnabled=function(){return s(this,"IsFreemiumUpsellEnabled",1,[],4,0)},n.prototype.launchUpsellExperience=function(e){s(this,"LaunchUpsellExperience",1,[e],4,0)},n.prototype._TestFireStateChangedEvent=function(e){s(this,"_TestFireStateChangedEvent",0,[e],1,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.License,t,"Microsoft.Office.Licensing.License",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.License=Se;var Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"LicenseFeature"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["id"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Id"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return p("id",this._I,"LicenseFeature",this._isNull),this._I},enumerable:!0,configurable:!0}),t.prototype._RegisterStateChange=function(){s(this,"_RegisterStateChange",1,[],4,0)},t.prototype._UnregisterStateChange=function(){s(this,"_UnregisterStateChange",1,[],4,0)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!u(t)){var n=t;y(this,n),f(n.Id)||(this._I=n.Id)}},t.prototype.load=function(e){return h(this,e)},t.prototype.retrieve=function(e){return m(this,e)},t.prototype._handleIdResult=function(t){e.prototype._handleIdResult.call(this,t),u(t)||f(t.Id)||(this._I=t.Id)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),O(this,t,n)},Object.defineProperty(t.prototype,"onStateChanged",{get:function(){var e=this;return this.m_stateChanged||(this.m_stateChanged=new OfficeExtension.GenericEventHandlers(this.context,this,"StateChanged",{eventType:1,registerFunc:function(){return e._RegisterStateChange()},unregisterFunc:function(){return e._UnregisterStateChange()},getTargetIdFunc:function(){return e.id},eventArgsTransformFunc:function(t){var n=D.LicenseFeature_StateChanged_EventArgsTransform(e,t);return OfficeExtension.Utility._createPromiseFromResult(n)}})),this.m_stateChanged},enumerable:!0,configurable:!0}),t.prototype.toJSON=function(){return g(this,{id:this._I},{})},t.prototype.setMockData=function(e){v(this,e)},t.prototype.ensureUnchanged=function(e){c(this,e)},t}(OfficeExtension.ClientObject);e.LicenseFeature=Ae,function(e){e.LicenseFeature_StateChanged_EventArgsTransform=function(e,t){var n={feature:t.featureName,isEnabled:t.isEnabled,tier:t.tierName};return t.tierName&&(n.tier=0==t.tierName?Oe.unknown:1==t.tierName?Oe.basic:2==t.tierName?Oe.premium:t.tierName),n}}(D=e._CC||(e._CC={}));var De=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"MsaDeviceTicketOptions"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["scopes"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Scopes"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scopes",{get:function(){return p("scopes",this._S,"MsaDeviceTicketOptions",this._isNull),this._S},set:function(e){this._S=e,l(this,"Scopes",e,0)},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["scopes"],[],[])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!u(e)){var n=e;y(this,n),f(n.Scopes)||(this._S=n.Scopes)}},n.prototype.load=function(e){return h(this,e)},n.prototype.retrieve=function(e){return m(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.MsaDeviceTicketOptions,t,"Microsoft.Office.Licensing.MsaDeviceTicketOptions",!1,4)},n.prototype.toJSON=function(){return g(this,{scopes:this._S},{})},n.prototype.setMockData=function(e){v(this,e)},n.prototype.ensureUnchanged=function(e){c(this,e)},n}(OfficeExtension.ClientObject);e.MsaDeviceTicketOptions=De;var Pe=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"DialogPage"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_Id"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_Id"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Id",{get:function(){return p("_Id",this.__I,"DialogPage",this._isNull),this.__I},enumerable:!0,configurable:!0}),n.prototype.close=function(){s(this,"Close",1,[],4,0)},n.prototype.readyToShow=function(){s(this,"ReadyToShow",1,[],4,0)},n.prototype.registerOnShow=function(){s(this,"RegisterOnShow",1,[],4,0)},n.prototype.sendMessageToHost=function(e){s(this,"SendMessageToHost",1,[e],4,0)},n.prototype.unregisterOnShow=function(){s(this,"UnregisterOnShow",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!u(e)){var n=e;y(this,n),f(n._Id)||(this.__I=n._Id)}},n.prototype.load=function(e){return h(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),u(e)||f(e._Id)||(this.__I=e._Id)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.DialogPage,t,"Microsoft.Office.DialogPage.DialogPage",!1,4)},Object.defineProperty(n.prototype,"onOnShowEvent",{get:function(){var e=this;return this.m_onShowEvent||(this.m_onShowEvent=new OfficeExtension.GenericEventHandlers(this.context,this,"OnShowEvent",{eventType:1,registerFunc:function(){return e.registerOnShow()},unregisterFunc:function(){return e.unregisterOnShow()},getTargetIdFunc:function(){return e._Id},eventArgsTransformFunc:function(e){return OfficeExtension.Utility._createPromiseFromResult({})}})),this.m_onShowEvent},enumerable:!0,configurable:!0}),n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.DialogPage=Pe;var Ce=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"ActionService"},enumerable:!0,configurable:!0}),n.prototype.areShortcutsInUse=function(e){return s(this,"AreShortcutsInUse",0,[e],0,0)},n.prototype.getShortcuts=function(){return s(this,"GetShortcuts",1,[],4,0)},n.prototype.replaceShortcuts=function(e){s(this,"ReplaceShortcuts",0,[e],0,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),u(e))||y(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),O(this,e,n)},n.newObject=function(t){return o(e.ActionService,t,"Microsoft.Office.ActionService",!1,4)},n.prototype.toJSON=function(){return g(this,{},{})},n}(OfficeExtension.ClientObject);e.ActionService=Ce,function(e){e.apiNotAvailable="ApiNotAvailable",e.clientError="ClientError",e.controlIdNotFound="ControlIdNotFound",e.entryIdRequired="EntryIdRequired",e.generalException="GeneralException",e.hostRestartNeeded="HostRestartNeeded",e.instanceNotFound="InstanceNotFound",e.interactiveFlowAborted="InteractiveFlowAborted",e.invalidArgument="InvalidArgument",e.invalidGrant="InvalidGrant",e.invalidResourceUrl="InvalidResourceUrl",e.invalidRibbonDefinition="InvalidRibbonDefinition",e.objectNotFound="ObjectNotFound",e.resourceNotSupported="ResourceNotSupported",e.serverError="ServerError",e.serviceUrlNotFound="ServiceUrlNotFound",e.sharedRuntimeNotAvailable="SharedRuntimeNotAvailable",e.ticketInvalidParams="TicketInvalidParams",e.ticketNetworkError="TicketNetworkError",e.ticketUnauthorized="TicketUnauthorized",e.ticketUninitialized="TicketUninitialized",e.ticketUnknownError="TicketUnknownError",e.unexpectedError="UnexpectedError",e.unsupportedUserIdentity="UnsupportedUserIdentity",e.userNotSignedIn="UserNotSignedIn"}(e.ErrorCodes||(e.ErrorCodes={})),e.Interfaces||(e.Interfaces={})}(OfficeCore||(OfficeCore={})),function(e){var t,n;!function(e){e.hidden="Hidden",e.taskpane="Taskpane"}(t=e.VisibilityMode||(e.VisibilityMode={})),function(e){e.none="None",e.load="Load"}(n=e.StartupBehavior||(e.StartupBehavior={})),function(e){function r(e){var t=new OfficeCore.RequestContext;return t._requestFlagModifier|=64,e&&(t._customData="WacPartition"),t}function i(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return t=r(!0),OfficeCore.AppRuntimeService.newObject(t).setAppRuntimeState(e),[4,t.sync()];case 1:return n.sent(),[2]}}))}))}var o;e.setStartupBehavior=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(o){switch(o.label){case 0:if(e!==n.load&&e!==n.none)throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.invalidArgument,null,null);return t=e==n.load?OfficeCore.AppRuntimeState.background:OfficeCore.AppRuntimeState.inactive,i=r(!1),OfficeCore.AppRuntimePersistenceService.newObject(i).setAppRuntimeStartState(t),[4,i.sync()];case 1:return o.sent(),[2]}}))}))},e.getStartupBehavior=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o;return __generator(this,(function(a){switch(a.label){case 0:return e=r(!1),t=OfficeCore.AppRuntimePersistenceService.newObject(e),i=t.getAppRuntimeStartState(),[4,e.sync()];case 1:return a.sent(),o=i.value,[2,o==OfficeCore.AppRuntimeState.inactive?n.none:n.load]}}))}))},e._getState=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){switch(i.label){case 0:return e=r(!0),t=OfficeCore.AppRuntimeService.newObject(e),n=t.getAppRuntimeState(),[4,e.sync()];case 1:return i.sent(),[2,n.value]}}))}))},e.showAsTaskpane=function(){return i(OfficeCore.AppRuntimeState.visible)},e.hide=function(){return i(OfficeCore.AppRuntimeState.background)},e.onVisibilityModeChanged=function(e){return __awaiter(this,void 0,void 0,(function(){var n,i,a=this;return __generator(this,(function(s){switch(s.label){case 0:return n=function(){if(!o){var e=r(!0);o=OfficeCore.AppRuntimeService.newObject(e)}return o}(),i=n.onVisibilityChanged.add((function(n){if(e){var r={visibilityMode:(i=n.visibility,i===OfficeCore.Visibility.visible?t.taskpane:t.hidden)};e(r)}var i;return null})),[4,n.context.sync()];case 1:return s.sent(),[2,function(){return __awaiter(a,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return i.remove(),[4,n.context.sync()];case 1:return e.sent(),[2]}}))}))}]}}))}))},function(e){function t(e){var t=new OfficeCore.RequestContext;return t._requestFlagModifier|=64,e&&(t._customData="WacPartition"),t}e.enable=function(){return __awaiter(this,void 0,void 0,(function(){var e,n;return __generator(this,(function(r){switch(r.label){case 0:return e=!1,"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e=!0),n=t(e),OfficeCore.BeforeDocumentCloseNotification.newObject(n).enable(),[4,n.sync()];case 1:return r.sent(),[2]}}))}))},e.disable=function(){return __awaiter(this,void 0,void 0,(function(){var e,n;return __generator(this,(function(r){switch(r.label){case 0:return e=!1,"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e=!0),n=t(e),OfficeCore.BeforeDocumentCloseNotification.newObject(n).disable(),[4,n.sync()];case 1:return r.sent(),[2]}}))}))},e.onCloseActionCancelled=function(e){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,a=this;return __generator(this,(function(s){switch(s.label){case 0:return n=!1,"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(n=!0),r=t(n),i=OfficeCore.BeforeDocumentCloseNotification.newObject(r),o=i.onBeforeCloseNotificationCancelled.add((function(t){return e&&e(),null})),[4,r.sync()];case 1:return s.sent(),[2,function(){return __awaiter(a,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return o.remove(),[4,r.sync()];case 1:return e.sent(),[2]}}))}))}]}}))}))}}(e.beforeDocumentCloseNotification||(e.beforeDocumentCloseNotification={}))}(e.addin||(e.addin={}))}(Office||(Office={})),function(e){var t;!function(e){e.taskpane="Taskpane"}(t||(t={})),function(e){e.launchTaskpane=function(e){return __awaiter(this,void 0,void 0,(function(){var n,r,i;return __generator(this,(function(o){switch(o.label){case 0:return n=new OfficeCore.RequestContext,r=OfficeCore.ExtensionLifeCycle.newObject(n),null!=(i=e.settings)&&(e.settings=OSF.OUtil.serializeSettings(i)),r.launchExtensionComponent("",t.taskpane,e),[4,n.sync()];case 1:return o.sent(),[2]}}))}))}}(e.extensionLifeCycle||(e.extensionLifeCycle={}))}(Office||(Office={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.requestUpdate=function(e){var n=t(),r=n.ribbon;function i(e){void 0!==e.controls&&void 0!==e.controls.length&&e.controls.length&&e.controls.filter((function(e){return!!e.id})).forEach((function(e){var t=r.getButton(e.id);void 0!==e.enabled&&null!==e.enabled&&(t.enabled=e.enabled)}))}return e.tabs.filter((function(e){return!!e.id})).forEach((function(e){var t=r.getTab(e.id);void 0!==e.visible&&null!==e.visible&&t.setVisibility(e.visible),e.groups&&e.groups.length?e.groups.filter((function(e){return!!e.id})).forEach((function(e){i(e)})):i(e)})),n.sync()},e.requestCreateControls=function(e){var n,r=t();return r.ribbon.executeRequestCreate(JSON.stringify(e)),(n=250,new Promise((function(e,t){return setTimeout((function(){return e()}),n)}))).then((function(){return r.sync()}))}}(e.ribbon||(e.ribbon={}))}(Office||(Office={})),function(e){var t;OfficeExtension.BatchApiHelper.createPropertyObject,OfficeExtension.BatchApiHelper.createMethodObject,OfficeExtension.BatchApiHelper.createIndexerObject,OfficeExtension.BatchApiHelper.createRootServiceObject,OfficeExtension.BatchApiHelper.createTopLevelServiceObject,OfficeExtension.BatchApiHelper.createChildItemObject,OfficeExtension.BatchApiHelper.invokeMethod,OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,OfficeExtension.BatchApiHelper.invokeSetProperty,OfficeExtension.Utility.isNullOrUndefined,OfficeExtension.Utility.isUndefined,OfficeExtension.Utility.throwIfNotLoaded,OfficeExtension.Utility.throwIfApiNotSupported,OfficeExtension.Utility.load,OfficeExtension.Utility.retrieve,OfficeExtension.Utility.toJson,OfficeExtension.Utility.fixObjectPathIfNecessary,OfficeExtension.Utility._handleNavigationPropertyResults,OfficeExtension.Utility.adjustToDateTime,OfficeExtension.Utility.processRetrieveResult,OfficeExtension.Utility.setMockData,OfficeExtension.CommonUtility.calculateApiFlags;!function(e){e.generalException="GeneralException"}(t||(t={}));new OfficeExtension.LibraryBuilder({metadata:{version:"1.0.0",name:"OfficeCore",defaultApiSetName:"OfficeSharedApi",hostName:"Office",apiSets:[],strings:["AddinInternalService"],enumTypes:[],clientObjectTypes:[[1,0,0,0,[["notifyActionHandlerReady",0,2,0,4]],0,0,0,0,"Microsoft.InternalService.AddinInternalService",4]]},targetNamespaceObject:e})}(OfficeCore||(OfficeCore={})),function(e){var t;!function(t){var n,r,i=OfficeExtension.Utility.isNullOrUndefined;function o(e){if(e){var t=e.toUpperCase(),r=n.mappings[t];if(!i(r)&&"function"==typeof r)return r}throw OfficeExtension.Utility.createRuntimeError("invalidOperation","sourceData","ActionProxy._getFunction")}function a(e){try{OfficeExtension.Utility.log("ActionProxy._handleMessage"),OfficeExtension.Utility.checkArgumentNull(e,"args");for(var t=e.entries,n=0;n<t.length;n++)if(2===t[n].messageCategory)if("string"==typeof t[n].message&&(t[n].message=JSON.parse(t[n].message)),1e3===t[n].messageType){var r=null,i=o(t[n].message[0]);if(t[n].message.length>=2){var a=t[n].message[1];a&&(r=s(a)?JSON.parse(a):a)}void 0!==OSF&&OSF.AppTelemetry&&OSF.AppTelemetry.CallOnAppActivatedIfPending&&OSF.AppTelemetry.CallOnAppActivatedIfPending(),i.apply(null,[r])}else OfficeExtension.Utility.log("ActionProxy._handleMessage unknown message type "+t[n].messageType)}catch(e){throw function(e){var t=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t}(e);OfficeExtension.Utility.log(t)}(e),e}return OfficeExtension.Utility._createPromiseFromResult(null)}function s(e){return"string"==typeof e&&"{"===e[0]}function c(){try{Microsoft.Office.WebExtension.onReadyInternal().then((function(){return function(){if(void 0!==OSF&&OSF.DDA&&OSF.DDA.RichApi&&OSF.DDA.RichApi.richApiMessageManager)return(new OfficeExtension.ClientRequestContext).eventRegistration.register(5,"",a)}()})).then((function(){var e,t,n=OSF._OfficeAppFactory.getHostInfo();return!0===n.isDialog||"web"===n.hostPlatform&&"word"!==n.hostType&&"excel"!==n.hostType?void 0:(e=new OfficeExtension.ClientRequestContext,t=OfficeCore.AddinInternalService.newObject(e),e._customData="WacPartition",t.notifyActionHandlerReady(),e.sync())}))}catch(e){}}OfficeExtension.Utility.log("ActionProxy.initOnce"),void 0!==e.actions&&(r=e.actions._association,n=r),"undefined"!=typeof document&&(document.readyState&&"loading"!==document.readyState?(OfficeExtension.Utility.log("ActionProxy.initOnce: document.readyState is not loading state"),c()):document.addEventListener&&document.addEventListener("DOMContentLoaded",(function(){OfficeExtension.Utility.log("ActionProxy.initOnce: DOMContentLoaded event triggered"),c()}))),OfficeExtension.HostBridge.onInited((function(e){!function(e){e.addHostMessageHandler((function(e){3===e.type&&a(e.message)}))}(e)}))}(t||(t={}))}(Office||(Office={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.areShortcutsInUse=function(e){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,a;return __generator(this,(function(s){switch(s.label){case 0:return n=t(),r=OfficeCore.ActionService.newObject(n),i=r.areShortcutsInUse(e),[4,n.sync()];case 1:for(s.sent(),o=[],a=0;a<e.length;a++)o.push({shortcut:e[a],inUse:i.value[a]});return[2,o]}}))}))},e.replaceShortcuts=function(e){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){switch(r.label){case 0:return n=t(),OfficeCore.ActionService.newObject(n).replaceShortcuts(e),[4,n.sync()];case 1:return r.sent(),[2]}}))}))},e.getShortcuts=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,r;return __generator(this,(function(i){switch(i.label){case 0:return e=t(),n=OfficeCore.ActionService.newObject(e),r=n.getShortcuts(),[4,e.sync()];case 1:return i.sent(),[2,r.value]}}))}))}}(e.actions||(e.actions={}))}(Office||(Office={})),function(e){var t;(t=e.dialogPage||(e.dialogPage={})).close=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=new OfficeCore.RequestContext,OfficeCore.DialogPage.newObject(e).close(),[4,e.sync()];case 1:return t.sent(),[2]}}))}))},t.readyToShow=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=new OfficeCore.RequestContext,OfficeCore.DialogPage.newObject(e).readyToShow(),[4,e.sync()];case 1:return t.sent(),[2]}}))}))},t.onShow=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r;return __generator(this,(function(i){switch(i.label){case 0:return t=new OfficeCore.RequestContext,(n=OfficeCore.DialogPage.newObject(t)).onOnShowEvent.add(e),r=function(){return n.onOnShowEvent.remove(e),null},[4,t.sync()];case 1:return i.sent(),[2,r]}}))}))},t.sendMessageToHost=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return t=new OfficeCore.RequestContext,OfficeCore.DialogPage.newObject(t).sendMessageToHost(e),[4,t.sync()];case 1:return n.sent(),[2]}}))}))}}(Office||(Office={}));var Word;__extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function exposeOfficeRuntimeThroughOfficeNamespace(e,t){var n,r;void 0===e&&"undefined"!=typeof window&&(e=null===window||void 0===window?void 0:window.OfficeRuntime),void 0===e&&(e={}),void 0!==t&&(t.storage=t.storage||(null==e?void 0:e.storage),t.auth=t.auth||(null==e?void 0:e.auth),t.getAccessToken=t.getAccessToken||(null===(n=null==e?void 0:e.auth)||void 0===n?void 0:n.getAccessToken),t.addin=t.addin||(null==e?void 0:e.addin),t.isSetSupported=t.isSetSupported||(null===(r=null==e?void 0:e.apiInformation)||void 0===r?void 0:r.isSetSupported),t.license=t.license||(null==e?void 0:e.license),t.message=t.message||(null==e?void 0:e.message))}!function(e){function t(t,n){if(OfficeExtension.Utility.isNullOrUndefined(n))return null;if("object"!=typeof n&&OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument,"searchOptions"),n instanceof e.SearchOptions)return n;var r=e.SearchOptions.newObject(t);for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i]);return r}function n(){return!!("undefined"!=typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)&&window.Office.context.requirements.isSetSupported("WordApiSearchFlags","1.1")}function r(t){if(OfficeExtension.Utility.isNullOrUndefined(t))return 0;"object"!=typeof t&&OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument,"searchOptions");var n=0;return t instanceof e.SearchOptions&&(t=t.toJSON()),t.ignorePunct&&(n|=32),t.ignoreSpace&&(n|=64),t.matchCase&&(n|=1),t.matchPrefix&&(n|=8),t.matchSuffix&&(n|=16),t.matchWildcards&&(n|=4),t.matchWholeWord&&(n|=2),n}var i="Word",o="WordApi",a=OfficeExtension.BatchApiHelper.createPropertyObject,s=OfficeExtension.BatchApiHelper.createMethodObject,c=OfficeExtension.BatchApiHelper.createIndexerObject,l=(OfficeExtension.BatchApiHelper.createRootServiceObject,OfficeExtension.BatchApiHelper.createTopLevelServiceObject),u=OfficeExtension.BatchApiHelper.createChildItemObject,f=OfficeExtension.BatchApiHelper.invokeMethod,p=OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,d=OfficeExtension.BatchApiHelper.invokeSetProperty,h=OfficeExtension.Utility.isNullOrUndefined,m=OfficeExtension.Utility.isUndefined,g=OfficeExtension.Utility.throwIfNotLoaded,y=OfficeExtension.Utility.throwIfApiNotSupported,_=OfficeExtension.Utility.load,b=OfficeExtension.Utility.retrieve,O=OfficeExtension.Utility.toJson,v=OfficeExtension.Utility.fixObjectPathIfNecessary,S=OfficeExtension.Utility._handleNavigationPropertyResults,A=OfficeExtension.Utility.adjustToDateTime,D=OfficeExtension.Utility.processRetrieveResult,P=OfficeExtension.Utility.setMockData,C=(OfficeExtension.CommonUtility.calculateApiFlags,"Annotation"),I=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"Annotation"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["content","id","_ReferenceId","_State"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Content","Id","_ReferenceId","_State"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"content",{get:function(){return g("content",this._C,C,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return g("id",this._I,C,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,C,this._isNull),this.__R},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_State",{get:function(){return g("_State",this.__S,C,this._isNull),this.__S},set:function(e){this.__S=e,d(this,"_State",e,0)},enumerable:!0,configurable:!0}),n.prototype.delete=function(){f(this,"Delete",0,[],0,0)},n.prototype.getParentAsAnnotation=function(){return s(e.Annotation,this,"GetParentAsAnnotation",1,[],!1,!1,null,4)},n.prototype.getParentAsParagraph=function(){return s(e.Paragraph,this,"GetParentAsParagraph",1,[],!1,!1,null,4)},n.prototype.getParentType=function(){return f(this,"GetParentType",1,[],4,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Content)||(this._C=n.Content),m(n.Id)||(this._I=n.Id),m(n._ReferenceId)||(this.__R=n._ReferenceId),m(n._State)||(this.__S=n._State)}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e.Id)||(this._I=e.Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{content:this._C,id:this._I},{})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.Annotation=I;var F="AnnotationCollection",R=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"AnnotationCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,F,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,F,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return s(e.Annotation,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return s(e.Annotation,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype.getItem=function(t){return c(e.Annotation,this,[t])},n.prototype.refresh=function(){f(this,"Refresh",1,[],4,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.Annotation,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.Annotation,!0,i,t,n)}))},Object.defineProperty(n.prototype,"onAnnotationAdded",{get:function(){var e=this;return this.m_annotationAdded||(this.m_annotationAdded=new OfficeExtension.GenericEventHandlers(this.context,this,"AnnotationAdded",{eventType:4,registerFunc:function(){return e._RegisterAddedEvent()},unregisterFunc:function(){return e._UnregisterAddedEvent()},getTargetIdFunc:function(){return e._ReferenceId},eventArgsTransformFunc:function(t){var n=E.AnnotationCollection_AnnotationAdded_EventArgsTransform(e,t);return OfficeExtension.Utility._createPromiseFromResult(n)}})),this.m_annotationAdded},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"onAnnotationChanged",{get:function(){var e=this;return this.m_annotationChanged||(this.m_annotationChanged=new OfficeExtension.GenericEventHandlers(this.context,this,"AnnotationChanged",{eventType:5,registerFunc:function(){return e._RegisterChangedEvent()},unregisterFunc:function(){return e._UnregisterChangedEvent()},getTargetIdFunc:function(){return e._ReferenceId},eventArgsTransformFunc:function(t){var n=E.AnnotationCollection_AnnotationChanged_EventArgsTransform(e,t);return OfficeExtension.Utility._createPromiseFromResult(n)}})),this.m_annotationChanged},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"onAnnotationDeleted",{get:function(){var e=this;return this.m_annotationDeleted||(this.m_annotationDeleted=new OfficeExtension.GenericEventHandlers(this.context,this,"AnnotationDeleted",{eventType:6,registerFunc:function(){return e._RegisterDeletedEvent()},unregisterFunc:function(){return e._UnregisterDeletedEvent()},getTargetIdFunc:function(){return e._ReferenceId},eventArgsTransformFunc:function(t){var n=E.AnnotationCollection_AnnotationDeleted_EventArgsTransform(e,t);return OfficeExtension.Utility._createPromiseFromResult(n)}})),this.m_annotationDeleted},enumerable:!0,configurable:!0}),n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.Annotation,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.AnnotationCollection=R;var E,T=function(){function e(){}return e.prototype.getDocument=function(){return h(this._document)&&(this._document=this.context.document),this._document},e.prototype.getReferenceId=function(){return h(this._refId)&&(this._refId=this._ReferenceId),this._refId},e.prototype._RegisterAddedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"AnnotationAdded")},e.prototype._UnregisterAddedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"AnnotationAdded")},e.prototype._RegisterChangedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"AnnotationChanged")},e.prototype._UnregisterChangedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"AnnotationChanged")},e.prototype._RegisterDeletedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"AnnotationDeleted")},e.prototype._UnregisterDeletedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"AnnotationDeleted")},e}();e.AnnotationCollectionCustom=T,OfficeExtension.Utility.applyMixin(R,T),function(t){t.AnnotationCollection_AnnotationAdded_EventArgsTransform=function(t,n){var r={eventType:e.EventType.annotationAdded,annotation:OfficeExtension.BatchApiHelper.createObjectFromReferenceId(e.Annotation,t.context,n)};return r.annotation.load(),r},t.AnnotationCollection_AnnotationChanged_EventArgsTransform=function(t,n){var r={eventType:e.EventType.annotationChanged,annotation:OfficeExtension.BatchApiHelper.createObjectFromReferenceId(e.Annotation,t.context,n)};return r.annotation.load(),r},t.AnnotationCollection_AnnotationDeleted_EventArgsTransform=function(t,n){var r={eventType:e.EventType.annotationDeleted,annotation:OfficeExtension.BatchApiHelper.createObjectFromReferenceId(e.Annotation,t.context,n)};return r.annotation.load(),r}}(E=e._CC||(e._CC={}));var x=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),n.prototype.createDocument=function(t){return s(e.DocumentCreated,this,"CreateDocument",1,[t],!1,!1,null,4)},n.prototype.getEnterpriseUserInfo=function(){return f(this,"GetEnterpriseUserInfo",1,[],5,0)},n.prototype.getMruFriendlyPath=function(e){return f(this,"GetMruFriendlyPath",1,[e],5,0)},n.prototype.getSharePointTenantRoot=function(){return f(this,"GetSharePointTenantRoot",1,[],5,0)},n.prototype.isTapEnabled=function(){return f(this,"IsTapEnabled",1,[],5,0)},n.prototype.launchFileUrlInOfficeApp=function(e,t){return f(this,"LaunchFileUrlInOfficeApp",1,[e,t],5,0)},n.prototype._handleResult=function(e){(t.prototype._handleResult.call(this,e),h(e))||v(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.newObject=function(t){return l(e.Application,t,"Microsoft.WordServices.Application",!1,4)},n.prototype.toJSON=function(){return O(this,{},{})},n}(OfficeExtension.ClientObject);e.Application=x;var N="Body",M=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"Body"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","style","text","type","styleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId","Style","Text","Type","StyleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0,!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["paragraphs","contentControls","parentContentControl","font","inlinePictures","parentBody","lists","tables","parentSection","parentContentControlOrNullObject","parentBodyOrNullObject","parentSectionOrNullObject","footnotes","endnotes","fields"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"contentControls",{get:function(){return this._C||(this._C=a(e.ContentControlCollection,this,"ContentControls",!0,4)),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"endnotes",{get:function(){return y("Body.endnotes","WordApiOnline","1.1",i),this._E||(this._E=a(e.NoteItemCollection,this,"Endnotes",!0,4)),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fields",{get:function(){return y("Body.fields",o,"1.4",i),this._F||(this._F=a(e.FieldCollection,this,"Fields",!0,4)),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"font",{get:function(){return this._Fo||(this._Fo=a(e.Font,this,"Font",!1,4)),this._Fo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"footnotes",{get:function(){return y("Body.footnotes","WordApiOnline","1.1",i),this._Foo||(this._Foo=a(e.NoteItemCollection,this,"Footnotes",!0,4)),this._Foo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inlinePictures",{get:function(){return this._I||(this._I=a(e.InlinePictureCollection,this,"InlinePictures",!0,4)),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lists",{get:function(){return y("Body.lists",o,"1.3",i),this._L||(this._L=a(e.ListCollection,this,"Lists",!0,4)),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paragraphs",{get:function(){return this._P||(this._P=a(e.ParagraphCollection,this,"Paragraphs",!0,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentBody",{get:function(){return y("Body.parentBody",o,"1.3",i),this._Pa||(this._Pa=a(e.Body,this,"ParentBody",!1,4)),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentBodyOrNullObject",{get:function(){return y("Body.parentBodyOrNullObject",o,"1.3",i),this._Par||(this._Par=a(e.Body,this,"ParentBodyOrNullObject",!1,4)),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControl",{get:function(){return this._Pare||(this._Pare=a(e.ContentControl,this,"ParentContentControl",!1,4)),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControlOrNullObject",{get:function(){return y("Body.parentContentControlOrNullObject",o,"1.3",i),this._Paren||(this._Paren=a(e.ContentControl,this,"ParentContentControlOrNullObject",!1,4)),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentSection",{get:function(){return y("Body.parentSection",o,"1.3",i),this._Parent||(this._Parent=a(e.Section,this,"ParentSection",!1,4)),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentSectionOrNullObject",{get:function(){return y("Body.parentSectionOrNullObject",o,"1.3",i),this._ParentS||(this._ParentS=a(e.Section,this,"ParentSectionOrNullObject",!1,4)),this._ParentS},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tables",{get:function(){return y("Body.tables",o,"1.3",i),this._T||(this._T=a(e.TableCollection,this,"Tables",!0,4)),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"style",{get:function(){return g("style",this._S,N,this._isNull),this._S},set:function(e){this._S=e,d(this,"Style",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"styleBuiltIn",{get:function(){return g("styleBuiltIn",this._St,N,this._isNull),y("Body.styleBuiltIn",o,"1.3",i),this._St},set:function(e){this._St=e,d(this,"StyleBuiltIn",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return g("text",this._Te,N,this._isNull),this._Te},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return g("type",this._Ty,N,this._isNull),y("Body.type",o,"1.3",i),this._Ty},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,N,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["style","styleBuiltIn"],["font"],["contentControls","endnotes","fields","footnotes","inlinePictures","lists","paragraphs","parentBody","parentBodyOrNullObject","parentContentControl","parentContentControlOrNullObject","parentSection","parentSectionOrNullObject","tables"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.clear=function(){f(this,"Clear",0,[],0,0)},n.prototype.getComments=function(){return y("Body.getComments",o,"1.4",i),s(e.CommentCollection,this,"GetComments",1,[],!0,!1,null,4)},n.prototype.getHtml=function(){return f(this,"GetHtml",1,[],4,0)},n.prototype.getOoxml=function(){return f(this,"GetOoxml",1,[],4,0)},n.prototype.getRange=function(t){return y("Body.getRange",o,"1.3",i),s(e.Range,this,"GetRange",1,[t],!1,!1,null,4)},n.prototype.getReviewedText=function(e){return y("Body.getReviewedText",o,"1.4",i),f(this,"GetReviewedText",1,[e],4,0)},n.prototype.insertBreak=function(e,t){f(this,"InsertBreak",0,[e,t],0,0)},n.prototype.insertContentControl=function(t){return s(e.ContentControl,this,"InsertContentControl",0,[t],!1,!0,null,0)},n.prototype.insertFileFromBase64=function(t,n){return s(e.Range,this,"InsertFileFromBase64",0,[t,n],!1,!0,null,0)},n.prototype.insertHtml=function(t,n){return s(e.Range,this,"InsertHtml",0,[t,n],!1,!0,null,0)},n.prototype.insertInlinePictureFromBase64=function(t,n){return y("Body.insertInlinePictureFromBase64",o,"1.2",i),s(e.InlinePicture,this,"InsertInlinePictureFromBase64",0,[t,n],!1,!0,null,0)},n.prototype.insertOoxml=function(t,n){return s(e.Range,this,"InsertOoxml",0,[t,n],!1,!0,null,0)},n.prototype.insertParagraph=function(t,n){return s(e.Paragraph,this,"InsertParagraph",0,[t,n],!1,!0,null,0)},n.prototype.insertTable=function(t,n,r,a){return y("Body.insertTable",o,"1.3",i),s(e.Table,this,"InsertTable",0,[t,n,r,a],!1,!0,null,0)},n.prototype.insertText=function(t,n){return s(e.Range,this,"InsertText",0,[t,n],!1,!0,null,0)},n.prototype.search=function(t,n){var r=E.Body_Search(this,t,n),i=r.handled,o=r.result;return i?o:s(e.RangeCollection,this,"Search",1,[t,n],!0,!1,null,4)},n.prototype.select=function(e){f(this,"Select",1,[e],4,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._Search2=function(t,n){return s(e.RangeCollection,this,"_Search2",1,[t,n],!0,!1,null,4)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Style)||(this._S=n.Style),m(n.StyleBuiltIn)||(this._St=n.StyleBuiltIn),m(n.Text)||(this._Te=n.Text),m(n.Type)||(this._Ty=n.Type),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["contentControls","ContentControls","endnotes","Endnotes","fields","Fields","font","Font","footnotes","Footnotes","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentBodyOrNullObject","ParentBodyOrNullObject","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentSection","ParentSection","parentSectionOrNullObject","ParentSectionOrNullObject","tables","Tables"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{style:this._S,styleBuiltIn:this._St,text:this._Te,type:this._Ty},{contentControls:this._C,fields:this._F,font:this._Fo,inlinePictures:this._I,lists:this._L,paragraphs:this._P,tables:this._T})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.Body=M;var j=function(){function e(){}return e.prototype.getDocument=function(){return h(this._document)&&(this._document=this.context.document),this._document},e.prototype.getReferenceId=function(){return h(this._refId)&&(this._refId=this._ReferenceId),this._refId},e.prototype._RegisterCommentAddedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentAdded")},e.prototype._UnregisterCommentAddedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentAdded")},e.prototype._RegisterCommentDeletedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentDeleted")},e.prototype._UnregisterCommentDeletedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentDeleted")},e.prototype._RegisterCommentChangedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentChanged")},e.prototype._UnregisterCommentChangedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentChanged")},e.prototype._RegisterCommentSelectedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentSelected")},e.prototype._UnregisterCommentSelectedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentSelected")},e.prototype._RegisterCommentDeselectedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentDeselected")},e.prototype._UnregisterCommentDeselectedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentDeselected")},e}();e.BodyCustom=j,OfficeExtension.Utility.applyMixin(M,j),function(i){i.Body_Search=function(i,o,a){var c;if(n()){var l=r(a);c=i._Search2(o,l)}else a=t(i.context,a),c=s(e.RangeCollection,i,"Search",1,[o,a],!0,!1,null,4);return{handled:!0,result:c}}}(E=e._CC||(e._CC={}));var w="Comment",k=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"Comment"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["authorEmail","authorName","content","creationDate","id","_ReferenceId","resolved"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["AuthorEmail","AuthorName","Content","CreationDate","Id","_ReferenceId","Resolved"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!1,!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["replies","contentRange"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"contentRange",{get:function(){return this._Co||(this._Co=a(e.CommentContentRange,this,"ContentRange",!1,4)),this._Co},set:function(e){this._Co=e,d(this,"ContentRange",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"replies",{get:function(){return this._R||(this._R=a(e.CommentReplyCollection,this,"Replies",!0,4)),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"authorEmail",{get:function(){return g("authorEmail",this._A,w,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"authorName",{get:function(){return g("authorName",this._Au,w,this._isNull),this._Au},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"content",{get:function(){return g("content",this._C,w,this._isNull),this._C},set:function(e){this._C=e,d(this,"Content",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"creationDate",{get:function(){return g("creationDate",this._Cr,w,this._isNull),this._Cr},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return g("id",this._I,w,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"resolved",{get:function(){return g("resolved",this._Re,w,this._isNull),this._Re},set:function(e){this._Re=e,d(this,"Resolved",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,w,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["content","resolved"],["contentRange"],["replies"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.delete=function(){f(this,"Delete",0,[],0,0)},n.prototype.getRange=function(){return s(e.Range,this,"GetRange",0,[],!1,!1,null,0)},n.prototype.reply=function(t){return s(e.CommentReply,this,"Reply",0,[t],!1,!1,null,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.AuthorEmail)||(this._A=n.AuthorEmail),m(n.AuthorName)||(this._Au=n.AuthorName),m(n.Content)||(this._C=n.Content),m(n.CreationDate)||(this._Cr=A(n.CreationDate)),m(n.Id)||(this._I=n.Id),m(n.Resolved)||(this._Re=n.Resolved),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["contentRange","ContentRange","replies","Replies"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e.Id)||(this._I=e.Id))},n.prototype._handleRetrieveResult=function(e,n){if(t.prototype._handleRetrieveResult.call(this,e,n),!h(e)){var r=e;m(r.CreationDate)||(r.creationDate=A(r.creationDate)),D(this,e,n)}},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{authorEmail:this._A,authorName:this._Au,content:this._C,creationDate:this._Cr,id:this._I,resolved:this._Re},{contentRange:this._Co,replies:this._R})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.Comment=k;var L="CommentCollection",U=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"CommentCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,L,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,L,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return s(e.Comment,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return s(e.Comment,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype._GetItem=function(t){return c(e.Comment,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.Comment,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.Comment,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.Comment,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.CommentCollection=U;var H="CommentContentRange",B=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"CommentContentRange"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","text","isEmpty","hyperlink","bold","italic","strikeThrough","underline"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId","Text","IsEmpty","Hyperlink","Bold","Italic","StrikeThrough","Underline"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!1,!0,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bold",{get:function(){return g("bold",this._B,H,this._isNull),this._B},set:function(e){this._B=e,d(this,"Bold",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hyperlink",{get:function(){return g("hyperlink",this._H,H,this._isNull),this._H},set:function(e){this._H=e,d(this,"Hyperlink",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isEmpty",{get:function(){return g("isEmpty",this._I,H,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"italic",{get:function(){return g("italic",this._It,H,this._isNull),this._It},set:function(e){this._It=e,d(this,"Italic",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"strikeThrough",{get:function(){return g("strikeThrough",this._S,H,this._isNull),this._S},set:function(e){this._S=e,d(this,"StrikeThrough",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return g("text",this._T,H,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"underline",{get:function(){return g("underline",this._U,H,this._isNull),this._U},set:function(e){this._U=e,d(this,"Underline",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,H,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["hyperlink","bold","italic","strikeThrough","underline"],[],[])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.insertText=function(t,n){return s(e.CommentContentRange,this,"InsertText",0,[t,n],!1,!1,null,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Bold)||(this._B=n.Bold),m(n.Hyperlink)||(this._H=n.Hyperlink),m(n.IsEmpty)||(this._I=n.IsEmpty),m(n.Italic)||(this._It=n.Italic),m(n.StrikeThrough)||(this._S=n.StrikeThrough),m(n.Text)||(this._T=n.Text),m(n.Underline)||(this._U=n.Underline),m(n._ReferenceId)||(this.__R=n._ReferenceId)}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{bold:this._B,hyperlink:this._H,isEmpty:this._I,italic:this._It,strikeThrough:this._S,text:this._T,underline:this._U},{})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.CommentContentRange=B;var W="CommentReply",G=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"CommentReply"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["authorEmail","authorName","content","creationDate","id","_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["AuthorEmail","AuthorName","Content","CreationDate","Id","_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!1,!1,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["parentComment","contentRange"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"contentRange",{get:function(){return this._Co||(this._Co=a(e.CommentContentRange,this,"ContentRange",!1,4)),this._Co},set:function(e){this._Co=e,d(this,"ContentRange",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentComment",{get:function(){return this._P||(this._P=a(e.Comment,this,"ParentComment",!1,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"authorEmail",{get:function(){return g("authorEmail",this._A,W,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"authorName",{get:function(){return g("authorName",this._Au,W,this._isNull),this._Au},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"content",{get:function(){return g("content",this._C,W,this._isNull),this._C},set:function(e){this._C=e,d(this,"Content",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"creationDate",{get:function(){return g("creationDate",this._Cr,W,this._isNull),this._Cr},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return g("id",this._I,W,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,W,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["content"],["parentComment","contentRange"],[])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.delete=function(){f(this,"Delete",0,[],0,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.AuthorEmail)||(this._A=n.AuthorEmail),m(n.AuthorName)||(this._Au=n.AuthorName),m(n.Content)||(this._C=n.Content),m(n.CreationDate)||(this._Cr=A(n.CreationDate)),m(n.Id)||(this._I=n.Id),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["contentRange","ContentRange","parentComment","ParentComment"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e.Id)||(this._I=e.Id))},n.prototype._handleRetrieveResult=function(e,n){if(t.prototype._handleRetrieveResult.call(this,e,n),!h(e)){var r=e;m(r.CreationDate)||(r.creationDate=A(r.creationDate)),D(this,e,n)}},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{authorEmail:this._A,authorName:this._Au,content:this._C,creationDate:this._Cr,id:this._I},{contentRange:this._Co,parentComment:this._P})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.CommentReply=G;var q="CommentReplyCollection",V=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"CommentReplyCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,q,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,q,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return s(e.CommentReply,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return s(e.CommentReply,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype._GetItem=function(t){return c(e.CommentReply,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.CommentReply,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.CommentReply,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.CommentReply,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.CommentReplyCollection=V;var z="ContentControl",J=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"ContentControl"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["id","_ReferenceId","title","tag","placeholderText","type","appearance","color","removeWhenEdited","cannotDelete","cannotEdit","style","text","subtype","styleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Id","_ReferenceId","Title","Tag","PlaceholderText","Type","Appearance","Color","RemoveWhenEdited","CannotDelete","CannotEdit","Style","Text","Subtype","StyleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["font","paragraphs","contentControls","parentContentControl","inlinePictures","lists","tables","parentTableCell","parentTable","parentBody","parentContentControlOrNullObject","parentTableCellOrNullObject","parentTableOrNullObject","footnotes","endnotes","fields"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"contentControls",{get:function(){return this._Con||(this._Con=a(e.ContentControlCollection,this,"ContentControls",!0,4)),this._Con},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"endnotes",{get:function(){return y("ContentControl.endnotes","WordApiOnline","1.1",i),this._E||(this._E=a(e.NoteItemCollection,this,"Endnotes",!0,4)),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fields",{get:function(){return y("ContentControl.fields",o,"1.4",i),this._F||(this._F=a(e.FieldCollection,this,"Fields",!0,4)),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"font",{get:function(){return this._Fo||(this._Fo=a(e.Font,this,"Font",!1,4)),this._Fo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"footnotes",{get:function(){return y("ContentControl.footnotes","WordApiOnline","1.1",i),this._Foo||(this._Foo=a(e.NoteItemCollection,this,"Footnotes",!0,4)),this._Foo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inlinePictures",{get:function(){return this._In||(this._In=a(e.InlinePictureCollection,this,"InlinePictures",!0,4)),this._In},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lists",{get:function(){return y("ContentControl.lists",o,"1.3",i),this._L||(this._L=a(e.ListCollection,this,"Lists",!0,4)),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paragraphs",{get:function(){return this._P||(this._P=a(e.ParagraphCollection,this,"Paragraphs",!0,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentBody",{get:function(){return y("ContentControl.parentBody",o,"1.3",i),this._Pa||(this._Pa=a(e.Body,this,"ParentBody",!1,4)),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControl",{get:function(){return this._Par||(this._Par=a(e.ContentControl,this,"ParentContentControl",!1,4)),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControlOrNullObject",{get:function(){return y("ContentControl.parentContentControlOrNullObject",o,"1.3",i),this._Pare||(this._Pare=a(e.ContentControl,this,"ParentContentControlOrNullObject",!1,4)),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTable",{get:function(){return y("ContentControl.parentTable",o,"1.3",i),this._Paren||(this._Paren=a(e.Table,this,"ParentTable",!1,4)),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCell",{get:function(){return y("ContentControl.parentTableCell",o,"1.3",i),this._Parent||(this._Parent=a(e.TableCell,this,"ParentTableCell",!1,4)),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCellOrNullObject",{get:function(){return y("ContentControl.parentTableCellOrNullObject",o,"1.3",i),this._ParentT||(this._ParentT=a(e.TableCell,this,"ParentTableCellOrNullObject",!1,4)),this._ParentT},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableOrNullObject",{get:function(){return y("ContentControl.parentTableOrNullObject",o,"1.3",i),this._ParentTa||(this._ParentTa=a(e.Table,this,"ParentTableOrNullObject",!1,4)),this._ParentTa},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tables",{get:function(){return y("ContentControl.tables",o,"1.3",i),this._T||(this._T=a(e.TableCollection,this,"Tables",!0,4)),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"appearance",{get:function(){return g("appearance",this._A,z,this._isNull),this._A},set:function(e){this._A=e,d(this,"Appearance",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cannotDelete",{get:function(){return g("cannotDelete",this._C,z,this._isNull),this._C},set:function(e){this._C=e,d(this,"CannotDelete",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cannotEdit",{get:function(){return g("cannotEdit",this._Ca,z,this._isNull),this._Ca},set:function(e){this._Ca=e,d(this,"CannotEdit",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"color",{get:function(){return g("color",this._Co,z,this._isNull),this._Co},set:function(e){this._Co=e,d(this,"Color",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return g("id",this._I,z,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"placeholderText",{get:function(){return g("placeholderText",this._Pl,z,this._isNull),this._Pl},set:function(e){this._Pl=e,d(this,"PlaceholderText",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"removeWhenEdited",{get:function(){return g("removeWhenEdited",this._R,z,this._isNull),this._R},set:function(e){this._R=e,d(this,"RemoveWhenEdited",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"style",{get:function(){return g("style",this._S,z,this._isNull),this._S},set:function(e){this._S=e,d(this,"Style",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"styleBuiltIn",{get:function(){return g("styleBuiltIn",this._St,z,this._isNull),y("ContentControl.styleBuiltIn",o,"1.3",i),this._St},set:function(e){this._St=e,d(this,"StyleBuiltIn",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"subtype",{get:function(){return g("subtype",this._Su,z,this._isNull),y("ContentControl.subtype",o,"1.3",i),this._Su},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tag",{get:function(){return g("tag",this._Ta,z,this._isNull),this._Ta},set:function(e){this._Ta=e,d(this,"Tag",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return g("text",this._Te,z,this._isNull),this._Te},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return g("title",this._Ti,z,this._isNull),this._Ti},set:function(e){this._Ti=e,d(this,"Title",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return g("type",this._Ty,z,this._isNull),this._Ty},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,z,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["title","tag","placeholderText","appearance","color","removeWhenEdited","cannotDelete","cannotEdit","style","styleBuiltIn"],["font"],["contentControls","endnotes","fields","footnotes","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.clear=function(){f(this,"Clear",0,[],0,0)},n.prototype.delete=function(e){f(this,"Delete",0,[e],0,0)},n.prototype.getComments=function(){return y("ContentControl.getComments",o,"1.4",i),s(e.CommentCollection,this,"GetComments",1,[],!0,!1,null,4)},n.prototype.getHtml=function(){return f(this,"GetHtml",1,[],4,0)},n.prototype.getOoxml=function(){return f(this,"GetOoxml",1,[],4,0)},n.prototype.getRange=function(t){return y("ContentControl.getRange",o,"1.3",i),s(e.Range,this,"GetRange",1,[t],!1,!1,null,4)},n.prototype.getReviewedText=function(e){return y("ContentControl.getReviewedText",o,"1.4",i),f(this,"GetReviewedText",1,[e],4,0)},n.prototype.getTextRanges=function(t,n){return y("ContentControl.getTextRanges",o,"1.3",i),s(e.RangeCollection,this,"GetTextRanges",1,[t,n],!0,!1,null,4)},n.prototype.insertBreak=function(e,t){f(this,"InsertBreak",0,[e,t],0,0)},n.prototype.insertFileFromBase64=function(t,n){return s(e.Range,this,"InsertFileFromBase64",0,[t,n],!1,!0,null,0)},n.prototype.insertHtml=function(t,n){return s(e.Range,this,"InsertHtml",0,[t,n],!1,!0,null,0)},n.prototype.insertInlinePictureFromBase64=function(t,n){return y("ContentControl.insertInlinePictureFromBase64",o,"1.2",i),s(e.InlinePicture,this,"InsertInlinePictureFromBase64",0,[t,n],!1,!0,null,0)},n.prototype.insertOoxml=function(t,n){return s(e.Range,this,"InsertOoxml",0,[t,n],!1,!0,null,0)},n.prototype.insertParagraph=function(t,n){return s(e.Paragraph,this,"InsertParagraph",0,[t,n],!1,!0,null,0)},n.prototype.insertTable=function(t,n,r,a){return y("ContentControl.insertTable",o,"1.3",i),s(e.Table,this,"InsertTable",0,[t,n,r,a],!1,!0,null,0)},n.prototype.insertText=function(t,n){return s(e.Range,this,"InsertText",0,[t,n],!1,!0,null,0)},n.prototype.search=function(t,n){var r=E.ContentControl_Search(this,t,n),i=r.handled,o=r.result;return i?o:s(e.RangeCollection,this,"Search",1,[t,n],!0,!1,null,4)},n.prototype.select=function(e){f(this,"Select",1,[e],4,0)},n.prototype.split=function(t,n,r,a){return y("ContentControl.split",o,"1.3",i),s(e.RangeCollection,this,"Split",1,[t,n,r,a],!0,!1,null,4)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._Search2=function(t,n){return s(e.RangeCollection,this,"_Search2",1,[t,n],!0,!1,null,4)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Appearance)||(this._A=n.Appearance),m(n.CannotDelete)||(this._C=n.CannotDelete),m(n.CannotEdit)||(this._Ca=n.CannotEdit),m(n.Color)||(this._Co=n.Color),m(n.Id)||(this._I=n.Id),m(n.PlaceholderText)||(this._Pl=n.PlaceholderText),m(n.RemoveWhenEdited)||(this._R=n.RemoveWhenEdited),m(n.Style)||(this._S=n.Style),m(n.StyleBuiltIn)||(this._St=n.StyleBuiltIn),m(n.Subtype)||(this._Su=n.Subtype),m(n.Tag)||(this._Ta=n.Tag),m(n.Text)||(this._Te=n.Text),m(n.Title)||(this._Ti=n.Title),m(n.Type)||(this._Ty=n.Type),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["contentControls","ContentControls","endnotes","Endnotes","fields","Fields","font","Font","footnotes","Footnotes","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject","tables","Tables"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e.Id)||(this._I=e.Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{appearance:this._A,cannotDelete:this._C,cannotEdit:this._Ca,color:this._Co,id:this._I,placeholderText:this._Pl,removeWhenEdited:this._R,style:this._S,styleBuiltIn:this._St,subtype:this._Su,tag:this._Ta,text:this._Te,title:this._Ti,type:this._Ty},{contentControls:this._Con,fields:this._F,font:this._Fo,inlinePictures:this._In,lists:this._L,paragraphs:this._P,tables:this._T})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.ContentControl=J;var K=function(){function e(){}return e.prototype.getDocument=function(){return h(this._document)&&(this._document=this.context.document),this._document},e.prototype.getReferenceId=function(){return h(this._refId)&&(this._refId=this._ReferenceId),this._refId},e.prototype._RegisterDataChangedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"ContentControlDataChanged")},e.prototype._UnregisterDataChangedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"ContentControlDataChanged")},e.prototype._RegisterDeletedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"ContentControlDeleted")},e.prototype._UnregisterDeletedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"ContentControlDeleted")},e.prototype._RegisterSelectionChangedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"ContentControlSelectionChanged")},e.prototype._UnregisterSelectionChangedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"ContentControlSelectionChanged")},e.prototype._RegisterCommentAddedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentAdded")},e.prototype._UnregisterCommentAddedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentAdded")},e.prototype._RegisterCommentChangedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentChanged")},e.prototype._UnregisterCommentChangedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentChanged")},e.prototype._RegisterCommentSelectedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentSelected")},e.prototype._UnregisterCommentSelectedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentSelected")},e.prototype._RegisterCommentDeselectedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentDeselected")},e.prototype._UnregisterCommentDeselectedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentDeselected")},e.prototype._RegisterEnteredEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"ContentControlEntered")},e.prototype._UnregisterEnteredEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"ContentControlEntered")},e.prototype._RegisterExitedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"ContentControlExited")},e.prototype._UnregisterExitedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"ContentControlExited")},e}();e.ContentControlCustom=K,OfficeExtension.Utility.applyMixin(J,K),function(i){i.ContentControl_Search=function(i,o,a){var c;if(n()){var l=r(a);c=i._Search2(o,l)}else a=t(i.context,a),c=s(e.RangeCollection,i,"Search",1,[o,a],!0,!1,null,4);return{handled:!0,result:c}}}(E=e._CC||(e._CC={}));var X="ContentControlCollection",Q=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"ContentControlCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,X,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,X,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getById=function(t){return s(e.ContentControl,this,"GetById",1,[t],!1,!1,null,4)},n.prototype.getByIdOrNullObject=function(t){return y("ContentControlCollection.getByIdOrNullObject",o,"1.3",i),s(e.ContentControl,this,"GetByIdOrNullObject",1,[t],!1,!1,null,4)},n.prototype.getByTag=function(t){return s(e.ContentControlCollection,this,"GetByTag",1,[t],!0,!1,null,4)},n.prototype.getByTitle=function(t){return s(e.ContentControlCollection,this,"GetByTitle",1,[t],!0,!1,null,4)},n.prototype.getByTypes=function(t){return y("ContentControlCollection.getByTypes",o,"1.3",i),s(e.ContentControlCollection,this,"GetByTypes",1,[t],!0,!1,null,4)},n.prototype.getFirst=function(){return y("ContentControlCollection.getFirst",o,"1.3",i),s(e.ContentControl,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return y("ContentControlCollection.getFirstOrNullObject",o,"1.3",i),s(e.ContentControl,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype.getItem=function(t){return c(e.ContentControl,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.ContentControl,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.ContentControl,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.ContentControl,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.ContentControlCollection=Q;var $="CustomProperty",Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"CustomProperty"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","key","value","type","_Id"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId","Key","Value","Type","_Id"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!1,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"key",{get:function(){return g("key",this._K,$,this._isNull),this._K},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return g("type",this.m_type,$,this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return g("value",this.m_value,$,this._isNull),this.m_value},set:function(e){this.m_value=e,d(this,"Value",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_Id",{get:function(){return g("_Id",this.__I,$,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,$,this._isNull),this.__R},enumerable:!0,configurable:!0}),t.prototype.set=function(e,t){this._recursivelySet(e,t,["value"],[],[])},t.prototype.update=function(e){this._recursivelyUpdate(e)},t.prototype.delete=function(){f(this,"Delete",0,[],0,0)},t.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!h(t)){var n=t;v(this,n),E.CustomProperty_HandleResult(this,n),m(n.Key)||(this._K=n.Key),m(n.Type)||(this.m_type=n.Type),m(n.Value)||(this.m_value=n.Value),m(n._Id)||(this.__I=n._Id),m(n._ReferenceId)||(this.__R=n._ReferenceId)}},t.prototype.load=function(e){return _(this,e)},t.prototype.retrieve=function(e){return b(this,e)},t.prototype._handleIdResult=function(t){e.prototype._handleIdResult.call(this,t),h(t)||(m(t._ReferenceId)||(this.__R=t._ReferenceId),m(t._Id)||(this.__I=t._Id))},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),D(this,t,n)},t.prototype.track=function(){return this.context.trackedObjects.add(this),this},t.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},t.prototype.toJSON=function(){return O(this,{key:this._K,type:this.m_type,value:this.m_value},{})},t.prototype.setMockData=function(e){P(this,e)},t.prototype.ensureUnchanged=function(e){p(this,e)},t}(OfficeExtension.ClientObject);e.CustomProperty=Y,function(e){e.CustomProperty_HandleResult=function(e,t){m(t.Value)||m(t.Type)||"Date"!=t.Type||(t.Value=new Date(t.Value))}}(E=e._CC||(e._CC={}));var Z="CustomPropertyCollection",ee=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"CustomPropertyCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,Z,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,Z,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.add=function(t,n){return s(e.CustomProperty,this,"Add",0,[t,n],!1,!0,null,0)},n.prototype.deleteAll=function(){f(this,"DeleteAll",0,[],0,0)},n.prototype.getCount=function(){return f(this,"GetCount",1,[],4,0)},n.prototype.getItem=function(t){return c(e.CustomProperty,this,[t])},n.prototype.getItemOrNullObject=function(t){return s(e.CustomProperty,this,"GetItemOrNullObject",1,[t],!1,!1,null,4)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.CustomProperty,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.CustomProperty,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.CustomProperty,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.CustomPropertyCollection=ee;var te="CustomXmlPart",ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"CustomXmlPart"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","id","namespaceUri"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId","Id","NamespaceUri"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return g("id",this._I,te,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"namespaceUri",{get:function(){return g("namespaceUri",this._N,te,this._isNull),this._N},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,te,this._isNull),this.__R},enumerable:!0,configurable:!0}),t.prototype.delete=function(){f(this,"Delete",0,[],0,0)},t.prototype.deleteAttribute=function(e,t,n){f(this,"DeleteAttribute",0,[e,t,n],0,0)},t.prototype.deleteElement=function(e,t){f(this,"DeleteElement",0,[e,t],0,0)},t.prototype.getXml=function(){return f(this,"GetXml",1,[],4,0)},t.prototype.insertAttribute=function(e,t,n,r){f(this,"InsertAttribute",0,[e,t,n,r],0,0)},t.prototype.insertElement=function(e,t,n,r){f(this,"InsertElement",0,[e,t,n,r],0,0)},t.prototype.query=function(e,t){return f(this,"Query",0,[e,t],0,0)},t.prototype.setXml=function(e){f(this,"SetXml",0,[e],0,0)},t.prototype.updateAttribute=function(e,t,n,r){f(this,"UpdateAttribute",0,[e,t,n,r],0,0)},t.prototype.updateElement=function(e,t,n){f(this,"UpdateElement",0,[e,t,n],0,0)},t.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!h(t)){var n=t;v(this,n),m(n.Id)||(this._I=n.Id),m(n.NamespaceUri)||(this._N=n.NamespaceUri),m(n._ReferenceId)||(this.__R=n._ReferenceId)}},t.prototype.load=function(e){return _(this,e)},t.prototype.retrieve=function(e){return b(this,e)},t.prototype._handleIdResult=function(t){e.prototype._handleIdResult.call(this,t),h(t)||(m(t._ReferenceId)||(this.__R=t._ReferenceId),m(t.Id)||(this._I=t.Id))},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),D(this,t,n)},t.prototype.track=function(){return this.context.trackedObjects.add(this),this},t.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},t.prototype.toJSON=function(){return O(this,{id:this._I,namespaceUri:this._N},{})},t.prototype.setMockData=function(e){P(this,e)},t.prototype.ensureUnchanged=function(e){p(this,e)},t}(OfficeExtension.ClientObject);e.CustomXmlPart=ne;var re="CustomXmlPartCollection",ie=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"CustomXmlPartCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,re,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,re,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.add=function(t){return s(e.CustomXmlPart,this,"Add",0,[t],!1,!0,null,0)},n.prototype.getByNamespace=function(t){return s(e.CustomXmlPartScopedCollection,this,"GetByNamespace",1,[t],!0,!1,null,4)},n.prototype.getCount=function(){return f(this,"GetCount",1,[],4,0)},n.prototype.getItem=function(t){return c(e.CustomXmlPart,this,[t])},n.prototype.getItemOrNullObject=function(t){return s(e.CustomXmlPart,this,"GetItemOrNullObject",1,[t],!1,!1,null,4)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.CustomXmlPart,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.CustomXmlPart,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.CustomXmlPart,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.CustomXmlPartCollection=ie;var oe="CustomXmlPartScopedCollection",ae=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"CustomXmlPartScopedCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,oe,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,oe,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getCount=function(){return f(this,"GetCount",1,[],4,0)},n.prototype.getItem=function(t){return c(e.CustomXmlPart,this,[t])},n.prototype.getItemOrNullObject=function(t){return s(e.CustomXmlPart,this,"GetItemOrNullObject",1,[t],!1,!1,null,4)},n.prototype.getOnlyItem=function(){return s(e.CustomXmlPart,this,"GetOnlyItem",1,[],!1,!1,null,4)},n.prototype.getOnlyItemOrNullObject=function(){return s(e.CustomXmlPart,this,"GetOnlyItemOrNullObject",1,[],!1,!1,null,4)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.CustomXmlPart,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.CustomXmlPart,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.CustomXmlPart,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.CustomXmlPartScopedCollection=ae;var se="Document",ce=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"Document"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["saved","_ReferenceId","allowCloseOnUntitled","changeTrackingMode"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Saved","_ReferenceId","AllowCloseOnUntitled","ChangeTrackingMode"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["sections","body","contentControls","properties","settings","customXmlParts"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._B||(this._B=a(e.Body,this,"Body",!1,4)),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"contentControls",{get:function(){return this._Co||(this._Co=a(e.ContentControlCollection,this,"ContentControls",!0,4)),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"customXmlParts",{get:function(){return y("Document.customXmlParts",o,"1.4",i),this._Cu||(this._Cu=a(e.CustomXmlPartCollection,this,"CustomXmlParts",!0,4)),this._Cu},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"properties",{get:function(){return y("Document.properties",o,"1.3",i),this._P||(this._P=a(e.DocumentProperties,this,"Properties",!1,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sections",{get:function(){return this._Se||(this._Se=a(e.SectionCollection,this,"Sections",!0,4)),this._Se},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"settings",{get:function(){return y("Document.settings",o,"1.4",i),this._Set||(this._Set=a(e.SettingCollection,this,"Settings",!0,4)),this._Set},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"allowCloseOnUntitled",{get:function(){return g("allowCloseOnUntitled",this._A,se,this._isNull),this._A},set:function(e){this._A=e,d(this,"AllowCloseOnUntitled",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"changeTrackingMode",{get:function(){return g("changeTrackingMode",this._C,se,this._isNull),y("Document.changeTrackingMode",o,"1.4",i),this._C},set:function(e){this._C=e,d(this,"ChangeTrackingMode",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"saved",{get:function(){return g("saved",this._S,se,this._isNull),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.m__ReferenceId,se,this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["allowCloseOnUntitled","changeTrackingMode"],["body","properties"],["contentControls","customXmlParts","sections","settings"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.deleteBookmark=function(e){y("Document.deleteBookmark",o,"1.4",i),f(this,"DeleteBookmark",0,[e],0,0)},n.prototype.getAnnotationsByType=function(t){return y("Document.getAnnotationsByType","WordApiOnline","1.1",i),s(e.AnnotationCollection,this,"GetAnnotationsByType",1,[t],!0,!1,null,4)},n.prototype.getBookmarkRange=function(t){return y("Document.getBookmarkRange",o,"1.4",i),s(e.Range,this,"GetBookmarkRange",1,[t],!1,!1,null,4)},n.prototype.getBookmarkRangeOrNullObject=function(t){return y("Document.getBookmarkRangeOrNullObject",o,"1.4",i),s(e.Range,this,"GetBookmarkRangeOrNullObject",1,[t],!1,!1,null,4)},n.prototype.getEndnoteBody=function(){return y("Document.getEndnoteBody","WordApiOnline","1.1",i),s(e.Body,this,"GetEndnoteBody",1,[],!1,!1,null,4)},n.prototype.getFootnoteBody=function(){return y("Document.getFootnoteBody","WordApiOnline","1.1",i),s(e.Body,this,"GetFootnoteBody",1,[],!1,!1,null,4)},n.prototype.getMetadata=function(e){return f(this,"GetMetadata",1,[e],4,0)},n.prototype.getNeighborhoodTextAroundSelection=function(e){return f(this,"GetNeighborhoodTextAroundSelection",1,[e],5,0)},n.prototype.getSelection=function(){return s(e.Range,this,"GetSelection",1,[],!1,!0,null,4)},n.prototype.launchTapPane=function(e){f(this,"LaunchTapPane",1,[e],5,0)},n.prototype.save=function(e,t){f(this,"Save",0,[e,t],0,0)},n.prototype.search=function(t,n){var r=E.Document_Search(this,t,n),o=r.handled,a=r.result;return o?a:(y("Document.search","WordApiOnline","1.1",i),s(e.RangeCollection,this,"Search",1,[t,n],!0,!1,null,4))},n.prototype.setMetadata=function(e,t){f(this,"SetMetadata",0,[e,t],0,0)},n.prototype.setMetadataOnTile=function(e,t,n){f(this,"SetMetadataOnTile",0,[e,t,n],0,0)},n.prototype.setNavigationPaneVisibility=function(e){y("Document.setNavigationPaneVisibility","WordApiOnline","1.1",i),f(this,"SetNavigationPaneVisibility",0,[e],1,0)},n.prototype._GetObjectByReferenceId=function(e){return f(this,"_GetObjectByReferenceId",1,[e],4,0)},n.prototype._GetObjectTypeNameByReferenceId=function(e){return f(this,"_GetObjectTypeNameByReferenceId",1,[e],4,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._RegisterEvent=function(e,t){f(this,"_RegisterEvent",1,[e,t],4,0)},n.prototype._RemoveAllReferences=function(){f(this,"_RemoveAllReferences",1,[],4,0)},n.prototype._RemoveReference=function(e){f(this,"_RemoveReference",1,[e],4,0)},n.prototype._Search2=function(t,n){return y("Document._Search2","WordApiOnline","1.1",i),s(e.RangeCollection,this,"_Search2",1,[t,n],!0,!1,null,4)},n.prototype._UnregisterEvent=function(e,t){f(this,"_UnregisterEvent",1,[e,t],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.AllowCloseOnUntitled)||(this._A=n.AllowCloseOnUntitled),m(n.ChangeTrackingMode)||(this._C=n.ChangeTrackingMode),m(n.Saved)||(this._S=n.Saved),m(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),S(this,n,["body","Body","contentControls","ContentControls","customXmlParts","CustomXmlParts","properties","Properties","sections","Sections","settings","Settings"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.m__ReferenceId=e._ReferenceId)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{allowCloseOnUntitled:this._A,changeTrackingMode:this._C,saved:this._S},{body:this._B,contentControls:this._Co,customXmlParts:this._Cu,properties:this._P,sections:this._Se,settings:this._Set})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.Document=ce;var le=function(){function e(){}return e.prototype._RegisterContentControlAddedEvent=function(){this._RegisterEvent(this._ReferenceId,"ContentControlAdded")},e.prototype._UnregisterContentControlAddedEvent=function(){this._UnregisterEvent(this._ReferenceId,"ContentControlAdded")},e}();e.DocumentCustom=le,OfficeExtension.Utility.applyMixin(ce,le),function(i){i.Document_Search=function(i,o,a){var c;if(n())a=t(i.context,a),c=s(e.RangeCollection,i,"Search",1,[o,a],!0,!1,null,4);else{var l=r(a);c=i._Search2(o,l)}return{handled:!0,result:c}}}(E=e._CC||(e._CC={}));var ue="DocumentCreated",fe=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"DocumentCreated"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["saved","_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Saved","_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["sections","body","contentControls","properties","settings","customXmlParts"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return y("DocumentCreated.body","WordApiHiddenDocument","1.3",i),this._B||(this._B=a(e.Body,this,"Body",!1,4)),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"contentControls",{get:function(){return y("DocumentCreated.contentControls","WordApiHiddenDocument","1.3",i),this._C||(this._C=a(e.ContentControlCollection,this,"ContentControls",!0,4)),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"customXmlParts",{get:function(){return y("DocumentCreated.customXmlParts","WordApiHiddenDocument","1.4",i),this._Cu||(this._Cu=a(e.CustomXmlPartCollection,this,"CustomXmlParts",!0,4)),this._Cu},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"properties",{get:function(){return y("DocumentCreated.properties","WordApiHiddenDocument","1.3",i),this._P||(this._P=a(e.DocumentProperties,this,"Properties",!1,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sections",{get:function(){return y("DocumentCreated.sections","WordApiHiddenDocument","1.3",i),this._Se||(this._Se=a(e.SectionCollection,this,"Sections",!0,4)),this._Se},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"settings",{get:function(){return y("DocumentCreated.settings","WordApiHiddenDocument","1.4",i),this._Set||(this._Set=a(e.SettingCollection,this,"Settings",!0,4)),this._Set},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"saved",{get:function(){return g("saved",this._S,ue,this._isNull),y("DocumentCreated.saved","WordApiHiddenDocument","1.3",i),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.m__ReferenceId,ue,this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,[],["body","properties"],["contentControls","customXmlParts","sections","settings"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.deleteBookmark=function(e){y("DocumentCreated.deleteBookmark","WordApiHiddenDocument","1.4",i),f(this,"DeleteBookmark",0,[e],0,0)},n.prototype.getBookmarkRange=function(t){return y("DocumentCreated.getBookmarkRange","WordApiHiddenDocument","1.4",i),s(e.Range,this,"GetBookmarkRange",1,[t],!1,!1,null,4)},n.prototype.getBookmarkRangeOrNullObject=function(t){return y("DocumentCreated.getBookmarkRangeOrNullObject","WordApiHiddenDocument","1.4",i),s(e.Range,this,"GetBookmarkRangeOrNullObject",1,[t],!1,!1,null,4)},n.prototype.open=function(){f(this,"Open",1,[],4,0)},n.prototype.save=function(e,t){y("DocumentCreated.save","WordApiHiddenDocument","1.3",i),f(this,"Save",0,[e,t],0,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Saved)||(this._S=n.Saved),m(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),S(this,n,["body","Body","contentControls","ContentControls","customXmlParts","CustomXmlParts","properties","Properties","sections","Sections","settings","Settings"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.m__ReferenceId=e._ReferenceId)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{saved:this._S},{body:this._B,contentControls:this._C,customXmlParts:this._Cu,properties:this._P,sections:this._Se,settings:this._Set})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.DocumentCreated=fe;var pe="DocumentProperties",de=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"DocumentProperties"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","title","subject","author","keywords","comments","template","lastAuthor","revisionNumber","applicationName","lastPrintDate","creationDate","lastSaveTime","security","category","format","manager","company"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId","Title","Subject","Author","Keywords","Comments","Template","LastAuthor","RevisionNumber","ApplicationName","LastPrintDate","CreationDate","LastSaveTime","Security","Category","Format","Manager","Company"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["customProperties"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"customProperties",{get:function(){return this._Cu||(this._Cu=a(e.CustomPropertyCollection,this,"CustomProperties",!0,4)),this._Cu},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"applicationName",{get:function(){return g("applicationName",this._A,pe,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"author",{get:function(){return g("author",this._Au,pe,this._isNull),this._Au},set:function(e){this._Au=e,d(this,"Author",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"category",{get:function(){return g("category",this._C,pe,this._isNull),this._C},set:function(e){this._C=e,d(this,"Category",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"comments",{get:function(){return g("comments",this._Co,pe,this._isNull),this._Co},set:function(e){this._Co=e,d(this,"Comments",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"company",{get:function(){return g("company",this._Com,pe,this._isNull),this._Com},set:function(e){this._Com=e,d(this,"Company",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"creationDate",{get:function(){return g("creationDate",this._Cr,pe,this._isNull),this._Cr},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"format",{get:function(){return g("format",this._F,pe,this._isNull),this._F},set:function(e){this._F=e,d(this,"Format",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"keywords",{get:function(){return g("keywords",this._K,pe,this._isNull),this._K},set:function(e){this._K=e,d(this,"Keywords",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lastAuthor",{get:function(){return g("lastAuthor",this._L,pe,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lastPrintDate",{get:function(){return g("lastPrintDate",this._La,pe,this._isNull),this._La},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lastSaveTime",{get:function(){return g("lastSaveTime",this._Las,pe,this._isNull),this._Las},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"manager",{get:function(){return g("manager",this._M,pe,this._isNull),this._M},set:function(e){this._M=e,d(this,"Manager",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"revisionNumber",{get:function(){return g("revisionNumber",this._R,pe,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"security",{get:function(){return g("security",this._S,pe,this._isNull),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"subject",{get:function(){return g("subject",this._Su,pe,this._isNull),this._Su},set:function(e){this._Su=e,d(this,"Subject",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"template",{get:function(){return g("template",this._T,pe,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return g("title",this._Ti,pe,this._isNull),this._Ti},set:function(e){this._Ti=e,d(this,"Title",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,pe,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["title","subject","author","keywords","comments","category","format","manager","company"],[],["customProperties"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.ApplicationName)||(this._A=n.ApplicationName),m(n.Author)||(this._Au=n.Author),m(n.Category)||(this._C=n.Category),m(n.Comments)||(this._Co=n.Comments),m(n.Company)||(this._Com=n.Company),m(n.CreationDate)||(this._Cr=A(n.CreationDate)),m(n.Format)||(this._F=n.Format),m(n.Keywords)||(this._K=n.Keywords),m(n.LastAuthor)||(this._L=n.LastAuthor),m(n.LastPrintDate)||(this._La=A(n.LastPrintDate)),m(n.LastSaveTime)||(this._Las=A(n.LastSaveTime)),m(n.Manager)||(this._M=n.Manager),m(n.RevisionNumber)||(this._R=n.RevisionNumber),m(n.Security)||(this._S=n.Security),m(n.Subject)||(this._Su=n.Subject),m(n.Template)||(this._T=n.Template),m(n.Title)||(this._Ti=n.Title),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["customProperties","CustomProperties"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(e,n){if(t.prototype._handleRetrieveResult.call(this,e,n),!h(e)){var r=e;m(r.CreationDate)||(r.creationDate=A(r.creationDate)),m(r.LastPrintDate)||(r.lastPrintDate=A(r.lastPrintDate)),m(r.LastSaveTime)||(r.lastSaveTime=A(r.lastSaveTime)),D(this,e,n)}},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{applicationName:this._A,author:this._Au,category:this._C,comments:this._Co,company:this._Com,creationDate:this._Cr,format:this._F,keywords:this._K,lastAuthor:this._L,lastPrintDate:this._La,lastSaveTime:this._Las,manager:this._M,revisionNumber:this._R,security:this._S,subject:this._Su,template:this._T,title:this._Ti},{customProperties:this._Cu})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.DocumentProperties=de;var he="Field",me=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"Field"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","code"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_Id","_ReferenceId","Code"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["result","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableOrNullObject","parentTableCell","parentTableCellOrNullObject"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentBody",{get:function(){return this._P||(this._P=a(e.Body,this,"ParentBody",!1,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControl",{get:function(){return this._Pa||(this._Pa=a(e.ContentControl,this,"ParentContentControl",!1,4)),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControlOrNullObject",{get:function(){return this._Par||(this._Par=a(e.ContentControl,this,"ParentContentControlOrNullObject",!1,4)),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTable",{get:function(){return this._Pare||(this._Pare=a(e.Table,this,"ParentTable",!1,4)),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCell",{get:function(){return this._Paren||(this._Paren=a(e.TableCell,this,"ParentTableCell",!1,4)),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCellOrNullObject",{get:function(){return this._Parent||(this._Parent=a(e.TableCell,this,"ParentTableCellOrNullObject",!1,4)),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableOrNullObject",{get:function(){return this._ParentT||(this._ParentT=a(e.Table,this,"ParentTableOrNullObject",!1,4)),this._ParentT},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"result",{get:function(){return this._R||(this._R=a(e.Range,this,"Result",!1,4)),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"code",{get:function(){return g("code",this._C,he,this._isNull),this._C},set:function(e){this._C=e,d(this,"Code",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Id",{get:function(){return g("_Id",this.__I,he,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,he,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["code"],["result"],["parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.getNext=function(){return s(e.Field,this,"GetNext",1,[],!1,!1,null,4)},n.prototype.getNextOrNullObject=function(){return s(e.Field,this,"GetNextOrNullObject",1,[],!1,!1,null,4)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Code)||(this._C=n.Code),m(n._Id)||(this.__I=n._Id),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject","result","Result"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e._Id)||(this.__I=e._Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{code:this._C},{result:this._R})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.Field=me;var ge="FieldCollection",ye=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"FieldCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,ge,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,ge,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return s(e.Field,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return s(e.Field,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype._GetItem=function(t){return c(e.Field,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.Field,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.Field,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.Field,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.FieldCollection=ye;var _e="Font",be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"Font"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","name","size","bold","italic","color","underline","subscript","superscript","strikeThrough","doubleStrikeThrough","highlightColor"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId","Name","Size","Bold","Italic","Color","Underline","Subscript","Superscript","StrikeThrough","DoubleStrikeThrough","HighlightColor"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bold",{get:function(){return g("bold",this._B,_e,this._isNull),this._B},set:function(e){this._B=e,d(this,"Bold",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return g("color",this._C,_e,this._isNull),this._C},set:function(e){this._C=e,d(this,"Color",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"doubleStrikeThrough",{get:function(){return g("doubleStrikeThrough",this._D,_e,this._isNull),this._D},set:function(e){this._D=e,d(this,"DoubleStrikeThrough",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"highlightColor",{get:function(){return g("highlightColor",this._H,_e,this._isNull),this._H},set:function(e){this._H=e,d(this,"HighlightColor",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"italic",{get:function(){return g("italic",this._I,_e,this._isNull),this._I},set:function(e){this._I=e,d(this,"Italic",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return g("name",this._N,_e,this._isNull),this._N},set:function(e){this._N=e,d(this,"Name",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return g("size",this._S,_e,this._isNull),this._S},set:function(e){this._S=e,d(this,"Size",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strikeThrough",{get:function(){return g("strikeThrough",this._St,_e,this._isNull),this._St},set:function(e){this._St=e,d(this,"StrikeThrough",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subscript",{get:function(){return g("subscript",this._Su,_e,this._isNull),this._Su},set:function(e){this._Su=e,d(this,"Subscript",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"superscript",{get:function(){return g("superscript",this._Sup,_e,this._isNull),this._Sup},set:function(e){this._Sup=e,d(this,"Superscript",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"underline",{get:function(){return g("underline",this._U,_e,this._isNull),this._U},set:function(e){this._U=e,d(this,"Underline",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,_e,this._isNull),this.__R},enumerable:!0,configurable:!0}),t.prototype.set=function(e,t){this._recursivelySet(e,t,["name","size","bold","italic","color","underline","subscript","superscript","strikeThrough","doubleStrikeThrough","highlightColor"],[],[])},t.prototype.update=function(e){this._recursivelyUpdate(e)},t.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!h(t)){var n=t;v(this,n),m(n.Bold)||(this._B=n.Bold),m(n.Color)||(this._C=n.Color),m(n.DoubleStrikeThrough)||(this._D=n.DoubleStrikeThrough),m(n.HighlightColor)||(this._H=n.HighlightColor),m(n.Italic)||(this._I=n.Italic),m(n.Name)||(this._N=n.Name),m(n.Size)||(this._S=n.Size),m(n.StrikeThrough)||(this._St=n.StrikeThrough),m(n.Subscript)||(this._Su=n.Subscript),m(n.Superscript)||(this._Sup=n.Superscript),m(n.Underline)||(this._U=n.Underline),m(n._ReferenceId)||(this.__R=n._ReferenceId)}},t.prototype.load=function(e){return _(this,e)},t.prototype.retrieve=function(e){return b(this,e)},t.prototype._handleIdResult=function(t){e.prototype._handleIdResult.call(this,t),h(t)||m(t._ReferenceId)||(this.__R=t._ReferenceId)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),D(this,t,n)},t.prototype.track=function(){return this.context.trackedObjects.add(this),this},t.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},t.prototype.toJSON=function(){return O(this,{bold:this._B,color:this._C,doubleStrikeThrough:this._D,highlightColor:this._H,italic:this._I,name:this._N,size:this._S,strikeThrough:this._St,subscript:this._Su,superscript:this._Sup,underline:this._U},{})},t.prototype.setMockData=function(e){P(this,e)},t.prototype.ensureUnchanged=function(e){p(this,e)},t}(OfficeExtension.ClientObject);e.Font=be;var Oe="InlinePicture",ve=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"InlinePicture"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","altTextDescription","altTextTitle","height","hyperlink","lockAspectRatio","width"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_Id","_ReferenceId","AltTextDescription","AltTextTitle","Height","Hyperlink","LockAspectRatio","Width"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!0,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["parentContentControl","paragraph","parentTableCell","parentTable","parentContentControlOrNullObject","parentTableCellOrNullObject","parentTableOrNullObject"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paragraph",{get:function(){return y("InlinePicture.paragraph",o,"1.2",i),this._P||(this._P=a(e.Paragraph,this,"Paragraph",!1,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControl",{get:function(){return this._Pa||(this._Pa=a(e.ContentControl,this,"ParentContentControl",!1,4)),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControlOrNullObject",{get:function(){return y("InlinePicture.parentContentControlOrNullObject",o,"1.3",i),this._Par||(this._Par=a(e.ContentControl,this,"ParentContentControlOrNullObject",!1,4)),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTable",{get:function(){return y("InlinePicture.parentTable",o,"1.3",i),this._Pare||(this._Pare=a(e.Table,this,"ParentTable",!1,4)),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCell",{get:function(){return y("InlinePicture.parentTableCell",o,"1.3",i),this._Paren||(this._Paren=a(e.TableCell,this,"ParentTableCell",!1,4)),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCellOrNullObject",{get:function(){return y("InlinePicture.parentTableCellOrNullObject",o,"1.3",i),this._Parent||(this._Parent=a(e.TableCell,this,"ParentTableCellOrNullObject",!1,4)),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableOrNullObject",{get:function(){return y("InlinePicture.parentTableOrNullObject",o,"1.3",i),this._ParentT||(this._ParentT=a(e.Table,this,"ParentTableOrNullObject",!1,4)),this._ParentT},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"altTextDescription",{get:function(){return g("altTextDescription",this._A,Oe,this._isNull),this._A},set:function(e){this._A=e,d(this,"AltTextDescription",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"altTextTitle",{get:function(){return g("altTextTitle",this._Al,Oe,this._isNull),this._Al},set:function(e){this._Al=e,d(this,"AltTextTitle",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return g("height",this._H,Oe,this._isNull),this._H},set:function(e){this._H=e,d(this,"Height",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hyperlink",{get:function(){return g("hyperlink",this._Hy,Oe,this._isNull),this._Hy},set:function(e){this._Hy=e,d(this,"Hyperlink",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lockAspectRatio",{get:function(){return g("lockAspectRatio",this._L,Oe,this._isNull),this._L},set:function(e){this._L=e,d(this,"LockAspectRatio",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return g("width",this._W,Oe,this._isNull),this._W},set:function(e){this._W=e,d(this,"Width",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Id",{get:function(){return g("_Id",this.__I,Oe,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,Oe,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["altTextDescription","altTextTitle","height","hyperlink","lockAspectRatio","width"],[],["paragraph","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.delete=function(){y("InlinePicture.delete",o,"1.2",i),f(this,"Delete",0,[],0,0)},n.prototype.getBase64ImageSrc=function(){return f(this,"GetBase64ImageSrc",1,[],4,0)},n.prototype.getNext=function(){return y("InlinePicture.getNext",o,"1.3",i),s(e.InlinePicture,this,"GetNext",1,[],!1,!1,null,4)},n.prototype.getNextOrNullObject=function(){return y("InlinePicture.getNextOrNullObject",o,"1.3",i),s(e.InlinePicture,this,"GetNextOrNullObject",1,[],!1,!1,null,4)},n.prototype.getRange=function(t){return y("InlinePicture.getRange",o,"1.3",i),s(e.Range,this,"GetRange",1,[t],!1,!1,null,4)},n.prototype.insertBreak=function(e,t){y("InlinePicture.insertBreak",o,"1.2",i),f(this,"InsertBreak",0,[e,t],0,0)},n.prototype.insertContentControl=function(){return s(e.ContentControl,this,"InsertContentControl",0,[],!1,!0,null,0)},n.prototype.insertFileFromBase64=function(t,n){return y("InlinePicture.insertFileFromBase64",o,"1.2",i),s(e.Range,this,"InsertFileFromBase64",0,[t,n],!1,!0,null,0)},n.prototype.insertHtml=function(t,n){return y("InlinePicture.insertHtml",o,"1.2",i),s(e.Range,this,"InsertHtml",0,[t,n],!1,!0,null,0)},n.prototype.insertInlinePictureFromBase64=function(t,n){return y("InlinePicture.insertInlinePictureFromBase64",o,"1.2",i),s(e.InlinePicture,this,"InsertInlinePictureFromBase64",0,[t,n],!1,!0,null,0)},n.prototype.insertOoxml=function(t,n){return y("InlinePicture.insertOoxml",o,"1.2",i),s(e.Range,this,"InsertOoxml",0,[t,n],!1,!0,null,0)},n.prototype.insertParagraph=function(t,n){return y("InlinePicture.insertParagraph",o,"1.2",i),s(e.Paragraph,this,"InsertParagraph",0,[t,n],!1,!0,null,0)},n.prototype.insertText=function(t,n){return y("InlinePicture.insertText",o,"1.2",i),s(e.Range,this,"InsertText",0,[t,n],!1,!0,null,0)},n.prototype.select=function(e){y("InlinePicture.select",o,"1.2",i),f(this,"Select",1,[e],4,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.AltTextDescription)||(this._A=n.AltTextDescription),m(n.AltTextTitle)||(this._Al=n.AltTextTitle),m(n.Height)||(this._H=n.Height),m(n.Hyperlink)||(this._Hy=n.Hyperlink),m(n.LockAspectRatio)||(this._L=n.LockAspectRatio),m(n.Width)||(this._W=n.Width),m(n._Id)||(this.__I=n._Id),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["paragraph","Paragraph","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e._Id)||(this.__I=e._Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{altTextDescription:this._A,altTextTitle:this._Al,height:this._H,hyperlink:this._Hy,lockAspectRatio:this._L,width:this._W},{})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.InlinePicture=ve;var Se="InlinePictureCollection",Ae=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"InlinePictureCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,Se,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,Se,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return y("InlinePictureCollection.getFirst",o,"1.3",i),s(e.InlinePicture,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return y("InlinePictureCollection.getFirstOrNullObject",o,"1.3",i),s(e.InlinePicture,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype._GetItem=function(t){return c(e.InlinePicture,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.InlinePicture,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.InlinePicture,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.InlinePicture,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.InlinePictureCollection=Ae;var De="List",Pe=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"List"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["id","_ReferenceId","levelTypes","levelExistences"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Id","_ReferenceId","LevelTypes","LevelExistences"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["paragraphs"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paragraphs",{get:function(){return this._P||(this._P=a(e.ParagraphCollection,this,"Paragraphs",!0,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return g("id",this._I,De,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"levelExistences",{get:function(){return g("levelExistences",this._L,De,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"levelTypes",{get:function(){return g("levelTypes",this._Le,De,this._isNull),this._Le},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,De,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getLevelParagraphs=function(t){return s(e.ParagraphCollection,this,"GetLevelParagraphs",1,[t],!0,!1,null,4)},n.prototype.getLevelString=function(e){return f(this,"GetLevelString",1,[e],4,0)},n.prototype.insertParagraph=function(t,n){return s(e.Paragraph,this,"InsertParagraph",0,[t,n],!1,!0,null,0)},n.prototype.setLevelAlignment=function(e,t){f(this,"SetLevelAlignment",0,[e,t],0,0)},n.prototype.setLevelBullet=function(e,t,n,r){f(this,"SetLevelBullet",0,[e,t,n,r],0,0)},n.prototype.setLevelIndents=function(e,t,n){f(this,"SetLevelIndents",0,[e,t,n],0,0)},n.prototype.setLevelNumbering=function(e,t,n){f(this,"SetLevelNumbering",0,[e,t,n],0,0)},n.prototype.setLevelStartingNumber=function(e,t){f(this,"SetLevelStartingNumber",0,[e,t],0,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Id)||(this._I=n.Id),m(n.LevelExistences)||(this._L=n.LevelExistences),m(n.LevelTypes)||(this._Le=n.LevelTypes),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["paragraphs","Paragraphs"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e.Id)||(this._I=e.Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{id:this._I,levelExistences:this._L,levelTypes:this._Le},{paragraphs:this._P})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.List=Pe;var Ce="ListCollection",Ie=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"ListCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,Ce,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,Ce,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getById=function(t){return s(e.List,this,"GetById",1,[t],!1,!1,null,4)},n.prototype.getByIdOrNullObject=function(t){return s(e.List,this,"GetByIdOrNullObject",1,[t],!1,!1,null,4)},n.prototype.getFirst=function(){return s(e.List,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return s(e.List,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype.getItem=function(t){return c(e.List,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.List,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.List,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.List,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.ListCollection=Ie;var Fe="ListItem",Re=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"ListItem"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","siblingIndex","listString","level"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId","SiblingIndex","ListString","Level"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"level",{get:function(){return g("level",this._L,Fe,this._isNull),this._L},set:function(e){this._L=e,d(this,"Level",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"listString",{get:function(){return g("listString",this._Li,Fe,this._isNull),this._Li},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"siblingIndex",{get:function(){return g("siblingIndex",this._S,Fe,this._isNull),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,Fe,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["level"],[],[])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.getAncestor=function(t){return s(e.Paragraph,this,"GetAncestor",1,[t],!1,!1,null,4)},n.prototype.getAncestorOrNullObject=function(t){return s(e.Paragraph,this,"GetAncestorOrNullObject",1,[t],!1,!1,null,4)},n.prototype.getDescendants=function(t){return s(e.ParagraphCollection,this,"GetDescendants",1,[t],!0,!1,null,4)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Level)||(this._L=n.Level),m(n.ListString)||(this._Li=n.ListString),m(n.SiblingIndex)||(this._S=n.SiblingIndex),m(n._ReferenceId)||(this.__R=n._ReferenceId)}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{level:this._L,listString:this._Li,siblingIndex:this._S},{})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.ListItem=Re;var Ee="NoteItem",Te=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"NoteItem"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","type"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_Id","_ReferenceId","Type"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["body","reference"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._B||(this._B=a(e.Body,this,"Body",!1,4)),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"reference",{get:function(){return this._R||(this._R=a(e.Range,this,"Reference",!1,4)),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return g("type",this._T,Ee,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Id",{get:function(){return g("_Id",this.__I,Ee,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,Ee,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,[],["body","reference"],[])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.delete=function(){f(this,"Delete",0,[],0,0)},n.prototype.getNext=function(){return s(e.NoteItem,this,"GetNext",1,[],!1,!1,null,4)},n.prototype.getNextOrNullObject=function(){return s(e.NoteItem,this,"GetNextOrNullObject",1,[],!1,!1,null,4)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Type)||(this._T=n.Type),m(n._Id)||(this.__I=n._Id),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["body","Body","reference","Reference"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e._Id)||(this.__I=e._Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{type:this._T},{body:this._B,reference:this._R})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.NoteItem=Te;var xe="NoteItemCollection",Ne=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"NoteItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,xe,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,xe,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return s(e.NoteItem,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return s(e.NoteItem,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype._GetItem=function(t){return c(e.NoteItem,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.NoteItem,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.NoteItem,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.NoteItem,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.NoteItemCollection=Ne;var Me="Paragraph",je=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"Paragraph"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","style","alignment","firstLineIndent","leftIndent","rightIndent","lineSpacing","outlineLevel","spaceBefore","spaceAfter","lineUnitBefore","lineUnitAfter","text","isListItem","tableNestingLevel","isLastParagraph","styleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_Id","_ReferenceId","Style","Alignment","FirstLineIndent","LeftIndent","RightIndent","LineSpacing","OutlineLevel","SpaceBefore","SpaceAfter","LineUnitBefore","LineUnitAfter","Text","IsListItem","TableNestingLevel","IsLastParagraph","StyleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["font","contentControls","parentContentControl","inlinePictures","parentBody","list","parentTableCell","parentTable","listItem","parentContentControlOrNullObject","parentTableCellOrNullObject","parentTableOrNullObject","listOrNullObject","listItemOrNullObject","footnotes","endnotes","fields"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"contentControls",{get:function(){return this._C||(this._C=a(e.ContentControlCollection,this,"ContentControls",!0,4)),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"endnotes",{get:function(){return y("Paragraph.endnotes","WordApiOnline","1.1",i),this._E||(this._E=a(e.NoteItemCollection,this,"Endnotes",!0,4)),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fields",{get:function(){return y("Paragraph.fields",o,"1.4",i),this._F||(this._F=a(e.FieldCollection,this,"Fields",!0,4)),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"font",{get:function(){return this._Fo||(this._Fo=a(e.Font,this,"Font",!1,4)),this._Fo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"footnotes",{get:function(){return y("Paragraph.footnotes","WordApiOnline","1.1",i),this._Foo||(this._Foo=a(e.NoteItemCollection,this,"Footnotes",!0,4)),this._Foo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inlinePictures",{get:function(){return this._I||(this._I=a(e.InlinePictureCollection,this,"InlinePictures",!0,4)),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"list",{get:function(){return y("Paragraph.list",o,"1.3",i),this._Lis||(this._Lis=a(e.List,this,"List",!1,4)),this._Lis},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"listItem",{get:function(){return y("Paragraph.listItem",o,"1.3",i),this._List||(this._List=a(e.ListItem,this,"ListItem",!1,4)),this._List},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"listItemOrNullObject",{get:function(){return y("Paragraph.listItemOrNullObject",o,"1.3",i),this._ListI||(this._ListI=a(e.ListItem,this,"ListItemOrNullObject",!1,4)),this._ListI},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"listOrNullObject",{get:function(){return y("Paragraph.listOrNullObject",o,"1.3",i),this._ListO||(this._ListO=a(e.List,this,"ListOrNullObject",!1,4)),this._ListO},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentBody",{get:function(){return y("Paragraph.parentBody",o,"1.3",i),this._P||(this._P=a(e.Body,this,"ParentBody",!1,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControl",{get:function(){return this._Pa||(this._Pa=a(e.ContentControl,this,"ParentContentControl",!1,4)),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControlOrNullObject",{get:function(){return y("Paragraph.parentContentControlOrNullObject",o,"1.3",i),this._Par||(this._Par=a(e.ContentControl,this,"ParentContentControlOrNullObject",!1,4)),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTable",{get:function(){return y("Paragraph.parentTable",o,"1.3",i),this._Pare||(this._Pare=a(e.Table,this,"ParentTable",!1,4)),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCell",{get:function(){return y("Paragraph.parentTableCell",o,"1.3",i),this._Paren||(this._Paren=a(e.TableCell,this,"ParentTableCell",!1,4)),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCellOrNullObject",{get:function(){return y("Paragraph.parentTableCellOrNullObject",o,"1.3",i),this._Parent||(this._Parent=a(e.TableCell,this,"ParentTableCellOrNullObject",!1,4)),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableOrNullObject",{get:function(){return y("Paragraph.parentTableOrNullObject",o,"1.3",i),this._ParentT||(this._ParentT=a(e.Table,this,"ParentTableOrNullObject",!1,4)),this._ParentT},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"alignment",{get:function(){return g("alignment",this._A,Me,this._isNull),this._A},set:function(e){this._A=e,d(this,"Alignment",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"firstLineIndent",{get:function(){return g("firstLineIndent",this._Fi,Me,this._isNull),this._Fi},set:function(e){this._Fi=e,d(this,"FirstLineIndent",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isLastParagraph",{get:function(){return g("isLastParagraph",this._Is,Me,this._isNull),y("Paragraph.isLastParagraph",o,"1.3",i),this._Is},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isListItem",{get:function(){return g("isListItem",this._IsL,Me,this._isNull),y("Paragraph.isListItem",o,"1.3",i),this._IsL},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"leftIndent",{get:function(){return g("leftIndent",this._L,Me,this._isNull),this._L},set:function(e){this._L=e,d(this,"LeftIndent",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lineSpacing",{get:function(){return g("lineSpacing",this._Li,Me,this._isNull),this._Li},set:function(e){this._Li=e,d(this,"LineSpacing",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lineUnitAfter",{get:function(){return g("lineUnitAfter",this._Lin,Me,this._isNull),this._Lin},set:function(e){this._Lin=e,d(this,"LineUnitAfter",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lineUnitBefore",{get:function(){return g("lineUnitBefore",this._Line,Me,this._isNull),this._Line},set:function(e){this._Line=e,d(this,"LineUnitBefore",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"outlineLevel",{get:function(){return g("outlineLevel",this._O,Me,this._isNull),this._O},set:function(e){this._O=e,d(this,"OutlineLevel",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rightIndent",{get:function(){return g("rightIndent",this._R,Me,this._isNull),this._R},set:function(e){this._R=e,d(this,"RightIndent",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"spaceAfter",{get:function(){return g("spaceAfter",this._S,Me,this._isNull),this._S},set:function(e){this._S=e,d(this,"SpaceAfter",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"spaceBefore",{get:function(){return g("spaceBefore",this._Sp,Me,this._isNull),this._Sp},set:function(e){this._Sp=e,d(this,"SpaceBefore",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"style",{get:function(){return g("style",this._St,Me,this._isNull),this._St},set:function(e){this._St=e,d(this,"Style",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"styleBuiltIn",{get:function(){return g("styleBuiltIn",this._Sty,Me,this._isNull),y("Paragraph.styleBuiltIn",o,"1.3",i),this._Sty},set:function(e){this._Sty=e,d(this,"StyleBuiltIn",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tableNestingLevel",{get:function(){return g("tableNestingLevel",this._T,Me,this._isNull),y("Paragraph.tableNestingLevel",o,"1.3",i),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return g("text",this._Te,Me,this._isNull),this._Te},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Id",{get:function(){return g("_Id",this.__I,Me,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,Me,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["style","alignment","firstLineIndent","leftIndent","rightIndent","lineSpacing","outlineLevel","spaceBefore","spaceAfter","lineUnitBefore","lineUnitAfter","styleBuiltIn"],["font","listItem","listItemOrNullObject"],["contentControls","endnotes","fields","footnotes","inlinePictures","list","listOrNullObject","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.attachToList=function(t,n){return y("Paragraph.attachToList",o,"1.3",i),s(e.List,this,"AttachToList",0,[t,n],!1,!1,null,0)},n.prototype.clear=function(){f(this,"Clear",0,[],0,0)},n.prototype.delete=function(){f(this,"Delete",0,[],0,0)},n.prototype.detachFromList=function(){y("Paragraph.detachFromList",o,"1.3",i),f(this,"DetachFromList",0,[],0,0)},n.prototype.getComments=function(){return y("Paragraph.getComments",o,"1.4",i),s(e.CommentCollection,this,"GetComments",1,[],!0,!1,null,4)},n.prototype.getHtml=function(){return f(this,"GetHtml",1,[],4,0)},n.prototype.getMetadata=function(e){return f(this,"GetMetadata",1,[e],4,0)},n.prototype.getNext=function(){return y("Paragraph.getNext",o,"1.3",i),s(e.Paragraph,this,"GetNext",1,[],!1,!1,null,4)},n.prototype.getNextOrNullObject=function(){return y("Paragraph.getNextOrNullObject",o,"1.3",i),s(e.Paragraph,this,"GetNextOrNullObject",1,[],!1,!1,null,4)},n.prototype.getOoxml=function(){return f(this,"GetOoxml",1,[],4,0)},n.prototype.getPrevious=function(){return y("Paragraph.getPrevious",o,"1.3",i),s(e.Paragraph,this,"GetPrevious",1,[],!1,!1,null,4)},n.prototype.getPreviousOrNullObject=function(){return y("Paragraph.getPreviousOrNullObject",o,"1.3",i),s(e.Paragraph,this,"GetPreviousOrNullObject",1,[],!1,!1,null,4)},n.prototype.getRange=function(t){return y("Paragraph.getRange",o,"1.3",i),s(e.Range,this,"GetRange",1,[t],!1,!1,null,4)},n.prototype.getReviewedText=function(e){return y("Paragraph.getReviewedText",o,"1.4",i),f(this,"GetReviewedText",1,[e],4,0)},n.prototype.getSubrange=function(t,n){return y("Paragraph.getSubrange",o,"1.3",i),s(e.Range,this,"GetSubrange",1,[t,n],!1,!1,null,4)},n.prototype.getTextRanges=function(t,n){return y("Paragraph.getTextRanges",o,"1.3",i),s(e.RangeCollection,this,"GetTextRanges",1,[t,n],!0,!1,null,4)},n.prototype.insertBreak=function(e,t){f(this,"InsertBreak",0,[e,t],0,0)},n.prototype.insertContentControl=function(t){return s(e.ContentControl,this,"InsertContentControl",0,[t],!1,!0,null,0)},n.prototype.insertFileFromBase64=function(t,n){return s(e.Range,this,"InsertFileFromBase64",0,[t,n],!1,!0,null,0)},n.prototype.insertHtml=function(t,n){return s(e.Range,this,"InsertHtml",0,[t,n],!1,!0,null,0)},n.prototype.insertInlinePictureFromBase64=function(t,n){return s(e.InlinePicture,this,"InsertInlinePictureFromBase64",0,[t,n],!1,!0,null,0)},n.prototype.insertOoxml=function(t,n){return s(e.Range,this,"InsertOoxml",0,[t,n],!1,!0,null,0)},n.prototype.insertParagraph=function(t,n){return s(e.Paragraph,this,"InsertParagraph",0,[t,n],!1,!0,null,0)},n.prototype.insertTable=function(t,n,r,a){return y("Paragraph.insertTable",o,"1.3",i),s(e.Table,this,"InsertTable",0,[t,n,r,a],!1,!0,null,0)},n.prototype.insertText=function(t,n){return s(e.Range,this,"InsertText",0,[t,n],!1,!0,null,0)},n.prototype.search=function(t,n){var r=E.Paragraph_Search(this,t,n),i=r.handled,o=r.result;return i?o:s(e.RangeCollection,this,"Search",1,[t,n],!0,!1,null,4)},n.prototype.select=function(e){f(this,"Select",1,[e],4,0)},n.prototype.setMetadata=function(e,t){f(this,"SetMetadata",0,[e,t],0,0)},n.prototype.split=function(t,n,r){return y("Paragraph.split",o,"1.3",i),s(e.RangeCollection,this,"Split",1,[t,n,r],!0,!1,null,4)},n.prototype.startNewList=function(){return y("Paragraph.startNewList",o,"1.3",i),s(e.List,this,"StartNewList",0,[],!1,!1,null,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._Search2=function(t,n){return s(e.RangeCollection,this,"_Search2",1,[t,n],!0,!1,null,4)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Alignment)||(this._A=n.Alignment),m(n.FirstLineIndent)||(this._Fi=n.FirstLineIndent),m(n.IsLastParagraph)||(this._Is=n.IsLastParagraph),m(n.IsListItem)||(this._IsL=n.IsListItem),m(n.LeftIndent)||(this._L=n.LeftIndent),m(n.LineSpacing)||(this._Li=n.LineSpacing),m(n.LineUnitAfter)||(this._Lin=n.LineUnitAfter),m(n.LineUnitBefore)||(this._Line=n.LineUnitBefore),m(n.OutlineLevel)||(this._O=n.OutlineLevel),m(n.RightIndent)||(this._R=n.RightIndent),m(n.SpaceAfter)||(this._S=n.SpaceAfter),m(n.SpaceBefore)||(this._Sp=n.SpaceBefore),m(n.Style)||(this._St=n.Style),m(n.StyleBuiltIn)||(this._Sty=n.StyleBuiltIn),m(n.TableNestingLevel)||(this._T=n.TableNestingLevel),m(n.Text)||(this._Te=n.Text),m(n._Id)||(this.__I=n._Id),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["contentControls","ContentControls","endnotes","Endnotes","fields","Fields","font","Font","footnotes","Footnotes","inlinePictures","InlinePictures","list","List","listItem","ListItem","listItemOrNullObject","ListItemOrNullObject","listOrNullObject","ListOrNullObject","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e._Id)||(this.__I=e._Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{alignment:this._A,firstLineIndent:this._Fi,isLastParagraph:this._Is,isListItem:this._IsL,leftIndent:this._L,lineSpacing:this._Li,lineUnitAfter:this._Lin,lineUnitBefore:this._Line,outlineLevel:this._O,rightIndent:this._R,spaceAfter:this._S,spaceBefore:this._Sp,style:this._St,styleBuiltIn:this._Sty,tableNestingLevel:this._T,text:this._Te},{fields:this._F,font:this._Fo,inlinePictures:this._I,listItem:this._List,listItemOrNullObject:this._ListI})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.Paragraph=je;var we=function(){function e(){}return e.prototype.getDocument=function(){return h(this._document)&&(this._document=this.context.document),this._document},e.prototype.getReferenceId=function(){return h(this._refId)&&(this._refId=this._ReferenceId),this._refId},e.prototype._RegisterCommentAddedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentAdded")},e.prototype._UnregisterCommentAddedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentAdded")},e.prototype._RegisterCommentDeletedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentDeleted")},e.prototype._UnregisterCommentDeletedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentDeleted")},e.prototype._RegisterCommentChangedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentChanged")},e.prototype._UnregisterCommentChangedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentChanged")},e.prototype._RegisterCommentSelectedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentSelected")},e.prototype._UnregisterCommentSelectedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentSelected")},e.prototype._RegisterCommentDeselectedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentDeselected")},e.prototype._UnregisterCommentDeselectedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentDeselected")},e}();e.ParagraphCustom=we,OfficeExtension.Utility.applyMixin(je,we),function(i){i.Paragraph_Search=function(i,o,a){var c;if(n()){var l=r(a);c=i._Search2(o,l)}else a=t(i.context,a),c=s(e.RangeCollection,i,"Search",1,[o,a],!0,!1,null,4);return{handled:!0,result:c}}}(E=e._CC||(e._CC={}));var ke="ParagraphCollection",Le=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"ParagraphCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,ke,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,ke,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return y("ParagraphCollection.getFirst",o,"1.3",i),s(e.Paragraph,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return y("ParagraphCollection.getFirstOrNullObject",o,"1.3",i),s(e.Paragraph,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype.getLast=function(){return y("ParagraphCollection.getLast",o,"1.3",i),s(e.Paragraph,this,"GetLast",1,[],!1,!1,null,4)},n.prototype.getLastOrNullObject=function(){return y("ParagraphCollection.getLastOrNullObject",o,"1.3",i),s(e.Paragraph,this,"GetLastOrNullObject",1,[],!1,!1,null,4)},n.prototype._GetItem=function(t){return c(e.Paragraph,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.Paragraph,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.Paragraph,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.Paragraph,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.ParagraphCollection=Le;var Ue="Range",He=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"Range"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","style","text","isEmpty","hyperlink","styleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_Id","_ReferenceId","Style","Text","IsEmpty","Hyperlink","StyleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!1,!1,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["font","paragraphs","contentControls","parentContentControl","inlinePictures","lists","tables","parentTableCell","parentTable","parentBody","parentContentControlOrNullObject","parentTableCellOrNullObject","parentTableOrNullObject","footnotes","endnotes","fields"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"contentControls",{get:function(){return this._C||(this._C=a(e.ContentControlCollection,this,"ContentControls",!0,4)),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"endnotes",{get:function(){return y("Range.endnotes","WordApiOnline","1.1",i),this._E||(this._E=a(e.NoteItemCollection,this,"Endnotes",!0,4)),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fields",{get:function(){return y("Range.fields",o,"1.4",i),this._F||(this._F=a(e.FieldCollection,this,"Fields",!0,4)),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"font",{get:function(){return this._Fo||(this._Fo=a(e.Font,this,"Font",!1,4)),this._Fo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"footnotes",{get:function(){return y("Range.footnotes","WordApiOnline","1.1",i),this._Foo||(this._Foo=a(e.NoteItemCollection,this,"Footnotes",!0,4)),this._Foo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inlinePictures",{get:function(){return y("Range.inlinePictures",o,"1.2",i),this._I||(this._I=a(e.InlinePictureCollection,this,"InlinePictures",!0,4)),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lists",{get:function(){return y("Range.lists",o,"1.3",i),this._L||(this._L=a(e.ListCollection,this,"Lists",!0,4)),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paragraphs",{get:function(){return this._P||(this._P=a(e.ParagraphCollection,this,"Paragraphs",!0,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentBody",{get:function(){return y("Range.parentBody",o,"1.3",i),this._Pa||(this._Pa=a(e.Body,this,"ParentBody",!1,4)),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControl",{get:function(){return this._Par||(this._Par=a(e.ContentControl,this,"ParentContentControl",!1,4)),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControlOrNullObject",{get:function(){return y("Range.parentContentControlOrNullObject",o,"1.3",i),this._Pare||(this._Pare=a(e.ContentControl,this,"ParentContentControlOrNullObject",!1,4)),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTable",{get:function(){return y("Range.parentTable",o,"1.3",i),this._Paren||(this._Paren=a(e.Table,this,"ParentTable",!1,4)),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCell",{get:function(){return y("Range.parentTableCell",o,"1.3",i),this._Parent||(this._Parent=a(e.TableCell,this,"ParentTableCell",!1,4)),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCellOrNullObject",{get:function(){return y("Range.parentTableCellOrNullObject",o,"1.3",i),this._ParentT||(this._ParentT=a(e.TableCell,this,"ParentTableCellOrNullObject",!1,4)),this._ParentT},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableOrNullObject",{get:function(){return y("Range.parentTableOrNullObject",o,"1.3",i),this._ParentTa||(this._ParentTa=a(e.Table,this,"ParentTableOrNullObject",!1,4)),this._ParentTa},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tables",{get:function(){return y("Range.tables",o,"1.3",i),this._T||(this._T=a(e.TableCollection,this,"Tables",!0,4)),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hyperlink",{get:function(){return g("hyperlink",this._H,Ue,this._isNull),y("Range.hyperlink",o,"1.3",i),this._H},set:function(e){this._H=e,d(this,"Hyperlink",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isEmpty",{get:function(){return g("isEmpty",this._Is,Ue,this._isNull),y("Range.isEmpty",o,"1.3",i),this._Is},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"style",{get:function(){return g("style",this._S,Ue,this._isNull),this._S},set:function(e){this._S=e,d(this,"Style",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"styleBuiltIn",{get:function(){return g("styleBuiltIn",this._St,Ue,this._isNull),y("Range.styleBuiltIn",o,"1.3",i),this._St},set:function(e){this._St=e,d(this,"StyleBuiltIn",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return g("text",this._Te,Ue,this._isNull),this._Te},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Id",{get:function(){return g("_Id",this.__I,Ue,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,Ue,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["style","hyperlink","styleBuiltIn"],["font"],["contentControls","endnotes","fields","footnotes","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.clear=function(){f(this,"Clear",0,[],0,0)},n.prototype.compareLocationWith=function(e){return y("Range.compareLocationWith",o,"1.3",i),f(this,"CompareLocationWith",1,[e],4,0)},n.prototype.delete=function(){f(this,"Delete",0,[],0,0)},n.prototype.endPreview=function(){f(this,"EndPreview",1,[],4,0)},n.prototype.expandTo=function(t){return y("Range.expandTo",o,"1.3",i),s(e.Range,this,"ExpandTo",0,[t],!1,!1,null,0)},n.prototype.expandToOrNullObject=function(t){return y("Range.expandToOrNullObject",o,"1.3",i),s(e.Range,this,"ExpandToOrNullObject",0,[t],!1,!1,null,0)},n.prototype.getBookmarks=function(e,t){return y("Range.getBookmarks",o,"1.4",i),f(this,"GetBookmarks",1,[e,t],4,0)},n.prototype.getComments=function(){return y("Range.getComments",o,"1.4",i),s(e.CommentCollection,this,"GetComments",1,[],!0,!1,null,4)},n.prototype.getHtml=function(){return f(this,"GetHtml",1,[],4,0)},n.prototype.getHyperlinkRanges=function(){return y("Range.getHyperlinkRanges",o,"1.3",i),s(e.RangeCollection,this,"GetHyperlinkRanges",1,[],!0,!1,null,4)},n.prototype.getNextTextRange=function(t,n){return y("Range.getNextTextRange",o,"1.3",i),s(e.Range,this,"GetNextTextRange",1,[t,n],!1,!1,null,4)},n.prototype.getNextTextRangeOrNullObject=function(t,n){return y("Range.getNextTextRangeOrNullObject",o,"1.3",i),s(e.Range,this,"GetNextTextRangeOrNullObject",1,[t,n],!1,!1,null,4)},n.prototype.getOoxml=function(){return f(this,"GetOoxml",1,[],4,0)},n.prototype.getRange=function(t){return y("Range.getRange",o,"1.3",i),s(e.Range,this,"GetRange",1,[t],!1,!1,null,4)},n.prototype.getReviewedText=function(e){return y("Range.getReviewedText",o,"1.4",i),f(this,"GetReviewedText",1,[e],4,0)},n.prototype.getTextRanges=function(t,n){return y("Range.getTextRanges",o,"1.3",i),s(e.RangeCollection,this,"GetTextRanges",1,[t,n],!0,!1,null,4)},n.prototype.highlight=function(e){f(this,"Highlight",1,[e],4,0)},n.prototype.insertBookmark=function(e){y("Range.insertBookmark",o,"1.4",i),f(this,"InsertBookmark",0,[e],0,0)},n.prototype.insertBreak=function(e,t){f(this,"InsertBreak",0,[e,t],0,0)},n.prototype.insertComment=function(t){return y("Range.insertComment",o,"1.4",i),s(e.Comment,this,"InsertComment",0,[t],!1,!0,null,0)},n.prototype.insertContentControl=function(t){return s(e.ContentControl,this,"InsertContentControl",0,[t],!1,!0,null,0)},n.prototype.insertEndnote=function(t){return y("Range.insertEndnote","WordApiOnline","1.1",i),s(e.NoteItem,this,"InsertEndnote",0,[t],!1,!0,null,0)},n.prototype.insertFileFromBase64=function(t,n){return s(e.Range,this,"InsertFileFromBase64",0,[t,n],!1,!0,null,0)},n.prototype.insertFootnote=function(t){return y("Range.insertFootnote","WordApiOnline","1.1",i),s(e.NoteItem,this,"InsertFootnote",0,[t],!1,!0,null,0)},n.prototype.insertHtml=function(t,n){return s(e.Range,this,"InsertHtml",0,[t,n],!1,!0,null,0)},n.prototype.insertInlinePictureFromBase64=function(t,n){return y("Range.insertInlinePictureFromBase64",o,"1.2",i),s(e.InlinePicture,this,"InsertInlinePictureFromBase64",0,[t,n],!1,!0,null,0)},n.prototype.insertOoxml=function(t,n){return s(e.Range,this,"InsertOoxml",0,[t,n],!1,!0,null,0)},n.prototype.insertParagraph=function(t,n){return s(e.Paragraph,this,"InsertParagraph",0,[t,n],!1,!0,null,0)},n.prototype.insertTable=function(t,n,r,a){return y("Range.insertTable",o,"1.3",i),s(e.Table,this,"InsertTable",0,[t,n,r,a],!1,!0,null,0)},n.prototype.insertTapObjectFromFileContent=function(t,n,r){return s(e.Range,this,"InsertTapObjectFromFileContent",0,[t,n,r],!1,!0,null,1)},n.prototype.insertText=function(t,n){return s(e.Range,this,"InsertText",0,[t,n],!1,!0,null,0)},n.prototype.intersectWith=function(t){return y("Range.intersectWith",o,"1.3",i),s(e.Range,this,"IntersectWith",0,[t],!1,!1,null,0)},n.prototype.intersectWithOrNullObject=function(t){return y("Range.intersectWithOrNullObject",o,"1.3",i),s(e.Range,this,"IntersectWithOrNullObject",0,[t],!1,!1,null,0)},n.prototype.previewTextReplacement=function(e){f(this,"PreviewTextReplacement",1,[e],4,0)},n.prototype.removeHighlight=function(){f(this,"RemoveHighlight",1,[],4,0)},n.prototype.search=function(t,n){var r=E.Range_Search(this,t,n),i=r.handled,o=r.result;return i?o:s(e.RangeCollection,this,"Search",1,[t,n],!0,!1,null,4)},n.prototype.select=function(e){f(this,"Select",1,[e],4,0)},n.prototype.split=function(t,n,r,a){return y("Range.split",o,"1.3",i),s(e.RangeCollection,this,"Split",1,[t,n,r,a],!0,!1,null,4)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._Search2=function(t,n){return s(e.RangeCollection,this,"_Search2",1,[t,n],!0,!1,null,4)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Hyperlink)||(this._H=n.Hyperlink),m(n.IsEmpty)||(this._Is=n.IsEmpty),m(n.Style)||(this._S=n.Style),m(n.StyleBuiltIn)||(this._St=n.StyleBuiltIn),m(n.Text)||(this._Te=n.Text),m(n._Id)||(this.__I=n._Id),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["contentControls","ContentControls","endnotes","Endnotes","fields","Fields","font","Font","footnotes","Footnotes","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject","tables","Tables"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e._Id)||(this.__I=e._Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{hyperlink:this._H,isEmpty:this._Is,style:this._S,styleBuiltIn:this._St,text:this._Te},{fields:this._F,font:this._Fo,inlinePictures:this._I})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.Range=He;var Be=function(){function e(){}return e.prototype.getDocument=function(){return h(this._document)&&(this._document=this.context.document),this._document},e.prototype.getReferenceId=function(){return h(this._refId)&&(this._refId=this._ReferenceId),this._refId},e.prototype._RegisterCommentAddedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentAdded")},e.prototype._UnregisterCommentAddedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentAdded")},e.prototype._RegisterCommentChangedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentChanged")},e.prototype._UnregisterCommentChangedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentChanged")},e.prototype._RegisterCommentSelectedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentSelected")},e.prototype._UnregisterCommentSelectedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentSelected")},e.prototype._RegisterCommentDeselectedEvent=function(){this.getDocument()._RegisterEvent(this.getReferenceId(),"CommentDeselected")},e.prototype._UnregisterCommentDeselectedEvent=function(){this.getDocument()._UnregisterEvent(this.getReferenceId(),"CommentDeselected")},e}();e.RangeCustom=Be,OfficeExtension.Utility.applyMixin(He,Be),function(i){i.Range_Search=function(i,o,a){var c;if(n()){var l=r(a);c=i._Search2(o,l)}else a=t(i.context,a),c=s(e.RangeCollection,i,"Search",1,[o,a],!0,!1,null,4);return{handled:!0,result:c}}}(E=e._CC||(e._CC={}));var We="RangeCollection",Ge=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"RangeCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,We,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,We,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return y("RangeCollection.getFirst",o,"1.3",i),s(e.Range,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return y("RangeCollection.getFirstOrNullObject",o,"1.3",i),s(e.Range,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype._GetItem=function(t){return c(e.Range,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.Range,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.Range,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.Range,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.RangeCollection=Ge;var qe="SearchOptions",Ve=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"SearchOptions"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["ignorePunct","ignoreSpace","matchCase","matchPrefix","matchSuffix","matchWildcards","matchWholeWord"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["IgnorePunct","IgnoreSpace","MatchCase","MatchPrefix","MatchSuffix","MatchWildcards","MatchWholeWord"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!0,!0,!0,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"ignorePunct",{get:function(){return g("ignorePunct",this._I,qe,this._isNull),this._I},set:function(e){this._I=e,d(this,"IgnorePunct",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"ignoreSpace",{get:function(){return g("ignoreSpace",this._Ig,qe,this._isNull),this._Ig},set:function(e){this._Ig=e,d(this,"IgnoreSpace",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"matchCase",{get:function(){return g("matchCase",this._M,qe,this._isNull),this._M},set:function(e){this._M=e,d(this,"MatchCase",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"matchPrefix",{get:function(){return g("matchPrefix",this._Ma,qe,this._isNull),this._Ma},set:function(e){this._Ma=e,d(this,"MatchPrefix",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"matchSuffix",{get:function(){return g("matchSuffix",this._Mat,qe,this._isNull),this._Mat},set:function(e){this._Mat=e,d(this,"MatchSuffix",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"matchWholeWord",{get:function(){return g("matchWholeWord",this._Matc,qe,this._isNull),this._Matc},set:function(e){this._Matc=e,d(this,"MatchWholeWord",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"matchWildcards",{get:function(){return g("matchWildcards",this.m_matchWildcards,qe,this._isNull),this.m_matchWildcards},set:function(e){this.m_matchWildcards=e,d(this,"MatchWildcards",e,0)},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["ignorePunct","ignoreSpace","matchCase","matchPrefix","matchSuffix","matchWildcards","matchWholeWord"],[],[])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.IgnorePunct)||(this._I=n.IgnorePunct),m(n.IgnoreSpace)||(this._Ig=n.IgnoreSpace),m(n.MatchCase)||(this._M=n.MatchCase),m(n.MatchPrefix)||(this._Ma=n.MatchPrefix),m(n.MatchSuffix)||(this._Mat=n.MatchSuffix),m(n.MatchWholeWord)||(this._Matc=n.MatchWholeWord),m(n.MatchWildcards)||(this.m_matchWildcards=n.MatchWildcards)}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.newObject=function(t){return l(e.SearchOptions,t,"Microsoft.WordServices.SearchOptions",!1,4)},n.prototype.toJSON=function(){return O(this,{ignorePunct:this._I,ignoreSpace:this._Ig,matchCase:this._M,matchPrefix:this._Ma,matchSuffix:this._Mat,matchWholeWord:this._Matc,matchWildcards:this.m_matchWildcards},{})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.SearchOptions=Ve;var ze=function(){function e(){}return Object.defineProperty(e.prototype,"matchWildCards",{get:function(){return g("matchWildCards",this.m_matchWildcards),this.m_matchWildcards},set:function(e){this.m_matchWildcards=e,d(this,"MatchWildCards",e,0)},enumerable:!0,configurable:!0}),e}();e.SearchOptionsCustom=ze,OfficeExtension.Utility.applyMixin(Ve,ze);var Je="Section",Ke=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"Section"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_Id","_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["body"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._B||(this._B=a(e.Body,this,"Body",!1,4)),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Id",{get:function(){return g("_Id",this.__I,Je,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,Je,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,[],["body"],[])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.getFooter=function(t){return s(e.Body,this,"GetFooter",1,[t],!1,!0,null,4)},n.prototype.getHeader=function(t){return s(e.Body,this,"GetHeader",1,[t],!1,!0,null,4)},n.prototype.getNext=function(){return y("Section.getNext",o,"1.3",i),s(e.Section,this,"GetNext",1,[],!1,!1,null,4)},n.prototype.getNextOrNullObject=function(){return y("Section.getNextOrNullObject",o,"1.3",i),s(e.Section,this,"GetNextOrNullObject",1,[],!1,!1,null,4)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n._Id)||(this.__I=n._Id),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["body","Body"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e._Id)||(this.__I=e._Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{body:this._B})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.Section=Ke;var Xe="SectionCollection",Qe=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"SectionCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,Xe,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,Xe,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return y("SectionCollection.getFirst",o,"1.3",i),s(e.Section,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return y("SectionCollection.getFirstOrNullObject",o,"1.3",i),s(e.Section,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype._GetItem=function(t){return c(e.Section,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.Section,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.Section,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.Section,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.SectionCollection=Qe;var $e="Setting",Ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"Setting"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","key","value","_Id"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId","Key","Value","_Id"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"key",{get:function(){return g("key",this._K,$e,this._isNull),this._K},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return g("value",this.m_value,$e,this._isNull),this.m_value},set:function(e){E.Setting_Value_Set(this,e).handled||(this.m_value=e,d(this,"Value",e,0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_Id",{get:function(){return g("_Id",this.__I,$e,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,$e,this._isNull),this.__R},enumerable:!0,configurable:!0}),t.prototype.set=function(e,t){this._recursivelySet(e,t,["value"],[],[])},t.prototype.update=function(e){this._recursivelyUpdate(e)},t.prototype.delete=function(){f(this,"Delete",0,[],0,0)},t.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!h(t)){var n=t;v(this,n),E.Setting_HandleResult(this,n),m(n.Key)||(this._K=n.Key),m(n.Value)||(this.m_value=n.Value),m(n._Id)||(this.__I=n._Id),m(n._ReferenceId)||(this.__R=n._ReferenceId)}},t.prototype.load=function(e){return _(this,e)},t.prototype.retrieve=function(e){return b(this,e)},t.prototype._handleIdResult=function(t){e.prototype._handleIdResult.call(this,t),h(t)||(m(t._ReferenceId)||(this.__R=t._ReferenceId),m(t._Id)||(this.__I=t._Id))},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),D(this,t,n)},t.prototype.track=function(){return this.context.trackedObjects.add(this),this},t.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},t.prototype.toJSON=function(){return O(this,{key:this._K,value:this.m_value},{})},t.prototype.setMockData=function(e){P(this,e)},t.prototype.ensureUnchanged=function(e){p(this,e)},t}(OfficeExtension.ClientObject);e.Setting=Ye;var Ze=function(){function e(){}return e.replaceStringDateWithDate=function(t){var n=JSON.stringify(t);return t=JSON.parse(n,(function(t,n){var r;return"string"==typeof n&&n&&n.length>6&&n.slice(0,5)===e.DateJSONPrefix&&n.slice(-1)===e.DateJSONSuffix&&(r=new Date(parseInt(n.slice(5,-1))))?r:n}))},e.replaceDateWithStringDate=function(t){var n=JSON.stringify(t,(function(t,n){return this[t]instanceof Date?e.DateJSONPrefix+this[t].getTime()+e.DateJSONSuffix:n}));return t=JSON.parse(n)},e.DateJSONPrefix="Date(",e.DateJSONSuffix=")",e}();e.SettingCustom=Ze,OfficeExtension.Utility.applyMixin(Ye,Ze),function(e){e.Setting_HandleResult=function(e,t){if(!m(t.Value)&&"string"==typeof t.Value){var n=JSON.parse(t.Value,(function(e,t){return/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(t)?new Date(t):t}));t.Value=Ze.replaceStringDateWithDate(n)}},e.Setting_Value_Set=function(e,t){var n=JSON.stringify(Ze.replaceDateWithStringDate(t));if(null!==n)return this.m_value=n,d(e,"Value",n,0),{handled:!0}}}(E=e._CC||(e._CC={}));var et="SettingCollection",tt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"SettingCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,et,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,et,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.add=function(t,n){var r=E.SettingCollection_Add(this,t,n),i=r.handled,o=r.result;return i?o:s(e.Setting,this,"Add",0,[t,n],!1,!0,null,0)},n.prototype.deleteAll=function(){f(this,"DeleteAll",0,[],0,0)},n.prototype.getCount=function(){return f(this,"GetCount",1,[],4,0)},n.prototype.getItem=function(t){return c(e.Setting,this,[t])},n.prototype.getItemOrNullObject=function(t){return s(e.Setting,this,"GetItemOrNullObject",1,[t],!1,!1,null,4)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.Setting,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.Setting,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.Setting,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.SettingCollection=tt,function(t){t.SettingCollection_Add=function(t,n,r){var i=JSON.stringify(Ze.replaceDateWithStringDate(r));return null!==i?{handled:!0,result:s(e.Setting,t,"Add",0,[n,i],!1,!1,null,0)}:{handled:!1,result:null}}}(E=e._CC||(e._CC={}));var nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"Style"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,"Style",this._isNull),this.__R},enumerable:!0,configurable:!0}),t.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!h(t)){var n=t;v(this,n),m(n._ReferenceId)||(this.__R=n._ReferenceId)}},t.prototype.load=function(e){return _(this,e)},t.prototype._handleIdResult=function(t){e.prototype._handleIdResult.call(this,t),h(t)||m(t._ReferenceId)||(this.__R=t._ReferenceId)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),D(this,t,n)},t.prototype.track=function(){return this.context.trackedObjects.add(this),this},t.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},t.prototype.toJSON=function(){return O(this,{},{})},t}(OfficeExtension.ClientObject);e.Style=nt;var rt="Table",it=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"Table"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","isUniform","nestingLevel","values","style","rowCount","headerRowCount","styleTotalRow","styleFirstColumn","styleLastColumn","styleBandedRows","styleBandedColumns","shadingColor","horizontalAlignment","verticalAlignment","width","styleBuiltIn","alignment"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_Id","_ReferenceId","IsUniform","NestingLevel","Values","Style","RowCount","HeaderRowCount","StyleTotalRow","StyleFirstColumn","StyleLastColumn","StyleBandedRows","StyleBandedColumns","ShadingColor","HorizontalAlignment","VerticalAlignment","Width","StyleBuiltIn","Alignment"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!1,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["rows","tables","parentTableCell","parentTable","font","parentContentControl","parentBody","parentTableCellOrNullObject","parentTableOrNullObject","parentContentControlOrNullObject","footnotes","endnotes","fields"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"endnotes",{get:function(){return y("Table.endnotes","WordApiOnline","1.1",i),this._E||(this._E=a(e.NoteItemCollection,this,"Endnotes",!0,4)),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fields",{get:function(){return y("Table.fields",o,"1.4",i),this._F||(this._F=a(e.FieldCollection,this,"Fields",!0,4)),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"font",{get:function(){return this._Fo||(this._Fo=a(e.Font,this,"Font",!1,4)),this._Fo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"footnotes",{get:function(){return y("Table.footnotes","WordApiOnline","1.1",i),this._Foo||(this._Foo=a(e.NoteItemCollection,this,"Footnotes",!0,4)),this._Foo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentBody",{get:function(){return this._P||(this._P=a(e.Body,this,"ParentBody",!1,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControl",{get:function(){return this._Pa||(this._Pa=a(e.ContentControl,this,"ParentContentControl",!1,4)),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentContentControlOrNullObject",{get:function(){return this._Par||(this._Par=a(e.ContentControl,this,"ParentContentControlOrNullObject",!1,4)),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTable",{get:function(){return this._Pare||(this._Pare=a(e.Table,this,"ParentTable",!1,4)),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCell",{get:function(){return this._Paren||(this._Paren=a(e.TableCell,this,"ParentTableCell",!1,4)),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableCellOrNullObject",{get:function(){return this._Parent||(this._Parent=a(e.TableCell,this,"ParentTableCellOrNullObject",!1,4)),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTableOrNullObject",{get:function(){return this._ParentT||(this._ParentT=a(e.Table,this,"ParentTableOrNullObject",!1,4)),this._ParentT},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rows",{get:function(){return this._Ro||(this._Ro=a(e.TableRowCollection,this,"Rows",!0,4)),this._Ro},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tables",{get:function(){return this._T||(this._T=a(e.TableCollection,this,"Tables",!0,4)),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"alignment",{get:function(){return g("alignment",this._A,rt,this._isNull),this._A},set:function(e){this._A=e,d(this,"Alignment",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"headerRowCount",{get:function(){return g("headerRowCount",this._H,rt,this._isNull),this._H},set:function(e){this._H=e,d(this,"HeaderRowCount",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"horizontalAlignment",{get:function(){return g("horizontalAlignment",this._Ho,rt,this._isNull),this._Ho},set:function(e){this._Ho=e,d(this,"HorizontalAlignment",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isUniform",{get:function(){return g("isUniform",this._I,rt,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nestingLevel",{get:function(){return g("nestingLevel",this._N,rt,this._isNull),this._N},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rowCount",{get:function(){return g("rowCount",this._R,rt,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shadingColor",{get:function(){return g("shadingColor",this._S,rt,this._isNull),this._S},set:function(e){this._S=e,d(this,"ShadingColor",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"style",{get:function(){return g("style",this._St,rt,this._isNull),this._St},set:function(e){this._St=e,d(this,"Style",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"styleBandedColumns",{get:function(){return g("styleBandedColumns",this._Sty,rt,this._isNull),this._Sty},set:function(e){this._Sty=e,d(this,"StyleBandedColumns",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"styleBandedRows",{get:function(){return g("styleBandedRows",this._Styl,rt,this._isNull),this._Styl},set:function(e){this._Styl=e,d(this,"StyleBandedRows",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"styleBuiltIn",{get:function(){return g("styleBuiltIn",this._Style,rt,this._isNull),this._Style},set:function(e){this._Style=e,d(this,"StyleBuiltIn",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"styleFirstColumn",{get:function(){return g("styleFirstColumn",this._StyleF,rt,this._isNull),this._StyleF},set:function(e){this._StyleF=e,d(this,"StyleFirstColumn",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"styleLastColumn",{get:function(){return g("styleLastColumn",this._StyleL,rt,this._isNull),this._StyleL},set:function(e){this._StyleL=e,d(this,"StyleLastColumn",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"styleTotalRow",{get:function(){return g("styleTotalRow",this._StyleT,rt,this._isNull),this._StyleT},set:function(e){this._StyleT=e,d(this,"StyleTotalRow",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"values",{get:function(){return g("values",this._V,rt,this._isNull),this._V},set:function(e){this._V=e,d(this,"Values",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"verticalAlignment",{get:function(){return g("verticalAlignment",this._Ve,rt,this._isNull),this._Ve},set:function(e){this._Ve=e,d(this,"VerticalAlignment",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return g("width",this._W,rt,this._isNull),this._W},set:function(e){this._W=e,d(this,"Width",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Id",{get:function(){return g("_Id",this.__I,rt,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,rt,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["values","style","headerRowCount","styleTotalRow","styleFirstColumn","styleLastColumn","styleBandedRows","styleBandedColumns","shadingColor","horizontalAlignment","verticalAlignment","width","styleBuiltIn","alignment"],["font"],["endnotes","fields","footnotes","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","rows","tables"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.addColumns=function(e,t,n){f(this,"AddColumns",0,[e,t,n],0,0)},n.prototype.addRows=function(t,n,r){return s(e.TableRowCollection,this,"AddRows",0,[t,n,r],!0,!1,null,0)},n.prototype.autoFitWindow=function(){f(this,"AutoFitWindow",0,[],0,0)},n.prototype.clear=function(){f(this,"Clear",0,[],0,0)},n.prototype.delete=function(){f(this,"Delete",0,[],0,0)},n.prototype.deleteColumns=function(e,t){f(this,"DeleteColumns",0,[e,t],0,0)},n.prototype.deleteRows=function(e,t){f(this,"DeleteRows",0,[e,t],0,0)},n.prototype.distributeColumns=function(){f(this,"DistributeColumns",0,[],0,0)},n.prototype.getBorder=function(t){return s(e.TableBorder,this,"GetBorder",1,[t],!1,!1,null,4)},n.prototype.getCell=function(t,n){return s(e.TableCell,this,"GetCell",1,[t,n],!1,!1,null,4)},n.prototype.getCellOrNullObject=function(t,n){return s(e.TableCell,this,"GetCellOrNullObject",1,[t,n],!1,!1,null,4)},n.prototype.getCellPadding=function(e){return f(this,"GetCellPadding",1,[e],4,0)},n.prototype.getNext=function(){return s(e.Table,this,"GetNext",1,[],!1,!1,null,4)},n.prototype.getNextOrNullObject=function(){return s(e.Table,this,"GetNextOrNullObject",1,[],!1,!1,null,4)},n.prototype.getParagraphAfter=function(){return s(e.Paragraph,this,"GetParagraphAfter",1,[],!1,!1,null,4)},n.prototype.getParagraphAfterOrNullObject=function(){return s(e.Paragraph,this,"GetParagraphAfterOrNullObject",1,[],!1,!1,null,4)},n.prototype.getParagraphBefore=function(){return s(e.Paragraph,this,"GetParagraphBefore",1,[],!1,!1,null,4)},n.prototype.getParagraphBeforeOrNullObject=function(){return s(e.Paragraph,this,"GetParagraphBeforeOrNullObject",1,[],!1,!1,null,4)},n.prototype.getRange=function(t){return s(e.Range,this,"GetRange",1,[t],!1,!1,null,4)},n.prototype.insertContentControl=function(){return s(e.ContentControl,this,"InsertContentControl",0,[],!1,!0,null,0)},n.prototype.insertParagraph=function(t,n){return s(e.Paragraph,this,"InsertParagraph",0,[t,n],!1,!0,null,0)},n.prototype.insertTable=function(t,n,r,i){return s(e.Table,this,"InsertTable",0,[t,n,r,i],!1,!0,null,0)},n.prototype.mergeCells=function(t,n,r,a){return y("Table.mergeCells",o,"1.4",i),s(e.TableCell,this,"MergeCells",0,[t,n,r,a],!1,!0,null,0)},n.prototype.search=function(t,n){var r=E.Table_Search(this,t,n),i=r.handled,o=r.result;return i?o:s(e.RangeCollection,this,"Search",1,[t,n],!0,!1,null,4)},n.prototype.select=function(e){f(this,"Select",1,[e],4,0)},n.prototype.setCellPadding=function(e,t){f(this,"SetCellPadding",0,[e,t],0,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._Search2=function(t,n){return s(e.RangeCollection,this,"_Search2",1,[t,n],!0,!1,null,4)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.Alignment)||(this._A=n.Alignment),m(n.HeaderRowCount)||(this._H=n.HeaderRowCount),m(n.HorizontalAlignment)||(this._Ho=n.HorizontalAlignment),m(n.IsUniform)||(this._I=n.IsUniform),m(n.NestingLevel)||(this._N=n.NestingLevel),m(n.RowCount)||(this._R=n.RowCount),m(n.ShadingColor)||(this._S=n.ShadingColor),m(n.Style)||(this._St=n.Style),m(n.StyleBandedColumns)||(this._Sty=n.StyleBandedColumns),m(n.StyleBandedRows)||(this._Styl=n.StyleBandedRows),m(n.StyleBuiltIn)||(this._Style=n.StyleBuiltIn),m(n.StyleFirstColumn)||(this._StyleF=n.StyleFirstColumn),m(n.StyleLastColumn)||(this._StyleL=n.StyleLastColumn),m(n.StyleTotalRow)||(this._StyleT=n.StyleTotalRow),m(n.Values)||(this._V=n.Values),m(n.VerticalAlignment)||(this._Ve=n.VerticalAlignment),m(n.Width)||(this._W=n.Width),m(n._Id)||(this.__I=n._Id),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["endnotes","Endnotes","fields","Fields","font","Font","footnotes","Footnotes","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject","rows","Rows","tables","Tables"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e._Id)||(this.__I=e._Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{alignment:this._A,headerRowCount:this._H,horizontalAlignment:this._Ho,isUniform:this._I,nestingLevel:this._N,rowCount:this._R,shadingColor:this._S,style:this._St,styleBandedColumns:this._Sty,styleBandedRows:this._Styl,styleBuiltIn:this._Style,styleFirstColumn:this._StyleF,styleLastColumn:this._StyleL,styleTotalRow:this._StyleT,values:this._V,verticalAlignment:this._Ve,width:this._W},{fields:this._F,font:this._Fo,rows:this._Ro,tables:this._T})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.Table=it,function(i){i.Table_Search=function(i,o,a){var c;if(n()){var l=r(a);c=i._Search2(o,l)}else a=t(i.context,a),c=s(e.RangeCollection,i,"Search",1,[o,a],!0,!1,null,4);return{handled:!0,result:c}}}(E=e._CC||(e._CC={}));var ot="TableCollection",at=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"TableCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,ot,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,ot,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return s(e.Table,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return s(e.Table,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype._GetItem=function(t){return c(e.Table,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.Table,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.Table,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.Table,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.TableCollection=at;var st="TableRow",ct=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"TableRow"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","cellCount","rowIndex","values","shadingColor","horizontalAlignment","verticalAlignment","isHeader","preferredHeight"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_Id","_ReferenceId","CellCount","RowIndex","Values","ShadingColor","HorizontalAlignment","VerticalAlignment","IsHeader","PreferredHeight"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!1,!1,!0,!0,!0,!0,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["cells","parentTable","font","footnotes","endnotes","fields"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cells",{get:function(){return this._Ce||(this._Ce=a(e.TableCellCollection,this,"Cells",!0,4)),this._Ce},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"endnotes",{get:function(){return y("TableRow.endnotes","WordApiOnline","1.1",i),this._E||(this._E=a(e.NoteItemCollection,this,"Endnotes",!0,4)),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fields",{get:function(){return y("TableRow.fields",o,"1.4",i),this._F||(this._F=a(e.FieldCollection,this,"Fields",!0,4)),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"font",{get:function(){return this._Fo||(this._Fo=a(e.Font,this,"Font",!1,4)),this._Fo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"footnotes",{get:function(){return y("TableRow.footnotes","WordApiOnline","1.1",i),this._Foo||(this._Foo=a(e.NoteItemCollection,this,"Footnotes",!0,4)),this._Foo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTable",{get:function(){return this._P||(this._P=a(e.Table,this,"ParentTable",!1,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cellCount",{get:function(){return g("cellCount",this._C,st,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"horizontalAlignment",{get:function(){return g("horizontalAlignment",this._H,st,this._isNull),this._H},set:function(e){this._H=e,d(this,"HorizontalAlignment",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isHeader",{get:function(){return g("isHeader",this._I,st,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"preferredHeight",{get:function(){return g("preferredHeight",this._Pr,st,this._isNull),this._Pr},set:function(e){this._Pr=e,d(this,"PreferredHeight",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rowIndex",{get:function(){return g("rowIndex",this._R,st,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shadingColor",{get:function(){return g("shadingColor",this._S,st,this._isNull),this._S},set:function(e){this._S=e,d(this,"ShadingColor",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"values",{get:function(){return g("values",this._V,st,this._isNull),this._V},set:function(e){this._V=e,d(this,"Values",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"verticalAlignment",{get:function(){return g("verticalAlignment",this._Ve,st,this._isNull),this._Ve},set:function(e){this._Ve=e,d(this,"VerticalAlignment",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Id",{get:function(){return g("_Id",this.__I,st,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,st,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["values","shadingColor","horizontalAlignment","verticalAlignment","preferredHeight"],["font"],["cells","endnotes","fields","footnotes","parentTable"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.clear=function(){f(this,"Clear",0,[],0,0)},n.prototype.delete=function(){f(this,"Delete",0,[],0,0)},n.prototype.getBorder=function(t){return s(e.TableBorder,this,"GetBorder",1,[t],!1,!1,null,4)},n.prototype.getCellPadding=function(e){return f(this,"GetCellPadding",1,[e],4,0)},n.prototype.getNext=function(){return s(e.TableRow,this,"GetNext",1,[],!1,!1,null,4)},n.prototype.getNextOrNullObject=function(){return s(e.TableRow,this,"GetNextOrNullObject",1,[],!1,!1,null,4)},n.prototype.insertRows=function(t,n,r){return s(e.TableRowCollection,this,"InsertRows",1,[t,n,r],!0,!1,null,4)},n.prototype.merge=function(){return y("TableRow.merge",o,"1.4",i),s(e.TableCell,this,"Merge",0,[],!1,!1,null,0)},n.prototype.search=function(t,n){var r=E.TableRow_Search(this,t,n),i=r.handled,o=r.result;return i?o:s(e.RangeCollection,this,"Search",1,[t,n],!0,!1,null,4)},n.prototype.select=function(e){f(this,"Select",1,[e],4,0)},n.prototype.setCellPadding=function(e,t){f(this,"SetCellPadding",0,[e,t],0,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._Search2=function(t,n){return s(e.RangeCollection,this,"_Search2",1,[t,n],!0,!1,null,4)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.CellCount)||(this._C=n.CellCount),m(n.HorizontalAlignment)||(this._H=n.HorizontalAlignment),m(n.IsHeader)||(this._I=n.IsHeader),m(n.PreferredHeight)||(this._Pr=n.PreferredHeight),m(n.RowIndex)||(this._R=n.RowIndex),m(n.ShadingColor)||(this._S=n.ShadingColor),m(n.Values)||(this._V=n.Values),m(n.VerticalAlignment)||(this._Ve=n.VerticalAlignment),m(n._Id)||(this.__I=n._Id),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["cells","Cells","endnotes","Endnotes","fields","Fields","font","Font","footnotes","Footnotes","parentTable","ParentTable"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e._Id)||(this.__I=e._Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{cellCount:this._C,horizontalAlignment:this._H,isHeader:this._I,preferredHeight:this._Pr,rowIndex:this._R,shadingColor:this._S,values:this._V,verticalAlignment:this._Ve},{cells:this._Ce,fields:this._F,font:this._Fo})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.TableRow=ct,function(i){i.TableRow_Search=function(i,o,a){var c;if(n()){var l=r(a);c=i._Search2(o,l)}else a=t(i.context,a),c=s(e.RangeCollection,i,"Search",1,[o,a],!0,!1,null,4);return{handled:!0,result:c}}}(E=e._CC||(e._CC={}));var lt="TableRowCollection",ut=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"TableRowCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,lt,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,lt,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return s(e.TableRow,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return s(e.TableRow,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype._GetItem=function(t){return c(e.TableRow,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.TableRow,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.TableRow,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.TableRow,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.TableRowCollection=ut;var ft="TableCell",pt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"TableCell"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","rowIndex","cellIndex","value","shadingColor","horizontalAlignment","verticalAlignment","columnWidth","width"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_Id","_ReferenceId","RowIndex","CellIndex","Value","ShadingColor","HorizontalAlignment","VerticalAlignment","ColumnWidth","Width"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!1,!1,!0,!0,!0,!0,!0,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["parentTable","parentRow","body"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._B||(this._B=a(e.Body,this,"Body",!1,4)),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentRow",{get:function(){return this._P||(this._P=a(e.TableRow,this,"ParentRow",!1,4)),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentTable",{get:function(){return this._Pa||(this._Pa=a(e.Table,this,"ParentTable",!1,4)),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cellIndex",{get:function(){return g("cellIndex",this._C,ft,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"columnWidth",{get:function(){return g("columnWidth",this._Co,ft,this._isNull),this._Co},set:function(e){this._Co=e,d(this,"ColumnWidth",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"horizontalAlignment",{get:function(){return g("horizontalAlignment",this._H,ft,this._isNull),this._H},set:function(e){this._H=e,d(this,"HorizontalAlignment",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rowIndex",{get:function(){return g("rowIndex",this._R,ft,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shadingColor",{get:function(){return g("shadingColor",this._S,ft,this._isNull),this._S},set:function(e){this._S=e,d(this,"ShadingColor",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return g("value",this._V,ft,this._isNull),this._V},set:function(e){this._V=e,d(this,"Value",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"verticalAlignment",{get:function(){return g("verticalAlignment",this._Ve,ft,this._isNull),this._Ve},set:function(e){this._Ve=e,d(this,"VerticalAlignment",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return g("width",this._W,ft,this._isNull),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_Id",{get:function(){return g("_Id",this.__I,ft,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,ft,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["value","shadingColor","horizontalAlignment","verticalAlignment","columnWidth"],["body"],["parentRow","parentTable"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.deleteColumn=function(){f(this,"DeleteColumn",0,[],0,0)},n.prototype.deleteRow=function(){f(this,"DeleteRow",0,[],0,0)},n.prototype.getBorder=function(t){return s(e.TableBorder,this,"GetBorder",1,[t],!1,!1,null,4)},n.prototype.getCellPadding=function(e){return f(this,"GetCellPadding",1,[e],4,0)},n.prototype.getNext=function(){return s(e.TableCell,this,"GetNext",1,[],!1,!1,null,4)},n.prototype.getNextOrNullObject=function(){return s(e.TableCell,this,"GetNextOrNullObject",1,[],!1,!1,null,4)},n.prototype.insertColumns=function(e,t,n){f(this,"InsertColumns",0,[e,t,n],0,0)},n.prototype.insertRows=function(t,n,r){return s(e.TableRowCollection,this,"InsertRows",0,[t,n,r],!0,!1,null,0)},n.prototype.setCellPadding=function(e,t){f(this,"SetCellPadding",0,[e,t],0,0)},n.prototype.split=function(e,t){y("TableCell.split",o,"1.4",i),f(this,"Split",0,[e,t],0,0)},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!h(e)){var n=e;v(this,n),m(n.CellIndex)||(this._C=n.CellIndex),m(n.ColumnWidth)||(this._Co=n.ColumnWidth),m(n.HorizontalAlignment)||(this._H=n.HorizontalAlignment),m(n.RowIndex)||(this._R=n.RowIndex),m(n.ShadingColor)||(this._S=n.ShadingColor),m(n.Value)||(this._V=n.Value),m(n.VerticalAlignment)||(this._Ve=n.VerticalAlignment),m(n.Width)||(this._W=n.Width),m(n._Id)||(this.__I=n._Id),m(n._ReferenceId)||(this.__R=n._ReferenceId),S(this,n,["body","Body","parentRow","ParentRow","parentTable","ParentTable"])}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||(m(e._ReferenceId)||(this.__R=e._ReferenceId),m(e._Id)||(this.__I=e._Id))},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),D(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{cellIndex:this._C,columnWidth:this._Co,horizontalAlignment:this._H,rowIndex:this._R,shadingColor:this._S,value:this._V,verticalAlignment:this._Ve,width:this._W},{body:this._B})},n.prototype.setMockData=function(e){P(this,e)},n.prototype.ensureUnchanged=function(e){p(this,e)},n}(OfficeExtension.ClientObject);e.TableCell=pt;var dt="TableCellCollection",ht=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"TableCellCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return g("items",this.m__items,dt,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,dt,this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getFirst=function(){return s(e.TableCell,this,"GetFirst",1,[],!1,!1,null,4)},n.prototype.getFirstOrNullObject=function(){return s(e.TableCell,this,"GetFirstOrNullObject",1,[],!1,!1,null,4)},n.prototype._GetItem=function(t){return c(e.TableCell,this,[t])},n.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!h(n)){var r=n;if(v(this,r),m(r._ReferenceId)||(this.__R=r._ReferenceId),!h(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o<i.length;o++){var a=u(e.TableCell,!0,this,i[o],o);a._handleResult(i[o]),this.m__items.push(a)}}}},n.prototype.load=function(e){return _(this,e)},n.prototype.retrieve=function(e){return b(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),h(e)||m(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(n,r){var i=this;t.prototype._handleRetrieveResult.call(this,n,r),D(this,n,r,(function(t,n){return u(e.TableCell,!0,i,t,n)}))},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return O(this,{},{},this.m__items)},n.prototype.setMockData=function(t){var n=this;P(this,t,(function(t,r){return u(e.TableCell,!0,n,t,r)}),(function(e){return n.m__items=e}))},n}(OfficeExtension.ClientObject);e.TableCellCollection=ht;var mt="TableBorder",gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"TableBorder"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","color","type","width"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId","Color","Type","Width"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return g("color",this._C,mt,this._isNull),this._C},set:function(e){this._C=e,d(this,"Color",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return g("type",this._T,mt,this._isNull),this._T},set:function(e){this._T=e,d(this,"Type",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return g("width",this._W,mt,this._isNull),this._W},set:function(e){this._W=e,d(this,"Width",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_ReferenceId",{get:function(){return g("_ReferenceId",this.__R,mt,this._isNull),this.__R},enumerable:!0,configurable:!0}),t.prototype.set=function(e,t){this._recursivelySet(e,t,["color","type","width"],[],[])},t.prototype.update=function(e){this._recursivelyUpdate(e)},t.prototype._KeepReference=function(){f(this,"_KeepReference",1,[],4,0)},t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!h(t)){var n=t;v(this,n),m(n.Color)||(this._C=n.Color),m(n.Type)||(this._T=n.Type),m(n.Width)||(this._W=n.Width),m(n._ReferenceId)||(this.__R=n._ReferenceId)}},t.prototype.load=function(e){return _(this,e)},t.prototype.retrieve=function(e){return b(this,e)},t.prototype._handleIdResult=function(t){e.prototype._handleIdResult.call(this,t),h(t)||m(t._ReferenceId)||(this.__R=t._ReferenceId)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),D(this,t,n)},t.prototype.track=function(){return this.context.trackedObjects.add(this),this},t.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},t.prototype.toJSON=function(){return O(this,{color:this._C,type:this._T,width:this._W},{})},t.prototype.setMockData=function(e){P(this,e)},t.prototype.ensureUnchanged=function(e){p(this,e)},t}(OfficeExtension.ClientObject);e.TableBorder=gt,function(e){e.off="Off",e.trackAll="TrackAll",e.trackMineOnly="TrackMineOnly"}(e.ChangeTrackingMode||(e.ChangeTrackingMode={})),function(e){e.original="Original",e.current="Current"}(e.ChangeTrackingVersion||(e.ChangeTrackingVersion={})),function(e){e.footnote="Footnote",e.endnote="Endnote"}(e.NoteItemType||(e.NoteItemType={})),function(e){e.contentControlDeleted="ContentControlDeleted",e.contentControlSelectionChanged="ContentControlSelectionChanged",e.contentControlDataChanged="ContentControlDataChanged",e.contentControlAdded="ContentControlAdded",e.annotationAdded="AnnotationAdded",e.annotationChanged="AnnotationChanged",e.annotationDeleted="AnnotationDeleted",e.commentDeleted="CommentDeleted",e.commentSelected="CommentSelected",e.commentDeselected="CommentDeselected",e.commentChanged="CommentChanged",e.commentAdded="CommentAdded",e.contentControlEntered="ContentControlEntered",e.contentControlExited="ContentControlExited"}(e.EventType||(e.EventType={})),function(e){e.unknown="Unknown",e.richTextInline="RichTextInline",e.richTextParagraphs="RichTextParagraphs",e.richTextTableCell="RichTextTableCell",e.richTextTableRow="RichTextTableRow",e.richTextTable="RichTextTable",e.plainTextInline="PlainTextInline",e.plainTextParagraph="PlainTextParagraph",e.picture="Picture",e.buildingBlockGallery="BuildingBlockGallery",e.checkBox="CheckBox",e.comboBox="ComboBox",e.dropDownList="DropDownList",e.datePicker="DatePicker",e.repeatingSection="RepeatingSection",e.richText="RichText",e.plainText="PlainText"}(e.ContentControlType||(e.ContentControlType={})),function(e){e.boundingBox="BoundingBox",e.tags="Tags",e.hidden="Hidden"}(e.ContentControlAppearance||(e.ContentControlAppearance={})),function(e){e.mixed="Mixed",e.none="None",e.hidden="Hidden",e.dotLine="DotLine",e.single="Single",e.word="Word",e.double="Double",e.thick="Thick",e.dotted="Dotted",e.dottedHeavy="DottedHeavy",e.dashLine="DashLine",e.dashLineHeavy="DashLineHeavy",e.dashLineLong="DashLineLong",e.dashLineLongHeavy="DashLineLongHeavy",e.dotDashLine="DotDashLine",e.dotDashLineHeavy="DotDashLineHeavy",e.twoDotDashLine="TwoDotDashLine",e.twoDotDashLineHeavy="TwoDotDashLineHeavy",e.wave="Wave",e.waveHeavy="WaveHeavy",e.waveDouble="WaveDouble"}(e.UnderlineType||(e.UnderlineType={})),function(e){e.page="Page",e.next="Next",e.sectionNext="SectionNext",e.sectionContinuous="SectionContinuous",e.sectionEven="SectionEven",e.sectionOdd="SectionOdd",e.line="Line"}(e.BreakType||(e.BreakType={})),function(e){e.before="Before",e.after="After",e.start="Start",e.end="End",e.replace="Replace"}(e.InsertLocation||(e.InsertLocation={})),function(e){e.mixed="Mixed",e.unknown="Unknown",e.left="Left",e.centered="Centered",e.right="Right",e.justified="Justified"}(e.Alignment||(e.Alignment={})),function(e){e.primary="Primary",e.firstPage="FirstPage",e.evenPages="EvenPages"}(e.HeaderFooterType||(e.HeaderFooterType={})),function(e){e.unknown="Unknown",e.mainDoc="MainDoc",e.section="Section",e.header="Header",e.footer="Footer",e.tableCell="TableCell",e.footnote="Footnote",e.endnote="Endnote",e.noteItem="NoteItem"}(e.BodyType||(e.BodyType={})),function(e){e.select="Select",e.start="Start",e.end="End"}(e.SelectionMode||(e.SelectionMode={})),function(e){e.whole="Whole",e.start="Start",e.end="End",e.before="Before",e.after="After",e.content="Content"}(e.RangeLocation||(e.RangeLocation={})),function(e){e.unrelated="Unrelated",e.equal="Equal",e.containsStart="ContainsStart",e.containsEnd="ContainsEnd",e.contains="Contains",e.insideStart="InsideStart",e.insideEnd="InsideEnd",e.inside="Inside",e.adjacentBefore="AdjacentBefore",e.overlapsBefore="OverlapsBefore",e.before="Before",e.adjacentAfter="AdjacentAfter",e.overlapsAfter="OverlapsAfter",e.after="After"}(e.LocationRelation||(e.LocationRelation={})),function(e){e.top="Top",e.left="Left",e.bottom="Bottom",e.right="Right",e.insideHorizontal="InsideHorizontal",e.insideVertical="InsideVertical",e.inside="Inside",e.outside="Outside",e.all="All"}(e.BorderLocation||(e.BorderLocation={})),function(e){e.top="Top",e.left="Left",e.bottom="Bottom",e.right="Right"}(e.CellPaddingLocation||(e.CellPaddingLocation={})),function(e){e.mixed="Mixed",e.none="None",e.single="Single",e.double="Double",e.dotted="Dotted",e.dashed="Dashed",e.dotDashed="DotDashed",e.dot2Dashed="Dot2Dashed",e.triple="Triple",e.thinThickSmall="ThinThickSmall",e.thickThinSmall="ThickThinSmall",e.thinThickThinSmall="ThinThickThinSmall",e.thinThickMed="ThinThickMed",e.thickThinMed="ThickThinMed",e.thinThickThinMed="ThinThickThinMed",e.thinThickLarge="ThinThickLarge",e.thickThinLarge="ThickThinLarge",e.thinThickThinLarge="ThinThickThinLarge",e.wave="Wave",e.doubleWave="DoubleWave",e.dashedSmall="DashedSmall",e.dashDotStroked="DashDotStroked",e.threeDEmboss="ThreeDEmboss",e.threeDEngrave="ThreeDEngrave"}(e.BorderType||(e.BorderType={})),function(e){e.mixed="Mixed",e.top="Top",e.center="Center",e.bottom="Bottom"}(e.VerticalAlignment||(e.VerticalAlignment={})),function(e){e.bullet="Bullet",e.number="Number",e.picture="Picture"}(e.ListLevelType||(e.ListLevelType={})),function(e){e.custom="Custom",e.solid="Solid",e.hollow="Hollow",e.square="Square",e.diamonds="Diamonds",e.arrow="Arrow",e.checkmark="Checkmark"}(e.ListBullet||(e.ListBullet={})),function(e){e.none="None",e.arabic="Arabic",e.upperRoman="UpperRoman",e.lowerRoman="LowerRoman",e.upperLetter="UpperLetter",e.lowerLetter="LowerLetter"}(e.ListNumbering||(e.ListNumbering={})),function(e){e.other="Other",e.normal="Normal",e.heading1="Heading1",e.heading2="Heading2",e.heading3="Heading3",e.heading4="Heading4",e.heading5="Heading5",e.heading6="Heading6",e.heading7="Heading7",e.heading8="Heading8",e.heading9="Heading9",e.toc1="Toc1",e.toc2="Toc2",e.toc3="Toc3",e.toc4="Toc4",e.toc5="Toc5",e.toc6="Toc6",e.toc7="Toc7",e.toc8="Toc8",e.toc9="Toc9",e.footnoteText="FootnoteText",e.header="Header",e.footer="Footer",e.caption="Caption",e.footnoteReference="FootnoteReference",e.endnoteReference="EndnoteReference",e.endnoteText="EndnoteText",e.title="Title",e.subtitle="Subtitle",e.hyperlink="Hyperlink",e.strong="Strong",e.emphasis="Emphasis",e.noSpacing="NoSpacing",e.listParagraph="ListParagraph",e.quote="Quote",e.intenseQuote="IntenseQuote",e.subtleEmphasis="SubtleEmphasis",e.intenseEmphasis="IntenseEmphasis",e.subtleReference="SubtleReference",e.intenseReference="IntenseReference",e.bookTitle="BookTitle",e.bibliography="Bibliography",e.tocHeading="TocHeading",e.tableGrid="TableGrid",e.plainTable1="PlainTable1",e.plainTable2="PlainTable2",e.plainTable3="PlainTable3",e.plainTable4="PlainTable4",e.plainTable5="PlainTable5",e.tableGridLight="TableGridLight",e.gridTable1Light="GridTable1Light",e.gridTable1Light_Accent1="GridTable1Light_Accent1",e.gridTable1Light_Accent2="GridTable1Light_Accent2",e.gridTable1Light_Accent3="GridTable1Light_Accent3",e.gridTable1Light_Accent4="GridTable1Light_Accent4",e.gridTable1Light_Accent5="GridTable1Light_Accent5",e.gridTable1Light_Accent6="GridTable1Light_Accent6",e.gridTable2="GridTable2",e.gridTable2_Accent1="GridTable2_Accent1",e.gridTable2_Accent2="GridTable2_Accent2",e.gridTable2_Accent3="GridTable2_Accent3",e.gridTable2_Accent4="GridTable2_Accent4",e.gridTable2_Accent5="GridTable2_Accent5",e.gridTable2_Accent6="GridTable2_Accent6",e.gridTable3="GridTable3",e.gridTable3_Accent1="GridTable3_Accent1",e.gridTable3_Accent2="GridTable3_Accent2",e.gridTable3_Accent3="GridTable3_Accent3",e.gridTable3_Accent4="GridTable3_Accent4",e.gridTable3_Accent5="GridTable3_Accent5",e.gridTable3_Accent6="GridTable3_Accent6",e.gridTable4="GridTable4",e.gridTable4_Accent1="GridTable4_Accent1",e.gridTable4_Accent2="GridTable4_Accent2",e.gridTable4_Accent3="GridTable4_Accent3",e.gridTable4_Accent4="GridTable4_Accent4",e.gridTable4_Accent5="GridTable4_Accent5",e.gridTable4_Accent6="GridTable4_Accent6",e.gridTable5Dark="GridTable5Dark",e.gridTable5Dark_Accent1="GridTable5Dark_Accent1",e.gridTable5Dark_Accent2="GridTable5Dark_Accent2",e.gridTable5Dark_Accent3="GridTable5Dark_Accent3",e.gridTable5Dark_Accent4="GridTable5Dark_Accent4",e.gridTable5Dark_Accent5="GridTable5Dark_Accent5",e.gridTable5Dark_Accent6="GridTable5Dark_Accent6",e.gridTable6Colorful="GridTable6Colorful",e.gridTable6Colorful_Accent1="GridTable6Colorful_Accent1",e.gridTable6Colorful_Accent2="GridTable6Colorful_Accent2",e.gridTable6Colorful_Accent3="GridTable6Colorful_Accent3",e.gridTable6Colorful_Accent4="GridTable6Colorful_Accent4",e.gridTable6Colorful_Accent5="GridTable6Colorful_Accent5",e.gridTable6Colorful_Accent6="GridTable6Colorful_Accent6",e.gridTable7Colorful="GridTable7Colorful",e.gridTable7Colorful_Accent1="GridTable7Colorful_Accent1",e.gridTable7Colorful_Accent2="GridTable7Colorful_Accent2",e.gridTable7Colorful_Accent3="GridTable7Colorful_Accent3",e.gridTable7Colorful_Accent4="GridTable7Colorful_Accent4",e.gridTable7Colorful_Accent5="GridTable7Colorful_Accent5",e.gridTable7Colorful_Accent6="GridTable7Colorful_Accent6",e.listTable1Light="ListTable1Light",e.listTable1Light_Accent1="ListTable1Light_Accent1",e.listTable1Light_Accent2="ListTable1Light_Accent2",e.listTable1Light_Accent3="ListTable1Light_Accent3",e.listTable1Light_Accent4="ListTable1Light_Accent4",e.listTable1Light_Accent5="ListTable1Light_Accent5",e.listTable1Light_Accent6="ListTable1Light_Accent6",e.listTable2="ListTable2",e.listTable2_Accent1="ListTable2_Accent1",e.listTable2_Accent2="ListTable2_Accent2",e.listTable2_Accent3="ListTable2_Accent3",e.listTable2_Accent4="ListTable2_Accent4",e.listTable2_Accent5="ListTable2_Accent5",e.listTable2_Accent6="ListTable2_Accent6",e.listTable3="ListTable3",e.listTable3_Accent1="ListTable3_Accent1",e.listTable3_Accent2="ListTable3_Accent2",e.listTable3_Accent3="ListTable3_Accent3",e.listTable3_Accent4="ListTable3_Accent4",e.listTable3_Accent5="ListTable3_Accent5",e.listTable3_Accent6="ListTable3_Accent6",e.listTable4="ListTable4",e.listTable4_Accent1="ListTable4_Accent1",e.listTable4_Accent2="ListTable4_Accent2",e.listTable4_Accent3="ListTable4_Accent3",e.listTable4_Accent4="ListTable4_Accent4",e.listTable4_Accent5="ListTable4_Accent5",e.listTable4_Accent6="ListTable4_Accent6",e.listTable5Dark="ListTable5Dark",e.listTable5Dark_Accent1="ListTable5Dark_Accent1",e.listTable5Dark_Accent2="ListTable5Dark_Accent2",e.listTable5Dark_Accent3="ListTable5Dark_Accent3",e.listTable5Dark_Accent4="ListTable5Dark_Accent4",e.listTable5Dark_Accent5="ListTable5Dark_Accent5",e.listTable5Dark_Accent6="ListTable5Dark_Accent6",e.listTable6Colorful="ListTable6Colorful",e.listTable6Colorful_Accent1="ListTable6Colorful_Accent1",e.listTable6Colorful_Accent2="ListTable6Colorful_Accent2",e.listTable6Colorful_Accent3="ListTable6Colorful_Accent3",e.listTable6Colorful_Accent4="ListTable6Colorful_Accent4",e.listTable6Colorful_Accent5="ListTable6Colorful_Accent5",e.listTable6Colorful_Accent6="ListTable6Colorful_Accent6",e.listTable7Colorful="ListTable7Colorful",e.listTable7Colorful_Accent1="ListTable7Colorful_Accent1",e.listTable7Colorful_Accent2="ListTable7Colorful_Accent2",e.listTable7Colorful_Accent3="ListTable7Colorful_Accent3",e.listTable7Colorful_Accent4="ListTable7Colorful_Accent4",e.listTable7Colorful_Accent5="ListTable7Colorful_Accent5",e.listTable7Colorful_Accent6="ListTable7Colorful_Accent6"}(e.BuiltInStyleName||(e.BuiltInStyleName={})),function(e){e.string="String",e.number="Number",e.date="Date",e.boolean="Boolean"}(e.DocumentPropertyType||(e.DocumentPropertyType={})),function(e){e.chart="Chart",e.smartArt="SmartArt",e.table="Table",e.image="Image",e.slide="Slide",e.ole="OLE",e.text="Text"}(e.TapObjectType||(e.TapObjectType={})),function(e){e.base64="Base64",e.html="Html",e.ooxml="Ooxml"}(e.FileContentFormat||(e.FileContentFormat={})),function(e){e.none="None",e.document="Document",e.paragraph="Paragraph",e.annotation="Annotation"}(e.AnnotationParentType||(e.AnnotationParentType={})),function(e){e[void 0]="Undefined",e.created="Created",e.sent="Sent",e.duplicated="Duplicated",e.seen="Seen",e.tried="Tried",e.kept="Kept",e.rejected="Rejected"}(e.AnnotationState||(e.AnnotationState={})),function(e){e.save="Save",e.prompt="Prompt"}(e.SaveBehavior||(e.SaveBehavior={})),function(e){e.accessDenied="AccessDenied",e.generalException="GeneralException",e.invalidArgument="InvalidArgument",e.itemNotFound="ItemNotFound",e.notImplemented="NotImplemented",e.searchDialogIsOpen="SearchDialogIsOpen",e.searchStringInvalidOrTooLong="SearchStringInvalidOrTooLong"}(e.ErrorCodes||(e.ErrorCodes={})),e.Interfaces||(e.Interfaces={})}(Word||(Word={})),void 0!==Word.Style&&function(e){e.other="Other",e.normal="Normal",e.heading1="Heading1",e.heading2="Heading2",e.heading3="Heading3",e.heading4="Heading4",e.heading5="Heading5",e.heading6="Heading6",e.heading7="Heading7",e.heading8="Heading8",e.heading9="Heading9",e.toc1="Toc1",e.toc2="Toc2",e.toc3="Toc3",e.toc4="Toc4",e.toc5="Toc5",e.toc6="Toc6",e.toc7="Toc7",e.toc8="Toc8",e.toc9="Toc9",e.footnoteText="FootnoteText",e.header="Header",e.footer="Footer",e.caption="Caption",e.footnoteReference="FootnoteReference",e.endnoteReference="EndnoteReference",e.endnoteText="EndnoteText",e.title="Title",e.subtitle="Subtitle",e.hyperlink="Hyperlink",e.strong="Strong",e.emphasis="Emphasis",e.noSpacing="NoSpacing",e.listParagraph="ListParagraph",e.quote="Quote",e.intenseQuote="IntenseQuote",e.subtleEmphasis="SubtleEmphasis",e.intenseEmphasis="IntenseEmphasis",e.subtleReference="SubtleReference",e.intenseReference="IntenseReference",e.bookTitle="BookTitle",e.bibliography="Bibliography",e.tocHeading="TocHeading",e.tableGrid="TableGrid",e.plainTable1="PlainTable1",e.plainTable2="PlainTable2",e.plainTable3="PlainTable3",e.plainTable4="PlainTable4",e.plainTable5="PlainTable5",e.tableGridLight="TableGridLight",e.gridTable1Light="GridTable1Light",e.gridTable1Light_Accent1="GridTable1Light_Accent1",e.gridTable1Light_Accent2="GridTable1Light_Accent2",e.gridTable1Light_Accent3="GridTable1Light_Accent3",e.gridTable1Light_Accent4="GridTable1Light_Accent4",e.gridTable1Light_Accent5="GridTable1Light_Accent5",e.gridTable1Light_Accent6="GridTable1Light_Accent6",e.gridTable2="GridTable2",e.gridTable2_Accent1="GridTable2_Accent1",e.gridTable2_Accent2="GridTable2_Accent2",e.gridTable2_Accent3="GridTable2_Accent3",e.gridTable2_Accent4="GridTable2_Accent4",e.gridTable2_Accent5="GridTable2_Accent5",e.gridTable2_Accent6="GridTable2_Accent6",e.gridTable3="GridTable3",e.gridTable3_Accent1="GridTable3_Accent1",e.gridTable3_Accent2="GridTable3_Accent2",e.gridTable3_Accent3="GridTable3_Accent3",e.gridTable3_Accent4="GridTable3_Accent4",e.gridTable3_Accent5="GridTable3_Accent5",e.gridTable3_Accent6="GridTable3_Accent6",e.gridTable4="GridTable4",e.gridTable4_Accent1="GridTable4_Accent1",e.gridTable4_Accent2="GridTable4_Accent2",e.gridTable4_Accent3="GridTable4_Accent3",e.gridTable4_Accent4="GridTable4_Accent4",e.gridTable4_Accent5="GridTable4_Accent5",e.gridTable4_Accent6="GridTable4_Accent6",e.gridTable5Dark="GridTable5Dark",e.gridTable5Dark_Accent1="GridTable5Dark_Accent1",e.gridTable5Dark_Accent2="GridTable5Dark_Accent2",e.gridTable5Dark_Accent3="GridTable5Dark_Accent3",e.gridTable5Dark_Accent4="GridTable5Dark_Accent4",e.gridTable5Dark_Accent5="GridTable5Dark_Accent5",e.gridTable5Dark_Accent6="GridTable5Dark_Accent6",e.gridTable6Colorful="GridTable6Colorful",e.gridTable6Colorful_Accent1="GridTable6Colorful_Accent1",e.gridTable6Colorful_Accent2="GridTable6Colorful_Accent2",e.gridTable6Colorful_Accent3="GridTable6Colorful_Accent3",e.gridTable6Colorful_Accent4="GridTable6Colorful_Accent4",e.gridTable6Colorful_Accent5="GridTable6Colorful_Accent5",e.gridTable6Colorful_Accent6="GridTable6Colorful_Accent6",e.gridTable7Colorful="GridTable7Colorful",e.gridTable7Colorful_Accent1="GridTable7Colorful_Accent1",e.gridTable7Colorful_Accent2="GridTable7Colorful_Accent2",e.gridTable7Colorful_Accent3="GridTable7Colorful_Accent3",e.gridTable7Colorful_Accent4="GridTable7Colorful_Accent4",e.gridTable7Colorful_Accent5="GridTable7Colorful_Accent5",e.gridTable7Colorful_Accent6="GridTable7Colorful_Accent6",e.listTable1Light="ListTable1Light",e.listTable1Light_Accent1="ListTable1Light_Accent1",e.listTable1Light_Accent2="ListTable1Light_Accent2",e.listTable1Light_Accent3="ListTable1Light_Accent3",e.listTable1Light_Accent4="ListTable1Light_Accent4",e.listTable1Light_Accent5="ListTable1Light_Accent5",e.listTable1Light_Accent6="ListTable1Light_Accent6",e.listTable2="ListTable2",e.listTable2_Accent1="ListTable2_Accent1",e.listTable2_Accent2="ListTable2_Accent2",e.listTable2_Accent3="ListTable2_Accent3",e.listTable2_Accent4="ListTable2_Accent4",e.listTable2_Accent5="ListTable2_Accent5",e.listTable2_Accent6="ListTable2_Accent6",e.listTable3="ListTable3",e.listTable3_Accent1="ListTable3_Accent1",e.listTable3_Accent2="ListTable3_Accent2",e.listTable3_Accent3="ListTable3_Accent3",e.listTable3_Accent4="ListTable3_Accent4",e.listTable3_Accent5="ListTable3_Accent5",e.listTable3_Accent6="ListTable3_Accent6",e.listTable4="ListTable4",e.listTable4_Accent1="ListTable4_Accent1",e.listTable4_Accent2="ListTable4_Accent2",e.listTable4_Accent3="ListTable4_Accent3",e.listTable4_Accent4="ListTable4_Accent4",e.listTable4_Accent5="ListTable4_Accent5",e.listTable4_Accent6="ListTable4_Accent6",e.listTable5Dark="ListTable5Dark",e.listTable5Dark_Accent1="ListTable5Dark_Accent1",e.listTable5Dark_Accent2="ListTable5Dark_Accent2",e.listTable5Dark_Accent3="ListTable5Dark_Accent3",e.listTable5Dark_Accent4="ListTable5Dark_Accent4",e.listTable5Dark_Accent5="ListTable5Dark_Accent5",e.listTable5Dark_Accent6="ListTable5Dark_Accent6",e.listTable6Colorful="ListTable6Colorful",e.listTable6Colorful_Accent1="ListTable6Colorful_Accent1",e.listTable6Colorful_Accent2="ListTable6Colorful_Accent2",e.listTable6Colorful_Accent3="ListTable6Colorful_Accent3",e.listTable6Colorful_Accent4="ListTable6Colorful_Accent4",e.listTable6Colorful_Accent5="ListTable6Colorful_Accent5",e.listTable6Colorful_Accent6="ListTable6Colorful_Accent6",e.listTable7Colorful="ListTable7Colorful",e.listTable7Colorful_Accent1="ListTable7Colorful_Accent1",e.listTable7Colorful_Accent2="ListTable7Colorful_Accent2",e.listTable7Colorful_Accent3="ListTable7Colorful_Accent3",e.listTable7Colorful_Accent4="ListTable7Colorful_Accent4",e.listTable7Colorful_Accent5="ListTable7Colorful_Accent5",e.listTable7Colorful_Accent6="ListTable7Colorful_Accent6"}(Word.Style),function(e){var t=function(t){function n(n){var r=t.call(this,n)||this;return r.m_document=new e.Document(r,OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(r)),r._rootObject=r.m_document,r}return __extends(n,t),Object.defineProperty(n.prototype,"document",{get:function(){return this.m_document},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"application",{get:function(){return null==this.m_application&&(this.m_application=new e.Application(this,OfficeExtension.ObjectPathFactory.createNewObjectObjectPath(this,"Microsoft.WordServices.Application",!1))),this.m_application},enumerable:!0,configurable:!0}),n}(OfficeCore.RequestContext);e.RequestContext=t,e.run=function(t,n){return OfficeExtension.ClientRequestContext._runBatch("Word.run",arguments,(function(){return new e.RequestContext}))}}(Word||(Word={})),OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel=!0,OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria=!1,window.OfficeExtensionBatch=window.OfficeExtension,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=OfficeExtensionBatch},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i,o,a=n(2),s=n(4),c=n(5),l=n(6),u=n(7),f=n(8),p=n(9),d=n(12),h=n(13);void 0!==OSF&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&0!=(1&OSF._OfficeAppFactory.getHostInfo().flags)?(i=l,o=u.storage):(i=c.AsyncStorage,o=c.storage),window._OfficeRuntimeNative=r(r({},window.OfficeRuntime),{displayWebDialog:s.displayWebDialog,AsyncStorage:i,storage:o,experimentation:f.experimentation,apiInformation:a.apiInformation,message:p.Message.instance,ui:d.ui,auth:h.Auth.instance}),Object.freeze(window._OfficeRuntimeNative)},function(e,t,n){"use strict";(function(e){function n(e){var t,n=e.split("."),r=0,i=0;if(n.length<2&&isNaN(Number(e)))throw"version format incorrect";if(t=Number(n[0]),n.length>=2&&(r=Number(n[1])),n.length>=3&&(i=Number(n[2])),isNaN(t)||isNaN(r)||isNaN(i))throw"version format incorrect";return{major:t,minor:r,patch:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.apiInformation=void 0,t.apiInformation={isSetSupported:function(t,r){if("string"!=typeof t)return!1;if(null==r&&(r="0.0.0"),void 0===e.__apiSets)return!1;var i=e.__apiSets,o=Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf(t.toLowerCase());if(o>-1){var a=i[Object.keys(i)[o]];try{var s,c=n(r);if((s=Array.isArray(a)?function(e,t){for(var r=0;r<e.length;r++){var i=n(e[r]);if(i.major==t)return i}return{major:0,minor:0,patch:0}}(a,c.major):n(a)).major>0){if(s.major>c.major)return!0;if(s.major==c.major&&s.minor>c.minor)return!0;if(s.major==c.major&&s.minor==c.minor&&s.patch>=c.patch)return!0}}catch(e){return!1}}return!1}}}).call(this,n(3))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DialogErrorCodes=t.DialogService=t.displayWebDialog=t.Dialog=void 0;var o=n(0),a=(o.BatchApiHelper.createPropertyObject,o.BatchApiHelper.createMethodObject,o.BatchApiHelper.createIndexerObject,o.BatchApiHelper.createRootServiceObject,o.BatchApiHelper.createTopLevelServiceObject),s=(o.BatchApiHelper.createChildItemObject,o.BatchApiHelper.invokeMethod),c=(o.BatchApiHelper.invokeEnsureUnchanged,o.BatchApiHelper.invokeSetProperty,o.Utility.isNullOrUndefined),l=(o.Utility.isUndefined,o.Utility.throwIfNotLoaded,o.Utility.throwIfApiNotSupported,o.Utility.load,o.Utility.retrieve,o.Utility.toJson),u=o.Utility.fixObjectPathIfNecessary,f=(o.Utility._handleNavigationPropertyResults,o.Utility.adjustToDateTime,o.Utility.processRetrieveResult),p=(o.Utility.setMockData,o.CommonUtility.calculateApiFlags,function(){function e(e){this._dialogService=e}return e.prototype.close=function(){return this._dialogService.close(),this._dialogService.context.sync()},e}());t.Dialog=p,t.displayWebDialog=function(e,t){return void 0===t&&(t={}),new o.CoreUtility.Promise((function(r,i){if(t.width&&t.height&&(!n(t.width)||!n(t.height)))throw new o.Error({code:"InvalidArgument",message:'Dimensions must be "number%" or number.'});var a=new o.ClientRequestContext,s=h.newObject(a),c=new p(s),l=s.onDialogMessage.add((function(e){switch(o.Utility.log("dialogMessageHandler:"+JSON.stringify(e)),e.type){case 17:e.error?i(e.error):r(c);break;case 12:t.onMessage&&t.onMessage(e.message,c,e.origin);break;case 10:default:12006===e.originalErrorCode?(l&&(l.remove(),a.sync()),t.onClose&&t.onClose()):t.onRuntimeError&&(t.onRuntimeError(e.error,c),i(e.error))}return o.CoreUtility.Promise.resolve()}));return a.sync().then((function(){var n={width:t.width?parseInt(t.width):50,height:t.height?parseInt(t.height):50,displayInIFrame:t.displayInIFrame};return s.displayDialog(e,n),a.sync()})).catch((function(e){i(e)}))}));function n(e){return/^(\-|\+)?([0-9]+)%?$/.test(e)}};var d,h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"DialogService"},enumerable:!1,configurable:!0}),t.prototype.close=function(){s(this,"Close",1,[],4,0)},t.prototype.displayDialog=function(e,t){s(this,"DisplayDialog",1,[e,t],4,0)},t.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),c(t)||u(this,t)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),f(this,t,n)},t.newObject=function(e){return a(t,e,"Microsoft.Dialog.DialogService",!1,4)},Object.defineProperty(t.prototype,"onDialogMessage",{get:function(){return this.m_dialogMessage||(this.m_dialogMessage=new o.GenericEventHandlers(this.context,this,"DialogMessage",{eventType:65536,registerFunc:function(){},unregisterFunc:function(){},getTargetIdFunc:function(){return null},eventArgsTransformFunc:function(e){var t,n,r,i;try{var a=JSON.parse(e.message),s=a.errorCode?new o.Error((n=a.errorCode,(r={})[12002]={code:"InvalidUrl",message:"Cannot load URL, no such page or bad URL syntax."},r[12003]={code:"InvalidUrl",message:"HTTPS is required."},r[12004]={code:"Untrusted",message:"Domain is not trusted."},r[12005]={code:"InvalidUrl",message:"HTTPS is required."},r[12007]={code:"FailedToOpen",message:"Another dialog is already opened."},(i=r)[n]?i[n]:{code:"Unknown",message:"An unknown error has occured with code: "+n})):null;t={originalErrorCode:a.errorCode,type:a.type,error:s,message:a.message,origin:a.origin}}catch(e){t={originalErrorCode:null,type:17,error:new o.Error({code:"GenericException",message:"Unknown error"}),message:e.message}}return o.Utility._createPromiseFromResult(t)}})),this.m_dialogMessage},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return l(this,{},{})},t}(o.ClientObject);t.DialogService=h,function(e){e[e.dialogMessageReceived=0]="dialogMessageReceived",e[e.dialogEventReceived=1]="dialogEventReceived"}(d||(d={})),(t.DialogErrorCodes||(t.DialogErrorCodes={})).generalException="GeneralException"},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCodes=t.PersistentKvStorageService=t.storage=t.AsyncStorage=void 0;var o=n(0),a=(o.BatchApiHelper.createPropertyObject,o.BatchApiHelper.createMethodObject,o.BatchApiHelper.createIndexerObject,o.BatchApiHelper.createRootServiceObject,o.BatchApiHelper.createTopLevelServiceObject),s=(o.BatchApiHelper.createChildItemObject,o.BatchApiHelper.invokeMethod),c=(o.BatchApiHelper.invokeEnsureUnchanged,o.BatchApiHelper.invokeSetProperty,o.Utility.isNullOrUndefined),l=(o.Utility.isUndefined,o.Utility.throwIfNotLoaded,o.Utility.throwIfApiNotSupported,o.Utility.load,o.Utility.retrieve,o.Utility.toJson),u=o.Utility.fixObjectPathIfNecessary,f=(o.Utility._handleNavigationPropertyResults,o.Utility.adjustToDateTime,o.Utility.processRetrieveResult);function p(e,t){return new o.CoreUtility.Promise((function(n,r){var i=h.getInstance(),o=i.setCallBack((function(e,i){if(i)r(i);else{var o=t(e);n(o)}}));i.ctx.sync().then((function(){var t=i.getPersistentKvStorageService();return e(t,o),i.ctx.sync()})).catch((function(e){r(e)}))}))}function d(e,t,n){return new o.CoreUtility.Promise((function(r,i){var o=h.getInstance(),a=o.setCallBack((function(e,o){if(o)return n&&n(o),void i(o);var a=t(e);n&&n(null,a),r(a)}));o.ctx.sync().then((function(){var t=o.getPersistentKvStorageService();return e(t,a),o.ctx.sync()})).catch((function(e){i(e)}))}))}o.Utility.setMockData,o.CommonUtility.calculateApiFlags,t.AsyncStorage={getItem:function(e,t){return d((function(t,n){return t.multiGet(n,JSON.stringify([e]))}),(function(e){var t=JSON.parse(e);return t&&t[0]&&t[0][1]?t[0][1]:null}),t)},setItem:function(e,t,n){return d((function(n,r){return n.multiSet(r,JSON.stringify([[e,t]]))}),(function(){return null}),n)},removeItem:function(e,t){return d((function(t,n){return t.multiRemove(n,JSON.stringify([e]))}),(function(){return null}),t)},multiGet:function(e,t){return d((function(t,n){return t.multiGet(n,JSON.stringify(e))}),(function(t){var n=JSON.parse(t),r={};return n&&n.forEach((function(e){var t=e[0],n=e[1];return r[t]=n,n})),e.map((function(e){return[e,r[e]?r[e]:null]}))}),t)},multiSet:function(e,t){return d((function(t,n){return t.multiSet(n,JSON.stringify(e))}),(function(){return null}),t)},multiRemove:function(e,t){return d((function(t,n){return t.multiRemove(n,JSON.stringify(e))}),(function(){return null}),t)},getAllKeys:function(e){return d((function(e,t){return e.getAllKeys(t)}),(function(e){return JSON.parse(e)}),e)},clear:function(e){return d((function(e,t){return e.clear(t)}),(function(){return null}),e)}},t.storage={getItem:function(e){return p((function(t,n){return t.multiGet(n,JSON.stringify([e]))}),(function(e){var t=JSON.parse(e);return t&&t[0]&&t[0][1]?t[0][1]:null}))},setItem:function(e,t){return p((function(n,r){return n.multiSet(r,JSON.stringify([[e,t]]))}),(function(){return null}))},removeItem:function(e){return p((function(t,n){return t.multiRemove(n,JSON.stringify([e]))}),(function(){return null}))},getItems:function(e){return p((function(t,n){return t.multiGet(n,JSON.stringify(e))}),(function(t){var n=JSON.parse(t),r={};return e.forEach((function(e){r[e]=null})),n&&n.forEach((function(e){var t=e[0],n=e[1];return r[t]=n,n})),r}))},setItems:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push([n,e[n]]);return p((function(e,n){return e.multiSet(n,JSON.stringify(t))}),(function(){return null}))},removeItems:function(e){return p((function(t,n){return t.multiRemove(n,JSON.stringify(e))}),(function(){return null}))},getKeys:function(){return p((function(e,t){return e.getAllKeys(t)}),(function(e){return JSON.parse(e)}))}};var h=function(){function e(){var e=this;this._invokeId=0,this._callDict={},this.ctx=new o.ClientRequestContext,this._perkvstorService=m.newObject(this.ctx),this._eventResult=this._perkvstorService.onPersistentStorageMessage.add((function(t){o.Utility.log("persistentKvStoragegMessageHandler:"+JSON.stringify(t));var n=e._callDict[t.invokeId];n&&(n(t.message,t.error),delete e._callDict[t.invokeId])}))}return e.getInstance=function(){return void 0===e.instance?e.instance=new e:e.instance._perkvstorService=m.newObject(e.instance.ctx),e.instance},e.prototype.getPersistentKvStorageService=function(){return this._perkvstorService},e.prototype.getCallBack=function(e){return this._callDict[e]},e.prototype.setCallBack=function(e){var t=this._invokeId;return this._callDict[this._invokeId++]=e,t},e}(),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"PersistentKvStorageService"},enumerable:!1,configurable:!0}),t.prototype.clear=function(e){s(this,"Clear",1,[e],4,0)},t.prototype.getAllKeys=function(e){s(this,"GetAllKeys",1,[e],4,0)},t.prototype.multiGet=function(e,t){s(this,"MultiGet",1,[e,t],4,0)},t.prototype.multiRemove=function(e,t){s(this,"MultiRemove",1,[e,t],4,0)},t.prototype.multiSet=function(e,t){s(this,"MultiSet",1,[e,t],4,0)},t.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),c(t)||u(this,t)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),f(this,t,n)},t.newObject=function(e){return a(t,e,"Microsoft.PersistentKvStorage.PersistentKvStorageService",!1,4)},Object.defineProperty(t.prototype,"onPersistentStorageMessage",{get:function(){return this.m_persistentStorageMessage||(this.m_persistentStorageMessage=new o.GenericEventHandlers(this.context,this,"PersistentStorageMessage",{eventType:65537,registerFunc:function(){},unregisterFunc:function(){},getTargetIdFunc:function(){return null},eventArgsTransformFunc:function(e){var t,n,r,i;try{var a=JSON.parse(e.message),s=parseInt(a.errorCode),c=0!=s?new o.Error((n=s,(r={})[16389]={code:"GenericException",message:"Unknown error."},r[65535]={code:"Unexcepted",message:"Catastrophic failure."},r[14]={code:"OutOfMemory",message:"Ran out of memory."},r[87]={code:"InvalidArg",message:"One or more arguments are invalid."},r[16385]={code:"NotImplemented",message:"Not implemented."},r[6]={code:"BadHandle",message:"File Handle is not Set."},r[5]={code:"AccessDenied",message:"Can't read the Storage File."},(i=r)[n]?i[n]:{code:"Unknown",message:"An unknown error has occured"})):null;t={invokeId:a.invokeId,message:a.message,error:c}}catch(e){t={invokeId:-1,message:e.message,error:new o.Error({code:"GenericException",message:"Unknown error"})}}return o.Utility._createPromiseFromResult(t)}})),this.m_persistentStorageMessage},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return l(this,{},{})},t}(o.ClientObject);t.PersistentKvStorageService=m,(t.ErrorCodes||(t.ErrorCodes={})).generalException="GeneralException"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiGet=t.multiRemove=t.multiSet=t.getAllKeys=t.clear=t.removeItem=t.setItem=t.getItem=void 0;var r="_Office_AsyncStorage_";function i(){window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_",null),window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_")}function o(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,r){try{i(),e(),t(null),n()}catch(e){t(e),r(e)}}))}function a(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,r){try{i();var o=e();t(null,o),n(o)}catch(e){t(e,null),r(e)}}))}function s(e,t,n){return void 0===n&&(n=function(){}),new Promise((function(r,o){var a=[];try{i()}catch(e){a.push(e)}e.forEach((function(e){try{t(e)}catch(e){a.push(e)}})),n(a),a.length>0?o(a):r()}))}t.getItem=function(e,t){return a((function(){return window.localStorage.getItem(r+e)}),t)},t.setItem=function(e,t,n){return o((function(){return window.localStorage.setItem(r+e,t)}),n)},t.removeItem=function(e,t){return o((function(){return window.localStorage.removeItem(r+e)}),t)},t.clear=function(e){return o((function(){Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).forEach((function(e){return window.localStorage.removeItem(e)}))}),e)},t.getAllKeys=function(e){return a((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}),e)},t.multiSet=function(e,t){return s(e,(function(e){var t=e[0],n=e[1];return window.localStorage.setItem(r+t,n)}),t)},t.multiRemove=function(e,t){return s(e,(function(e){return window.localStorage.removeItem(r+e)}),t)},t.multiGet=function(e,t){return new Promise((function(n,i){t||(t=function(){});var o=[],a=e.map((function(e){try{return[e,window.localStorage.getItem(r+e)]}catch(e){o.push(e)}})).filter((function(e){return e}));o.length>0?(t(o,a),i(o)):(t(null,a),n(a))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storage=void 0;var r="_OfficeRuntime_Storage_";function i(){window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_",null),window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_")}function o(e){return new Promise((function(t,n){try{i(),e(),t()}catch(e){n(e)}}))}function a(e){return new Promise((function(t,n){try{i(),t(e())}catch(e){n(e)}}))}function s(e,t){return new Promise((function(n,r){var o=[];try{i()}catch(e){o.push(e)}for(var a in e)if(e.hasOwnProperty(a)||Array.isArray(e))try{Array.isArray(e)?t(e[a]):t(a)}catch(e){o.push(e)}o.length>0?r(new Error("Unknown error.")):n()}))}t.storage={getItem:function(e){return a((function(){return window.localStorage.getItem(r+e)}))},setItem:function(e,t){return o((function(){return window.localStorage.setItem(r+e,t)}))},removeItem:function(e){return o((function(){return window.localStorage.removeItem(r+e)}))},getItems:function(e){return new Promise((function(t,n){var o={},a=[];try{i()}catch(e){n(e)}e.forEach((function(e){try{var t=window.localStorage.getItem(r+e);o[e]=t||null}catch(e){a.push(e)}})),a.length>0?n(new Error("Unknown error.")):t(o)}))},setItems:function(e){return s(e,(function(t){return window.localStorage.setItem(r+t,e[t])}))},removeItems:function(e){return s(e,(function(e){window.localStorage.removeItem(r+e)}))},getKeys:function(){return a((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}))}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.experimentation=void 0;var o=function(){function e(){}return e.prototype.getBooleanFeatureGate=function(e,t){try{var n=Microsoft.Office.WebExtension.FeatureGates[e];return"true"===n.toString().toLowerCase()||!0===n}catch(e){return t}},e.prototype.getIntFeatureGate=function(e,t){try{var n=parseInt(Microsoft.Office.WebExtension.FeatureGates[e]);return isNaN(n)?t:n}catch(e){return t}},e.prototype.getStringFeatureGate=function(e,t){try{var n=Microsoft.Office.WebExtension.FeatureGates[e];return null==n?t:n}catch(e){return t}},e.prototype.getChangeGate=function(e){return this.getBooleanFeatureGate(e,!0)},e.prototype.getBooleanFeatureGateAsync=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),n=this.getRequestContext(),r=n.flighting.getFeature(e,"Boolean",t),n.load(r),[4,n.sync()];case 1:return i.sent(),[2,r.value];case 2:return i.sent(),[2,Promise.resolve(t)];case 3:return[2]}}))}))},e.prototype.getStringFeatureGateAsync=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),n=this.getRequestContext(),r=n.flighting.getFeature(e,"String",t),n.load(r),[4,n.sync()];case 1:return i.sent(),[2,r.value];case 2:return i.sent(),[2,Promise.resolve(t)];case 3:return[2]}}))}))},e.prototype.getIntFeatureGateAsync=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),n=this.getRequestContext(),r=n.flighting.getFeature(e,"Integer",t),n.load(r),[4,n.sync()];case 1:return i.sent(),[2,r.value];case 2:return i.sent(),[2,Promise.resolve(t)];case 3:return[2]}}))}))},e.prototype.getRequestContext=function(){var e;if(Office.context.platform!==Office.PlatformType.OfficeOnline){switch(Office.context.host){case Office.HostType.Excel:e=new Excel.RequestContext;break;case Office.HostType.OneNote:e=new OneNote.RequestContext;break;case Office.HostType.PowerPoint:e=new PowerPoint.RequestContext;break;case Office.HostType.Word:e=new Word.RequestContext;break;default:throw new Error("Unknown Application "+Office.context.host)}return e}},e}();t.experimentation=new o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var r=n(10);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var r=n(11),i=function(){function e(){this.listeners={}}return e.prototype.on=function(e,t){return this.add(e,t),new Promise((function(e){e()}))},e.prototype.off=function(e,t){return this.remove(e,t),new Promise((function(e){e()}))},e.prototype.emit=function(e,t){return this.send(e,t),new Promise((function(e){e()}))},Object.defineProperty(e,"instance",{get:function(){return e.singleton||(e.singleton=new e),this.singleton},enumerable:!1,configurable:!0}),e.prototype.setupReceive=function(){Office&&Office.context&&Office.context.messaging&&!Office.context.messaging.onMessage&&(Office.context.messaging.onMessage=this.receiveMessage.bind(this))},e.prototype.add=function(e,t){this.listeners.hasOwnProperty(e)||(this.listeners[e]=new r.ListenerManager,this.setupReceive()),this.listeners[e].add(t)},e.prototype.remove=function(e,t){this.listeners.hasOwnProperty(e)&&(t?this.listeners[e].remove(t):delete this.listeners[e])},e.prototype.send=function(e,t){var n={eventName:e,message:t};Office&&Office.context&&Office.context.messaging&&Office.context.messaging.sendMessage&&Office.context.messaging.sendMessage(n)},e.prototype.receiveMessage=function(e){var t=e.eventName,n=e.message;this.listeners.hasOwnProperty(t)&&this.listeners[t].call(n)},e}();t.Message=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListenerManager=void 0;var r=function(){function e(){this.listeners=[]}return e.prototype.add=function(e){this.listeners.push(e)},e.prototype.remove=function(e){var t=this.listeners.lastIndexOf(e);-1!==t&&this.listeners.splice(t,1)},e.prototype.call=function(e){this.listeners.forEach((function(t){return t(e)}))},e}();t.ListenerManager=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ribbon=t.ui=void 0,t.ui={getRibbon:function(){return new Promise((function(e,t){e(new r)}))}};var r=function(){function e(){this.requestContext=new OfficeCore.RequestContext,OSF.WebAuth&&"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(this.requestContext._customData="WacPartition")}return e.prototype.requestUpdate=function(e){var t=this.requestContext.ribbon;return e.tabs.filter((function(e){return!!e.id})).forEach((function(e){var n=t.getTab(e.id);void 0!==e.visible&&null!==e.visible&&n.setVisibility(e.visible),e.controls.filter((function(e){return!!e.id})).forEach((function(e){var n=t.getButton(e.id);void 0!==e.enabled&&null!==e.enabled&&(n.enabled=e.enabled)}))})),this.requestContext.sync()},e}();t.Ribbon=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Auth=void 0;var r=n(0),i=function(){function e(){}return e.prototype.getAccessToken=function(e){return new r.CoreUtility.Promise((function(t,n){try{Office.context.auth.getAccessTokenAsync(e||{},(function(e){"succeeded"===e.status?t(e.value):n(e.error)}))}catch(e){n(e)}}))},Object.defineProperty(e,"instance",{get:function(){return e.singleton||(e.singleton=new e),e.singleton},enumerable:!1,configurable:!0}),e}();t.Auth=i}]),window.OfficeRuntime=window._OfficeRuntimeNative,exposeOfficeRuntimeThroughOfficeNamespace("undefined"!=typeof OfficeRuntime&&OfficeRuntime||void 0,void 0!==Office&&Office||void 0),"undefined"!=typeof OSFPerformance&&(OSFPerformance.hostInitializationEnd=OSFPerformance.now(),OSFPerformance.totalJSHeapSize=OSFPerformance.getTotalJSHeapSize(),OSFPerformance.usedJSHeapSize=OSFPerformance.getUsedJSHeapSize(),OSFPerformance.jsHeapSizeLimit=OSFPerformance.getJSHeapSizeLimit()),OfficeExtension.Utility._doApiNotSupportedCheck=!0;