text: /*
  	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.
  */
  
  /*
  * @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
  */
  
  
  // Sources:
  // osfweb: 16.0\11305.10000
  // runtime: 16.0.11302.30004
  // core: 16.0\11307.10000
  // host: 16.0\11307.10000
  
  var __extends=this&&this.__extends||function(b,a){for(var c in a)if(a.hasOwnProperty(c))b[c]=a[c];function d(){this.constructor=b}b.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)},OfficeExt;(function(b){var a=function(){function a(){}a.prototype.isMsAjaxLoaded=function(){if(typeof Sys!=="undefined"&&typeof Type!=="undefined"&&Sys.StringBuilder&&typeof Sys.StringBuilder==="function"&&Type.registerNamespace&&typeof Type.registerNamespace==="function"&&Type.registerClass&&typeof Type.registerClass==="function"&&typeof Function._validateParams==="function"&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize==="function")return true;else return false};a.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(a.prototype,"msAjaxError",{"get":function(){if(this._msAjaxError==null&&this.isMsAjaxLoaded())this._msAjaxError=Error;return this._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"msAjaxString",{"get":function(){if(this._msAjaxString==null&&this.isMsAjaxLoaded())this._msAjaxString=String;return this._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"msAjaxDebug",{"get":function(){if(this._msAjaxDebug==null&&this.isMsAjaxLoaded())this._msAjaxDebug=Sys.Debug;return this._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:true,configurable:true});return a}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a<e;a++){var c=this._internalStorage.key(a);c.indexOf(d)===0&&b.push(c)}}catch(f){}return b};return a}();b.SafeStorage=a})(OfficeExt||(OfficeExt={}));OSF.XdmFieldName={ConversationUrl:"ConversationUrl",AppId:"AppId"};OSF.WindowNameItemKeys={BaseFrameName:"baseFrameName",HostInfo:"hostInfo",XdmInfo:"xdmInfo",SerializerVersion:"serializerVersion",AppContext:"appContext"};OSF.OUtil=function(){var h=-1,m="&_xdm_Info=",k="&_serializer_version=",l="_xdm_",p="_serializer_version=",d="#",j="&",a="class",g={},o=3e4,c=null,f=null,b=+new Date;function n(){var a=2147483647*Math.random();a^=b^(new Date).getMilliseconds()<<Math.floor(Math.random()*(31-10));return a.toString(16)}function e(){if(!c){try{var a=window.sessionStorage}catch(b){a=null}c=new OfficeExt.SafeStorage(a)}return c}function i(e){for(var c=[],b=[],f=e.length,a,d=0;d<f;d++){a=e[d];if(a.tabIndex)if(a.tabIndex>0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return[].concat(b,c)}return{set_entropy:function(a){if(typeof a=="string")for(var c=0;c<a.length;c+=4){for(var e=0,d=0;d<4&&c+d<a.length;d++)e=(e<<8)+a.charCodeAt(c+d);b^=e}else if(typeof a=="number")b^=a;else b^=2147483647*Math.random();b&=2147483647},extend:function(b,a){var c=function(){};c.prototype=a.prototype;b.prototype=new c;b.prototype.constructor=b;b.uber=a.prototype;if(a.prototype.constructor===Object.prototype.constructor)a.prototype.constructor=a},setNamespace:function(b,a){if(a&&b&&!a[b])a[b]={}},unsetNamespace:function(b,a){if(a&&b&&a[b])delete a[b]},serializeSettings:function(b){var d={};for(var c in b){var a=b[c];try{if(JSON)a=JSON.stringify(a,function(a,b){return OSF.OUtil.isDate(this[a])?OSF.DDA.SettingsManager.DateJSONPrefix+this[a].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:b});else a=Sys.Serialization.JavaScriptSerializer.serialize(a);d[c]=a}catch(e){}}return d},deserializeSettings:function(b){var d={};b=b||{};for(var c in b){var a=b[c];try{if(JSON)a=JSON.parse(a,function(c,a){var b;if(typeof a==="string"&&a&&a.length>6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,-1)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,true);d[c]=a}catch(e){}}return d},loadScript:function(c,d,e){if(c&&d){var i=window.document,a=g[c];if(!a){var b=i.createElement("script");b.type="text/javascript";a={loaded:false,pendingCallbacks:[d],timer:null};g[c]=a;var f=function(){if(a.timer!=null){clearTimeout(a.timer);delete a.timer}a.loaded=true;for(var c=a.pendingCallbacks.length,b=0;b<c;b++){var d=a.pendingCallbacks.shift();d()}},h=function(){delete g[c];if(a.timer!=null){clearTimeout(a.timer);delete a.timer}for(var d=a.pendingCallbacks.length,b=0;b<d;b++){var e=a.pendingCallbacks.shift();e()}};if(b.readyState)b.onreadystatechange=function(){if(b.readyState=="loaded"||b.readyState=="complete"){b.onreadystatechange=null;f()}};else b.onload=f;b.onerror=h;e=e||o;a.timer=setTimeout(h,e);b.setAttribute("crossOrigin","anonymous");b.src=c;i.getElementsByTagName("head")[0].appendChild(b)}else if(a.loaded)d();else a.pendingCallbacks.push(d)}},loadCSS:function(c){if(c){var b=window.document,a=b.createElement("link");a.type="text/css";a.rel="stylesheet";a.href=c;b.getElementsByTagName("head")[0].appendChild(a)}},parseEnum:function(b,c){var a=c[b.trim()];if(typeof a=="undefined"){OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+b);throw OsfMsAjaxFactory.msAjaxError.argument("str");}return a},delayExecutionAndCache:function(){var a={calc:arguments[0]};return function(){if(a.calc){a.val=a.calc.apply(this,arguments);delete a.calc}return a.val}},getUniqueId:function(){h=h+1;return h.toString()},formatString:function(){var a=arguments,b=a[0];return b.replace(/{(\d+)}/gm,function(d,b){var c=parseInt(b,10)+1;return a[c]===undefined?"{"+b+"}":a[c]})},generateConversationId:function(){return[n(),n(),(+new Date).toString()].join("_")},getFrameName:function(a){return l+a+this.generateConversationId()},addXdmInfoAsHash:function(b,a){return OSF.OUtil.addInfoAsHash(b,m,a,false)},addSerializerVersionAsHash:function(b,a){return OSF.OUtil.addInfoAsHash(b,k,a,true)},addInfoAsHash:function(b,g,c,i){b=b.trim()||"";var f=b.split(d),h=f.shift(),e=f.join(d),a;if(i)a=[g,encodeURIComponent(c),e].join("");else a=[e,g,c].join("");return[h,d,a].join("")},parseHostInfoFromWindowName:function(a,b){return OSF.OUtil.parseInfoFromWindowName(a,b,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(b){var a=OSF.OUtil.parseXdmInfoWithGivenFragment(b,window.location.hash);if(!a)a=OSF.OUtil.parseXdmInfoFromWindowName(b,window.name);return a},parseXdmInfoFromWindowName:function(a,b){return OSF.OUtil.parseInfoFromWindowName(a,b,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(a,b){return OSF.OUtil.parseInfoWithGivenFragment(m,l,false,a,b)},parseSerializerVersion:function(b){var a=OSF.OUtil.parseSerializerVersionWithGivenFragment(b,window.location.hash);if(isNaN(a))a=OSF.OUtil.parseSerializerVersionFromWindowName(b,window.name);return a},parseSerializerVersionFromWindowName:function(a,b){return parseInt(OSF.OUtil.parseInfoFromWindowName(a,b,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(a,b){return parseInt(OSF.OUtil.parseInfoWithGivenFragment(k,p,true,a,b))},parseInfoFromWindowName:function(g,h,f){try{var a=JSON.parse(h),b=a!=null?a[f]:null,c=e();if(!g&&c&&a!=null){var d=a[OSF.WindowNameItemKeys.BaseFrameName]+f;if(b)c.setItem(d,b);else b=c.getItem(d)}return b}catch(i){return null}},parseInfoWithGivenFragment:function(m,i,k,h,l){var d=l.split(m),a=d.length>1?d[d.length-1]:null;if(k&&a!=null){if(a.indexOf(j)>=0)a=a.split(j)[0];a=decodeURIComponent(a)}var b=e();if(!h&&b){var c=window.name.indexOf(i);if(c>-1){var f=window.name.indexOf(";",c);if(f==-1)f=window.name.length;var g=window.name.substring(c,f);if(a)b.setItem(g,a);else a=b.getItem(g)}}return a},getConversationId:function(){var b=window.location.search,a=null;if(b){var c=b.indexOf("&");a=c>0?b.substring(1,c):b.substr(1);if(a&&a.charAt(a.length-1)==="="){a=a.substring(0,a.length-1);if(a)a=decodeURIComponent(a)}}return a},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]=="undefined")a=b.split("|");if(typeof a[1]=="undefined")a=b.split("%7C");return a},getXdmFieldValue:function(e,d){var b="",c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1];break}}return b},validateParamObject:function(d,c,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:false},{name:"expectedProperties",type:Object,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true}]);if(a)throw a;for(var b in c){a=Function._validateParameter(d[b],c[b],b);if(a)throw a;}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!=="undefined"&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(d,e,a,b){a=a||{};for(var f in b){var c=b[f];if(a[c]==undefined)a[c]=true}Object.defineProperty(d,e,a);return d},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,["enumerable"])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,["enumerable"])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,["writable","enumerable","configurable"])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,["writable","enumerable","configurable"])},finalizeProperties:function(c,b){b=b||{};for(var e=Object.getOwnPropertyNames(c),g=e.length,d=0;d<g;d++){var f=e[d],a=Object.getOwnPropertyDescriptor(c,f);if(!a.get&&!a.set)a.writable=b.writable||false;a.configurable=b.configurable||false;a.enumerable=b.enumerable||true;Object.defineProperty(c,f,a)}return c},mapList:function(a,c){var b=[];if(a)for(var d in a)b.push(c(a[d]));return b},listContainsKey:function(b,c){for(var a in b)if(c==a)return true;return false},listContainsValue:function(a,b){for(var c in a)if(b==a[c])return true;return false},augmentList:function(a,b){var d=a.push?function(c,b){a.push(b)}:function(c,b){a[c]=b};for(var c in b)d(c,b[c])},redefineList:function(a,b){for(var d in a)delete a[d];for(var c in b)a[c]=b[c]},isArray:function(a){return Object.prototype.toString.apply(a)==="[object Array]"},isFunction:function(a){return Object.prototype.toString.apply(a)==="[object Function]"},isDate:function(a){return Object.prototype.toString.apply(a)==="[object Date]"},addEventListener:function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,false);else if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&a.attachEvent)a.attachEvent("on"+b,c);else a["on"+b]=c},removeEventListener:function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,false);else if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&a.detachEvent)a.detachEvent("on"+b,c);else a["on"+b]=null},getCookieValue:function(b){var a=RegExp(b+"[^;]+").exec(document.cookie);return a.toString().replace(/^[^=]+./,"")},xhrGet:function(d,c,b){var a;try{a=new XMLHttpRequest;a.onreadystatechange=function(){if(a.readyState==4)if(a.status==200)c(a.responseText);else b(a.status)};a.open("GET",d,true);a.send()}catch(e){b(e)}},xhrGetFull:function(f,d,e,b){var a,c=d;try{a=new XMLHttpRequest;a.onreadystatechange=function(){if(a.readyState==4)if(a.status==200)e(a,c);else b(a.status)};a.open("GET",f,true);a.send()}catch(g){b(g)}},encodeBase64:function(c){if(!c)return c;var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[],b=[],h=0,j,g,i,d,e,f,a,m=c.length;do{j=c.charCodeAt(h++);g=c.charCodeAt(h++);i=c.charCodeAt(h++);a=0;d=j&255;e=j>>8;f=g&255;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63;if(!isNaN(g)){d=g>>8;e=i&255;f=i>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63}if(isNaN(g))b[a-1]=64;else if(isNaN(i)){b[a-2]=64;b[a-1]=64}for(var k=0;k<a;k++)l.push(n.charAt(b[k]))}while(h<m);return l.join("")},getSessionStorage:function(){return e()},getLocalStorage:function(){if(!f){try{var a=window.localStorage}catch(b){a=null}f=new OfficeExt.SafeStorage(a)}return f},convertIntToCssHexColor:function(b){var a="#"+(Number(b)+16777216).toString(16).slice(-6);return a},attachClickHandler:function(a,b){a.onclick=function(a){b()};a.ontouchend=function(a){b();a.preventDefault()}},getQueryStringParamValue:function(a,c){var d=Function._validateParams(arguments,[{name:"queryString",type:String,mayBeNull:false},{name:"paramName",type:String,mayBeNull:false}]);if(d){OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null.");return""}var b=new RegExp("[\\?&]"+c+"=([^&#]*)","i");if(!b.test(a)){OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found.");return""}return b.exec(a)[1]},isiOS:function(){return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?true:false},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},shallowCopy:function(a){if(a==null)return null;else if(!(a instanceof Object))return a;else if(Array.isArray(a)){for(var d=[],c=0;c<a.length;c++)d.push(a[c]);return d}else{var e=a.constructor();for(var b in a)if(a.hasOwnProperty(b))e[b]=a[b];return e}},createObject:function(a){var c=null;if(a){c={};for(var d=a.length,b=0;b<d;b++)c[a[b].name]=a[b].value}return c},addClass:function(b,c){if(!OSF.OUtil.hasClass(b,c)){var d=b.getAttribute(a);if(d)b.setAttribute(a,d+" "+c);else b.setAttribute(a,c)}},removeClass:function(c,d){if(OSF.OUtil.hasClass(c,d)){var b=c.getAttribute(a),e=new RegExp("(\\s|^)"+d+"(\\s|$)");b=b.replace(e,"");c.setAttribute(a,b)}},hasClass:function(d,c){var b=d.getAttribute(a);return b&&b.match(new RegExp("(\\s|^)"+c+"(\\s|$)"))},focusToFirstTabbable:function(a,e){var c,d=false,b,f=function(a){d=true},g=function(c,a,b){if(a<0||a>c)return-1;else if(a===0&&b)return-1;else if(a===c-1&&!b)return-1;if(b)return a-1;else return a+1};a=i(a);c=e?a.length-1:0;if(a.length===0)return null;while(!d&&c>=0&&c<a.length){b=a[c];window.focus();b.addEventListener("focus",f);b.focus();b.removeEventListener("focus",f);c=g(a.length,c,e);if(!d&&b===document.activeElement)d=true}if(d)return b;else return null},focusToNextTabbable:function(b,k,h){var f,a,d=false,c,g=function(a){d=true},j=function(b,c){for(var a=0;a<b.length;a++)if(b[a]===c)return a;return-1},e=function(c,a,b){if(a<0||a>c)return-1;else if(a===0&&b)return-1;else if(a===c-1&&!b)return-1;if(b)return a-1;else return a+1};b=i(b);f=j(b,k);a=e(b.length,f,h);if(a<0)return null;while(!d&&a>=0&&a<b.length){c=b[a];c.addEventListener("focus",g);c.focus();c.removeEventListener("focus",g);a=e(b.length,a,h);if(!d&&c===document.activeElement)d=true}if(d)return c;else return null}}}();OSF.OUtil.Guid=function(){var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return{generateNewGuid:function(){for(var c="",d=+new Date,b=0;b<32&&d>0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();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};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(x,t,o,m,q,u,p,s,w,i,v,k,j,l,g,f,e,d,h,b,c,r,n,a){this._id=x;this._appName=t;this._appVersion=o;this._appUILocale=m;this._dataLocale=q;this._docUrl=u;this._clientMode=p;this._settings=s;this._reason=w;this._osfControlType=i;this._eToken=v;this._correlationId=k;this._appInstanceId=j;this._touchEnabled=l;this._commerceAllowed=g;this._appMinorVersion=f;this._requirementMatrix=e;this._hostCustomMessage=d;this._hostFullVersion=h;this._isDialog=false;this._clientWindowHeight=b;this._clientWindowWidth=c;this._addinName=r;this._appDomains=n;this._dialogRequirementMatrix=a;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}};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"};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",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",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(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};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,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,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return{getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},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,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,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,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,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:b.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:b.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:b.L_SSOConnectionLostError,message:b.L_SSOConnectionLostErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:b.L_SSOConnectionLostError,message:b.L_SSOUnsupportedPlatform};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:b.L_OperationCancelledError,message:b.L_OperationCancelledErrorMessage}}}}();var OfficeExt;(function(a){var b;(function(a){var y=function(){function a(){}return a}();a.RequirementVersion=y;var c=function(){function a(a){this.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.minor>0&&a.minor>0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};this._getVersion=function(a){a=a+"";var b=a.split("."),c=0,d=0;if(b.length<2&&isNaN(Number(a)))throw"version format incorrect";else{c=Number(b[0]);if(b.length>=2)d=Number(b[1]);if(isNaN(c)||isNaN(d))throw"version format incorrect";}var e={minor:d,major:c};return e};this._setMap=a;this.isSetSupported=this.isSetSupported.bind(this)}return a}();a.RequirementMatrix=c;var b=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();a.DefaultSetRequirement=b;var w=function(b){__extends(a,b);function a(){b.call(this,{dialogapi:1.1})}return a}(b);a.DefaultDialogSetRequirement=w;var e=function(b){__extends(a,b);function a(){b.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})}return a}(b);a.ExcelClientDefaultSetRequirement=e;var j=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({imagecoercion:1.1})}return a}(e);a.ExcelClientV1DefaultSetRequirement=j;var k=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(b);a.OutlookClientDefaultSetRequirement=k;var g=function(b){__extends(a,b);function a(){b.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})}return a}(b);a.WordClientDefaultSetRequirement=g;var o=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:1.1})}return a}(g);a.WordClientV1DefaultSetRequirement=o;var d=function(b){__extends(a,b);function a(){b.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})}return a}(b);a.PowerpointClientDefaultSetRequirement=d;var i=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({imagecoercion:1.1})}return a}(d);a.PowerpointClientV1DefaultSetRequirement=i;var n=function(b){__extends(a,b);function a(){b.call(this,{selection:1.1,textcoercion:1.1})}return a}(b);a.ProjectClientDefaultSetRequirement=n;var t=function(b){__extends(a,b);function a(){b.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})}return a}(b);a.ExcelWebDefaultSetRequirement=t;var v=function(b){__extends(a,b);function a(){b.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})}return a}(b);a.WordWebDefaultSetRequirement=v;var m=function(b){__extends(a,b);function a(){b.call(this,{activeview:1.1,settings:1.1})}return a}(b);a.PowerpointWebDefaultSetRequirement=m;var f=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(b);a.OutlookWebDefaultSetRequirement=f;var u=function(b){__extends(a,b);function a(){b.call(this,{activeview:1.1,documentevents:1.1,selection:1.1,settings:1.1,textcoercion:1.1})}return a}(b);a.SwayWebDefaultSetRequirement=u;var q=function(b){__extends(a,b);function a(){b.call(this,{bindingevents:1.1,partialtablebindings:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1})}return a}(b);a.AccessWebDefaultSetRequirement=q;var s=function(b){__extends(a,b);function a(){b.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})}return a}(b);a.ExcelIOSDefaultSetRequirement=s;var h=function(b){__extends(a,b);function a(){b.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})}return a}(b);a.WordIOSDefaultSetRequirement=h;var r=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return a}(h);a.WordIOSV1DefaultSetRequirement=r;var l=function(b){__extends(a,b);function a(){b.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})}return a}(b);a.PowerpointIOSDefaultSetRequirement=l;var p=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.1})}return a}(b);a.OutlookIOSDefaultSetRequirement=p;var x=function(){function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(e){this.initializeDefaultSetMatrix();var d=undefined,f=e.get_requirementMatrix();if(f!=undefined&&f.length>0&&typeof JSON!=="undefined"){var h=JSON.parse(e.get_requirementMatrix().toLowerCase());d=new c(new b(h))}else{var g=a.getClientFullVersionString(e);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[g]!=undefined)d=new c(a.DefaultSetArrayMatrix[g]);else d=new c(new b({}))}return d};a.getDefaultDialogRequirementMatrix=function(e){var a=undefined,d=e.get_dialogRequirementMatrix();if(d!=undefined&&d.length>0&&typeof JSON!=="undefined"){var f=JSON.parse(e.get_requirementMatrix().toLowerCase());a=new c(new b(f))}else a=new c(new w);return a};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new g;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new d;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new o;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new i;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new k;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new t;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new v;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new f;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new f;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new n;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new q;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new m;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new s;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new u;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new h;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new l;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new p};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();a.RequirementsMatrixFactory=x})(b=a.Requirement||(a.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 b,a=false;return{enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case"binding":case"bindings":if(g)c=new OSF.DDA.BindingPromise(g);break}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e);}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,e,f,b,c){OSF.OUtil.defineEnumerableProperties(this,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.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(a.get_hostFullVersion())}});f&&OSF.OUtil.defineEnumerableProperty(this,"license",{value:f});a.ui&&OSF.OUtil.defineEnumerableProperty(this,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(this,"auth",{value:a.auth});a.application&&OSF.OUtil.defineEnumerableProperty(this,"application",{value:a.application});if(a.get_isDialog()){var d=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:d})}else{e&&OSF.OUtil.defineEnumerableProperty(this,"document",{value:e});if(b){var g=b.displayName||"appOM";delete b.displayName;OSF.OUtil.defineEnumerableProperty(this,g,{value:b})}c&&OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{"get":function(){return c()}});var d=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:d})}};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(a,c,b){};OSF.DDA.Application=function(a){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite;break}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(c,a,d){OSF.DDA.JsomDocument.uber.constructor.call(this,c,d);a&&OSF.OUtil.defineEnumerableProperty(this,"bindings",{"get":function(){return a}});var b=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[b.GetSelectedDataAsync,b.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 a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(b,e,d,f,g){var c=b.length,a=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,g)});this.verifyArguments=function(d,f){for(var e in d){var b=d[e],c=f[e];if(b["enum"])switch(typeof c){case"string":if(OSF.OUtil.listContainsValue(b["enum"],c))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw a();}if(b.types)if(!OSF.OUtil.listContainsValue(b.types,typeof c))throw a();}};this.extractRequiredArguments=function(g,l,j){if(g.length<c)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments);for(var e=[],d=0;d<c;d++)e.push(g[d]);this.verifyArguments(b,e);var i={};for(d=0;d<c;d++){var f=b[d],h=e[d];if(f.verify){var k=f.verify(h,l,j);if(!k)throw a();}i[f.name]=h}return i},this.fillOptions=function(a,f,h,g){a=a||{};for(var d in e)if(!OSF.OUtil.listContainsKey(a,d)){var c=undefined,b=e[d];if(b.calculate&&f)c=b.calculate(f,h,g);if(!c&&b.defaultValue!==undefined)c=b.defaultValue;a[d]=c}return a};this.constructCallArgs=function(c,e,g,b){var a={};for(var i in c)a[i]=c[i];for(var h in e)a[h]=e[h];for(var j in d)a[j]=d[j](g,b);if(f)a=f(a,g,b);return 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(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.AsyncMethodNames[a]=c}};OSF.DDA.AsyncMethodCall=function(c,d,h,e,f,i,j){var b=c.length,a=new OSF.DDA.ApiMethodCall(c,d,h,i,j);function g(g,i,k,j){if(g.length>b+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var c,e,h=g.length-1;h>=b;h--){var f=g[h];switch(typeof f){case"object":if(c)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else c=f;break;case"function":if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=f;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);break}}c=a.fillOptions(c,i,k,j);if(e)if(c[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else c[Microsoft.Office.WebExtension.Parameters.Callback]=e;a.verifyArguments(d,c);return c}this.verifyAndExtractCall=function(e,c,b){var d=a.extractRequiredArguments(e,c,b),h=g(e,d,c,b),f=a.constructCallArgs(d,h,c,b);return f};this.processResponse=function(c,b,g,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(e)a=e(b,g,d);else a=b;else if(f)a=f(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(f){for(var a,c,e=f.length-1;e>=b;e--){var d=f[e];switch(typeof d){case"object":a=d;break;case"function":c=d;break}}a=a||{};if(c)a[Microsoft.Office.WebExtension.Parameters.Callback]=c;return a}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case"object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);break}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return{setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(a,b){var h="toHost",d="fromHost",j="sourceData",f="self",c={};c[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};c[Microsoft.Office.WebExtension.Parameters.SampleData]=c[Microsoft.Office.WebExtension.Parameters.Data];function e(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],f;if(OSF.DDA.ListType.isListType(h)){f=[];for(var n in g)f.push(e(g[n],i))}else if(OSF.OUtil.listContainsKey(c,h))f=c[h][i](g);else if(i==d&&a.preserveNesting(h))f=e(g,i);else{var k=b[h];if(k){var l=k[i];if(l){f=l[g];if(f===undefined)f=g}}else f=g}m[h]=f}return m}function i(k,j){var e;for(var c in j){var d;if(a.isComplexType(c))d=i(k,b[c][h]);else d=k[c];if(d!=undefined){if(!e)e={};var g=j[c];if(g==f)g=c;e[g]=a.pack(c,d)}}return e}function g(k,n,h){if(!h)h={};for(var c in n){var l=n[c],e;if(l==f)e=k;else if(l==j){h[c]=k.toArray();continue}else e=k[l];if(e===null||e===undefined)h[c]=undefined;else{e=a.unpack(c,e);var i;if(a.isComplexType(c)){i=b[c][d];if(a.preserveNesting(c))h[c]=g(e,i);else g(e,i,h)}else if(OSF.DDA.ListType.isListType(c)){i={};var p=OSF.DDA.ListType.getDescriptor(c);i[p]=f;var m=new Array(e.length);for(var o in e)m[o]=g(e[o],i);h[c]=m}else h[c]=e}}return h}function k(k,f,a){var d=b[k][a],c;if(a=="toHost"){var j=e(f,a);c=i(j,d)}else if(a=="fromHost"){var h=g(f,d);c=e(h,a)}return c}if(!b)b={};this.addMapping=function(l,i){var a,e;if(i.map){a=i.map;e={};for(var j in a){var k=a[j];if(k==f)k=j;e[k]=j}}else{a=i.toHost;e=i.fromHost}var c=b[l];if(c){var g=c[h];for(var n in g)a[n]=g[n];g=c[d];for(var m in g)e[m]=g[m]}else c=b[l]={};c[h]=a;c[d]=e};this.toHost=function(b,a){return k(b,a,h)};this.fromHost=function(a,b){return k(a,b,d)};this.self=f;this.sourceData=j;this.addComplexType=function(b){a.addComplexType(b)};this.getDynamicType=function(b){return a.getDynamicType(b)};this.setDynamicType=function(c,b){a.setDynamicType(c,b)};this.dynamicTypes=c;this.doMapValues=function(a,b){return e(a,b)}};OSF.DDA.SpecialProcessor=function(b,a){this.addComplexType=function(a){b.push(a)};this.getDynamicType=function(b){return a[b]};this.setDynamicType=function(c,b){a[c]=b};this.isComplexType=function(a){return OSF.OUtil.listContainsValue(b,a)};this.isDynamicType=function(b){return OSF.OUtil.listContainsKey(a,b)};this.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};this.pack=function(c,d){var b;if(this.isDynamicType(c))b=a[c].toHost(d);else b=d;return b};this.unpack=function(c,d){var b;if(this.isDynamicType(c))b=a[c].fromHost(d);else b=d;return b}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b<d;b++)c[a[b].name]=a[b].value}return c}a.define=function(c){var d={},e=b(c.toHost);if(c.invertible)d.map=e;else if(c.canonical)d.toHost=d.fromHost=e;else{d.toHost=e;d.fromHost=b(c.fromHost)}a.addMapping(c.type,d);c.isComplexType&&a.addComplexType(c.type)};for(var e in c)a.define(c[e]);return a};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(d,e){var b={},c=OSF.DDA.AsyncMethodNames,a=OSF.DDA.MethodDispId,k={GoToByIdAsync:a.dispidNavigateToMethod,GetSelectedDataAsync:a.dispidGetSelectedDataMethod,SetSelectedDataAsync:a.dispidSetSelectedDataMethod,GetDocumentCopyChunkAsync:a.dispidGetDocumentCopyChunkMethod,ReleaseDocumentCopyAsync:a.dispidReleaseDocumentCopyMethod,GetDocumentCopyAsync:a.dispidGetDocumentCopyMethod,AddFromSelectionAsync:a.dispidAddBindingFromSelectionMethod,AddFromPromptAsync:a.dispidAddBindingFromPromptMethod,AddFromNamedItemAsync:a.dispidAddBindingFromNamedItemMethod,GetAllAsync:a.dispidGetAllBindingsMethod,GetByIdAsync:a.dispidGetBindingMethod,ReleaseByIdAsync:a.dispidReleaseBindingMethod,GetDataAsync:a.dispidGetBindingDataMethod,SetDataAsync:a.dispidSetBindingDataMethod,AddRowsAsync:a.dispidAddRowsMethod,AddColumnsAsync:a.dispidAddColumnsMethod,DeleteAllDataValuesAsync:a.dispidClearAllRowsMethod,RefreshAsync:a.dispidLoadSettingsMethod,SaveAsync:a.dispidSaveSettingsMethod,GetActiveViewAsync:a.dispidGetActiveViewMethod,GetFilePropertiesAsync:a.dispidGetFilePropertiesMethod,GetOfficeThemeAsync:a.dispidGetOfficeThemeMethod,GetDocumentThemeAsync:a.dispidGetDocumentThemeMethod,ClearFormatsAsync:a.dispidClearFormatsMethod,SetTableOptionsAsync:a.dispidSetTableOptionsMethod,SetFormatsAsync:a.dispidSetFormatsMethod,GetAccessTokenAsync:a.dispidGetAccessTokenMethod,ExecuteRichApiRequestAsync:a.dispidExecuteRichApiRequestMethod,AppCommandInvocationCompletedAsync:a.dispidAppCommandInvocationCompletedMethod,CloseContainerAsync:a.dispidCloseContainerMethod,OpenBrowserWindow:a.dispidOpenBrowserWindow,CreateDocumentAsync:a.dispidCreateDocumentMethod,InsertFormAsync:a.dispidInsertFormMethod,ExecuteFeature:a.dispidExecuteFeature,QueryFeature:a.dispidQueryFeature,AddDataPartAsync:a.dispidAddDataPartMethod,GetDataPartByIdAsync:a.dispidGetDataPartByIdMethod,GetDataPartsByNameSpaceAsync:a.dispidGetDataPartsByNamespaceMethod,GetPartXmlAsync:a.dispidGetDataPartXmlMethod,GetPartNodesAsync:a.dispidGetDataPartNodesMethod,DeleteDataPartAsync:a.dispidDeleteDataPartMethod,GetNodeValueAsync:a.dispidGetDataNodeValueMethod,GetNodeXmlAsync:a.dispidGetDataNodeXmlMethod,GetRelativeNodesAsync:a.dispidGetDataNodesMethod,SetNodeValueAsync:a.dispidSetDataNodeValueMethod,SetNodeXmlAsync:a.dispidSetDataNodeXmlMethod,AddDataPartNamespaceAsync:a.dispidAddDataNamespaceMethod,GetDataPartNamespaceAsync:a.dispidGetDataUriByPrefixMethod,GetDataPartPrefixAsync:a.dispidGetDataPrefixByUriMethod,GetNodeTextAsync:a.dispidGetDataNodeTextMethod,SetNodeTextAsync:a.dispidSetDataNodeTextMethod,GetSelectedTask:a.dispidGetSelectedTaskMethod,GetTask:a.dispidGetTaskMethod,GetWSSUrl:a.dispidGetWSSUrlMethod,GetTaskField:a.dispidGetTaskFieldMethod,GetSelectedResource:a.dispidGetSelectedResourceMethod,GetResourceField:a.dispidGetResourceFieldMethod,GetProjectField:a.dispidGetProjectFieldMethod,GetSelectedView:a.dispidGetSelectedViewMethod,GetTaskByIndex:a.dispidGetTaskByIndexMethod,GetResourceByIndex:a.dispidGetResourceByIndexMethod,SetTaskField:a.dispidSetTaskFieldMethod,SetResourceField:a.dispidSetResourceFieldMethod,GetMaxTaskIndex:a.dispidGetMaxTaskIndexMethod,GetMaxResourceIndex:a.dispidGetMaxResourceIndexMethod,CreateTask:a.dispidCreateTaskMethod};for(var f in k)if(c[f])b[c[f].id]=k[f];c=OSF.DDA.SyncMethodNames;a=OSF.DDA.MethodDispId;var j={MessageParent:a.dispidMessageParentMethod,SendMessage:a.dispidSendMessageMethod};for(var f in j)if(c[f])b[c[f].id]=j[f];c=Microsoft.Office.WebExtension.EventType;a=OSF.DDA.EventDispId;var l={SettingsChanged:a.dispidSettingsChangedEvent,DocumentSelectionChanged:a.dispidDocumentSelectionChangedEvent,BindingSelectionChanged:a.dispidBindingSelectionChangedEvent,BindingDataChanged:a.dispidBindingDataChangedEvent,ActiveViewChanged:a.dispidActiveViewChangedEvent,OfficeThemeChanged:a.dispidOfficeThemeChangedEvent,DocumentThemeChanged:a.dispidDocumentThemeChangedEvent,AppCommandInvoked:a.dispidAppCommandInvokedEvent,DialogMessageReceived:a.dispidDialogMessageReceivedEvent,DialogParentMessageReceived:a.dispidDialogParentMessageReceivedEvent,ObjectDeleted:a.dispidObjectDeletedEvent,ObjectSelectionChanged:a.dispidObjectSelectionChangedEvent,ObjectDataChanged:a.dispidObjectDataChangedEvent,ContentControlAdded:a.dispidContentControlAddedEvent,RichApiMessage:a.dispidRichApiMessageEvent,ItemChanged:a.dispidOlkItemSelectedChangedEvent,RecipientsChanged:a.dispidOlkRecipientsChangedEvent,AppointmentTimeChanged:a.dispidOlkAppointmentTimeChangedEvent,RecurrenceChanged:a.dispidOlkRecurrenceChangedEvent,AttachmentsChanged:a.dispidOlkAttachmentsChangedEvent,EnhancedLocationsChanged:a.dispidOlkEnhancedLocationsChangedEvent,TaskSelectionChanged:a.dispidTaskSelectionChangedEvent,ResourceSelectionChanged:a.dispidResourceSelectionChangedEvent,ViewSelectionChanged:a.dispidViewSelectionChangedEvent,DataNodeInserted:a.dispidDataNodeAddedEvent,DataNodeReplaced:a.dispidDataNodeReplacedEvent,DataNodeDeleted:a.dispidDataNodeDeletedEvent};for(var h in l)if(c[h])b[c[h]]=l[h];function i(a){return a==OSF.DDA.EventDispId.dispidObjectDeletedEvent||a==OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent||a==OSF.DDA.EventDispId.dispidObjectDataChangedEvent||a==OSF.DDA.EventDispId.dispidContentControlAddedEvent}function g(a,c,d,b){if(typeof a=="number"){if(!b)b=c.getCallArgs(d);OSF.DDA.issueAsyncResult(b,a,OSF.DDA.ErrorCodeManager.getErrorArgs(a))}else throw a;}this[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function(r,l,m,o){var a;try{var i=r.id,k=OSF.DDA.AsyncMethodCalls[i];a=k.verifyAndExtractCall(l,m,o);var j=b[i],q=d(i),c=null;if(window.Excel&&window.Office.context.requirements.isSetSupported("RedirectV1Api"))window.Excel._RedirectV1APIs=true;if(window.Excel&&window.Excel._RedirectV1APIs&&(c=window.Excel._V1APIMap[i])){var f=OSF.OUtil.shallowCopy(a);delete f[Microsoft.Office.WebExtension.Parameters.AsyncContext];if(c.preprocess)f=c.preprocess(f);var n=new window.Excel.RequestContext,s=c.call(n,f);n.sync().then(function(){var b=s.value,d=b.status;delete b.status;delete b["@odata.type"];if(c.postprocess)b=c.postprocess(b,f);if(d!=0)b=OSF.DDA.ErrorCodeManager.getErrorArgs(d);OSF.DDA.issueAsyncResult(a,d,b)})["catch"](function(b){OSF.DDA.issueAsyncResult(a,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null)})}else{var h;if(e.toHost)h=e.toHost(j,a);else h=a;var p=+new Date;q[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:j,hostCallArgs:h,onCalling:function(){},onReceiving:function(){},onComplete:function(c,d){var b;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(e.fromHost)b=e.fromHost(j,d);else b=d;else b=d;var f=k.processResponse(c,b,m,a);OSF.DDA.issueAsyncResult(a,c,f);if(OSF.AppTelemetry)OSF.AppTelemetry.onMethodDone(j,h,Math.abs(+new Date-p),c)}})}}catch(t){g(t,k,l,a)}};this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function(o,c,m,q){var f,a,l,h=false;function k(b){if(b==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var e=!h?c.addEventHandler(a,l):c.addObjectEventHandler(a,f[Microsoft.Office.WebExtension.Parameters.Id],l);if(!e)b=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed}var d;if(b!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)d=OSF.DDA.ErrorCodeManager.getErrorArgs(b);OSF.DDA.issueAsyncResult(f,b,d)}try{var p=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id];f=p.verifyAndExtractCall(o,m,c);a=f[Microsoft.Office.WebExtension.Parameters.EventType];l=f[Microsoft.Office.WebExtension.Parameters.Handler];if(q){k(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);return}var n=b[a];h=i(n);var j=h?f[Microsoft.Office.WebExtension.Parameters.Id]:m.id||"",s=h?c.getObjectEventHandlerCount(a,j):c.getEventHandlerCount(a);if(s==0){var r=d(a)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];r({eventType:a,dispId:n,targetId:j,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:k,onEvent:function(d){var b=e.fromHost(n,d);if(!h)c.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(a,m,b));else c.fireObjectEvent(j,OSF.DDA.OMFactory.manufactureEventArgs(a,j,b))}})}else k(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(t){g(t,p,o,f)}};this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function(n,c,p){var e,a,k,f=false;function m(a){var b;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)b=OSF.DDA.ErrorCodeManager.getErrorArgs(a);OSF.DDA.issueAsyncResult(e,a,b)}try{var o=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];e=o.verifyAndExtractCall(n,p,c);a=e[Microsoft.Office.WebExtension.Parameters.EventType];k=e[Microsoft.Office.WebExtension.Parameters.Handler];var q=b[a];f=i(q);var j=f?e[Microsoft.Office.WebExtension.Parameters.Id]:p.id||"",l,h;if(k===null){h=f?c.clearObjectEventHandlers(a,j):c.clearEventHandlers(a);l=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}else{h=f?c.removeObjectEventHandler(a,j,k):c.removeEventHandler(a,k);l=h?OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist}var s=f?c.getObjectEventHandlerCount(a,j):c.getEventHandlerCount(a);if(h&&s==0){var r=d(a)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];r({eventType:a,dispId:q,targetId:j,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:m})}else m(l)}catch(t){g(t,o,n,e)}};this[OSF.DDA.DispIdHost.Methods.OpenDialog]=function(n,a,m){var h,l,c=Microsoft.Office.WebExtension.EventType.DialogMessageReceived,f=Microsoft.Office.WebExtension.EventType.DialogEventReceived;function i(b){var e;if(b!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)e=OSF.DDA.ErrorCodeManager.getErrorArgs(b);else{var d={};d[Microsoft.Office.WebExtension.Parameters.Id]=l;d[Microsoft.Office.WebExtension.Parameters.Data]=a;var e=j.processResponse(b,d,m,h);OSF.DialogShownStatus.hasDialogShown=true;a.clearEventHandlers(c);a.clearEventHandlers(f)}OSF.DDA.issueAsyncResult(h,b,e)}try{(c==undefined||f==undefined)&&i(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported);if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync==null){i(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);return}var j=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id];h=j.verifyAndExtractCall(n,m,a);var o=b[c],k=d(c),p=k[OSF.DDA.DispIdHost.Delegates.OpenDialog]!=undefined?k[OSF.DDA.DispIdHost.Delegates.OpenDialog]:k[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];l=JSON.stringify(h);if(!OSF.DialogShownStatus.hasDialogShown){a.clearQueuedEvent(c);a.clearQueuedEvent(f);a.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived)}p({eventType:c,dispId:o,targetId:l,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:i,onEvent:function(i){var h=e.fromHost(o,i),g=OSF.DDA.OMFactory.manufactureEventArgs(c,m,h);if(g.type==f){var d=OSF.DDA.ErrorCodeManager.getErrorArgs(g.error),b={};b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=d.name||d;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=d.message||d;g.error=new OSF.DDA.Error(b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}a.fireOrQueueEvent(g);if(h[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed){a.clearEventHandlers(c);a.clearEventHandlers(f);a.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived);OSF.DialogShownStatus.hasDialogShown=false}}})}catch(q){g(q,j,n,h)}};this[OSF.DDA.DispIdHost.Methods.CloseDialog]=function(h,m,e,o){var k,a,i,f=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;function l(a){f=a;OSF.DialogShownStatus.hasDialogShown=false}try{var j=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id];k=j.verifyAndExtractCall(h,o,e);a=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;i=Microsoft.Office.WebExtension.EventType.DialogEventReceived;e.clearEventHandlers(a);e.clearEventHandlers(i);var p=b[a],c=d(a),n=c[OSF.DDA.DispIdHost.Delegates.CloseDialog]!=undefined?c[OSF.DDA.DispIdHost.Delegates.CloseDialog]:c[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];n({eventType:a,dispId:p,targetId:m,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:l})}catch(q){g(q,j,h,k)}if(f!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,f);};this[OSF.DDA.DispIdHost.Methods.MessageParent]=function(a,i){var e={},c=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id],f=c.verifyAndExtractCall(a,i,e),g=d(OSF.DDA.SyncMethodNames.MessageParent.id),h=g[OSF.DDA.DispIdHost.Delegates.MessageParent],j=b[OSF.DDA.SyncMethodNames.MessageParent.id];return h({dispId:j,hostCallArgs:f,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})};this[OSF.DDA.DispIdHost.Methods.SendMessage]=function(a,k,i){var e={},c=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id],f=c.verifyAndExtractCall(a,i,e),g=d(OSF.DDA.SyncMethodNames.SendMessage.id),h=g[OSF.DDA.DispIdHost.Delegates.SendMessage],j=b[OSF.DDA.SyncMethodNames.SendMessage.id];return h({dispId:j,hostCallArgs:f,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})}};OSF.DDA.DispIdHost.addAsyncMethods=function(a,b,e){for(var f in b){var c=b[f],d=c.displayName;!a[d]&&OSF.OUtil.defineEnumerableProperty(a,d,{value:function(b){return function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod];c(b,arguments,a,e)}}(c)})}};OSF.DDA.DispIdHost.addEventSupport=function(a,b,e){var d=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName,c=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;!a[d]&&OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler];c(arguments,b,a,e)}});!a[c]&&OSF.OUtil.defineEnumerableProperty(a,c,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler];c(arguments,b,a)}})};var OfficeExt;(function(c){var f=function(){function a(){}a.isInstanceOfType=function(c,b){if(typeof b==="undefined"||b===null)return false;if(b instanceof c)return true;var a=b.constructor;if(!a||typeof a!=="function"||!a.__typeName||a.__typeName==="Object")a=Object;return!!(a===c)||a.__typeName&&c.__typeName&&a.__typeName===c.__typeName};return a}();c.MsAjaxTypeHelper=f;var d=function(){function a(){}a.create=function(c,b){var a=new Error(c);a.message=c;if(b)for(var d in b)a[d]=b[d];a.popStackFrame();return a};a.parameterCount=function(b){var d="Sys.ParameterCountException: "+(b?b:"Parameter count mismatch."),c=a.create(d,{name:"Sys.ParameterCountException"});c.popStackFrame();return c};a.argument=function(c,e){var d="Sys.ArgumentException: "+(e?e:"Value does not fall within the expected range.");if(c)d+="\n"+b.format("Parameter name: {0}",c);var f=a.create(d,{name:"Sys.ArgumentException",paramName:c});f.popStackFrame();return f};a.argumentNull=function(c,e){var d="Sys.ArgumentNullException: "+(e?e:"Value cannot be null.");if(c)d+="\n"+b.format("Parameter name: {0}",c);var f=a.create(d,{name:"Sys.ArgumentNullException",paramName:c});f.popStackFrame();return f};a.argumentOutOfRange=function(e,c,f){var d="Sys.ArgumentOutOfRangeException: "+(f?f:"Specified argument was out of the range of valid values.");if(e)d+="\n"+b.format("Parameter name: {0}",e);if(typeof c!=="undefined"&&c!==null)d+="\n"+b.format("Actual value was {0}.",c);var g=a.create(d,{name:"Sys.ArgumentOutOfRangeException",paramName:e,actualValue:c});g.popStackFrame();return g};a.argumentType=function(f,e,d,g){var c="Sys.ArgumentTypeException: ";if(g)c+=g;else if(e&&d)c+=b.format("Object of type '{0}' cannot be converted to type '{1}'.",e.getName?e.getName():e,d.getName?d.getName():d);else c+="Object cannot be converted to the required type.";if(f)c+="\n"+b.format("Parameter name: {0}",f);var h=a.create(c,{name:"Sys.ArgumentTypeException",paramName:f,actualType:e,expectedType:d});h.popStackFrame();return h};a.argumentUndefined=function(c,e){var d="Sys.ArgumentUndefinedException: "+(e?e:"Value cannot be undefined.");if(c)d+="\n"+b.format("Parameter name: {0}",c);var f=a.create(d,{name:"Sys.ArgumentUndefinedException",paramName:c});f.popStackFrame();return f};a.invalidOperation=function(b){var d="Sys.InvalidOperationException: "+(b?b:"Operation is not valid due to the current state of the object."),c=a.create(d,{name:"Sys.InvalidOperationException"});c.popStackFrame();return c};return a}();c.MsAjaxError=d;var b=function(){function a(){}a.format=function(c){for(var b=[],a=1;a<arguments.length;a++)b[a-1]=arguments[a];var d=c;return d.replace(/{(\d+)}/gm,function(d,a){var c=parseInt(a,10);return b[c]===undefined?"{"+a+"}":b[c]})};a.startsWith=function(b,a){return b.substr(0,a.length)===a};return a}();c.MsAjaxString=b;var e=function(){function a(){}a.trace=function(a){typeof Debug!=="undefined"&&Debug.writeln;window.console&&window.console.log&&window.console.log(a);window.opera&&window.opera.postError&&window.opera.postError(a);window.debugService&&window.debugService.trace&&window.debugService.trace(a);var b=document.getElementById("TraceConsole");if(b&&b.tagName.toUpperCase()==="TEXTAREA")b.innerHTML+=a+"\n"};return a}();c.MsAjaxDebug=e;if(!OsfMsAjaxFactory.isMsAjaxLoaded()){var a=function(a,c,b){if(a.__typeName===undefined||a.__typeName===null)a.__typeName=c;if(a.__class===undefined||a.__class===null)a.__class=b};a(Function,"Function",true);a(Error,"Error",true);a(Object,"Object",true);a(String,"String",true);a(Boolean,"Boolean",true);a(Date,"Date",true);a(Number,"Number",true);a(RegExp,"RegExp",true);a(Array,"Array",true);if(!Function.createCallback)Function.createCallback=function(b,a){var c=Function._validateParams(arguments,[{name:"method",type:Function},{name:"context",mayBeNull:true}]);if(c)throw c;return function(){var e=arguments.length;if(e>0){for(var d=[],c=0;c<e;c++)d[c]=arguments[c];d[e]=a;return b.apply(this,d)}return b.call(this,a)}};if(!Function.createDelegate)Function.createDelegate=function(b,c){var a=Function._validateParams(arguments,[{name:"instance",mayBeNull:true},{name:"method",type:Function}]);if(a)throw a;return function(){return c.apply(b,arguments)}};if(!Function._validateParams)Function._validateParams=function(g,e,c){var a,d=e.length;c=c||typeof c==="undefined";a=Function._validateParameterCount(g,e,c);if(a){a.popStackFrame();return a}for(var b=0,i=g.length;b<i;b++){var f=e[Math.min(b,d-1)],h=f.name;if(f.parameterArray)h+="["+(b-d+1)+"]";else if(!c&&b>=d)break;a=Function._validateParameter(g[b],f,h);if(a){a.popStackFrame();return a}}return null};if(!Function._validateParameterCount)Function._validateParameterCount=function(k,e,j){var a,c,b=e.length,f=k.length;if(f<b){var g=b;for(a=0;a<b;a++){var h=e[a];if(h.optional||h.parameterArray)g--}if(f<g)c=true}else if(j&&f>b){c=true;for(a=0;a<b;a++)if(e[a].parameterArray){c=false;break}}if(c){var i=d.parameterCount();i.popStackFrame();return i}return null};if(!Function._validateParameter)Function._validateParameter=function(c,a,h){var b,g=a.type,l=!!a.integer,k=!!a.domElement,m=!!a.mayBeNull;b=Function._validateParameterType(c,g,l,k,m,h);if(b){b.popStackFrame();return b}var e=a.elementType,f=!!a.elementMayBeNull;if(g===Array&&typeof c!=="undefined"&&c!==null&&(e||!f))for(var j=!!a.elementInteger,i=!!a.elementDomElement,d=0;d<c.length;d++){var n=c[d];b=Function._validateParameterType(n,e,j,i,f,h+"["+d+"]");if(b){b.popStackFrame();return b}}return null};if(!Function._validateParameterType)Function._validateParameterType=function(b,d,h,g,f,e){var a,i;if(typeof b==="undefined")if(f)return null;else{a=c.MsAjaxError.argumentUndefined(e);a.popStackFrame();return a}if(b===null)if(f)return null;else{a=c.MsAjaxError.argumentNull(e);a.popStackFrame();return a}if(d&&!c.MsAjaxTypeHelper.isInstanceOfType(d,b)){a=c.MsAjaxError.argumentType(e,typeof b,d);a.popStackFrame();return a}return null};if(!window.Type)window.Type=Function;if(!Type.registerNamespace)Type.registerNamespace=function(d){for(var c=d.split("."),b=window,a=0;a<c.length;a++){b[c[a]]=b[c[a]]||{};b=b[c[a]]}};if(!Type.prototype.registerClass)Type.prototype.registerClass=function(a){a={}};typeof Sys==="undefined"&&Type.registerNamespace("Sys");if(!Error.prototype.popStackFrame)Error.prototype.popStackFrame=function(){if(arguments.length!==0)throw d.parameterCount();if(typeof this.stack==="undefined"||this.stack===null||typeof this.fileName==="undefined"||this.fileName===null||typeof this.lineNumber==="undefined"||this.lineNumber===null)return;var a=this.stack.split("\n"),c=a[0],f=this.fileName+":"+this.lineNumber;while(typeof c!=="undefined"&&c!==null&&c.indexOf(f)===-1){a.shift();c=a[0]}var e=a[1];if(typeof e==="undefined"||e===null)return;var b=e.match(/@(.*):(\d+)$/);if(typeof b==="undefined"||b===null)return;this.fileName=b[1];this.lineNumber=parseInt(b[2]);a.shift();this.stack=a.join("\n")};OsfMsAjaxFactory.msAjaxError=d;OsfMsAjaxFactory.msAjaxString=b;OsfMsAjaxFactory.msAjaxDebug=e}})(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(d,c){var a,b=d.number;if(b)switch(b){case-2146828218:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case-2147467259:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened;break;case-2146828283:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam;break;case-2147209089:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam;break;case-2147208704:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests;break;case-2146827850:default:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;break}if(c.onComplete)c.onComplete(a||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod=function(c,d){var a,b=c.number;if(b)switch(b){case-2146828218:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case-2146827850:default:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;break}return a||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError};OSF.DDA.SafeArray.Delegate.SpecialProcessor=function(){function a(a){var b;try{var h=a.ubound(1),d=a.ubound(2);a=a.toArray();if(h==1&&d==1)b=[a];else{b=[];for(var f=0;f<h;f++){for(var c=[],e=0;e<d;e++){var g=a[f*d+e];g!=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid&&c.push(g)}c.length>0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return{toHost:function(a){if(OSF.DDA.TableDataProperties&&typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=(a||typeof a==="unknown")&&a.toArray;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};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(a){function c(a){var b=a;if(OSF.OUtil.isArray(a))for(var f=b.length,d=0;d<f;d++)b[d]=c(b[d]);else if(OSF.OUtil.isDate(a))b=a.getVarDate();else if(typeof a==="object"&&!OSF.OUtil.isArray(a)){b=[];for(var e in a)if(!OSF.OUtil.isFunction(a[e]))b[e]=c(a[e])}return b}function b(a){var e=a;if(a!=null&&a.toArray){var d=a.toArray();e=new Array(d.length);for(var c=0;c<d.length;c++)e[c]=b(d[c])}return e}try{a.onCalling&&a.onCalling();OSF.ClientHostController.execute(a.dispId,c(a.hostCallArgs),function(h,i){var d=h.toArray(),e=d[OSF.DDA.SafeArray.Response.Status];if(e==OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult){var c=d[OSF.DDA.SafeArray.Response.Payload];c=b(c);if(c!=null){if(!a._chunkResultData)a._chunkResultData=[];a._chunkResultData[c[0]]=c[1]}return false}a.onReceiving&&a.onReceiving();if(a.onComplete){var c;if(e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){if(d.length>2){c=[];for(var f=1;f<d.length;f++)c[f-1]=d[f]}else c=d[OSF.DDA.SafeArray.Response.Payload];if(a._chunkResultData){c=b(c);if(c!=null){var g=c[c.length-1];if(a._chunkResultData.length==g)c[c.length-1]=a._chunkResultData;else e=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}}}else c=d[OSF.DDA.SafeArray.Response.Payload];a.onComplete(e,c)}return true})}catch(d){OSF.DDA.SafeArray.Delegate._onException(d,a)}};OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function(c,a){var b=+new Date;return function(d){a.onReceiving&&a.onReceiving();var e=d.toArray?d.toArray()[OSF.DDA.SafeArray.Response.Status]:d;if(a.onComplete)a.onComplete(e);if(OSF.AppTelemetry)OSF.AppTelemetry.onRegisterDone(c,a.dispId,Math.abs(+new Date-b),e)}};OSF.DDA.SafeArray.Delegate.registerEventAsync=function(a){a.onCalling&&a.onCalling();var b=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);try{OSF.ClientHostController.registerEvent(a.dispId,a.targetId,function(c,b){if(a.onEvent)a.onEvent(b);if(OSF.AppTelemetry)OSF.AppTelemetry.onEventDone(a.dispId)},b)}catch(c){OSF.DDA.SafeArray.Delegate._onException(c,a)}};OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function(a){a.onCalling&&a.onCalling();var b=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.unregisterEvent(a.dispId,a.targetId,b)}catch(c){OSF.DDA.SafeArray.Delegate._onException(c,a)}};OSF.ClientMode={ReadWrite:0,ReadOnly:1};OSF.DDA.RichInitializationReason={1:Microsoft.Office.WebExtension.InitializationReason.Inserted,2:Microsoft.Office.WebExtension.InitializationReason.DocumentOpened};OSF.InitializationHelper=function(c,a,e,d,b){this._hostInfo=c;this._webAppState=a;this._context=e;this._settings=d;this._hostFacade=b;this._initializeSettings=this.initializeSettings};OSF.InitializationHelper.prototype.deserializeSettings=function(b,f){var d,c=OSF.OUtil.getSessionStorage();if(c){var a=c.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());if(a)b=JSON.parse(a);else{a=JSON.stringify(b);c.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),a)}}var e=OSF.DDA.SettingsManager.deserializeSettings(b);if(f)d=new OSF.DDA.RefreshableSettings(e);else d=new OSF.DDA.Settings(e);return d};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(a){};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(a){this.prepareApiSurface(a);Microsoft.Office.WebExtension.initialize(this.getInitializationReason(a))};OSF.InitializationHelper.prototype.prepareApiSurface=function(a){var e=new OSF.DDA.License(a.get_eToken()),d=OSF.DDA.OfficeTheme&&OSF.DDA.OfficeTheme.getOfficeTheme?OSF.DDA.OfficeTheme.getOfficeTheme:null;if(a.get_isDialog()){if(OSF.DDA.UI.ChildUI)a.ui=new OSF.DDA.UI.ChildUI}else if(OSF.DDA.UI.ParentUI){a.ui=new OSF.DDA.UI.ParentUI;OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(a.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync])}OSF.DDA.OpenBrowser&&OSF.DDA.DispIdHost.addAsyncMethods(a.ui,[OSF.DDA.AsyncMethodNames.OpenBrowserWindow]);OSF.DDA.ExecuteFeature&&OSF.DDA.DispIdHost.addAsyncMethods(a.ui,[OSF.DDA.AsyncMethodNames.ExecuteFeature]);OSF.DDA.QueryFeature&&OSF.DDA.DispIdHost.addAsyncMethods(a.ui,[OSF.DDA.AsyncMethodNames.QueryFeature]);if(OSF.DDA.Auth){a.auth=new OSF.DDA.Auth;OSF.DDA.DispIdHost.addAsyncMethods(a.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync])}OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(a,a.doc,e,null,d));var b,c;b=OSF.DDA.DispIdHost.getClientDelegateMethods;c=OSF.DDA.SafeArray.Delegate.ParameterMap;OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(b,c))};OSF.InitializationHelper.prototype.getInitializationReason=function(a){return OSF.DDA.RichInitializationReason[a.get_reason()]};OSF.DDA.DispIdHost.getClientDelegateMethods=function(b){var a={};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync;a[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync;a[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync;a[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.SafeArray.Delegate.openDialog;a[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.SafeArray.Delegate.closeDialog;a[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.messageParent;a[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.SafeArray.Delegate.sendMessage;if(OSF.DDA.AsyncMethodNames.RefreshAsync&&b==OSF.DDA.AsyncMethodNames.RefreshAsync.id){var d=function(c,b,a){return OSF.DDA.ClientSettingsManager.read(b,a)};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(d)}if(OSF.DDA.AsyncMethodNames.SaveAsync&&b==OSF.DDA.AsyncMethodNames.SaveAsync.id){var c=function(a,c,b){return OSF.DDA.ClientSettingsManager.write(a[OSF.DDA.SettingsManager.SerializedSettings],a[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],c,b)};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(c)}return a};var OfficeExt;(function(b){var a=function(){function a(){}a.prototype.execute=function(c,b,a){window.external.Execute(c,b,a)};a.prototype.registerEvent=function(d,b,c,a){window.external.RegisterEvent(d,b,c,a)};a.prototype.unregisterEvent=function(c,b,a){window.external.UnregisterEvent(c,b,a)};return a}();b.RichClientHostController=a})(OfficeExt||(OfficeExt={}));var OfficeExt;(function(a){var b=function(b){__extends(a,b);function a(){b.apply(this,arguments)}a.prototype.messageParent=function(b){var a=b[Microsoft.Office.WebExtension.Parameters.MessageToParent];window.external.MessageParent(a)};a.prototype.openDialog=function(d,b,c,a){this.registerEvent(d,b,c,a)};a.prototype.closeDialog=function(c,b,a){this.unregisterEvent(c,b,a)};a.prototype.sendMessage=function(a){};return a}(a.RichClientHostController);a.Win32RichClientHostController=b})(OfficeExt||(OfficeExt={}));OSF.ClientHostController=new OfficeExt.Win32RichClientHostController;var OfficeExt;(function(a){var b;(function(c){var b=function(){function a(){this._osfOfficeTheme=null;this._osfOfficeThemeTimeStamp=null}a.prototype.getOfficeTheme=function(){if(OSF.DDA._OsfControlContext){if(this._osfOfficeTheme&&this._osfOfficeThemeTimeStamp&&+new Date-this._osfOfficeThemeTimeStamp<a._osfOfficeThemeCacheValidPeriod){if(OSF.AppTelemetry)OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",0)}else{var e=+new Date,d=OSF.DDA._OsfControlContext.GetOfficeThemeInfo(),b=+new Date;if(OSF.AppTelemetry)OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",Math.abs(b-e));this._osfOfficeTheme=JSON.parse(d);for(var c in this._osfOfficeTheme)this._osfOfficeTheme[c]=OSF.OUtil.convertIntToCssHexColor(this._osfOfficeTheme[c]);this._osfOfficeThemeTimeStamp=b}return this._osfOfficeTheme}};a.instance=function(){if(a._instance==null)a._instance=new a;return a._instance};a._osfOfficeThemeCacheValidPeriod=5e3;a._instance=null;return a}();c.OfficeThemeManager=b;OSF.OUtil.setNamespace("OfficeTheme",OSF.DDA);OSF.DDA.OfficeTheme.getOfficeTheme=a.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme})(b=a.OfficeTheme||(a.OfficeTheme={}))})(OfficeExt||(OfficeExt={}));OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(a){return function(b){var d,c;try{c=a(b.hostCallArgs,b.onCalling,b.onReceiving);d=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}catch(e){d=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;c={name:Strings.OfficeOM.L_InternalError,message:e}}if(b.onComplete)b.onComplete(d,c)}},read:function(e,d){var b=[],f=[];e&&e();OSF.DDA._OsfControlContext.GetSettings().Read(b,f);d&&d();for(var c={},a=0;a<b.length;a++)c[b[a]]=f[a];return c},write:function(a,g,c,b){var e=[],d=[];for(var f in a){e.push(f);d.push(a[f])}c&&c();OSF.DDA._OsfControlContext.GetSettings().Write(e,d);b&&b()}};OSF.InitializationHelper.prototype.initializeSettings=function(b){var a=OSF.DDA.ClientSettingsManager.read(),c=this.deserializeSettings(a,b);return c};OSF.InitializationHelper.prototype.getAppContext=function(y,n){var c,a,l="Warning: Office.js is loaded outside of Office client";try{if(window.external&&typeof window.external.GetContext!=="undefined")a=OSF.DDA._OsfControlContext=window.external.GetContext();else{OsfMsAjaxFactory.msAjaxDebug.trace(l);return}}catch(A){OsfMsAjaxFactory.msAjaxDebug.trace(l);return}var t=a.GetAppType(),x=a.GetSolutionRef(),u=a.GetAppVersionMajor(),o=a.GetAppVersionMinor(),s=a.GetAppUILocale(),q=a.GetAppDataLocale(),v=a.GetDocUrl(),p=a.GetAppCapabilities(),w=a.GetActivationMode(),m=a.GetControlIntegrationLevel(),r=[],b;try{b=a.GetSolutionToken()}catch(z){}var j;if(typeof a.GetCorrelationId!=="undefined")j=a.GetCorrelationId();var i;if(typeof a.GetInstanceId!=="undefined")i=a.GetInstanceId();var k;if(typeof a.GetTouchEnabled!=="undefined")k=a.GetTouchEnabled();var g;if(typeof a.GetCommerceAllowed!=="undefined")g=a.GetCommerceAllowed();var f;if(typeof a.GetSupportedMatrix!=="undefined")f=a.GetSupportedMatrix();var e;if(typeof a.GetHostCustomMessage!=="undefined")e=a.GetHostCustomMessage();var h;if(typeof a.GetHostFullVersion!=="undefined")h=a.GetHostFullVersion();var d;if(typeof a.GetDialogRequirementMatrix!="undefined")d=a.GetDialogRequirementMatrix();b=b?b.toString():"";c=new OSF.OfficeAppContext(x,t,u,s,q,v,p,r,w,m,b,j,i,k,g,o,f,e,h,undefined,undefined,undefined,d);OSF.AppTelemetry&&OSF.AppTelemetry.initialize(c);n(c)};var OSFLog;(function(b){var a=function(){function a(a){this._table=a;this._fields={}}Object.defineProperty(a.prototype,"Fields",{"get":function(){return this._fields},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"Table",{"get":function(){return this._table},enumerable:true,configurable:true});a.prototype.SerializeFields=function(){};a.prototype.SetSerializedField=function(b,a){if(typeof a!=="undefined"&&a!==null)this._serializedFields[b]=a.toString()};a.prototype.SerializeRow=function(){this._serializedFields={};this.SetSerializedField("Table",this._table);this.SerializeFields();return JSON.stringify(this._serializedFields)};return a}();b.BaseUsageData=a;var d=function(b){__extends(a,b);function a(){b.call(this,"AppActivated")}Object.defineProperty(a.prototype,"CorrelationId",{"get":function(){return this.Fields.CorrelationId},"set":function(a){this.Fields.CorrelationId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"SessionId",{"get":function(){return this.Fields.SessionId},"set":function(a){this.Fields.SessionId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"AppId",{"get":function(){return this.Fields.AppId},"set":function(a){this.Fields.AppId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"AppInstanceId",{"get":function(){return this.Fields.AppInstanceId},"set":function(a){this.Fields.AppInstanceId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"AppURL",{"get":function(){return this.Fields.AppURL},"set":function(a){this.Fields.AppURL=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"AssetId",{"get":function(){return this.Fields.AssetId},"set":function(a){this.Fields.AssetId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"Browser",{"get":function(){return this.Fields.Browser},"set":function(a){this.Fields.Browser=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"UserId",{"get":function(){return this.Fields.UserId},"set":function(a){this.Fields.UserId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"Host",{"get":function(){return this.Fields.Host},"set":function(a){this.Fields.Host=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"HostVersion",{"get":function(){return this.Fields.HostVersion},"set":function(a){this.Fields.HostVersion=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"ClientId",{"get":function(){return this.Fields.ClientId},"set":function(a){this.Fields.ClientId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"AppSizeWidth",{"get":function(){return this.Fields.AppSizeWidth},"set":function(a){this.Fields.AppSizeWidth=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"AppSizeHeight",{"get":function(){return this.Fields.AppSizeHeight},"set":function(a){this.Fields.AppSizeHeight=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"Message",{"get":function(){return this.Fields.Message},"set":function(a){this.Fields.Message=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"DocUrl",{"get":function(){return this.Fields.DocUrl},"set":function(a){this.Fields.DocUrl=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"OfficeJSVersion",{"get":function(){return this.Fields.OfficeJSVersion},"set":function(a){this.Fields.OfficeJSVersion=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"HostJSVersion",{"get":function(){return this.Fields.HostJSVersion},"set":function(a){this.Fields.HostJSVersion=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"WacHostEnvironment",{"get":function(){return this.Fields.WacHostEnvironment},"set":function(a){this.Fields.WacHostEnvironment=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"IsFromWacAutomation",{"get":function(){return this.Fields.IsFromWacAutomation},"set":function(a){this.Fields.IsFromWacAutomation=a},enumerable:true,configurable:true});a.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)};return a}(a);b.AppActivatedUsageData=d;var e=function(b){__extends(a,b);function a(){b.call(this,"ScriptLoad")}Object.defineProperty(a.prototype,"CorrelationId",{"get":function(){return this.Fields.CorrelationId},"set":function(a){this.Fields.CorrelationId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"SessionId",{"get":function(){return this.Fields.SessionId},"set":function(a){this.Fields.SessionId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"ScriptId",{"get":function(){return this.Fields.ScriptId},"set":function(a){this.Fields.ScriptId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"StartTime",{"get":function(){return this.Fields.StartTime},"set":function(a){this.Fields.StartTime=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"ResponseTime",{"get":function(){return this.Fields.ResponseTime},"set":function(a){this.Fields.ResponseTime=a},enumerable:true,configurable:true});a.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)};return a}(a);b.ScriptLoadUsageData=e;var f=function(b){__extends(a,b);function a(){b.call(this,"AppClosed")}Object.defineProperty(a.prototype,"CorrelationId",{"get":function(){return this.Fields.CorrelationId},"set":function(a){this.Fields.CorrelationId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"SessionId",{"get":function(){return this.Fields.SessionId},"set":function(a){this.Fields.SessionId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"FocusTime",{"get":function(){return this.Fields.FocusTime},"set":function(a){this.Fields.FocusTime=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"AppSizeFinalWidth",{"get":function(){return this.Fields.AppSizeFinalWidth},"set":function(a){this.Fields.AppSizeFinalWidth=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"AppSizeFinalHeight",{"get":function(){return this.Fields.AppSizeFinalHeight},"set":function(a){this.Fields.AppSizeFinalHeight=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"OpenTime",{"get":function(){return this.Fields.OpenTime},"set":function(a){this.Fields.OpenTime=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"CloseMethod",{"get":function(){return this.Fields.CloseMethod},"set":function(a){this.Fields.CloseMethod=a},enumerable:true,configurable:true});a.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)};return a}(a);b.AppClosedUsageData=f;var g=function(b){__extends(a,b);function a(){b.call(this,"APIUsage")}Object.defineProperty(a.prototype,"CorrelationId",{"get":function(){return this.Fields.CorrelationId},"set":function(a){this.Fields.CorrelationId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"SessionId",{"get":function(){return this.Fields.SessionId},"set":function(a){this.Fields.SessionId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"APIType",{"get":function(){return this.Fields.APIType},"set":function(a){this.Fields.APIType=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"APIID",{"get":function(){return this.Fields.APIID},"set":function(a){this.Fields.APIID=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"Parameters",{"get":function(){return this.Fields.Parameters},"set":function(a){this.Fields.Parameters=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"ResponseTime",{"get":function(){return this.Fields.ResponseTime},"set":function(a){this.Fields.ResponseTime=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"ErrorType",{"get":function(){return this.Fields.ErrorType},"set":function(a){this.Fields.ErrorType=a},enumerable:true,configurable:true});a.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)};return a}(a);b.APIUsageUsageData=g;var c=function(b){__extends(a,b);function a(){b.call(this,"AppInitialization")}Object.defineProperty(a.prototype,"CorrelationId",{"get":function(){return this.Fields.CorrelationId},"set":function(a){this.Fields.CorrelationId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"SessionId",{"get":function(){return this.Fields.SessionId},"set":function(a){this.Fields.SessionId=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"SuccessCode",{"get":function(){return this.Fields.SuccessCode},"set":function(a){this.Fields.SuccessCode=a},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"Message",{"get":function(){return this.Fields.Message},"set":function(a){this.Fields.Message=a},enumerable:true,configurable:true});a.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId);this.SetSerializedField("SessionId",this.SessionId);this.SetSerializedField("SuccessCode",this.SuccessCode);this.SetSerializedField("Message",this.Message)};return a}(a);b.AppInitializationUsageData=c})(OSFLog||(OSFLog={}));var Logger;(function(a){"use strict";(function(a){a[a.info=0]="info";a[a.warning=1]="warning";a[a.error=2]="error"})(a.TraceLevel||(a.TraceLevel={}));var f=a.TraceLevel;(function(a){a[a.none=0]="none";a[a.flush=1]="flush"})(a.SendFlag||(a.SendFlag={}));var g=a.SendFlag;function b(){}a.allowUploadingData=b;function e(a,b,c){}a.sendLog=e;function c(){try{return new d}catch(a){return null}}var d=function(){function a(){}a.prototype.writeLog=function(a){};a.prototype.loadProxyFrame=function(){};return a}();if(!OSF.Logger)OSF.Logger=a;a.ulsEndpoint=c()})(Logger||(Logger={}));var OSFAriaLogger;(function(k){var d={name:"AppActivated",enabled:true,critical:true,points:[{name:"Browser",type:"string"},{name:"Message",type:"string"},{name:"AppId",type:"string"},{name:"AppURL",type:"string"},{name:"UserId",type:"string"},{name:"Host",type:"string"},{name:"HostVersion",type:"string"},{name:"CorrelationId",type:"string",rename:"HostSessionId"},{name:"AppSizeWidth",type:"int64"},{name:"AppSizeHeight",type:"int64"},{name:"AppInstanceId",type:"string"},{name:"OfficeJSVersion",type:"string"},{name:"HostJSVersion",type:"string"},{name:"IsFromWacAutomation",type:"string"}]},e={name:"ScriptLoad",enabled:true,critical:false,points:[{name:"ScriptId",type:"string"},{name:"StartTime",type:"double"},{name:"ResponseTime",type:"double"}]},i={name:"APIUsage",enabled:false,critical:false,points:[{name:"APIType",type:"string"},{name:"APIID",type:"int64"},{name:"Parameters",type:"string"},{name:"ResponseTime",type:"int64"},{name:"ErrorType",type:"int64"}]},c={name:"AppInitialization",enabled:true,critical:false,points:[{name:"SuccessCode",type:"int64"},{name:"Message",type:"string"}]},f={name:"AppClosed",enabled:true,critical:false,points:[{name:"FocusTime",type:"int64"},{name:"AppSizeFinalWidth",type:"int64"},{name:"AppSizeFinalHeight",type:"int64"},{name:"OpenTime",type:"int64"}]},b=[d,e,i,c,f];function j(a,c){var d=c.rename===undefined?c.name:c.rename,e=c.type,b=undefined;switch(e){case"string":b=oteljs.makeStringDataField(d,a);break;case"double":if(typeof a==="string")a=parseFloat(a);b=oteljs.makeDoubleDataField(d,a);break;case"int64":if(typeof a==="string")a=parseInt(a);b=oteljs.makeInt64DataField(d,a);break;case"boolean":if(typeof a==="string")a=a==="true";b=oteljs.makeBooleanDataField(d,a);break}return b}function a(d){for(var a=0;a<b.length;a++){var c=b[a];if(c.name===d)return c}return undefined}function l(c){var b=a(c);if(b===undefined)return false;return b.enabled}function g(e,m){var b=a(e);if(b===undefined)return undefined;for(var d=[],c=0,k=b.points;c<k.length;c++){var h=k[c],o=h.name,i=m[o];if(i===undefined)continue;var f=j(i,h);f!==undefined&&d.push(f)}var g={};if(b.critical)g={samplingPolicy:oteljs.SamplingPolicy.CriticalBusinessImpact};var l="Office.Extensibility.OfficeJs."+e+"X",n={eventName:l,dataFields:d,eventFlags:g};return n}function h(a,b){if(l(a))OTel.OTelLogger.onTelemetryLoaded(function(){var c=g(a,b);if(c===undefined)return;Microsoft.Office.WebExtension.sendTelemetryEvent(c)})}var m=function(){function a(){}a.prototype.getAriaCDNLocation=function(){return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"ariatelemetry/aria-web-telemetry.js"};a.getInstance=function(){if(a.AriaLoggerObj===undefined)a.AriaLoggerObj=new a;return a.AriaLoggerObj};a.prototype.isIUsageData=function(a){return a.Fields!==undefined};a.prototype.loadAriaScriptAndLog=function(c,b){var d=1e3;OSF.OUtil.loadScript(this.getAriaCDNLocation(),function(){try{if(!this.ALogger){var e="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439";this.ALogger=AWTLogManager.initialize(e)}var a=new AWTEventProperties;a.setName("Office.Extensibility.OfficeJS."+c);for(var d in b)d.toLowerCase()!=="table"&&a.setProperty(d,b[d]);var f=new Date;a.setProperty("Date",f.toISOString());this.ALogger.logEvent(a)}catch(g){}},d);a.EnableSendingTelemetryWithOTel&&h(c,b)};a.prototype.logData=function(a){if(this.isIUsageData(a))this.loadAriaScriptAndLog(a.Table,a.Fields);else this.loadAriaScriptAndLog(a.Table,a)};a.EnableSendingTelemetryWithOTel=false;return a}();k.AriaLogger=m})(OSFAriaLogger||(OSFAriaLogger={}));var OSFAppTelemetry;(function(b){"use strict";var a,d=OSF.OUtil.Guid.generateNewGuid(),g="",n=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");b.enableTelemetry=true;var j=function(){function a(){}return a}();b.AppInfo=j;var e=function(){function a(b,a){this.name=b;this.handler=a}return a}(),i=function(){function a(){this.clientIDKey="Office API client";this.logIdSetKey="Office App Log Id Set"}a.prototype.getClientId=function(){var a=this.getValue(this.clientIDKey);if(!a||a.length<=0||a.length>40){a=OSF.OUtil.Guid.generateNewGuid();this.setValue(this.clientIDKey,a)}return a};a.prototype.saveLog=function(b,c){var a=this.getValue(this.logIdSetKey);a=(a&&a.length>0?a+";":"")+b;this.setValue(this.logIdSetKey,a);this.setValue(b,c)};a.prototype.enumerateLog=function(b,d){var c=this.getValue(this.logIdSetKey);if(c){var e=c.split(";");for(var g in e){var a=e[g],f=this.getValue(a);if(f){b&&b(a,f);d&&this.remove(a)}}d&&this.remove(this.logIdSetKey)}};a.prototype.getValue=function(c){var a=OSF.OUtil.getLocalStorage(),b="";if(a)b=a.getItem(c);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),f=function(){function a(){}a.prototype.LogData=function(a){if(!b.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(a)}catch(c){}};a.prototype.LogRawData=function(a){if(!b.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(c){}};return a}();function c(a){if(a)a=a.replace(/[{}]/g,"").toLowerCase();return a||""}var x=function(){function a(){}a.hashString=function(c){var a=0;if(c.length===0)return a;for(var b=0;b<c.length;b++){var d=c.charCodeAt(b);a=(a<<5)-a+d;a|=0}return a};a.stringToHash=function(d){var c=a.hashString(d),b=c.toString();if(c<0)b="1"+b.substring(1);else b="0"+b;return b};a.startsWith=function(b,a){return b.indexOf(a)==-0};a.isFileUrl=function(b){return a.startsWith(b.toLowerCase(),"file:")};a.removeHttpPrefix=function(c){var b="";if(a.startsWith(c.toLowerCase(),a.httpsPrefix))b=a.httpsPrefix;else if(a.startsWith(c.toLowerCase(),a.httpPrefix))b=a.httpPrefix;var d=c.slice(b.length);return d};a.getUrlDomain=function(c){var b=a.removeHttpPrefix(c);b=b.split("/")[0];b=b.split(":")[0];return b};a.isIp4Address=function(b){var a=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;return a.test(b)};a.filter=function(d){if(a.isFileUrl(d)){var c=a.stringToHash(d);return"file://"+c}var b=a.getUrlDomain(d);if(a.isIp4Address(b)){var c=a.stringToHash(d);if(a.startsWith(b,"10."))return"IP10Range_"+c;else if(a.startsWith(b,"192."))return"IP192Range_"+c;else if(a.startsWith(b,"127."))return"IP127Range_"+c;return"IPOther_"+c}return b};a.httpPrefix="http://";a.httpsPrefix="https://";return a}();function v(f){if(!b.enableTelemetry)return;if(a)return;a=new j;if(f.get_hostFullVersion())a.hostVersion=f.get_hostFullVersion();else a.hostVersion=f.get_appVersion();a.appId=f.get_id();a.host=f.get_appName();a.browser=window.navigator.userAgent;a.correlationId=c(f.get_correlationId());a.clientId=(new i).getClientId();a.appInstanceId=f.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,"").toLowerCase();a.message=f.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="16.0.11305.10000";if(f._wacHostEnvironment)a.wacHostEnvironment=f._wacHostEnvironment;if(f._isFromWacAutomation!==undefined&&f._isFromWacAutomation!==null)a.isFromWacAutomation=f._isFromWacAutomation.toString().toLowerCase();var h=f.get_docUrl();a.docUrl=n.test(h)?h:"";var g=location.href;if(g)g=g.split("?")[0].split("#")[0];a.appURL=x.filter(g);(function(g,a){var c,f,b;a.assetId="";a.userId="";try{c=decodeURIComponent(g);f=new DOMParser;b=f.parseFromString(c,"text/xml");var d=b.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),e=b.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(d&&d.nodeValue)a.userId=d.nodeValue;else if(e&&e.nodeValue)a.userId=e.nodeValue;a.assetId=b.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(h){}finally{c=null;b=null;f=null}})(f.get_eToken(),a);a.sessionId=d;a.name=f.get_addinName();OTel.OTelLogger.initialize(a);(function(){var j=new Date,c=null,g=0,i=false,d=function(){if(document.hasFocus()){if(c==null)c=new Date}else if(c){g+=Math.abs(+new Date-c.getTime());c=null}},a=[];a.push(new e("focus",d));a.push(new e("blur",d));a.push(new e("focusout",d));a.push(new e("focusin",d));var h=function(){for(var d=0;d<a.length;d++)OSF.OUtil.removeEventListener(window,a[d].name,a[d].handler);a.length=0;if(!i){if(document.hasFocus()&&c){g+=Math.abs(+new Date-c.getTime());c=null}b.onAppClosed(Math.abs(+new Date-j.getTime()),g);i=true}};a.push(new e("beforeunload",h));a.push(new e("unload",h));for(var f=0;f<a.length;f++)OSF.OUtil.addEventListener(window,a[f].name,a[f].handler);d()})();b.onAppActivated()}b.initialize=v;function o(){if(!a)return;(new i).enumerateLog(function(b,a){return(new f).LogRawData(a)},true);var b=new OSFLog.AppActivatedUsageData;b.SessionId=d;b.AppId=a.appId;b.AssetId=a.assetId;b.AppURL=a.appURL;b.UserId="";b.ClientId=a.clientId;b.Browser=a.browser;b.Host=a.host;b.HostVersion=a.hostVersion;b.CorrelationId=c(a.correlationId);b.AppSizeWidth=window.innerWidth;b.AppSizeHeight=window.innerHeight;b.AppInstanceId=a.appInstanceId;b.Message=a.message;b.DocUrl=a.docUrl;b.OfficeJSVersion=a.officeJSVersion;b.HostJSVersion=a.hostJSVersion;if(a.wacHostEnvironment)b.WacHostEnvironment=a.wacHostEnvironment;if(a.isFromWacAutomation!==undefined&&a.isFromWacAutomation!==null)b.IsFromWacAutomation=a.isFromWacAutomation;(new f).LogData(b)}b.onAppActivated=o;function s(h,g,e,b){var a=new OSFLog.ScriptLoadUsageData;a.CorrelationId=c(b);a.SessionId=d;a.ScriptId=h;a.StartTime=g;a.ResponseTime=e;(new f).LogData(a)}b.onScriptDone=s;function w(j,k,h,e,i){if(!a)return;var b=new OSFLog.APIUsageUsageData;b.CorrelationId=c(g);b.SessionId=d;b.APIType=j;b.APIID=k;b.Parameters=h;b.ResponseTime=e;b.ErrorType=i;(new f).LogData(b)}b.onCallDone=w;function r(f,b,d,e){var a=null;if(b)if(typeof b=="number")a=String(b);else if(typeof b==="object")for(var c in b){if(a!==null)a+=",";else a="";if(typeof b[c]=="number")a+=String(b[c])}else a="";OSF.AppTelemetry.onCallDone("method",f,a,d,e)}b.onMethodDone=r;function p(b,a){OSF.AppTelemetry.onCallDone("property",-1,b,a)}b.onPropertyDone=p;function u(b,a){OSF.AppTelemetry.onCallDone("event",b,null,0,a)}b.onEventDone=u;function q(c,d,a,b){OSF.AppTelemetry.onCallDone(c?"registerevent":"unregisterevent",d,null,a,b)}b.onRegisterDone=q;function t(f,e){if(!a)return;var b=new OSFLog.AppClosedUsageData;b.CorrelationId=c(g);b.SessionId=d;b.FocusTime=e;b.OpenTime=f;b.AppSizeFinalWidth=window.innerWidth;b.AppSizeFinalHeight=window.innerHeight;(new i).saveLog(d,b.SerializeRow())}b.onAppClosed=t;function k(a){g=c(a)}b.setOsfControlAppCorrelationId=k;function h(b,e){var a=new OSFLog.AppInitializationUsageData;a.CorrelationId=c(g);a.SessionId=d;a.SuccessCode=b?1:0;a.Message=e;(new f).LogData(a)}b.doAppInitializationLogging=h;function l(a){h(false,a)}b.logAppCommonMessage=l;function m(a){h(true,a)}b.logAppException=m;OSF.AppTelemetry=b})(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(b){this._eventHandlers={};this._objectEventHandlers={};this._queuedEventsArgs={};if(b!=null)for(var c=0;c<b.length;c++){var a=b[c],d=a=="objectDeleted"||a=="objectSelectionChanged"||a=="objectDataChanged"||a=="contentControlAdded";if(!d)this._eventHandlers[a]=[];else this._objectEventHandlers[a]={};this._queuedEventsArgs[a]=[]}};OSF.EventDispatch.prototype={getSupportedEvents:function(){var a=[];for(var b in this._eventHandlers)a.push(b);for(var b in this._objectEventHandlers)a.push(b);return a},supportsEvent:function(b){for(var a in this._eventHandlers)if(b==a)return true;for(var a in this._objectEventHandlers)if(b==a)return true;return false},hasEventHandler:function(c,d){var a=this._eventHandlers[c];if(a&&a.length>0)for(var b=0;b<a.length;b++)if(a[b]===d)return true;return false},hasObjectEventHandler:function(d,e,f){var c=this._objectEventHandlers[d];if(c!=null)for(var a=c[e],b=0;a!=null&&b<a.length;b++)if(a[b]===f)return true;return false},addEventHandler:function(b,a){if(typeof a!="function")return false;var c=this._eventHandlers[b];if(c&&!this.hasEventHandler(b,a)){c.push(a);return true}else return false},addObjectEventHandler:function(d,b,c){if(typeof c!="function")return false;var a=this._objectEventHandlers[d];if(a&&!this.hasObjectEventHandler(d,b,c)){if(a[b]==null)a[b]=[];a[b].push(c);return true}return false},addEventHandlerAndFireQueuedEvent:function(a,e){var d=this._eventHandlers[a],c=d.length==0,b=this.addEventHandler(a,e);c&&b&&this.fireQueuedEvent(a);return b},removeEventHandler:function(c,d){var a=this._eventHandlers[c];if(a&&a.length>0)for(var b=0;b<a.length;b++)if(a[b]===d){a.splice(b,1);return true}return false},removeObjectEventHandler:function(d,e,f){var c=this._objectEventHandlers[d];if(c!=null)for(var a=c[e],b=0;a!=null&&b<a.length;b++)if(a[b]===f){a.splice(b,1);return true}return false},clearEventHandlers:function(a){if(typeof this._eventHandlers[a]!="undefined"&&this._eventHandlers[a].length>0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){for(var d=this._eventHandlers[b],c=0;c<d.length;c++)d[c](a);return true}else return false},fireObjectEvent:function(f,a){if(a.type==undefined)return false;var b=a.type;if(b&&this._objectEventHandlers[b]){var e=this._objectEventHandlers[b],c=e[f];if(c!=null){for(var d=0;d<c.length;d++)c[d](a);return true}}return false},fireOrQueueEvent:function(b){var a=b.type;if(a&&this._eventHandlers[a]){var c=this._eventHandlers[a],d=this._queuedEventsArgs[a];if(c.length==0)d.push(b);else this.fireEvent(b);return true}else return false},fireQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._eventHandlers[a],c=this._queuedEventsArgs[a];if(b.length>0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(c,d,b){var a;switch(c){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(d);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(b,d.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(b,d.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(d);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);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:a=new OSF.DDA.ObjectEventArgs(c,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:a=new OSF.DDA.RichApiMessageEventArgs(c,b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(d);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(d);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(d);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo().hostType=="outlook"){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);d.initialize(a.initialData);(OSF._OfficeAppFactory.getHostInfo().hostPlatform=="win32"||OSF._OfficeAppFactory.getHostInfo().hostPlatform=="mac")&&d.setCurrentItemNumber(a.itemNumber.itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo().hostType=="outlook")a=new OSF.DDA.OlkRecipientsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo().hostType=="outlook")a=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if(OSF._OfficeAppFactory.getHostInfo().hostType=="outlook")a=new OSF.DDA.OlkRecurrenceChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if(OSF._OfficeAppFactory.getHostInfo().hostType=="outlook")a=new OSF.DDA.OlkAttachmentsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if(OSF._OfficeAppFactory.getHostInfo().hostType=="outlook")a=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));}return a};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(b,c,a){return a.supportsEvent(b)}},{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(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:false,isWindowDialog:false};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"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var a;if(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived!=null)a=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]);else a=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]);var c=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,b=this;!b[c]&&OSF.OUtil.defineEnumerableProperty(b,c,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];c(arguments,a,b)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(d){var b=OSF.DDA.SyncMethodNames.MessageParent.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return b(arguments,a)}});var c=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;!a[c]&&typeof OSF.DialogParentMessageEventDispatch!="undefined"&&OSF.DDA.DispIdHost.addEventSupport(a,OSF.DialogParentMessageEventDispatch,d);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(a){if(a[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}});else OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:a[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{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:true}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[],onSucceeded:function(c,i,h){var g=c[Microsoft.Office.WebExtension.Parameters.Id],b=c[Microsoft.Office.WebExtension.Parameters.Data],a=new OSF.DialogHandler,d=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];c(arguments,g,b,a)}});var f=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(a,f,{value:function(){var d=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],c=d.verifyAndExtractCall(arguments,a,b),e=c[Microsoft.Office.WebExtension.Parameters.EventType],f=c[Microsoft.Office.WebExtension.Parameters.Handler];return b.addEventHandlerAndFireQueuedEvent(e,f)}});var e=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(a,e,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return c(arguments,b,a)}});return a},checkCallArgs:function(a,c,b){if(a[Microsoft.Office.WebExtension.Parameters.Width]<=0)a[Microsoft.Office.WebExtension.Parameters.Width]=1;if(!a[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&a[Microsoft.Office.WebExtension.Parameters.Width]>100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(!a[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;return a}});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:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{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:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(a){try{a.onCalling&&a.onCalling();var b=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);OSF.ClientHostController.openDialog(a.dispId,a.targetId,function(c,b){if(a.onEvent)a.onEvent(b);if(OSF.AppTelemetry)OSF.AppTelemetry.onEventDone(a.dispId)},b)}catch(c){OSF.DDA.SafeArray.Delegate._onException(c,a)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(a){a.onCalling&&a.onCalling();var b=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.closeDialog(a.dispId,a.targetId,b)}catch(c){OSF.DDA.SafeArray.Delegate._onException(c,a)}};OSF.DDA.SafeArray.Delegate.messageParent=function(a){try{a.onCalling&&a.onCalling();var c=+new Date,b=OSF.ClientHostController.messageParent(a.hostCallArgs);a.onReceiving&&a.onReceiving();if(OSF.AppTelemetry)OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs(+new Date-c),b);return b}catch(d){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(d)}};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:true});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}],isComplexType:true});OSF.DDA.SafeArray.Delegate.sendMessage=function(a){try{a.onCalling&&a.onCalling();var c=+new Date,b=OSF.ClientHostController.sendMessage(a.hostCallArgs);a.onReceiving&&a.onReceiving();return b}catch(d){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(d)}};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,c,b){OSF.OUtil.defineEnumerableProperties(this,{size:{value:c},sliceCount:{value:Math.ceil(c/b)}});var a={};a[OSF.DDA.FileProperties.Handle]=e;a[OSF.DDA.FileProperties.SliceSize]=b;var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDocumentCopyChunkAsync,d.ReleaseDocumentCopyAsync],a)};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:4*1024*1024}}],checkCallArgs:function(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.SliceSize];if(a<=0||a>4*1024*1024)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return b},onSucceeded:function(a,c,b){return new OSF.DDA.File(a[OSF.DDA.FileProperties.Handle],a[OSF.DDA.FileProperties.FileSize],b[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(b,a){return a[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(b,a){return a[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(a,d,c){var b=a[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(b<0||b>=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt((b*c[OSF.DDA.FileProperties.SliceSize]).toString());return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:a[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});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(a){OSF.OUtil.defineEnumerableProperties(this,{url:{value:a[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(a,c,b){return new Microsoft.Office.WebExtension.FileProperties(a)}});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:true});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:true});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"});(function(){function a(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}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:a});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(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:["number","boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:["number","boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:["number","boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:["number","boolean"],defaultValue:false}}],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(a){return OSF.OUtil.serializeSettings(a)},deserializeSettings:function(a){return OSF.OUtil.deserializeSettings(a)}};OSF.DDA.Settings=function(a){a=a||{};var b=function(d){var b=OSF.OUtil.getSessionStorage();if(b){var a=OSF.DDA.SettingsManager.serializeSettings(d),c=JSON?JSON.stringify(a):Sys.Serialization.JavaScriptSerializer.serialize(a);b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),c)}};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(d){var c=Function._validateParams(arguments,[{name:"name",type:String,mayBeNull:false}]);if(c)throw c;var b=a[d];return typeof b==="undefined"?null:b}},"set":{value:function(e,d){var c=Function._validateParams(arguments,[{name:"name",type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(c)throw c;a[e]=d;b(a)}},remove:{value:function(d){var c=Function._validateParams(arguments,[{name:"name",type:String,mayBeNull:false}]);if(c)throw c;delete a[d];b(a)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],a)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);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(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};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(b,a){return a}}],onSucceeded:function(d,a,e){var f=d[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(f),g=e[OSF.DDA.SettingsManager.RefreshingSettings];for(var b in g)a.remove(b);for(var b in c)a.set(b,c[b]);return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});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(b,a){this._id=b;OSF.OUtil.defineEnumerableProperty(this,"onFail",{"get":function(){return a},"set":function(c){var b=typeof c;if(b!="undefined"&&b!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,b);a=c}})};OSF.DDA.BindingPromise.prototype={_fetch:function(a){if(this.binding)a&&a(this.binding);else if(!this._binding){var b=this;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id,function(c){if(c.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded){OSF.OUtil.defineEnumerableProperty(b,"binding",{value:c.value});a&&a(b.binding)}else if(b.onFail)b.onFail(c)})}return this},getDataAsync:function(){var a=arguments;this._fetch(function(b){b.getDataAsync.apply(b,a)});return this},setDataAsync:function(){var a=arguments;this._fetch(function(b){b.setDataAsync.apply(b,a)});return this},addHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.addHandlerAsync.apply(b,a)});return this},removeHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.removeHandlerAsync.apply(b,a)});return this}};OSF.DDA.BindingFacade=function(b){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:b});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddFromSelectionAsync,a.AddFromNamedItemAsync,a.GetAllAsync,a.GetByIdAsync,a.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{document:{value:a},id:{value:b}})};OSF.DDA.Binding=function(a,c){OSF.OUtil.defineEnumerableProperties(this,{document:{value:c},id:{value:a}});var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDataAsync,d.SetDataAsync]);var e=Microsoft.Office.WebExtension.EventType,b=c.bindings._eventDispatches;if(!b[a])b[a]=new OSF.EventDispatch([e.BindingSelectionChanged,e.BindingDataChanged]);var f=b[a];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+ +new Date};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(a,c){var d=a[OSF.DDA.BindingProperties.Id],g=a[OSF.DDA.BindingProperties.RowCount],f=a[OSF.DDA.BindingProperties.ColumnCount],h=a[OSF.DDA.BindingProperties.HasHeaders],b;switch(a[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:b=new OSF.DDA.TextBinding(d,c);break;case Microsoft.Office.WebExtension.BindingType.Matrix:b=new OSF.DDA.MatrixBinding(d,c,g,f);break;case Microsoft.Office.WebExtension.BindingType.Table:var i=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument},e;if(i()&&OSF.DDA.ExcelTableBinding)e=OSF.DDA.ExcelTableBinding;else e=OSF.DDA.TableBinding;b=new e(d,c,g,f,h);break;default:b=new OSF.DDA.UnknownBinding(d,c)}return b};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"});(function(){function a(a){return OSF.DDA.OMFactory.manufactureBinding(a,Microsoft.Office.WebExtension.context.document)}function b(a){return a.id}function c(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}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:a});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 true}}],onSucceeded:a});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(b){return OSF.OUtil.mapList(b[OSF.DDA.ListDescriptors.BindingList],a)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:a});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(d,b,a){var c=a[Microsoft.Office.WebExtension.Parameters.Id];delete b._eventDispatches[c]}});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(b,a){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(a.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(a,b,c){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&a[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&a[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn];delete a[Microsoft.Office.WebExtension.Parameters.RowCount];delete a[Microsoft.Office.WebExtension.Parameters.ColumnCount]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]||a[Microsoft.Office.WebExtension.Parameters.RowCount]||a[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:b}],onSucceeded:c});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(a){return OSF.DDA.DataCoercion.determineCoercionType(a[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(a,b,c){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:b}]})})();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(d,c,b,a){OSF.DDA.MatrixBinding.uber.constructor.call(this,d,c);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:b?b:0},columnCount:{value:a?a: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:true});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:true});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:true});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:true,isComplexType:true});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:true,isComplexType:true});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:true,isComplexType:true});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(b,a){function c(a){if(a==null||a==undefined)return null;try{for(var b=OSF.DDA.DataCoercion.findArrayDimensionality(a,2);b<2;b++)a=[a];return a}catch(c){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return a},"set":function(b){a=c(b)}},rows:{"get":function(){return b},"set":function(a){b=a==null||OSF.OUtil.isArray(a)&&a.length==0?[]:c(a)}}});this.headers=a;this.rows=b};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[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(f,e,d,c,b){OSF.DDA.TableBinding.uber.constructor.call(this,f,e);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:d?d:0},columnCount:{value:c?c:0},hasHeaders:{value:b?b:false}});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddRowsAsync,a.AddColumnsAsync,a.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"});(function(){function a(a){return a.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:a}]});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:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]})})();OSF.DDA.TextBinding=function(b,a){OSF.DDA.TextBinding.uber.constructor.call(this,b,a);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(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:a}})};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(a,b){OSF.OUtil.defineEnumerableProperties(this,{type:{value:a},object:{value:b}})};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(c,a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:c}});for(var b in a)OSF.OUtil.defineEnumerableProperty(this,b,{value:a[b]})};OSF.DDA.BindingDataChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:a}})};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:true});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:true});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=function(){return{findArrayDimensionality:function(c){if(OSF.OUtil.isArray(c)){for(var b=0,a=0;a<c.length;a++)b=Math.max(b,OSF.DDA.DataCoercion.findArrayDimensionality(c[a]));return b+1}else return 0},getCoercionDefaultForBinding:function(a){switch(a){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(a){switch(a){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(a){if(a==null||a==undefined)return null;var b=null,c=typeof a;if(a.rows!==undefined)b=Microsoft.Office.WebExtension.CoercionType.Table;else if(OSF.OUtil.isArray(a))b=Microsoft.Office.WebExtension.CoercionType.Matrix;else if(c=="string"||c=="number"||c=="boolean"||OSF.OUtil.isDate(a))b=Microsoft.Office.WebExtension.CoercionType.Text;else throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject;return b},coerceData:function(b,c,a){a=a||OSF.DDA.DataCoercion.determineCoercionType(b);if(a&&a!=c){OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin);b=OSF.DDA.DataCoercion._coerceDataFromTable(c,OSF.DDA.DataCoercion._coerceDataToTable(b,a));OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd)}return b},_matrixToText:function(a){if(a.length==1&&a[0].length==1)return""+a[0][0];for(var b="",c=0;c<a.length;c++)b+=a[c].join("\t")+"\n";return b.substring(0,b.length-1)},_textToMatrix:function(c){for(var a=c.split("\n"),b=0;b<a.length;b++)a[b]=a[b].split("\t");return a},_tableToText:function(b){var a="";if(b.headers!=null)a=OSF.DDA.DataCoercion._matrixToText([b.headers])+"\n";var c=OSF.DDA.DataCoercion._matrixToText(b.rows);if(c=="")a=a.substring(0,a.length-1);return a+c},_tableToMatrix:function(a){var b=a.rows;a.headers!=null&&b.unshift(a.headers);return b},_coerceDataFromTable:function(c,b){var a;switch(c){case Microsoft.Office.WebExtension.CoercionType.Table:a=b;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:a=OSF.DDA.DataCoercion._tableToMatrix(b);break;case Microsoft.Office.WebExtension.CoercionType.SlideRange:a=null;if(OSF.DDA.OMFactory.manufactureSlideRange)a=OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(b));if(a==null)a=OSF.DDA.DataCoercion._tableToText(b);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:a=OSF.DDA.DataCoercion._tableToText(b);break}return a},_coerceDataToTable:function(b,c){if(c==undefined)c=OSF.DDA.DataCoercion.determineCoercionType(b);var a;switch(c){case Microsoft.Office.WebExtension.CoercionType.Table:a=b;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:a=new Microsoft.Office.WebExtension.TableData(b);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:a=new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(b));break}return a}}}();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.CoercionType,{SlideRange:"slideRange"});OSF.DDA.SlideProperties={Id:0,Title:1,Index:2};OSF.DDA.Slide=function(c,b,a){OSF.OUtil.defineEnumerableProperties(this,{id:{value:c},title:{value:b},index:{value:a}})};OSF.DDA.SlideRange=function(a){OSF.OUtil.defineEnumerableProperties(this,{slides:{value:a}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureSlideRange=function(g){var a=null;if(JSON)a=JSON.parse(g);else a=Sys.Serialization.JavaScriptSerializer.deserialize(g);if(a==null)return null;var d=0;for(var j in OSF.DDA.SlideProperties)if(OSF.DDA.SlideProperties.hasOwnProperty(j))d++;for(var e=[],c=true,b=0;b<a.length&&c;b++){c=false;if(a[b].length==d){var h=parseInt(a[b][OSF.DDA.SlideProperties.Id]),i=a[b][OSF.DDA.SlideProperties.Title],f=parseInt(a[b][OSF.DDA.SlideProperties.Index]);if(!isNaN(h)&&!isNaN(f)){c=true;e.push(new OSF.DDA.Slide(h,i,f))}}}if(!c)return null;return new OSF.DDA.SlideRange(e)};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.SlideRange,value:7}]});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 a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddDataPartAsync,a.GetDataPartByIdAsync,a.GetDataPartsByNameSpaceAsync])};OSF.DDA.CustomXmlPart=function(f,b,g){OSF.OUtil.defineEnumerableProperties(this,{builtIn:{value:g},id:{value:b},namespaceManager:{value:new OSF.DDA.CustomXmlPrefixMappings(b)}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[c.DeleteDataPartAsync,c.GetPartNodesAsync,c.GetPartXmlAsync]);var e=f._eventDispatches,a=e[b];if(!a){var d=Microsoft.Office.WebExtension.EventType;a=new OSF.EventDispatch([d.DataNodeDeleted,d.DataNodeInserted,d.DataNodeReplaced]);e[b]=a}OSF.DDA.DispIdHost.addEventSupport(this,a)};OSF.DDA.CustomXmlPrefixMappings=function(b){var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddDataPartNamespaceAsync,a.GetDataPartNamespaceAsync,a.GetDataPartPrefixAsync],b)};OSF.DDA.CustomXmlNode=function(d,c,e,b){OSF.OUtil.defineEnumerableProperties(this,{baseName:{value:b},namespaceUri:{value:e},nodeType:{value:c}});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.GetRelativeNodesAsync,a.GetNodeValueAsync,a.GetNodeXmlAsync,a.SetNodeValueAsync,a.SetNodeXmlAsync,a.GetNodeTextAsync,a.SetNodeTextAsync],d)};OSF.DDA.NodeInsertedEventArgs=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeInserted},newNode:{value:b},inUndoRedo:{value:a}})};OSF.DDA.NodeReplacedEventArgs=function(c,b,a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeReplaced},oldNode:{value:c},newNode:{value:b},inUndoRedo:{value:a}})};OSF.DDA.NodeDeletedEventArgs=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeDeleted},oldNode:{value:c},oldNextSibling:{value:a},inUndoRedo:{value:b}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureDataNode=function(a){if(a)return new OSF.DDA.CustomXmlNode(a[OSF.DDA.DataNodeProperties.Handle],a[OSF.DDA.DataNodeProperties.NodeType],a[OSF.DDA.DataNodeProperties.NamespaceUri],a[OSF.DDA.DataNodeProperties.BaseName])};OSF.DDA.OMFactory.manufactureDataPart=function(a,b){return new OSF.DDA.CustomXmlPart(b,a[OSF.DDA.DataPartProperties.Id],a[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 c(a){return OSF.DDA.OMFactory.manufactureDataPart(a,Microsoft.Office.WebExtension.context.document.customXmlParts)}function f(a){return OSF.DDA.OMFactory.manufactureDataNode(a)}function b(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];return a==undefined?null:a}function d(a){return a.id}function e(b,a){return a}function a(b,a){return a}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:c});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:c});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataPartList],c)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:d}]});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:d}],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataNodeList],f)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:d}],onSucceeded:b});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:e}]});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:e}],onSucceeded:b});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:e}],onSucceeded:b});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:a}],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataNodeList],f)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:a}],onSucceeded:b});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:a}],onSucceeded:b});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:a}]});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:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:a}],onSucceeded:b});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:a}]})})();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:true});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:true});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:true});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:true});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:true});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:true});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:true});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:true});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:true});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.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}]});var OfficeExt;(function(a){var b;(function(b){var e=function(){function d(){var a=this;this._pseudoDocument=null;this._eventDispatch=null;this._processAppCommandInvocation=function(b){var c=a._verifyManifestCallback(b.callbackName);if(c.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){a._invokeAppCommandCompletedMethod(b.appCommandId,c.errorCode,"");return}var d=a._constructEventObjectForCallback(b);if(d)window.setTimeout(function(){c.callback(d)},0);else a._invokeAppCommandCompletedMethod(b.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}d.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=a.AppCommand.AppCommandInvokedEventArgs};d.prototype.initializeAndChangeOnce=function(a){b.registerDdaFacade();this._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);var c=function(b){if(a)if(b.status=="succeeded")a(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);else a(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch);this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,c)};d.prototype._verifyManifestCallback=function(e){var d={callback:null,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback};e=e.trim();try{for(var a=e.split("."),b=window,c=0;c<a.length-1;c++)if(b[a[c]]&&(typeof b[a[c]]=="object"||typeof b[a[c]]=="function"))b=b[a[c]];else return d;var f=b[a[a.length-1]];if(typeof f!="function")return d}catch(g){return d}return{callback:f,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}};d.prototype._invokeAppCommandCompletedMethod=function(a,b,c){this._pseudoDocument.appCommandInvocationCompletedAsync(a,b,c)};d.prototype._constructEventObjectForCallback=function(b){var e=this,a=new c;try{var d=JSON.parse(b.eventObjStr);this._translateEventObjectInternal(d,a);Object.defineProperty(a,"completed",{value:function(c){a.completedContext=c;var d=JSON.stringify(a);e._invokeAppCommandCompletedMethod(b.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,d)},enumerable:true})}catch(f){a=null}return a};d.prototype._translateEventObjectInternal=function(d,c){for(var a in d){if(!d.hasOwnProperty(a))continue;var b=d[a];if(typeof b=="object"&&b!=null){OSF.OUtil.defineEnumerableProperty(c,a,{value:{}});this._translateEventObjectInternal(b,c[a])}else Object.defineProperty(c,a,{value:b,enumerable:true,writable:true})}};d.prototype._constructObjectByTemplate=function(c,g){var b={};if(!c||!g)return b;for(var a in c)if(c.hasOwnProperty(a)){b[a]=null;if(g[a]!=null){var e=c[a],f=g[a],d=typeof f;if(typeof e=="object"&&e!=null)b[a]=this._constructObjectByTemplate(e,f);else if(d=="number"||d=="string"||d=="boolean")b[a]=f}}return b};d.instance=function(){if(d._instance==null)d._instance=new d;return d._instance};d._instance=null;return d}();b.AppCommandManager=e;var d=function(){function a(a,b,c){this.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked;this.appCommandId=a;this.callbackName=b;this.eventObjStr=c}a.create=function(c){return new a(c[b.AppCommandInvokedEventEnums.AppCommandId],c[b.AppCommandInvokedEventEnums.CallbackName],c[b.AppCommandInvokedEventEnums.EventObjStr])};return a}();b.AppCommandInvokedEventArgs=d;var c=function(){function a(){}return a}();b.AppCommandCallbackEventArgs=c;b.AppCommandInvokedEventEnums={AppCommandId:"appCommandId",CallbackName:"callbackName",EventObjStr:"eventObjStr"}})(b=a.AppCommand||(a.AppCommand={}))})(OfficeExt||(OfficeExt={}));OfficeExt.AppCommand.AppCommandManager.initializeOsfDda();var OfficeExt;(function(a){var b;(function(c){function b(){if(OSF.DDA.SafeArray){var b=OSF.DDA.SafeArray.Delegate.ParameterMap;b.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}]});b.define({type:OSF.DDA.EventDispId.dispidAppCommandInvokedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,value:b.self}],isComplexType:true});b.define({type:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,fromHost:[{name:a.AppCommand.AppCommandInvokedEventEnums.AppCommandId,value:0},{name:a.AppCommand.AppCommandInvokedEventEnums.CallbackName,value:1},{name:a.AppCommand.AppCommandInvokedEventEnums.EventObjStr,value:2}],isComplexType:true})}}c.registerDdaFacade=b})(b=a.AppCommand||(a.AppCommand={}))})(OfficeExt||(OfficeExt={}));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:true});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(){var a=OfficeExt.AppCommand.AppCommandManager.instance();a.initializeAndChangeOnce()};OSF.DDA.OneNoteDocument=function(a,b){OSF.DDA.OneNoteDocument.uber.constructor.call(this,a,new OSF.DDA.BindingFacade(this),b);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.OneNoteDocument,OSF.DDA.JsomDocument);OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(a,b,c){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);a.doc=new OSF.DDA.OneNoteDocument(a,this._initializeSettings(false));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);b()};var __extends=this&&this.__extends||function(){var a=function(c,b){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(c,a){for(var b in a)if(a.hasOwnProperty(b))c[b]=a[b]};return a(c,b)};return function(c,b){a(c,b);function d(){this.constructor=c}c.prototype=b===null?Object.create(b):(d.prototype=b.prototype,new d)}}(),OfficeExtension;(function(a){var b;(function(a){a.OfficeRequire=function(){return null}()})(b=a._Internal||(a._Internal={}));(function(a){var b;(function(b){function c(){return function(){"use strict";function N(a){return typeof a==="function"||typeof a==="object"&&a!==null}function u(a){return typeof a==="function"}function Q(a){return typeof a==="object"&&a!==null}var v;if(!Array.isArray)v=function(a){return Object.prototype.toString.call(a)==="[object Array]"};else v=Array.isArray;var A=v,n=0,lb={}.toString,gb,s,h=function(a,b){m[n]=a;m[n+1]=b;n+=2;if(n===2)if(s)s(l);else o()};function Z(a){s=a}function ib(a){h=a}var U=typeof window!=="undefined"?window:undefined,z=U||{},w=z.MutationObserver||z.WebKitMutationObserver,jb=typeof process!=="undefined"&&{}.toString.call(process)==="[object process]",hb=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function bb(){var b=process.nextTick,a=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);if(Array.isArray(a)&&a[1]==="0"&&a[2]==="10")b=window.setImmediate;return function(){b(l)}}function kb(){return function(){gb(l)}}function I(){var a=0,c=new w(l),b=document.createTextNode("");c.observe(b,{characterData:true});return function(){b.data=a=++a%2}}function L(){var a=new MessageChannel;a.port1.onmessage=l;return function(){a.port2.postMessage(0)}}function V(){return function(){setTimeout(l,1)}}var m=new Array(1e3);function l(){for(var a=0;a<n;a+=2){var b=m[a],c=m[a+1];b(c);m[a]=undefined;m[a+1]=undefined}n=0}var o;if(jb)o=bb();else if(w)o=I();else if(hb)o=L();else o=V();function k(){}var g=void 0,i=1,f=2,p=new y;function G(){return new TypeError("You cannot resolve a promise with itself")}function H(){return new TypeError("A promises callback cannot return that same promise.")}function X(a){try{return a.then}catch(b){p.error=b;return p}}function Y(d,c,a,b){try{d.call(c,a,b)}catch(e){return e}}function B(c,a,e){h(function(f){var c=false,g=Y(e,a,function(b){if(c)return;c=true;if(a!==b)j(f,b);else d(f,b)},function(a){if(c)return;c=true;b(f,a)},"Settle: "+(f._label||" unknown promise"));if(!c&&g){c=true;b(f,g)}},c)}function D(c,a){if(a._state===i)d(c,a._result);else if(a._state===f)b(c,a._result);else q(a,undefined,function(a){j(c,a)},function(a){b(c,a)})}function C(c,a){if(a.constructor===c.constructor)D(c,a);else{var e=X(a);if(e===p)b(c,p.error);else if(e===undefined)d(c,a);else if(u(e))B(c,a,e);else d(c,a)}}function j(a,c){if(a===c)b(a,G());else if(N(c))C(a,c);else d(a,c)}function F(a){a._onerror&&a._onerror(a._result);t(a)}function d(a,b){if(a._state!==g)return;a._result=b;a._state=i;a._subscribers.length!==0&&h(t,a)}function b(a,b){if(a._state!==g)return;a._state=f;a._result=b;h(F,a)}function q(c,g,d,e){var a=c._subscribers,b=a.length;c._onerror=null;a[b]=g;a[b+i]=d;a[b+f]=e;b===0&&c._state&&h(t,c)}function t(b){var a=b._subscribers,f=b._state;if(a.length===0)return;for(var e,d,g=b._result,c=0;c<a.length;c+=3){e=a[c];d=a[c+f];if(e)x(f,e,d,g);else d(g)}b._subscribers.length=0}function y(){this.error=null}var r=new y;function T(a,b){try{return a(b)}catch(c){r.error=c;return r}}function x(l,c,k,m){var h=u(k),a,o,e,n;if(h){a=T(k,m);if(a===r){n=true;o=a.error;a=null}else e=true;if(c===a){b(c,H());return}}else{a=m;e=true}if(c._state===g)if(h&&e)j(c,a);else if(n)b(c,o);else if(l===i)d(c,a);else l===f&&b(c,a)}function E(a,c){try{c(function(b){j(a,b)},function(c){b(a,c)})}catch(d){b(a,d)}}function e(e,c){var a=this;a._instanceConstructor=e;a.promise=new e(k);if(a._validateInput(c)){a._input=c;a.length=c.length;a._remaining=c.length;a._init();if(a.length===0)d(a.promise,a._result);else{a.length=a.length||0;a._enumerate();a._remaining===0&&d(a.promise,a._result)}}else b(a.promise,a._validationError())}e.prototype._validateInput=function(a){return A(a)};e.prototype._validationError=function(){return new a.Error("Array Methods must be provided an Array")};e.prototype._init=function(){this._result=new Array(this.length)};var W=e;e.prototype._enumerate=function(){for(var a=this,d=a.length,c=a.promise,e=a._input,b=0;c._state===g&&b<d;b++)a._eachEntry(e[b],b)};e.prototype._eachEntry=function(a,c){var b=this,d=b._instanceConstructor;if(Q(a))if(a.constructor===d&&a._state!==g){a._onerror=null;b._settledAt(a._state,c,a._result)}else b._willSettleAt(d.resolve(a),c);else{b._remaining--;b._result[c]=a}};e.prototype._settledAt=function(h,i,e){var a=this,c=a.promise;if(c._state===g){a._remaining--;if(h===f)b(c,e);else a._result[i]=e}a._remaining===0&&d(c,a._result)};e.prototype._willSettleAt=function(c,b){var a=this;q(c,undefined,function(c){a._settledAt(i,b,c)},function(c){a._settledAt(f,b,c)})};function fb(a){return new W(this,a).promise}var S=fb;function ab(c){var e=this,a=new e(k);if(!A(c)){b(a,new TypeError("You must pass an array to race."));return a}var i=c.length;function f(b){j(a,b)}function h(c){b(a,c)}for(var d=0;a._state===g&&d<i;d++)q(e.resolve(c[d]),undefined,f,h);return a}var R=ab;function K(a){var b=this;if(a&&typeof a==="object"&&a.constructor===b)return a;var c=new b(k);j(c,a);return c}var J=K;function P(d){var c=this,a=new c(k);b(a,d);return a}var M=P,db=0;function O(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");}function cb(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");}var eb=c;function c(a){this._id=db++;this._state=undefined;this._result=undefined;this._subscribers=[];if(k!==a){!u(a)&&O();!(this instanceof c)&&cb();E(this,a)}}c.all=S;c.race=R;c.resolve=J;c.reject=M;c._setScheduler=Z;c._setAsap=ib;c._asap=h;c.prototype={constructor:c,then:function(d,e){var b=this,a=b._state;if(a===i&&!d||a===f&&!e)return this;var c=new this.constructor(k),j=b._result;if(a){var g=arguments[a-1];h(function(){x(a,c,g,j)})}else q(b,c,d,e);return c},"catch":function(a){return this.then(null,a)}};return eb}.call(this)}b.Init=c})(b=a.PromiseImpl||(a.PromiseImpl={}))})(b=a._Internal||(a._Internal={}));(function(a){function c(){var a=window.navigator.userAgent,b=a.indexOf("Edge/");if(b>=0){a=a.substring(b+5,a.length);if(a<"14.14393")return true;else return false}return false}function b(){if(typeof window==="undefined"&&typeof Promise==="function")return Promise;if(typeof window!=="undefined"&&window.Promise)if(c())return a.PromiseImpl.Init();else return window.Promise;else return a.PromiseImpl.Init()}a.OfficePromise=b()})(b=a._Internal||(a._Internal={}));var c=b.OfficePromise;a.Promise=c})(OfficeExtension||(OfficeExtension={}));var OfficeExtension;(function(c){var s=function(){function b(){}b.prototype._resolveRequestUrlAndHeaderInfo=function(){return a._createPromiseFromResult(null)};b.prototype._createRequestExecutorOrNull=function(){return null};Object.defineProperty(b.prototype,"eventRegistration",{"get":function(){return null},enumerable:true,configurable:true});return b}();c.SessionBase=s;var D=function(){function b(){}b.setCustomSendRequestFunc=function(a){b.s_customSendRequestFunc=a};b.xhrSendRequestFunc=function(b){return a.createPromise(function(g,h){var c=new XMLHttpRequest;c.open(b.method,b.url);c.onload=function(){var b={statusCode:c.status,headers:a._parseHttpResponseHeaders(c.getAllResponseHeaders()),body:c.responseText};g(b)};c.onerror=function(){h(new d.RuntimeError({code:f.connectionFailure,message:a._getResourceString(i.connectionFailureWithStatus,c.statusText)}))};if(b.headers)for(var e in b.headers)c.setRequestHeader(e,b.headers[e]);c.send(a._getRequestBodyText(b))})};b.sendRequest=function(c){b.validateAndNormalizeRequest(c);var a=b.s_customSendRequestFunc;if(!a)a=b.xhrSendRequestFunc;return a(c)};b.setCustomSendLocalDocumentRequestFunc=function(a){b.s_customSendLocalDocumentRequestFunc=a};b.sendLocalDocumentRequest=function(a){b.validateAndNormalizeRequest(a);var c;c=b.s_customSendLocalDocumentRequestFunc||b.officeJsSendLocalDocumentRequestFunc;return c(a)};b.officeJsSendLocalDocumentRequestFunc=function(b){b=a._validateLocalDocumentRequest(b);var c=a._buildRequestMessageSafeArray(b);return a.createPromise(function(b,d){OSF.DDA.RichApi.executeRichApiRequestAsync(c,function(c){var d;if(c.status=="succeeded")d={statusCode:k.getResponseStatusCode(c),headers:k.getResponseHeaders(c),body:k.getResponseBody(c)};else d=k.buildHttpResponseFromOfficeJsError(c.error.code,c.error.message);a.log("Response:");a.log(JSON.stringify(d));b(d)})})};b.validateAndNormalizeRequest=function(b){if(a.isNullOrUndefined(b))throw d.RuntimeError._createInvalidArgError({argumentName:"request"});if(a.isNullOrEmptyString(b.method))b.method="GET";b.method=b.method.toUpperCase()};b.logRequest=function(c){if(a._logEnabled){a.log("---HTTP Request---");a.log(c.method+" "+c.url);if(c.headers)for(var d in c.headers)a.log(d+": "+c.headers[d]);b._logBodyEnabled&&a.log(a._getRequestBodyText(c))}};b.logResponse=function(c){if(a._logEnabled){a.log("---HTTP Response---");a.log(""+c.statusCode);if(c.headers)for(var d in c.headers)a.log(d+": "+c.headers[d]);b._logBodyEnabled&&a.log(c.body)}};b._logBodyEnabled=false;return b}();c.HttpUtility=D;var v=function(){function b(a){var b=this;this.m_bridge=a;this.m_promiseResolver={};this.m_handlers=[];this.m_bridge.onMessageFromHost=function(f){var e=JSON.parse(f);if(e.type==3){var c=e.message;if(c&&c.entries)for(var d=0;d<c.entries.length;d++){var a=c.entries[d];if(Array.isArray(a)){var g={messageCategory:a[0],messageType:a[1],targetId:a[2],message:a[3],id:a[4]};c.entries[d]=g}}}b.dispatchMessage(e)}}b.init=function(d){if(typeof d!=="object"||!d)return;var c=new b(d);b.s_instance=c;D.setCustomSendLocalDocumentRequestFunc(function(d){d=a._validateLocalDocumentRequest(d);var e=0;if(!a.isReadonlyRestRequest(d.method))e=1;var g=d.url.indexOf("?");if(g>=0){var i=d.url.substr(g+1),f=a._parseRequestFlagsFromQueryStringIfAny(i);if(f>=0)e=f}var h={id:b.nextId(),type:1,flags:e,message:d};return c.sendMessageToHostAndExpectResponse(h).then(function(a){var b=a.message;return b})});for(var e=0;e<b.s_onInitedHandlers.length;e++)b.s_onInitedHandlers[e](c)};Object.defineProperty(b,"instance",{"get":function(){return b.s_instance},enumerable:true,configurable:true});b.prototype.sendMessageToHost=function(a){this.m_bridge.sendMessageToHost(JSON.stringify(a))};b.prototype.sendMessageToHostAndExpectResponse=function(b){var c=this,d=a.createPromise(function(a,d){c.m_promiseResolver[b.id]=a});this.m_bridge.sendMessageToHost(JSON.stringify(b));return d};b.prototype.addHostMessageHandler=function(a){this.m_handlers.push(a)};b.prototype.removeHostMessageHandler=function(b){var a=this.m_handlers.indexOf(b);a>=0&&this.m_handlers.splice(a,1)};b.onInited=function(a){b.s_onInitedHandlers.push(a);b.s_instance&&a(b.s_instance)};b.prototype.dispatchMessage=function(a){if(typeof a.id==="number"){var c=this.m_promiseResolver[a.id];if(c){c(a);delete this.m_promiseResolver[a.id];return}}for(var b=0;b<this.m_handlers.length;b++)this.m_handlers[b](a)};b.nextId=function(){return b.s_nextId++};b.s_onInitedHandlers=[];b.s_nextId=1;return b}();c.HostBridge=v;typeof _richApiNativeBridge==="object"&&_richApiNativeBridge&&v.init(_richApiNativeBridge);var d;(function(b){var c=function(d){__extends(c,d);function c(a){var b=d.call(this,typeof a==="string"?a:a.message)||this;Object.setPrototypeOf(b,c.prototype);b.name="RichApi.Error";if(typeof a==="string")b.message=a;else{b.code=a.code;b.message=a.message;b.traceMessages=a.traceMessages||[];b.innerError=a.innerError||null;b.debugInfo=b._createDebugInfo(a.debugInfo||{})}return b}c.prototype.toString=function(){return this.code+": "+this.message};c.prototype._createDebugInfo=function(c){var a={code:this.code,message:this.message};a.toString=function(){return JSON.stringify(this)};for(var d in c)a[d]=c[d];if(this.innerError)if(this.innerError instanceof b.RuntimeError)a.innerError=this.innerError.debugInfo;else a.innerError=this.innerError;return a};c._createInvalidArgError=function(c){return new b.RuntimeError({code:f.invalidArgument,message:a.isNullOrEmptyString(c.argumentName)?a._getResourceString(i.invalidArgumentGeneric):a._getResourceString(i.invalidArgument,c.argumentName),debugInfo:c.errorLocation?{errorLocation:c.errorLocation}:{},innerError:c.innerError})};return c}(Error);b.RuntimeError=c})(d=c._Internal||(c._Internal={}));c.Error=d.RuntimeError;var f=function(){function a(){}a.apiNotFound="ApiNotFound";a.accessDenied="AccessDenied";a.generalException="GeneralException";a.activityLimitReached="ActivityLimitReached";a.invalidArgument="InvalidArgument";a.connectionFailure="ConnectionFailure";a.timeout="Timeout";a.invalidOrTimedOutSession="InvalidOrTimedOutSession";a.invalidObjectPath="InvalidObjectPath";a.invalidRequestContext="InvalidRequestContext";a.valueNotLoaded="ValueNotLoaded";return a}();c.CoreErrorCodes=f;var i=function(){function a(){}a.apiNotFoundDetails="ApiNotFoundDetails";a.connectionFailureWithStatus="ConnectionFailureWithStatus";a.connectionFailureWithDetails="ConnectionFailureWithDetails";a.invalidArgument="InvalidArgument";a.invalidArgumentGeneric="InvalidArgumentGeneric";a.timeout="Timeout";a.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage";a.invalidObjectPath="InvalidObjectPath";a.invalidRequestContext="InvalidRequestContext";a.valueNotLoaded="ValueNotLoaded";return a}();c.CoreResourceStrings=i;var m=function(){function a(){}a.flags="flags";a.sourceLibHeader="SdkVersion";a.processQuery="ProcessQuery";a.localDocument="http://document.localhost/";a.localDocumentApiPrefix="http://document.localhost/_api/";return a}();c.CoreConstants=m;var k=function(){function b(){}b.buildMessageArrayForIRequestExecutor=function(i,h,g,e){var c=JSON.stringify(g.Body);a.log("Request:");a.log(c);var d={};d[m.sourceLibHeader]=e;var f=b.buildRequestMessageSafeArray(i,h,"POST",m.processQuery,d,c);return f};b.buildResponseOnSuccess=function(c,b){var a={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};a.Body=JSON.parse(c);a.Headers=b;return a};b.buildResponseOnError=function(d,e){var c={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};c.ErrorCode=f.generalException;c.ErrorMessage=e;if(d==b.OfficeJsErrorCode_ooeNoCapability)c.ErrorCode=f.accessDenied;else if(d==b.OfficeJsErrorCode_ooeActivityLimitReached)c.ErrorCode=f.activityLimitReached;else if(d==b.OfficeJsErrorCode_ooeInvalidOrTimedOutSession){c.ErrorCode=f.invalidOrTimedOutSession;c.ErrorMessage=a._getResourceString(i.invalidOrTimedOutSessionMessage)}return c};b.buildHttpResponseFromOfficeJsError=function(d,e){var c=500,a={};a.error={};a.error.code=f.generalException;a.error.message=e;if(d===b.OfficeJsErrorCode_ooeNoCapability){c=403;a.error.code=f.accessDenied}else if(d===b.OfficeJsErrorCode_ooeActivityLimitReached){c=429;a.error.code=f.activityLimitReached}return{statusCode:c,headers:{},body:JSON.stringify(a)}};b.buildRequestMessageSafeArray=function(g,f,j,l,b,k){var a=[];if(b)for(var c in b){a.push(c);a.push(b[c])}var e=0,i="",h="",d="";return[g,j,l,a,k,e,f,i,h,d]};b.getResponseBody=function(a){return b.getResponseBodyFromSafeArray(a.value.data)};b.getResponseHeaders=function(a){return b.getResponseHeadersFromSafeArray(a.value.data)};b.getResponseBodyFromSafeArray=function(b){var a=b[2];if(typeof a==="string")return a;var c=a;return c.join("")};b.getResponseHeadersFromSafeArray=function(d){var a=d[1];if(!a)return null;for(var c={},b=0;b<a.length-1;b+=2)c[a[b]]=a[b+1];return c};b.getResponseStatusCode=function(a){return b.getResponseStatusCodeFromSafeArray(a.value.data)};b.getResponseStatusCodeFromSafeArray=function(a){return a[0]};b.OfficeJsErrorCode_ooeInvalidOrTimedOutSession=5012;b.OfficeJsErrorCode_ooeActivityLimitReached=5102;b.OfficeJsErrorCode_ooeNoCapability=7e3;return b}();c.RichApiMessageUtility=k;(function(a){function b(){if(typeof Promise!=="undefined")return Promise;if(typeof Office!=="undefined")if(Office.Promise)return Office.Promise;if(typeof OfficeExtension!=="undefined")if(OfficeExtension.Promise)return OfficeExtension.Promise;throw new a.Error("No Promise implementation found");}a.getPromiseType=b})(d=c._Internal||(c._Internal={}));var a=function(){function a(){}a.log=function(b){a._logEnabled&&typeof console!=="undefined"&&console.log&&console.log(b)};a.checkArgumentNull=function(b,c){if(a.isNullOrUndefined(b))throw d.RuntimeError._createInvalidArgError({argumentName:c});};a.isNullOrUndefined=function(a){if(a===null)return true;if(typeof a==="undefined")return true;return false};a.isUndefined=function(a){if(typeof a==="undefined")return true;return false};a.isNullOrEmptyString=function(a){if(a===null)return true;if(typeof a==="undefined")return true;if(a.length==0)return true;return false};a.isPlainJsonObject=function(c){if(a.isNullOrUndefined(c))return false;if(typeof c!=="object")return false;if(Object.prototype.toString.apply(c)!=="[object Object]")return false;var b=c;do b=Object.getPrototypeOf(b);while(b!==null&&Object.getPrototypeOf(b)!==null);return Object.getPrototypeOf(c)===b};a.trim=function(a){return a.replace(new RegExp("^\\s+|\\s+$","g"),"")};a.caseInsensitiveCompareString=function(c,b){if(a.isNullOrUndefined(c))return a.isNullOrUndefined(b);else if(a.isNullOrUndefined(b))return false;else return c.toUpperCase()==b.toUpperCase()};a.isReadonlyRestRequest=function(b){return a.caseInsensitiveCompareString(b,"GET")};a._getResourceString=function(d,c){var b;if(typeof window!=="undefined"&&window.Strings&&window.Strings.OfficeOM){var f="L_"+d,e=window.Strings.OfficeOM[f];if(e)b=e}if(!b)b=a.s_resourceStringValues[d];if(!b)b=d;if(!a.isNullOrUndefined(c))if(Array.isArray(c)){var g=c;b=a._formatString(b,g)}else b=b.replace("{0}",c);return b};a._formatString=function(b,a){return b.replace(/\{\d\}/g,function(c){var b=parseInt(c.substr(1,c.length-2));if(b<a.length)return a[b];else throw d.RuntimeError._createInvalidArgError({argumentName:"format"});})};Object.defineProperty(a,"Promise",{"get":function(){return d.getPromiseType()},enumerable:true,configurable:true});a.createPromise=function(b){var c=new a.Promise(b);return c};a._createPromiseFromResult=function(b){return a.createPromise(function(a,c){a(b)})};a._createPromiseFromException=function(b){return a.createPromise(function(c,a){a(b)})};a._createTimeoutPromise=function(b){return a.createPromise(function(a,c){setTimeout(function(){a(null)},b)})};a._createInvalidArgError=function(a){return d.RuntimeError._createInvalidArgError(a)};a._isLocalDocumentUrl=function(b){return a._getLocalDocumentUrlPrefixLength(b)>0};a._getLocalDocumentUrlPrefixLength=function(d){for(var b=["http://document.localhost","https://document.localhost","//document.localhost"],c=d.toLowerCase().trim(),a=0;a<b.length;a++)if(c===b[a])return b[a].length;else if(c.substr(0,b[a].length+1)===b[a]+"/")return b[a].length+1;return 0};a._validateLocalDocumentRequest=function(b){var f=a._getLocalDocumentUrlPrefixLength(b.url);if(f<=0)throw d.RuntimeError._createInvalidArgError({argumentName:"request"});var c=b.url.substr(f),e=c.toLowerCase();if(e==="_api")c="";else if(e.substr(0,"_api/".length)==="_api/")c=c.substr("_api/".length);return{method:b.method,url:c,headers:b.headers,body:b.body}};a._parseRequestFlagsFromQueryStringIfAny=function(e){for(var d=e.split("&"),b=0;b<d.length;b++){var c=d[b].split("=");if(c[0].toLowerCase()===m.flags){var a=parseInt(c[1]);a=a&255;return a}}return-1};a._getRequestBodyText=function(a){var b="";if(typeof a.body==="string")b=a.body;else if(a.body&&typeof a.body==="object")b=JSON.stringify(a.body);return b};a._parseResponseBody=function(b){if(typeof b.body==="string"){var c=a.trim(b.body);return JSON.parse(c)}else return b.body};a._buildRequestMessageSafeArray=function(b){var c=0;if(!a.isReadonlyRestRequest(b.method))c=1;if(b.url.substr(0,m.processQuery.length).toLowerCase()===m.processQuery.toLowerCase()){var e=b.url.indexOf("?");if(e>0){var f=b.url.substr(e+1),d=a._parseRequestFlagsFromQueryStringIfAny(f);if(d>=0)c=d}}return k.buildRequestMessageSafeArray("",c,b.method,b.url,b.headers,a._getRequestBodyText(b))};a._parseHttpResponseHeaders=function(g){var h={};if(!a.isNullOrEmptyString(g))for(var j=new RegExp("\x0d?\x0a"),i=g.split(j),f=0;f<i.length;f++){var b=i[f];if(b!=null){var c=b.indexOf(":");if(c>0){var e=b.substr(0,c),d=b.substr(c+1);e=a.trim(e);d=a.trim(d);h[e.toUpperCase()]=d}}}return h};a._parseErrorResponse=function(c){var b=null;if(a.isPlainJsonObject(c.body))b=c.body;else if(!a.isNullOrEmptyString(c.body)){var g=a.trim(c.body);try{b=JSON.parse(g)}catch(h){a.log("Error when parse "+g)}}var e,d;if(!a.isNullOrUndefined(b)&&typeof b==="object"&&b.error){d=b.error.code;e=a._getResourceString(i.connectionFailureWithDetails,[c.statusCode.toString(),b.error.code,b.error.message])}else e=a._getResourceString(i.connectionFailureWithStatus,c.statusCode.toString());if(a.isNullOrEmptyString(d))d=f.connectionFailure;return{errorCode:d,errorMessage:e}};a._copyHeaders=function(a,b){if(a&&b)for(var c in a)b[c]=a[c]};a.addResourceStringValues=function(b){for(var c in b)a.s_resourceStringValues[c]=b[c]};a._logEnabled=false;a.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.'};return a}();c.CoreUtility=a;c._internalConfig={showDisposeInfoInDebugInfo:false,showInternalApiInDebugInfo:false,enableEarlyDispose:true,alwaysPolyfillClientObjectUpdateMethod:false,alwaysPolyfillClientObjectRetrieveMethod:false,enableConcurrentFlag:true,enableUndoableFlag:true};c.config={extendedErrorLogging:false};var t=function(){function a(){}a.createSetPropertyAction=function(f,a,g,i,h){e.validateObjectPath(a);var d={Id:f._nextId(),ActionType:4,Name:g,ObjectPathId:a._objectPath.objectPathInfo.Id,ArgumentInfo:{}},j=[i],c=e.setMethodArguments(f,d.ArgumentInfo,j);e.validateReferencedObjectPaths(c);var b=new o(d,0,h);b.referencedObjectPath=a._objectPath;b.referencedArgumentObjectPaths=c;return a._addAction(b)};a.createQueryAction=function(g,a,d,c){e.validateObjectPath(a);var f={Id:g._nextId(),ActionType:2,Name:"",ObjectPathId:a._objectPath.objectPathInfo.Id,QueryInfo:d},b=new o(f,1,4);b.referencedObjectPath=a._objectPath;return a._addAction(b,c)};a.createQueryAsJsonAction=function(g,a,d,c){e.validateObjectPath(a);var f={Id:g._nextId(),ActionType:7,Name:"",ObjectPathId:a._objectPath.objectPathInfo.Id,QueryInfo:d},b=new o(f,1,4);b.referencedObjectPath=a._objectPath;return a._addAction(b,c)};a.createUpdateAction=function(f,a,c){e.validateObjectPath(a);var d={Id:f._nextId(),ActionType:9,Name:"",ObjectPathId:a._objectPath.objectPathInfo.Id,ObjectState:c},b=new o(d,0,0);b.referencedObjectPath=a._objectPath;return a._addAction(b)};return a}();c.CommonActionFactory=t;var y=function(){function b(a,b){this.m_contextBase=a;this.m_objectPath=b}Object.defineProperty(b.prototype,"_objectPath",{"get":function(){return this.m_objectPath},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"_context",{"get":function(){return this.m_contextBase},enumerable:true,configurable:true});b.prototype._addAction=function(c,b){var d=this;if(b===void 0)b=null;return a.createPromise(function(a,e){d._context._addServiceApiAction(c,b,a,e)})};b.prototype._retrieve=function(f,b){var a=c._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;if(!a)a=!e.isSetSupported("RichApiRuntime","1.1");var d=B._parseQueryOption(f);if(a)return t.createQueryAction(this._context,this,d,b);return t.createQueryAsJsonAction(this._context,this,d,b)};b.prototype._recursivelyUpdate=function(p){var n=c._internalConfig.alwaysPolyfillClientObjectUpdateMethod;if(!n)n=!e.isSetSupported("RichApiRuntime","1.2");try{var g=this[j.scalarPropertyNames];if(!g)g=[];var k=this[j.scalarPropertyUpdateable];if(!k){k=[];for(var h=0;h<g.length;h++)k.push(false)}var l=this[j.navigationPropertyNames];if(!l)l=[];var o={},m={},q=0;for(var b in p){var s=g.indexOf(b);if(s>=0){if(!k[s])throw new d.RuntimeError({code:f.invalidArgument,message:a._getResourceString(w.attemptingToSetReadOnlyProperty,b),debugInfo:{errorLocation:b}});o[b]=p[b];++q}else if(l.indexOf(b)>=0)m[b]=p[b];else throw new d.RuntimeError({code:f.invalidArgument,message:a._getResourceString(w.propertyDoesNotExist,b),debugInfo:{errorLocation:b}});}if(q>0)if(n)for(var h=0;h<g.length;h++){var b=g[h],r=o[b];!e.isUndefined(r)&&t.createSetPropertyAction(this._context,this,b,r)}else t.createUpdateAction(this._context,this,o);for(var b in m){var u=this[b],v=m[b];u._recursivelyUpdate(v)}}catch(x){throw new d.RuntimeError({code:f.invalidArgument,message:a._getResourceString(i.invalidArgument,"properties"),debugInfo:{errorLocation:this._className+".update"},innerError:x});}};return b}();c.ClientObjectBase=y;var o=function(){function a(b,a,c){this.m_actionInfo=b;this.m_operationType=a;this.m_flags=c}Object.defineProperty(a.prototype,"actionInfo",{"get":function(){return this.m_actionInfo},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"operationType",{"get":function(){return this.m_operationType},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"flags",{"get":function(){return this.m_flags},enumerable:true,configurable:true});return a}();c.Action=o;var l=function(){function b(c,b,e,a,d,f){this.m_objectPathInfo=c;this.m_parentObjectPath=b;this.m_isCollection=e;this.m_isInvalidAfterRequest=a;this.m_isValid=true;this.m_operationType=d;this.m_flags=f}Object.defineProperty(b.prototype,"objectPathInfo",{"get":function(){return this.m_objectPathInfo},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"operationType",{"get":function(){return this.m_operationType},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"flags",{"get":function(){return this.m_flags},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"isCollection",{"get":function(){return this.m_isCollection},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"isInvalidAfterRequest",{"get":function(){return this.m_isInvalidAfterRequest},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"parentObjectPath",{"get":function(){return this.m_parentObjectPath},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"argumentObjectPaths",{"get":function(){return this.m_argumentObjectPaths},"set":function(a){this.m_argumentObjectPaths=a},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"isValid",{"get":function(){return this.m_isValid},"set":function(a){this.m_isValid=a;if(!a&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo){b.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo);this.m_parentObjectPath=this.m_savedObjectPathInfo.parent;this.m_isValid=true;this.m_savedObjectPathInfo=null}},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"originalObjectPathInfo",{"get":function(){return this.m_originalObjectPathInfo},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"getByIdMethodName",{"get":function(){return this.m_getByIdMethodName},"set":function(a){this.m_getByIdMethodName=a},enumerable:true,configurable:true});b.prototype._updateAsNullObject=function(){this.resetForUpdateUsingObjectData();this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_parentObjectPath=null};b.prototype.saveOriginalObjectPathInfo=function(){if(c.config.extendedErrorLogging&&!this.m_originalObjectPathInfo){this.m_originalObjectPathInfo={};b.copyObjectPathInfo(this.m_objectPathInfo,this.m_originalObjectPathInfo)}};b.prototype.updateUsingObjectData=function(i,c){var m=i[j.referenceId];if(!a.isNullOrEmptyString(m)){if(!this.m_savedObjectPathInfo&&!this.isInvalidAfterRequest&&b.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)){var n={};b.copyObjectPathInfo(this.m_objectPathInfo,n);this.m_savedObjectPathInfo={pathInfo:n,parent:this.m_parentObjectPath}}this.saveOriginalObjectPathInfo();this.resetForUpdateUsingObjectData();this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=m;delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;return}if(c){var l=c[j.collectionPropertyPath];if(!a.isNullOrEmptyString(l)&&c.context){var d=e.tryGetObjectIdFromLoadOrRetrieveResult(i);if(!a.isNullOrUndefined(d)){for(var g=l.split("."),h=c.context[g[0]],k=1;k<g.length;k++)h=h[g[k]];this.saveOriginalObjectPathInfo();this.resetForUpdateUsingObjectData();this.m_parentObjectPath=h._objectPath;this.m_objectPathInfo.ParentObjectPathId=this.m_parentObjectPath.objectPathInfo.Id;this.m_objectPathInfo.ObjectPathType=5;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo.Arguments=[d];return}}}var o=this.parentObjectPath&&this.parentObjectPath.isCollection,f=this.getByIdMethodName;if(o||!a.isNullOrEmptyString(f)){var d=e.tryGetObjectIdFromLoadOrRetrieveResult(i);if(!a.isNullOrUndefined(d)){this.saveOriginalObjectPathInfo();this.resetForUpdateUsingObjectData();if(!a.isNullOrEmptyString(f)){this.m_objectPathInfo.ObjectPathType=3;this.m_objectPathInfo.Name=f;this.m_getByIdMethodName=null}else{this.m_objectPathInfo.ObjectPathType=5;this.m_objectPathInfo.Name=""}this.m_objectPathInfo.ArgumentInfo.Arguments=[d];return}}};b.prototype.resetForUpdateUsingObjectData=function(){this.m_isInvalidAfterRequest=false;this.m_isValid=true;this.m_operationType=1;this.m_flags=4;this.m_objectPathInfo.ArgumentInfo={};this.m_argumentObjectPaths=null};b.isRestorableObjectPath=function(a){return a===1||a===5||a===3||a===4};b.copyObjectPathInfo=function(b,a){a.Id=b.Id;a.ArgumentInfo=b.ArgumentInfo;a.Name=b.Name;a.ObjectPathType=b.ObjectPathType;a.ParentObjectPathId=b.ParentObjectPathId};return b}();c.ObjectPath=l;var B=function(){function a(){this.m_nextId=0}a.prototype._nextId=function(){return++this.m_nextId};a.prototype._addServiceApiAction=function(c,a,b,d){if(!this.m_serviceApiQueue)this.m_serviceApiQueue=new cb(this);this.m_serviceApiQueue.add(c,a,b,d)};a._parseQueryOption=function(f){var c={};if(typeof f==="string"){var g=f;c.Select=e._parseSelectExpand(g)}else if(Array.isArray(f))c.Select=f;else if(typeof f==="object"){var b=f;if(a.isLoadOption(b)){if(typeof b.select==="string")c.Select=e._parseSelectExpand(b.select);else if(Array.isArray(b.select))c.Select=b.select;else if(!e.isNullOrUndefined(b.select))throw d.RuntimeError._createInvalidArgError({argumentName:"option.select"});if(typeof b.expand==="string")c.Expand=e._parseSelectExpand(b.expand);else if(Array.isArray(b.expand))c.Expand=b.expand;else if(!e.isNullOrUndefined(b.expand))throw d.RuntimeError._createInvalidArgError({argumentName:"option.expand"});if(typeof b.top==="number")c.Top=b.top;else if(!e.isNullOrUndefined(b.top))throw d.RuntimeError._createInvalidArgError({argumentName:"option.top"});if(typeof b.skip==="number")c.Skip=b.skip;else if(!e.isNullOrUndefined(b.skip))throw d.RuntimeError._createInvalidArgError({argumentName:"option.skip"});}else c=a.parseStrictLoadOption(f)}else if(!e.isNullOrUndefined(f))throw d.RuntimeError._createInvalidArgError({argumentName:"option"});return c};a.isLoadOption=function(a){if(!e.isUndefined(a.select)&&(typeof a.select==="string"||Array.isArray(a.select)))return true;if(!e.isUndefined(a.expand)&&(typeof a.expand==="string"||Array.isArray(a.expand)))return true;if(!e.isUndefined(a.top)&&typeof a.top==="number")return true;if(!e.isUndefined(a.skip)&&typeof a.skip==="number")return true;for(var b in a)return false;return true};a.parseStrictLoadOption=function(c){var b={Select:[]};a.parseStrictLoadOptionHelper(b,"","option",c);return b};a.combineQueryPath=function(a,b,c){if(a.length===0)return b;else return a+c+b};a.parseStrictLoadOptionHelper=function(g,e,f,h){for(var b in h){var c=h[b];if(b==="$all"){if(typeof c!=="boolean")throw d.RuntimeError._createInvalidArgError({argumentName:a.combineQueryPath(f,b,".")});c&&g.Select.push(a.combineQueryPath(e,"*","/"))}else if(b==="$top"){if(typeof c!=="number"||e.length>0)throw d.RuntimeError._createInvalidArgError({argumentName:a.combineQueryPath(f,b,".")});g.Top=c}else if(b==="$skip"){if(typeof c!=="number"||e.length>0)throw d.RuntimeError._createInvalidArgError({argumentName:a.combineQueryPath(f,b,".")});g.Skip=c}else if(typeof c==="boolean")c&&g.Select.push(a.combineQueryPath(e,b,"/"));else if(typeof c==="object")a.parseStrictLoadOptionHelper(g,a.combineQueryPath(e,b,"/"),a.combineQueryPath(f,b,"."),c);else throw d.RuntimeError._createInvalidArgError({argumentName:a.combineQueryPath(f,b,".")});}};return a}();c.ClientRequestContextBase=B;var P=function(){function b(a){this.m_objectPath=a}b.prototype._handleResult=function(b){if(a.isNullOrUndefined(b))this.m_objectPath._updateAsNullObject();else this.m_objectPath.updateUsingObjectData(b,null)};return b}(),H=function(){function b(a){this.m_contextBase=a;this.m_actions=[];this.m_actionResultHandler={};this.m_referencedObjectPaths={};this.m_instantiatedObjectPaths={};this.m_preSyncPromises=[]}b.prototype.addAction=function(a){this.m_actions.push(a);if(a.actionInfo.ActionType==1)this.m_instantiatedObjectPaths[a.actionInfo.ObjectPathId]=a};Object.defineProperty(b.prototype,"hasActions",{"get":function(){return this.m_actions.length>0},enumerable:true,configurable:true});b.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]};b.prototype.ensureInstantiateObjectPath=function(a){if(a){if(this.m_instantiatedObjectPaths[a.objectPathInfo.Id])return;this.ensureInstantiateObjectPath(a.parentObjectPath);this.ensureInstantiateObjectPaths(a.argumentObjectPaths);if(!this.m_instantiatedObjectPaths[a.objectPathInfo.Id]){var d={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:a.objectPathInfo.Id},b=new o(d,1,4);b.referencedObjectPath=a;this.addReferencedObjectPath(a);this.addAction(b);var c=new P(a);this.addActionResultHandler(b,c)}}};b.prototype.ensureInstantiateObjectPaths=function(a){if(a)for(var b=0;b<a.length;b++)this.ensureInstantiateObjectPath(a[b])};b.prototype.addReferencedObjectPath=function(b){if(this.m_referencedObjectPaths[b.objectPathInfo.Id])return;if(!b.isValid)throw new d.RuntimeError({code:f.invalidObjectPath,message:a._getResourceString(i.invalidObjectPath,e.getObjectPathExpression(b)),debugInfo:{errorLocation:e.getObjectPathExpression(b)}});while(b){this.m_referencedObjectPaths[b.objectPathInfo.Id]=b;b.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(b.argumentObjectPaths);b=b.parentObjectPath}};b.prototype.addReferencedObjectPaths=function(a){if(a)for(var b=0;b<a.length;b++)this.addReferencedObjectPath(a[b])};b.prototype.addActionResultHandler=function(b,a){this.m_actionResultHandler[b.actionInfo.Id]=a};b.prototype.aggregrateRequestFlags=function(a,c,b){if(c===0){a=a|1;if((b&2)===0)a=a&~16;a=a&~4}if(b&1)a=a|2;if((b&4)===0)a=a&~4;return a};b.prototype.finallyNormalizeFlags=function(a){if((a&1)===0)a=a&~16;if(!c._internalConfig.enableConcurrentFlag)a=a&~4;if(!c._internalConfig.enableUndoableFlag)a=a&~16;if(!e.isSetSupported("RichApiRuntimeFlag","1.1")){a=a&~4;a=a&~16}if(typeof this.m_flagsForTesting==="number")a=this.m_flagsForTesting;return a};b.prototype.buildRequestMessageBodyAndRequestFlags=function(){c._internalConfig.enableEarlyDispose&&b._calculateLastUsedObjectPathIds(this.m_actions);var a=4|16,h={};for(var e in this.m_referencedObjectPaths){a=this.aggregrateRequestFlags(a,this.m_referencedObjectPaths[e].operationType,this.m_referencedObjectPaths[e].flags);h[e]=this.m_referencedObjectPaths[e].objectPathInfo}for(var i=[],g=false,f=0;f<this.m_actions.length;f++){var d=this.m_actions[f];if(d.actionInfo.ActionType===3&&d.actionInfo.Name===j.keepReference)g=true;a=this.aggregrateRequestFlags(a,d.operationType,d.flags);i.push(d.actionInfo)}a=this.finallyNormalizeFlags(a);var k={AutoKeepReference:this.m_contextBase._autoCleanup&&g,Actions:i,ObjectPaths:h};return{body:k,flags:a}};b.prototype.processResponse=function(a){if(a)for(var b=0;b<a.length;b++){var c=a[b],d=this.m_actionResultHandler[c.ActionId];d&&d._handleResult(c.Value)}};b.prototype.invalidatePendingInvalidObjectPaths=function(){for(var a in this.m_referencedObjectPaths)if(this.m_referencedObjectPaths[a].isInvalidAfterRequest)this.m_referencedObjectPaths[a].isValid=false};b.prototype._addPreSyncPromise=function(a){this.m_preSyncPromises.push(a)};Object.defineProperty(b.prototype,"_preSyncPromises",{"get":function(){return this.m_preSyncPromises},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"_actions",{"get":function(){return this.m_actions},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"_objectPaths",{"get":function(){return this.m_referencedObjectPaths},enumerable:true,configurable:true});b.prototype._removeKeepReferenceAction=function(c){for(var a=this.m_actions.length-1;a>=0;a--){var b=this.m_actions[a].actionInfo;if(b.ObjectPathId===c&&b.ActionType===3&&b.Name===j.keepReference){this.m_actions.splice(a,1);break}}};b._updateLastUsedActionIdOfObjectPathId=function(c,a,f){while(a){if(c[a.objectPathInfo.Id])return;c[a.objectPathInfo.Id]=f;var d=a.argumentObjectPaths;if(d)for(var g=d.length,e=0;e<g;e++)b._updateLastUsedActionIdOfObjectPathId(c,d[e],f);a=a.parentObjectPath}};b._calculateLastUsedObjectPathIds=function(k){for(var d={},l=k.length,c=l-1;c>=0;--c){var a=k[c],f=a.actionInfo.Id;a.referencedObjectPath&&b._updateLastUsedActionIdOfObjectPathId(d,a.referencedObjectPath,f);var i=a.referencedArgumentObjectPaths;if(i)for(var n=i.length,j=0;j<n;j++)b._updateLastUsedActionIdOfObjectPathId(d,i[j],f)}var g={};for(var m in d){var f=d[m],e=g[f];if(!e){e=[];g[f]=e}e.push(parseInt(m))}for(var c=0;c<l;c++){var a=k[c],h=g[a.actionInfo.Id];if(h&&h.length>0)a.actionInfo.L=h;else if(a.actionInfo.L)delete a.actionInfo.L}};return b}();c.ClientRequestBase=H;var z=function(){function b(a){this.m_type=a}Object.defineProperty(b.prototype,"value",{"get":function(){if(!this.m_isLoaded)throw new d.RuntimeError({code:f.valueNotLoaded,message:a._getResourceString(i.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:true,configurable:true});b.prototype._handleResult=function(a){this.m_isLoaded=true;if(typeof a==="object"&&a&&a._IsNull)return;if(this.m_type===1)this.m_value=e.adjustToDateTime(a);else this.m_value=a};return b}();c.ClientResult=z;var cb=function(){function b(a){this.m_context=a;this.m_actions=[]}b.prototype.add=function(c,a,b,d){var e=this;this.m_actions.push({action:c,resultHandler:a,resolve:b,reject:d});this.m_actions.length===1&&setTimeout(function(){return e.processActions()},0)};b.prototype.processActions=function(){var k=this;if(this.m_actions.length===0)return;var c=this.m_actions;this.m_actions=[];for(var b=new H(this.m_context),e=0;e<c.length;e++){var d=c[e];b.ensureInstantiateObjectPath(d.action.referencedObjectPath);b.ensureInstantiateObjectPaths(d.action.referencedArgumentObjectPaths);b.addAction(d.action);b.addReferencedObjectPath(d.action.referencedObjectPath);b.addReferencedObjectPaths(d.action.referencedArgumentObjectPaths)}var g=b.buildRequestMessageBodyAndRequestFlags(),f=g.body,j=g.flags,h={Url:m.localDocumentApiPrefix,Headers:null,Body:f};a.log("Request:");a.log(JSON.stringify(f));var i=new F;i.executeAsync(this.m_context._customData,j,h).then(function(a){k.processResponse(b,c,a)})["catch"](function(d){for(var a=0;a<c.length;a++){var b=c[a];b.reject(d)}})};b.prototype.processResponse=function(d,c,a){var e=this.getErrorFromResponse(a),b=null;if(a.Body.Results)b=a.Body.Results;else if(a.Body.ProcessedResults&&a.Body.ProcessedResults.Results)b=a.Body.ProcessedResults.Results;if(!b)b=[];this.processActionResults(d,c,b,e)};b.prototype.getErrorFromResponse=function(b){if(!a.isNullOrEmptyString(b.ErrorCode))return new d.RuntimeError({code:b.ErrorCode,message:b.ErrorMessage});if(b.Body&&b.Body.Error)return new d.RuntimeError({code:b.Body.Error.Code,message:b.Body.Error.Message});return null};b.prototype.processActionResults=function(j,g,b,h){j.processResponse(b);for(var e=0;e<g.length;e++){for(var a=g[e],i=a.action.actionInfo.Id,f=false,c=0;c<b.length;c++)if(i==b[c].ActionId){var d=b[c].Value;if(a.resultHandler){a.resultHandler._handleResult(d);d=a.resultHandler.value}a.resolve&&a.resolve(d);f=true;break}if(!f&&a.reject)if(h)a.reject(h);else a.reject("No response for the action.")}};return b}(),F=function(){function b(){}b.prototype.executeAsync=function(i,h,d){var c=d.Url;if(c.charAt(c.length-1)!="/")c=c+"/";c=c+m.processQuery;c=c+"?"+m.flags+"="+h.toString();var e={method:"POST",url:c,headers:{},body:d.Body};e.headers[m.sourceLibHeader]=b.SourceLibHeaderValue;e.headers["CONTENT-TYPE"]="application/json";if(d.Headers)for(var f in d.Headers)e.headers[f]=d.Headers[f];var g=a._isLocalDocumentUrl(e.url)?D.sendLocalDocumentRequest:D.sendRequest;return g(e).then(function(b){var c;if(b.statusCode===200)c={ErrorCode:null,ErrorMessage:null,Headers:b.headers,Body:a._parseResponseBody(b)};else{a.log("Error Response:"+b.body);var d=a._parseErrorResponse(b);c={ErrorCode:d.errorCode,ErrorMessage:d.errorMessage,Headers:b.headers,Body:null}}return c})};b.SourceLibHeaderValue="officejs-rest";return b}();c.HttpRequestExecutor=F;var j=function(b){__extends(a,b);function a(){return b!==null&&b.apply(this,arguments)||this}a.collectionPropertyPath="_collectionPropertyPath";a.id="Id";a.idLowerCase="id";a.idPrivate="_Id";a.keepReference="_KeepReference";a.objectPathIdPrivate="_ObjectPathId";a.referenceId="_ReferenceId";a.items="_Items";a.itemsLowerCase="items";a.scalarPropertyNames="_scalarPropertyNames";a.navigationPropertyNames="_navigationPropertyNames";a.scalarPropertyUpdateable="_scalarPropertyUpdateable";return a}(m);c.CommonConstants=j;var e=function(c){__extends(b,c);function b(){return c!==null&&c.apply(this,arguments)||this}b.validateObjectPath=function(e){var c=e._objectPath;while(c){if(!c.isValid)throw new d.RuntimeError({code:f.invalidObjectPath,message:a._getResourceString(i.invalidObjectPath,b.getObjectPathExpression(c)),debugInfo:{errorLocation:b.getObjectPathExpression(c)}});c=c.parentObjectPath}};b.validateReferencedObjectPaths=function(e){if(e)for(var g=0;g<e.length;g++){var c=e[g];while(c){if(!c.isValid)throw new d.RuntimeError({code:f.invalidObjectPath,message:a._getResourceString(i.invalidObjectPath,b.getObjectPathExpression(c))});c=c.parentObjectPath}}};b._toCamelLowerCase=function(b){if(a.isNullOrEmptyString(b))return b;var c=0;while(c<b.length&&b.charCodeAt(c)>=65&&b.charCodeAt(c)<=90)c++;if(c<b.length)return b.substr(0,c).toLowerCase()+b.substr(c);else return b.toLowerCase()};b.adjustToDateTime=function(c){if(a.isNullOrUndefined(c))return null;if(typeof c==="string")return new Date(c);if(Array.isArray(c)){for(var d=c,e=0;e<d.length;e++)d[e]=b.adjustToDateTime(d[e]);return d}throw a._createInvalidArgError({argumentName:"date"});};b.tryGetObjectIdFromLoadOrRetrieveResult=function(c){var b=c[j.id];if(a.isNullOrUndefined(b))b=c[j.idLowerCase];if(a.isNullOrUndefined(b))b=c[j.idPrivate];return b};b.getObjectPathExpression=function(c){var a="";while(c){switch(c.objectPathInfo.ObjectPathType){case 1:a=a;break;case 2:a="new()"+(a.length>0?".":"")+a;break;case 3:a=b.normalizeName(c.objectPathInfo.Name)+"()"+(a.length>0?".":"")+a;break;case 4:a=b.normalizeName(c.objectPathInfo.Name)+(a.length>0?".":"")+a;break;case 5:a="getItem()"+(a.length>0?".":"")+a;break;case 6:a="_reference()"+(a.length>0?".":"")+a;break}c=c.parentObjectPath}return a};b.setMethodArguments=function(g,f,c){if(a.isNullOrUndefined(c))return null;var e=[],d=[],h=b.collectObjectPathInfos(g,c,e,d);f.Arguments=c;if(h)f.ReferencedObjectPathIds=d;return e};b.validateContext=function(b,c){if(b&&c&&c._context!==b)throw new d.RuntimeError({code:f.invalidRequestContext,message:a._getResourceString(i.invalidRequestContext)});};b.isSetSupported=function(b,a){if(typeof window!=="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements)return window.Office.context.requirements.isSetSupported(b,a);return true};b.throwIfApiNotSupported=function(e,g,c,h){if(!b._doApiNotSupportedCheck)return;if(!b.isSetSupported(g,c)){var j=a._getResourceString(i.apiNotFoundDetails,[e,g+" "+c,h]);throw new d.RuntimeError({code:f.apiNotFound,message:j,debugInfo:{errorLocation:e}});}};b._parseSelectExpand=function(e){var f=[];if(!a.isNullOrEmptyString(e))for(var d=e.split(","),c=0;c<d.length;c++){var b=d[c];b=g(b.trim());b.length>0&&f.push(b)}return f;function g(b){var a=b.toLowerCase();if(a==="items"||a==="items/")return"*";var c=6,d=a.substr(0,c)==="items/"||a.substr(0,c)==="items.";if(d)b=b.substr(c);return b.replace(new RegExp("[/.]items[/.]","gi"),"/")}};b.changePropertyNameToCamelLowerCase=function(a){var h=95;if(Array.isArray(a)){for(var c=[],e=0;e<a.length;e++)c.push(this.changePropertyNameToCamelLowerCase(a[e]));return c}else if(typeof a==="object"&&a!==null){var c={};for(var d in a){var f=a[d];if(d===j.items){c={};c[j.itemsLowerCase]=this.changePropertyNameToCamelLowerCase(f);break}else{var g=b._toCamelLowerCase(d);c[g]=this.changePropertyNameToCamelLowerCase(f)}}return c}else return a};b.purifyJson=function(a){var f=95;if(Array.isArray(a)){for(var c=[],e=0;e<a.length;e++)c.push(this.purifyJson(a[e]));return c}else if(typeof a==="object"&&a!==null){var c={};for(var d in a)if(d.charCodeAt(0)!==f){var b=a[d];if(typeof b==="object"&&b!==null&&Array.isArray(b.items))b=b.items;c[d]=this.purifyJson(b)}return c}else return a};b.collectObjectPathInfos=function(j,d,g,e){for(var h=false,c=0;c<d.length;c++)if(d[c]instanceof y){var f=d[c];b.validateContext(j,f);d[c]=f._objectPath.objectPathInfo.Id;e.push(f._objectPath.objectPathInfo.Id);g.push(f._objectPath);h=true}else if(Array.isArray(d[c])){var i=[],k=b.collectObjectPathInfos(j,d[c],g,i);if(k){e.push(i);h=true}else e.push(0)}else if(a.isPlainJsonObject(d[c])){e.push(0);b.replaceClientObjectPropertiesWithObjectPathIds(d[c],g)}else e.push(0);return h};b.replaceClientObjectPropertiesWithObjectPathIds=function(f,e){var g,h;for(var k in f){var c=f[k];if(c instanceof y){e.push(c._objectPath);f[k]=(g={},g[j.objectPathIdPrivate]=c._objectPath.objectPathInfo.Id,g)}else if(Array.isArray(c))for(var d=0;d<c.length;d++)if(c[d]instanceof y){var i=c[d];e.push(i._objectPath);c[d]=(h={},h[j.objectPathIdPrivate]=i._objectPath.objectPathInfo.Id,h)}else a.isPlainJsonObject(c[d])&&b.replaceClientObjectPropertiesWithObjectPathIds(c[d],e);else a.isPlainJsonObject(c)&&b.replaceClientObjectPropertiesWithObjectPathIds(c,e)}};b.normalizeName=function(a){return a.substr(0,1).toLowerCase()+a.substr(1)};b._doApiNotSupportedCheck=false;return b}(a);c.CommonUtility=e;var w=function(b){__extends(a,b);function a(){return b!==null&&b.apply(this,arguments)||this}a.propertyDoesNotExist="PropertyDoesNotExist";a.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty";return a}(i);c.CommonResourceStrings=w;var K=function(b){__extends(a,b);function a(c){var a=b.call(this)||this;a.m_shouldPolyfill=c;return a}a.prototype._handleResult=function(a){b.prototype._handleResult.call(this,a);if(this.m_shouldPolyfill)this.m_value=e.changePropertyNameToCamelLowerCase(this.m_value);this.m_value=this.removeItemNodes(this.m_value)};a.prototype.removeItemNodes=function(a){if(typeof a==="object"&&a!==null&&a[j.itemsLowerCase])a=a[j.itemsLowerCase];return e.purifyJson(a)};return a}(z);c.ClientRetrieveResult=K;var Z=function(){function b(){}b.invokeMethod=function(b,h,c,f,d,g){if(c===void 0)c=0;if(f===void 0)f=[];if(d===void 0)d=0;if(g===void 0)g=0;return a.createPromise(function(j,k){var l=new z,g={Id:b._context._nextId(),ActionType:3,Name:h,ObjectPathId:b._objectPath.objectPathInfo.Id,ArgumentInfo:{}},i=e.setMethodArguments(b._context,g.ArgumentInfo,f),a=new o(g,c,d);a.referencedObjectPath=b._objectPath;a.referencedArgumentObjectPaths=i;b._context._addServiceApiAction(a,l,j,k)})};b.invokeRetrieve=function(g,f){var a=c._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;if(!a)a=!e.isSetSupported("RichApiRuntime","1.1");var d=b._parseSelectOption(f);return g._retrieve(d,new K(a))};b._parseSelectOption=function(a){if(!a||!a[0])throw d.RuntimeError._createInvalidArgError({});var c=a[0]&&typeof a[0]!=="string"?a[0]:a;return Array.isArray(c)?c:b.parseRecursiveSelect(c)};b.parseRecursiveSelect=function(b){var a=function(b){return Object.keys(b).reduce(function(c,e){var d=b[e];if(typeof d==="object")return c.concat(a(d).map(function(a){return e+"/"+a}));if(d)return c.concat(e);return c},[])};return a(b)};b.invokeRecursiveUpdate=function(c,b){return a.createPromise(function(a){c._recursivelyUpdate(b);a()})};b.createRootServiceObject=function(d,a){var b={Id:a._nextId(),ObjectPathType:1,Name:""},c=new l(b,null,false,false,1,4);return new d(a,c)};b.createTopLevelServiceObject=function(g,a,e,c,f){var b={Id:a._nextId(),ObjectPathType:2,Name:e},d=new l(b,null,c,false,1,f|4);return new g(a,d)};b.createPropertyObject=function(g,a,d,c,f){var b={Id:a._context._nextId(),ObjectPathType:4,Name:d,ParentObjectPathId:a._objectPath.objectPathInfo.Id},e=new l(b,a._objectPath,c,false,1,f|4);return new g(a._context,e)};b.createIndexerObject=function(e,a,d){var b={Id:a._context._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:a._objectPath.objectPathInfo.Id,ArgumentInfo:{}};b.ArgumentInfo.Arguments=d;var c=new l(b,a._objectPath,false,false,1,4);return new e(a._context,c)};b.createMethodObject=function(n,a,j,h,m,i,d,g,k){var c={Id:a._context._nextId(),ObjectPathType:3,Name:j,ParentObjectPathId:a._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f=e.setMethodArguments(a._context,c.ArgumentInfo,m),b=new l(c,a._objectPath,i,d,h,k);b.argumentObjectPaths=f;b.getByIdMethodName=g;return new n(a._context,b)};b.createAndInstantiateMethodObject=function(k,b,h,f,j,g,c,d,i){return a.createPromise(function(r,s){var m={Id:b._context._nextId(),ObjectPathType:3,Name:h,ParentObjectPathId:b._objectPath.objectPathInfo.Id,ArgumentInfo:{}},p=e.setMethodArguments(b._context,m.ArgumentInfo,j),a=new l(m,b._objectPath,g,c,f,i);a.argumentObjectPaths=p;a.getByIdMethodName=d;var t=new z,q={Id:b._context._nextId(),ActionType:1,Name:"",ObjectPathId:a.objectPathInfo.Id,QueryInfo:{}},n=new o(q,1,4);n.referencedObjectPath=a;b._context._addServiceApiAction(n,t,function(){return r(new k(b._context,a))},s)})};b.localDocumentContext=new B;return b}();c.OperationalApiHelper=Z;var A=function(b){__extends(a,b);function a(){return b!==null&&b.apply(this,arguments)||this}a.propertyNotLoaded="PropertyNotLoaded";a.runMustReturnPromise="RunMustReturnPromise";a.cannotRegisterEvent="CannotRegisterEvent";a.invalidOrTimedOutSession="InvalidOrTimedOutSession";a.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty";return a}(f);c.ErrorCodes=A;var T=function(){function a(a){this.m_callback=a}a.prototype._handleResult=function(a){this.m_callback&&this.m_callback()};return a}(),n=function(c){__extends(a,c);function a(){return c!==null&&c.apply(this,arguments)||this}a.createMethodAction=function(f,c,h,g,j,i){b.validateObjectPath(c);var e={Id:f._nextId(),ActionType:3,Name:h,ObjectPathId:c._objectPath.objectPathInfo.Id,ArgumentInfo:{}},d=b.setMethodArguments(f,e.ArgumentInfo,j);b.validateReferencedObjectPaths(d);var a=new o(e,g,b._fixupApiFlags(i));a.referencedObjectPath=c._objectPath;a.referencedArgumentObjectPaths=d;c._addAction(a);return a};a.createRecursiveQueryAction=function(e,a,f){b.validateObjectPath(a);var d={Id:e._nextId(),ActionType:6,Name:"",ObjectPathId:a._objectPath.objectPathInfo.Id,RecursiveQueryInfo:f},c=new o(d,1,4);c.referencedObjectPath=a._objectPath;a._addAction(c);return c};a.createEnsureUnchangedAction=function(f,a,d){b.validateObjectPath(a);var e={Id:f._nextId(),ActionType:8,Name:"",ObjectPathId:a._objectPath.objectPathInfo.Id,ObjectState:d},c=new o(e,1,4);c.referencedObjectPath=a._objectPath;a._addAction(c);return c};a.createInstantiateAction=function(c,a){b.validateObjectPath(a);c._pendingRequest.ensureInstantiateObjectPath(a._objectPath.parentObjectPath);c._pendingRequest.ensureInstantiateObjectPaths(a._objectPath.argumentObjectPaths);var e={Id:c._nextId(),ActionType:1,Name:"",ObjectPathId:a._objectPath.objectPathInfo.Id},d=new o(e,1,4);d.referencedObjectPath=a._objectPath;a._addAction(d,new S(a),true);return d};a.createTraceAction=function(a,e,d){var b={Id:a._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},c=new o(b,1,4);a._pendingRequest.addAction(c);d&&a._pendingRequest.addTrace(b.Id,e);return c};a.createTraceMarkerForCallback=function(b,c){var d=a.createTraceAction(b,null,false);b._pendingRequest.addActionResultHandler(d,new T(c))};return a}(t);c.ActionFactory=n;var J=function(e){__extends(c,e);function c(a,d){var c=e.call(this,a,d)||this;b.checkArgumentNull(a,"context");c.m_context=a;if(c._objectPath)if(!a._processingResult&&a._pendingRequest){n.createInstantiateAction(a,c);a._autoCleanup&&c._KeepReference&&a.trackedObjects._autoAdd(c)}return c}Object.defineProperty(c.prototype,"context",{"get":function(){return this.m_context},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"isNull",{"get":function(){b.throwIfNotLoaded("isNull",this._isNull,null,this._isNull);return this._isNull},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"isNullObject",{"get":function(){b.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull);return this._isNull},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"_isNull",{"get":function(){return this.m_isNull},"set":function(a){this.m_isNull=a;a&&this._objectPath&&this._objectPath._updateAsNullObject()},enumerable:true,configurable:true});c.prototype._addAction=function(b,c,d){if(c===void 0)c=null;if(!d){this.context._pendingRequest.ensureInstantiateObjectPath(this._objectPath);this.context._pendingRequest.ensureInstantiateObjectPaths(b.referencedArgumentObjectPaths)}this.context._pendingRequest.addAction(b);this.context._pendingRequest.addReferencedObjectPath(this._objectPath);this.context._pendingRequest.addReferencedObjectPaths(b.referencedArgumentObjectPaths);this.context._pendingRequest.addActionResultHandler(b,c);return a._createPromiseFromResult(null)};c.prototype._handleResult=function(a){this._isNull=b.isNullOrUndefined(a);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,a)};c.prototype._handleIdResult=function(a){this._isNull=b.isNullOrUndefined(a);b.fixObjectPathIfNecessary(this,a);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,a)};c.prototype._handleRetrieveResult=function(a,b){this._handleIdResult(a)};c.prototype._recursivelySet=function(g,n,k,l,o){var m=g instanceof c,s=g;if(m)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(g))g=JSON.parse(JSON.stringify(g));else throw d.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(var e,h=0;h<k.length;h++){e=k[h];if(g.hasOwnProperty(e))if(typeof g[e]!=="undefined")this[e]=g[e]}for(var h=0;h<l.length;h++){e=l[h];if(g.hasOwnProperty(e))if(typeof g[e]!=="undefined"){var r=m?s[e]:g[e];this[e].set(r,n)}}var j=!m;if(n&&!b.isNullOrUndefined(j))j=n.throwOnReadOnly;for(var h=0;h<o.length;h++){e=o[h];if(g.hasOwnProperty(e))if(typeof g[e]!=="undefined"&&j)throw new d.RuntimeError({code:f.invalidArgument,message:a._getResourceString(p.cannotApplyPropertyThroughSetMethod,e),debugInfo:{errorLocation:e}});}for(e in g)if(k.indexOf(e)<0&&l.indexOf(e)<0){var q=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),e);if(!q)throw new d.RuntimeError({code:f.invalidArgument,message:a._getResourceString(w.propertyDoesNotExist,e),debugInfo:{errorLocation:e}});if(j&&!q.set)throw new d.RuntimeError({code:f.invalidArgument,message:a._getResourceString(w.attemptingToSetReadOnlyProperty,e),debugInfo:{errorLocation:e}});}}catch(t){throw new d.RuntimeError({code:f.invalidArgument,message:a._getResourceString(i.invalidArgument,"properties"),debugInfo:{errorLocation:this._className+".set"},innerError:t});}};return c}(y);c.ClientObject=J;var U=function(){function b(a){this.m_session=a}b.prototype.executeAsync=function(f,e,b){var d={url:m.processQuery,method:"POST",headers:b.Headers,body:b.Body},c={id:v.nextId(),type:1,flags:e,message:d};a.log(JSON.stringify(c));return this.m_session.sendMessageToHost(c).then(function(d){a.log("Received response: "+JSON.stringify(d));var b=d.message,c;if(b.statusCode===200)c={ErrorCode:null,ErrorMessage:null,Headers:b.headers,Body:a._parseResponseBody(b)};else{a.log("Error Response:"+b.body);var e=a._parseErrorResponse(b);c={ErrorCode:e.errorCode,ErrorMessage:e.errorMessage,Headers:b.headers,Body:null}}return c})};return b}(),L=function(c){__extends(b,c);function b(b){var a=c.call(this)||this;a.m_bridge=b;a.m_bridge.addHostMessageHandler(function(a){a.type===3&&q.getGenericEventRegistration()._handleRichApiMessage(a.message)});return a}b.getInstanceIfHostBridgeInited=function(){if(v.instance){if(a.isNullOrUndefined(b.s_instance)||b.s_instance.m_bridge!==v.instance)b.s_instance=new b(v.instance);return b.s_instance}return null};b.prototype._resolveRequestUrlAndHeaderInfo=function(){return a._createPromiseFromResult(null)};b.prototype._createRequestExecutorOrNull=function(){a.log("NativeBridgeSession::CreateRequestExecutor");return new U(this)};Object.defineProperty(b.prototype,"eventRegistration",{"get":function(){return q.getGenericEventRegistration()},enumerable:true,configurable:true});b.prototype.sendMessageToHost=function(a){return this.m_bridge.sendMessageToHostAndExpectResponse(a)};return b}(s),X=function(h){__extends(e,h);function e(f){var c=h.call(this)||this;c.m_customRequestHeaders={};c.m_batchMode=0;c._onRunFinishedNotifiers=[];if(s._overrideSession)c.m_requestUrlAndHeaderInfoResolver=s._overrideSession;else{if(b.isNullOrUndefined(f)||typeof f==="string"&&f.length===0){f=e.defaultRequestUrlAndHeaders;if(!f)f={url:m.localDocument,headers:{}}}if(typeof f==="string")c.m_requestUrlAndHeaderInfo={url:f,headers:{}};else if(e.isRequestUrlAndHeaderInfoResolver(f))c.m_requestUrlAndHeaderInfoResolver=f;else if(e.isRequestUrlAndHeaderInfo(f)){var i=f;c.m_requestUrlAndHeaderInfo={url:i.url,headers:{}};a._copyHeaders(i.headers,c.m_requestUrlAndHeaderInfo.headers)}else throw d.RuntimeError._createInvalidArgError({argumentName:"url"});}if(!c.m_requestUrlAndHeaderInfoResolver&&c.m_requestUrlAndHeaderInfo&&a._isLocalDocumentUrl(c.m_requestUrlAndHeaderInfo.url)&&L.getInstanceIfHostBridgeInited()){c.m_requestUrlAndHeaderInfo=null;c.m_requestUrlAndHeaderInfoResolver=L.getInstanceIfHostBridgeInited()}if(c.m_requestUrlAndHeaderInfoResolver instanceof s)c.m_session=c.m_requestUrlAndHeaderInfoResolver;c._processingResult=false;c._customData=g.iterativeExecutor;c.sync=c.sync.bind(c);return c}Object.defineProperty(e.prototype,"session",{"get":function(){return this.m_session},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"eventRegistration",{"get":function(){if(this.m_session)return this.m_session.eventRegistration;return d.officeJsEventRegistration},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"_url",{"get":function(){if(this.m_requestUrlAndHeaderInfo)return this.m_requestUrlAndHeaderInfo.url;return null},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"_pendingRequest",{"get":function(){if(this.m_pendingRequest==null)this.m_pendingRequest=new x(this);return this.m_pendingRequest},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"debugInfo",{"get":function(){var a=new E(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,c._internalConfig.showDisposeInfoInDebugInfo),b=a.process();return{pendingStatements:b}},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"trackedObjects",{"get":function(){if(!this.m_trackedObjects)this.m_trackedObjects=new M(this);return this.m_trackedObjects},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"requestHeaders",{"get":function(){return this.m_customRequestHeaders},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"batchMode",{"get":function(){return this.m_batchMode},enumerable:true,configurable:true});e.prototype.ensureInProgressBatchIfBatchMode=function(){if(this.m_batchMode===1&&!this.m_explicitBatchInProgress)throw b.createRuntimeError(f.generalException,a._getResourceString(p.notInsideBatch),null);};e.prototype.load=function(a,d){b.validateContext(this,a);var c=e._parseQueryOption(d);t.createQueryAction(this,a,c,a)};e.prototype.loadRecursive=function(c,a,h){if(!b.isPlainJsonObject(a))throw d.RuntimeError._createInvalidArgError({argumentName:"options"});var f={};for(var g in a)f[g]=e._parseQueryOption(a[g]);var i=n.createRecursiveQueryAction(this,c,{Queries:f,MaxDepth:h});this._pendingRequest.addActionResultHandler(i,c)};e.prototype.trace=function(a){n.createTraceAction(this,a,true)};e.prototype._processOfficeJsErrorResponse=function(a,b){};e.prototype.ensureRequestUrlAndHeaderInfo=function(){var a=this;return b._createPromiseFromResult(null).then(function(){if(!a.m_requestUrlAndHeaderInfo)return a.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(d){a.m_requestUrlAndHeaderInfo=d;if(!a.m_requestUrlAndHeaderInfo)a.m_requestUrlAndHeaderInfo={url:m.localDocument,headers:{}};if(b.isNullOrEmptyString(a.m_requestUrlAndHeaderInfo.url))a.m_requestUrlAndHeaderInfo.url=m.localDocument;if(!a.m_requestUrlAndHeaderInfo.headers)a.m_requestUrlAndHeaderInfo.headers={};if(typeof a.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull==="function"){var c=a.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();if(c)a._requestExecutor=c}})})};e.prototype.syncPrivateMain=function(){var a=this;return this.ensureRequestUrlAndHeaderInfo().then(function(){var b=a._pendingRequest;a.m_pendingRequest=null;return a.processPreSyncPromises(b).then(function(){return a.syncPrivate(b)})})};e.prototype.syncPrivate=function(e){var i=this;if(!e.hasActions)return this.processPendingEventHandlers(e);var j=e.buildRequestMessageBodyAndRequestFlags(),m=j.body,g=j.flags;if(this._requestFlagModifier)g|=this._requestFlagModifier;if(!this._requestExecutor)if(a._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url))this._requestExecutor=new W(this);else this._requestExecutor=new F;var l=this._requestExecutor,h={};a._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,h);a._copyHeaders(this.m_customRequestHeaders,h);var k={Url:this.m_requestUrlAndHeaderInfo.url,Headers:h,Body:m};e.invalidatePendingInvalidObjectPaths();var f=null,c=null;this._lastSyncStart=typeof performance==="undefined"?0:performance.now();this._lastRequestFlags=g;return l.executeAsync(this._customData,g,k).then(function(b){i._lastSyncEnd=typeof performance==="undefined"?0:performance.now();f=i.processRequestExecutorResponseMessage(e,b);return i.processPendingEventHandlers(e)["catch"](function(b){a.log("Error in processPendingEventHandlers");a.log(JSON.stringify(b));c=b})}).then(function(){if(f){a.log("Throw error from response: "+JSON.stringify(f));throw f;}if(c){a.log("Throw error from ProcessEventHandler: "+JSON.stringify(c));var h=null;if(c instanceof d.RuntimeError){h=c;h.traceMessages=e._responseTraceMessages}else{var g=null;if(typeof c==="string")g=c;else g=c.message;if(b.isNullOrEmptyString(g))g=a._getResourceString(p.cannotRegisterEvent);h=new d.RuntimeError({code:A.cannotRegisterEvent,message:g,traceMessages:e._responseTraceMessages})}throw h;}})};e.prototype.processRequestExecutorResponseMessage=function(e,a){a.Body&&a.Body.TraceIds&&e._setResponseTraceIds(a.Body.TraceIds);var k=e._responseTraceMessages,f=null;if(a.Body){if(a.Body.Error&&a.Body.Error.ActionIndex>=0){var i=new E(this._rootObjectPropertyName,e._objectPaths,e._actions,false,true),j=i.processForDebugStatementInfo(a.Body.Error.ActionIndex);f={statement:j.statement,surroundingStatements:j.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]};if(c.config.extendedErrorLogging){i=new E(this._rootObjectPropertyName,e._objectPaths,e._actions,false,false);f.fullStatements=i.process()}}var g=null;if(a.Body.Results)g=a.Body.Results;else if(a.Body.ProcessedResults&&a.Body.ProcessedResults.Results)g=a.Body.ProcessedResults.Results;if(g){this._processingResult=true;try{e.processResponse(g)}finally{this._processingResult=false}}}if(!b.isNullOrEmptyString(a.ErrorCode))return new d.RuntimeError({code:a.ErrorCode,message:a.ErrorMessage,traceMessages:k});else if(a.Body&&a.Body.Error){var h={errorLocation:a.Body.Error.Location};if(f){h.statement=f.statement;h.surroundingStatements=f.surroundingStatements;h.fullStatements=f.fullStatements}return new d.RuntimeError({code:a.Body.Error.Code,message:a.Body.Error.Message,traceMessages:k,debugInfo:h})}return null};e.prototype.processPendingEventHandlers=function(a){for(var c=b._createPromiseFromResult(null),d=0;d<a._pendingProcessEventHandlers.length;d++){var e=a._pendingProcessEventHandlers[d];c=c.then(this.createProcessOneEventHandlersFunc(e,a))}return c};e.prototype.createProcessOneEventHandlersFunc=function(a,b){return function(){return a._processRegistration(b)}};e.prototype.processPreSyncPromises=function(d){for(var a=b._createPromiseFromResult(null),c=0;c<d._preSyncPromises.length;c++){var e=d._preSyncPromises[c];a=a.then(this.createProcessOneProSyncFunc(e))}return a};e.prototype.createProcessOneProSyncFunc=function(a){return function(){return a}};e.prototype.sync=function(a){return this.syncPrivateMain().then(function(){return a})};e.prototype.batch=function(i){var c=this;if(this.m_batchMode!==1)return a._createPromiseFromException(b.createRuntimeError(f.generalException,null,null));if(this.m_explicitBatchInProgress)return a._createPromiseFromException(b.createRuntimeError(f.generalException,a._getResourceString(p.pendingBatchInProgress),null));if(b.isNullOrUndefined(i))return b._createPromiseFromResult(null);this.m_explicitBatchInProgress=true;var e=this.m_pendingRequest;this.m_pendingRequest=new x(this);var d;try{d=i(this._rootObject,this)}catch(j){this.m_explicitBatchInProgress=false;this.m_pendingRequest=e;return a._createPromiseFromException(j)}var g,h;if(typeof d==="object"&&d&&typeof d.then==="function")h=b._createPromiseFromResult(null).then(function(){return d}).then(function(a){c.m_explicitBatchInProgress=false;g=c.m_pendingRequest;c.m_pendingRequest=e;return a})["catch"](function(b){c.m_explicitBatchInProgress=false;g=c.m_pendingRequest;c.m_pendingRequest=e;return a._createPromiseFromException(b)});else{this.m_explicitBatchInProgress=false;g=this.m_pendingRequest;this.m_pendingRequest=e;h=b._createPromiseFromResult(d)}return h.then(function(a){return c.ensureRequestUrlAndHeaderInfo().then(function(){return c.syncPrivate(g)}).then(function(){return a})})};e._run=function(f,g,a,b,d,c){if(a===void 0)a=3;if(b===void 0)b=5e3;return e._runCommon("run",null,f,0,g,a,b,null,d,c)};e.isValidRequestInfo=function(a){return typeof a==="string"||e.isRequestUrlAndHeaderInfo(a)||e.isRequestUrlAndHeaderInfoResolver(a)};e.isRequestUrlAndHeaderInfo=function(a){return typeof a==="object"&&a!==null&&Object.getPrototypeOf(a)===Object.getPrototypeOf({})&&!b.isNullOrUndefined(a.url)};e.isRequestUrlAndHeaderInfoResolver=function(a){return typeof a==="object"&&a!==null&&typeof a._resolveRequestUrlAndHeaderInfo==="function"};e._runBatch=function(h,f,g,i,a,b,d,c){if(a===void 0)a=3;if(b===void 0)b=5e3;return e._runBatchCommon(0,h,f,g,a,b,i,d,c)};e._runExplicitBatch=function(h,f,g,i,a,b,d,c){if(a===void 0)a=3;if(b===void 0)b=5e3;return e._runBatchCommon(1,h,f,g,a,b,i,d,c)};e._runBatchCommon=function(u,d,a,t,l,m,q,s,r){if(l===void 0)l=3;if(m===void 0)m=5e3;var h,n,i=null,c=null,f=0,j=null;if(a.length>0)if(e.isValidRequestInfo(a[0])){i=a[0];f=1}else if(b.isPlainJsonObject(a[0])){j=a[0];i=j.session;if(i!=null&&!e.isValidRequestInfo(i))return e.createErrorPromise(d);c=j.previousObjects;f=1}if(a.length==f+1)n=a[f+0];else if(j==null&&a.length==f+2){c=a[f+0];n=a[f+1]}else return e.createErrorPromise(d);if(c!=null)if(c instanceof J)h=function(){return c.context};else if(c instanceof e)h=function(){return c};else if(Array.isArray(c)){var g=c;if(g.length==0)return e.createErrorPromise(d);for(var k=0;k<g.length;k++){if(!(g[k]instanceof J))return e.createErrorPromise(d);if(g[k].context!=g[0].context)return e.createErrorPromise(d,p.invalidRequestContext)}h=function(){return g[0].context}}else return e.createErrorPromise(d);else h=t;var o=null;if(q)o=function(a){return q(j||{},a)};return e._runCommon(d,i,h,u,n,l,m,o,s,r)};e.createErrorPromise=function(d,c){if(c===void 0)c=i.invalidArgument;return a._createPromiseFromException(b.createRuntimeError(c,a._getResourceString(c),d))};e._runCommon=function(t,g,r,h,i,o,u,m,l,k){if(s._overrideSession)g=s._overrideSession;var q=a.createPromise(function(a,b){a()}),d,n=false,f,j;return q.then(function(){d=r(g);if(d._autoCleanup)return new c.Promise(function(a,b){d._onRunFinishedNotifiers.push(function(){d._autoCleanup=true;a()})});else d._autoCleanup=true}).then(function(){if(typeof i!=="function")return e.createErrorPromise(t);j=d.m_batchMode;d.m_batchMode=h;m&&m(d);var a;if(h==1)a=i(d.batch.bind(d));else a=i(d);(b.isNullOrUndefined(a)||typeof a.then!=="function")&&b.throwError(p.runMustReturnPromise);return a}).then(function(a){if(h===1)return a;else return d.sync(a)}).then(function(a){n=true;f=a})["catch"](function(a){f=a}).then(function(){var c=d.trackedObjects._retrieveAndClearAutoCleanupList();d._autoCleanup=false;d.m_batchMode=j;for(var h in c)c[h]._objectPath.isValid=false;var a=0;if(b._synchronousCleanup||e.isRequestUrlAndHeaderInfoResolver(g))return f();else f();function f(){a++;var e=d.m_pendingRequest,g=d.m_batchMode,b=new x(d);d.m_pendingRequest=b;d.m_batchMode=0;try{for(var h in c)d.trackedObjects.remove(c[h])}finally{d.m_batchMode=g;d.m_pendingRequest=e}return d.syncPrivate(b).then(function(){l&&l(a)})["catch"](function(){k&&k(a);a<o&&setTimeout(function(){f()},u)})}}).then(function(){if(d._onRunFinishedNotifiers&&d._onRunFinishedNotifiers.length>0){var a=d._onRunFinishedNotifiers.shift();a()}if(n)return f;else throw f;})};return e}(B);c.ClientRequestContext=X;var ab=function(){function c(c,h){this.m_proxy=c;this.m_shouldPolyfill=h;var e=c[g.scalarPropertyNames],d=c[g.navigationPropertyNames],f=c[g.className],i=c[g.isCollection];if(e)for(var a=0;a<e.length;a++)b.definePropertyThrowUnloadedException(this,f,e[a]);if(d)for(var a=0;a<d.length;a++)b.definePropertyThrowUnloadedException(this,f,d[a]);i&&b.definePropertyThrowUnloadedException(this,f,g.itemsLowerCase)}Object.defineProperty(c.prototype,"$proxy",{"get":function(){return this.m_proxy},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"$isNullObject",{"get":function(){if(!this.m_isLoaded)throw new d.RuntimeError({code:A.valueNotLoaded,message:a._getResourceString(p.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.$isNullObject"}});return this.m_isNullObject},enumerable:true,configurable:true});c.prototype.toJSON=function(){if(!this.m_isLoaded)return undefined;if(this.m_isNullObject)return null;if(b.isUndefined(this.m_json))this.m_json=b.purifyJson(this.m_value);return this.m_json};c.prototype.toString=function(){return JSON.stringify(this.toJSON())};c.prototype._handleResult=function(a){this.m_isLoaded=true;if(a===null||typeof a==="object"&&a&&a._IsNull){this.m_isNullObject=true;a=null}else this.m_isNullObject=false;if(this.m_shouldPolyfill)a=b.changePropertyNameToCamelLowerCase(a);this.m_value=a;this.m_proxy._handleRetrieveResult(a,this)};return c}(),g=function(b){__extends(a,b);function a(){return b!==null&&b.apply(this,arguments)||this}a.getItemAt="GetItemAt";a.index="_Index";a.iterativeExecutor="IterativeExecutor";a.isTracked="_IsTracked";a.eventMessageCategory=65536;a.eventWorkbookId="Workbook";a.eventSourceRemote="Remote";a.proxy="$proxy";a.className="_className";a.isCollection="_isCollection";a.collectionPropertyPath="_collectionPropertyPath";a.objectPathInfoDoNotKeepReferenceFieldName="D";return a}(j);c.Constants=g;var x=function(c){__extends(b,c);function b(b){var a=c.call(this,b)||this;a.m_context=b;a.m_pendingProcessEventHandlers=[];a.m_pendingEventHandlerActions={};a.m_traceInfos={};a.m_responseTraceIds={};a.m_responseTraceMessages=[];return a}Object.defineProperty(b.prototype,"traceInfos",{"get":function(){return this.m_traceInfos},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"_responseTraceMessages",{"get":function(){return this.m_responseTraceMessages},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"_responseTraceIds",{"get":function(){return this.m_responseTraceIds},enumerable:true,configurable:true});b.prototype._setResponseTraceIds=function(c){if(c)for(var d=0;d<c.length;d++){var b=c[d];this.m_responseTraceIds[b]=b;var e=this.m_traceInfos[b];!a.isNullOrUndefined(e)&&this.m_responseTraceMessages.push(e)}};b.prototype.addTrace=function(a,b){this.m_traceInfos[a]=b};b.prototype._addPendingEventHandlerAction=function(a,b){if(!this.m_pendingEventHandlerActions[a._id]){this.m_pendingEventHandlerActions[a._id]=[];this.m_pendingProcessEventHandlers.push(a)}this.m_pendingEventHandlerActions[a._id].push(b)};Object.defineProperty(b.prototype,"_pendingProcessEventHandlers",{"get":function(){return this.m_pendingProcessEventHandlers},enumerable:true,configurable:true});b.prototype._getPendingEventHandlerActions=function(a){return this.m_pendingEventHandlerActions[a._id]};return b}(H);c.ClientRequest=x;var N=function(){function b(a,e,d,c){var b=this;this.m_id=a._nextId();this.m_context=a;this.m_name=d;this.m_handlers=[];this.m_registered=false;this.m_eventInfo=c;this.m_callback=function(a){b.m_eventInfo.eventArgsTransformFunc(a).then(function(a){return b.fireEvent(a)})}}Object.defineProperty(b.prototype,"_registered",{"get":function(){return this.m_registered},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"_id",{"get":function(){return this.m_id},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"_handlers",{"get":function(){return this.m_handlers},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"_context",{"get":function(){return this.m_context},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"_callback",{"get":function(){return this.m_callback},enumerable:true,configurable:true});b.prototype.add=function(a){var b=n.createTraceAction(this.m_context,null,false);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:b.actionInfo.Id,handler:a,operation:0});return new G(this.m_context,this,a)};b.prototype.remove=function(a){var b=n.createTraceAction(this.m_context,null,false);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:b.actionInfo.Id,handler:a,operation:1})};b.prototype.removeAll=function(){var a=n.createTraceAction(this.m_context,null,false);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:a.actionInfo.Id,handler:null,operation:2})};b.prototype._processRegistration=function(i){var e=this,d=a._createPromiseFromResult(null),f=i._getPendingEventHandlerActions(this);if(!f)return d;for(var b=[],c=0;c<this.m_handlers.length;c++)b.push(this.m_handlers[c]);for(var h=false,c=0;c<f.length;c++)if(i._responseTraceIds[f[c].id]){h=true;switch(f[c].operation){case 0:b.push(f[c].handler);break;case 1:for(var g=b.length-1;g>=0;g--)if(b[g]===f[c].handler){b.splice(g,1);break}break;case 2:b=[];break}}if(h){if(!this.m_registered&&b.length>0)d=d.then(function(){return e.m_eventInfo.registerFunc(e.m_callback)}).then(function(){return e.m_registered=true});else if(this.m_registered&&b.length==0)d=d.then(function(){return e.m_eventInfo.unregisterFunc(e.m_callback)})["catch"](function(b){a.log("Error when unregister event: "+JSON.stringify(b))}).then(function(){return e.m_registered=false});d=d.then(function(){return e.m_handlers=b})}return d};b.prototype.fireEvent=function(e){for(var c=[],b=0;b<this.m_handlers.length;b++){var d=this.m_handlers[b],f=a._createPromiseFromResult(null).then(this.createFireOneEventHandlerFunc(d,e))["catch"](function(b){a.log("Error when invoke handler: "+JSON.stringify(b))});c.push(f)}a.Promise.all(c)};b.prototype.createFireOneEventHandlerFunc=function(a,b){return function(){return a(b)}};return b}();c.EventHandlers=N;var G=function(){function a(b,a,c){this.m_context=b;this.m_allHandlers=a;this.m_handler=c}Object.defineProperty(a.prototype,"context",{"get":function(){return this.m_context},enumerable:true,configurable:true});a.prototype.remove=function(){if(this.m_allHandlers&&this.m_handler){this.m_allHandlers.remove(this.m_handler);this.m_allHandlers=null;this.m_handler=null}};return a}();c.EventHandlerResult=G;(function(a){var c=function(){function c(){}c.prototype.register=function(e,d,c){switch(e){case 4:return b.promisify(function(a){return Office.context.document.bindings.getByIdAsync(d,a)}).then(function(a){return b.promisify(function(b){return a.addHandlerAsync(Office.EventType.BindingDataChanged,c,b)})});case 3:return b.promisify(function(a){return Office.context.document.bindings.getByIdAsync(d,a)}).then(function(a){return b.promisify(function(b){return a.addHandlerAsync(Office.EventType.BindingSelectionChanged,c,b)})});case 2:return b.promisify(function(a){return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged,c,a)});case 1:return b.promisify(function(a){return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged,c,a)});case 5:return b.promisify(function(a){return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage",c,a)});case 13:return b.promisify(function(a){return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted,c,{id:d},a)});case 14:return b.promisify(function(a){return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged,c,{id:d},a)});case 15:return b.promisify(function(a){return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged,c,{id:d},a)});case 16:return b.promisify(function(a){return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded,c,{id:d},a)});default:throw a.RuntimeError._createInvalidArgError({argumentName:"eventId"});}};c.prototype.unregister=function(e,d,c){switch(e){case 4:return b.promisify(function(a){return Office.context.document.bindings.getByIdAsync(d,a)}).then(function(a){return b.promisify(function(b){return a.removeHandlerAsync(Office.EventType.BindingDataChanged,{handler:c},b)})});case 3:return b.promisify(function(a){return Office.context.document.bindings.getByIdAsync(d,a)}).then(function(a){return b.promisify(function(b){return a.removeHandlerAsync(Office.EventType.BindingSelectionChanged,{handler:c},b)})});case 2:return b.promisify(function(a){return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged,{handler:c},a)});case 1:return b.promisify(function(a){return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged,{handler:c},a)});case 5:return b.promisify(function(a){return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage",{handler:c},a)});case 13:return b.promisify(function(a){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted,{id:d,handler:c},a)});case 14:return b.promisify(function(a){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged,{id:d,handler:c},a)});case 15:return b.promisify(function(a){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged,{id:d,handler:c},a)});case 16:return b.promisify(function(a){return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded,{id:d,handler:c},a)});default:throw a.RuntimeError._createInvalidArgError({argumentName:"eventId"});}};return c}();a.officeJsEventRegistration=new c})(d=c._Internal||(c._Internal={}));var I=function(){function a(b,a){this.m_handlersByEventByTarget={};this.m_registerEventImpl=b;this.m_unregisterEventImpl=a}a.prototype.getHandlers=function(e,d){if(b.isNullOrUndefined(d))d="";var a=this.m_handlersByEventByTarget[e];if(!a){a={};this.m_handlersByEventByTarget[e]=a}var c=a[d];if(!c){c=[];a[d]=c}return c};a.prototype.register=function(e,c,f){if(!f)throw d.RuntimeError._createInvalidArgError({argumentName:"handler"});var a=this.getHandlers(e,c);a.push(f);if(a.length===1)return this.m_registerEventImpl(e,c);return b._createPromiseFromResult(null)};a.prototype.unregister=function(f,e,g){if(!g)throw d.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var a=this.getHandlers(f,e),c=a.length-1;c>=0;c--)if(a[c]===g){a.splice(c,1);break}if(a.length===0)return this.m_unregisterEventImpl(f,e);return b._createPromiseFromResult(null)};return a}();c.EventRegistration=I;var q=function(){function c(){this.m_eventRegistration=new I(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}c.prototype.ready=function(){var a=this;if(!this.m_ready)if(c._testReadyImpl)this.m_ready=c._testReadyImpl().then(function(){a.m_isReady=true});else if(v.instance)this.m_ready=b._createPromiseFromResult(null).then(function(){a.m_isReady=true});else this.m_ready=d.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){a.m_isReady=true});return this.m_ready};Object.defineProperty(c.prototype,"isReady",{"get":function(){return this.m_isReady},enumerable:true,configurable:true});c.prototype.register=function(b,a,c){var d=this;return this.ready().then(function(){return d.m_eventRegistration.register(b,a,c)})};c.prototype.unregister=function(b,a,c){var d=this;return this.ready().then(function(){return d.m_eventRegistration.unregister(b,a,c)})};c.prototype._registerEventImpl=function(c,a){return b._createPromiseFromResult(null)};c.prototype._unregisterEventImpl=function(c,a){return b._createPromiseFromResult(null)};c.prototype._handleRichApiMessage=function(c){if(c&&c.entries)for(var d=0;d<c.entries.length;d++){var b=c.entries[d];if(b.messageCategory==g.eventMessageCategory){a._logEnabled&&a.log(JSON.stringify(b));var e=this.m_eventRegistration.getHandlers(b.messageType,b.targetId);if(e.length>0){var h=JSON.parse(b.message);if(b.isRemoteOverride)h.source=g.eventSourceRemote;for(var f=0;f<e.length;f++)e[f](h)}}}};c.getGenericEventRegistration=function(){if(!c.s_genericEventRegistration)c.s_genericEventRegistration=new c;return c.s_genericEventRegistration};c.richApiMessageEventCategory=65536;return c}();function Q(a){q._testReadyImpl=a}c._testSetRichApiMessageReadyImpl=Q;function R(a){q.getGenericEventRegistration()._handleRichApiMessage(a)}c._testTriggerRichApiMessageEvent=R;var Y=function(b){__extends(a,b);function a(e,d,f,a){var c=b.call(this,e,d,f,a)||this;c.m_genericEventInfo=a;return c}a.prototype.add=function(b){var a=this;this._handlers.length==0&&this.m_genericEventInfo.registerFunc&&this.m_genericEventInfo.registerFunc();!q.getGenericEventRegistration().isReady&&this._context._pendingRequest._addPreSyncPromise(q.getGenericEventRegistration().ready());n.createTraceMarkerForCallback(this._context,function(){a._handlers.push(b);a._handlers.length==1&&q.getGenericEventRegistration().register(a.m_genericEventInfo.eventType,a.m_genericEventInfo.getTargetIdFunc(),a._callback)});return new G(this._context,this,b)};a.prototype.remove=function(b){var a=this;this._handlers.length==1&&this.m_genericEventInfo.unregisterFunc&&this.m_genericEventInfo.unregisterFunc();n.createTraceMarkerForCallback(this._context,function(){for(var c=a._handlers,d=c.length-1;d>=0;d--)if(c[d]===b){c.splice(d,1);break}c.length==0&&q.getGenericEventRegistration().unregister(a.m_genericEventInfo.eventType,a.m_genericEventInfo.getTargetIdFunc(),a._callback)})};a.prototype.removeAll=function(){};return a}(N);c.GenericEventHandlers=Y;var S=function(){function a(a){this.m_clientObject=a}a.prototype._handleResult=function(a){this.m_clientObject._handleIdResult(a)};return a}(),r=function(){function a(){}a.createGlobalObjectObjectPath=function(b){var a={Id:b._nextId(),ObjectPathType:1,Name:""};return new l(a,null,false,false,1,4)};a.createNewObjectObjectPath=function(e,d,c,f){var a={Id:e._nextId(),ObjectPathType:2,Name:d},g=new l(a,null,c,false,1,b._fixupApiFlags(f));return g};a.createPropertyObjectPath=function(g,a,f,e,c,h){var d={Id:g._nextId(),ObjectPathType:4,Name:f,ParentObjectPathId:a._objectPath.objectPathInfo.Id},i=new l(d,a._objectPath,e,c,1,b._fixupApiFlags(h));return i};a.createIndexerObjectPath=function(c,b,d){var a={Id:c._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:b._objectPath.objectPathInfo.Id,ArgumentInfo:{}};a.ArgumentInfo.Arguments=d;return new l(a,b._objectPath,false,false,1,4)};a.createIndexerObjectPathUsingParentPath=function(c,a,d){var b={Id:c._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:a.objectPathInfo.Id,ArgumentInfo:{}};b.ArgumentInfo.Arguments=d;return new l(b,a,false,false,1,4)};a.createMethodObjectPath=function(d,e,k,i,n,j,f,h,m){var c={Id:d._nextId(),ObjectPathType:3,Name:k,ParentObjectPathId:e._objectPath.objectPathInfo.Id,ArgumentInfo:{}},g=b.setMethodArguments(d,c.ArgumentInfo,n),a=new l(c,e._objectPath,j,f,i,b._fixupApiFlags(m));a.argumentObjectPaths=g;a.getByIdMethodName=h;return a};a.createReferenceIdObjectPath=function(c,b){var a={Id:c._nextId(),ObjectPathType:6,Name:b,ArgumentInfo:{}},d=new l(a,null,false,false,1,4);return d};a.createChildItemObjectPathUsingIndexerOrGetItemAt=function(f,d,e,c,g){var h=b.tryGetObjectIdFromLoadOrRetrieveResult(c);if(f&&!b.isNullOrUndefined(h))return a.createChildItemObjectPathUsingIndexer(d,e,c);else return a.createChildItemObjectPathUsingGetItemAt(d,e,c,g)};a.createChildItemObjectPathUsingIndexer=function(e,c,d){var f=b.tryGetObjectIdFromLoadOrRetrieveResult(d),a=a={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:c._objectPath.objectPathInfo.Id,ArgumentInfo:{}};a.ArgumentInfo.Arguments=[f];return new l(a,c._objectPath,false,false,1,4)};a.createChildItemObjectPathUsingGetItemAt=function(f,c,e,d){var a=e[g.index];if(a)d=a;var b={Id:f._nextId(),ObjectPathType:3,Name:g.getItemAt,ParentObjectPathId:c._objectPath.objectPathInfo.Id,ArgumentInfo:{}};b.ArgumentInfo.Arguments=[d];return new l(b,c._objectPath,false,false,1,4)};return a}();c.ObjectPathFactory=r;var W=function(){function b(a){this.m_context=a}b.prototype.executeAsync=function(g,f,e){var h=this,d=k.buildMessageArrayForIRequestExecutor(g,f,e,b.SourceLibHeaderValue);return new c.Promise(function(b,c){OSF.DDA.RichApi.executeRichApiRequestAsync(d,function(c){a.log("Response:");a.log(JSON.stringify(c));var d;if(c.status=="succeeded")d=k.buildResponseOnSuccess(k.getResponseBody(c),k.getResponseHeaders(c));else{d=k.buildResponseOnError(c.error.code,c.error.message);h.m_context._processOfficeJsErrorResponse(c.error.code,d)}b(d)})})};b.SourceLibHeaderValue="officejs";return b}(),M=function(){function c(a){this._autoCleanupList={};this.m_context=a}c.prototype.add=function(a){var b=this;if(Array.isArray(a))a.forEach(function(a){return b._addCommon(a,true)});else this._addCommon(a,true)};c.prototype._autoAdd=function(a){this._addCommon(a,false);this._autoCleanupList[a._objectPath.objectPathInfo.Id]=a};c.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(a,c){var d=this.m_context._autoCleanup&&!a[g.isTracked]&&a!==this.m_context._rootObject&&c&&!b.isNullOrEmptyString(c[g.referenceId]);if(d){this._autoCleanupList[a._objectPath.objectPathInfo.Id]=a;a[g.isTracked]=true}};c.prototype._addCommon=function(c,d){if(c[g.isTracked]){if(d&&this.m_context._autoCleanup)delete this._autoCleanupList[c._objectPath.objectPathInfo.Id];return}var h=c[g.referenceId],e=c._objectPath.objectPathInfo[g.objectPathInfoDoNotKeepReferenceFieldName];if(e)throw b.createRuntimeError(f.generalException,a._getResourceString(p.objectIsUntracked),null);if(b.isNullOrEmptyString(h)&&c._KeepReference){c._KeepReference();n.createInstantiateAction(this.m_context,c);if(d&&this.m_context._autoCleanup)delete this._autoCleanupList[c._objectPath.objectPathInfo.Id];c[g.isTracked]=true}};c.prototype.remove=function(a){var b=this;if(Array.isArray(a))a.forEach(function(a){return b._removeCommon(a)});else this._removeCommon(a)};c.prototype._removeCommon=function(a){a._objectPath.objectPathInfo[g.objectPathInfoDoNotKeepReferenceFieldName]=true;a.context._pendingRequest._removeKeepReferenceAction(a._objectPath.objectPathInfo.Id);var c=a[g.referenceId];if(!b.isNullOrEmptyString(c)){var d=this.m_context._rootObject;d._RemoveReference&&d._RemoveReference(c)}delete a[g.isTracked]};c.prototype._retrieveAndClearAutoCleanupList=function(){var a=this._autoCleanupList;this._autoCleanupList={};return a};return c}();c.TrackedObjects=M;var E=function(){function a(a,b,e,c,d){if(!a)a="root";this.m_globalObjName=a;this.m_referencedObjectPaths=b;this.m_actions=e;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=c;this.m_removePII=d}a.prototype.process=function(){this.m_showDispose&&x._calculateLastUsedObjectPathIds(this.m_actions);for(var a=0;a<this.m_actions.length;a++)this.processOneAction(this.m_actions[a]);return this.m_statements};a.prototype.processForDebugStatementInfo=function(i){this.m_showDispose&&x._calculateLastUsedObjectPathIds(this.m_actions);var f=5;this.m_statements=[];for(var j="",a=-1,e=0;e<this.m_actions.length;e++){this.processOneAction(this.m_actions[e]);if(i==e)a=this.m_statements.length-1;if(a>=0&&this.m_statements.length>a+f+1)break}if(a<0)return null;var c=a-f;if(c<0)c=0;var d=a+1+f;if(d>this.m_statements.length)d=this.m_statements.length;var b=[];c!=0&&b.push("...");for(var g=c;g<a;g++)b.push(this.m_statements[g]);b.push("// >>>>>");b.push(this.m_statements[a]);b.push("// <<<<<");for(var h=a+1;h<d;h++)b.push(this.m_statements[h]);d<this.m_statements.length&&b.push("...");return{statement:this.m_statements[a],surroundingStatements:b}};a.prototype.processOneAction=function(a){var b=a.actionInfo;switch(b.ActionType){case 1:this.processInstantiateAction(a);break;case 3:this.processMethodAction(a);break;case 2:this.processQueryAction(a);break;case 7:this.processQueryAsJsonAction(a);break;case 6:this.processRecursiveQueryAction(a);break;case 4:this.processSetPropertyAction(a);break;case 5:this.processTraceAction(a);break;case 8:this.processEnsureUnchangedAction(a);break;case 9:this.processUpdateAction(a);break}};a.prototype.processInstantiateAction=function(d){var b=d.actionInfo.ObjectPathId,e=this.m_referencedObjectPaths[b],c=this.getObjVarName(b);if(!this.m_declaredObjectPathMap[b]){var a="var "+c+" = "+this.buildObjectPathExpressionWithParent(e)+";";a=this.appendDisposeCommentIfRelevant(a,d);this.m_statements.push(a);this.m_declaredObjectPathMap[b]=c}else{var a="// Instantiate {"+c+"}";a=this.appendDisposeCommentIfRelevant(a,d);this.m_statements.push(a)}};a.prototype.processMethodAction=function(a){var d=a.actionInfo.Name;if(d==="_KeepReference"){if(!c._internalConfig.showInternalApiInDebugInfo)return;d="track"}var e=this.getObjVarName(a.actionInfo.ObjectPathId)+"."+b._toCamelLowerCase(d)+"("+this.buildArgumentsExpression(a.actionInfo.ArgumentInfo)+");";e=this.appendDisposeCommentIfRelevant(e,a);this.m_statements.push(e)};a.prototype.processQueryAction=function(b){var c=this.buildQueryExpression(b),a=this.getObjVarName(b.actionInfo.ObjectPathId)+".load("+c+");";a=this.appendDisposeCommentIfRelevant(a,b);this.m_statements.push(a)};a.prototype.processQueryAsJsonAction=function(b){var c=this.buildQueryExpression(b),a=this.getObjVarName(b.actionInfo.ObjectPathId)+".retrieve("+c+");";a=this.appendDisposeCommentIfRelevant(a,b);this.m_statements.push(a)};a.prototype.processRecursiveQueryAction=function(a){var c="";if(a.actionInfo.RecursiveQueryInfo)c=JSON.stringify(a.actionInfo.RecursiveQueryInfo);var b=this.getObjVarName(a.actionInfo.ObjectPathId)+".loadRecursive("+c+");";b=this.appendDisposeCommentIfRelevant(b,a);this.m_statements.push(b)};a.prototype.processSetPropertyAction=function(a){var c=this.getObjVarName(a.actionInfo.ObjectPathId)+"."+b._toCamelLowerCase(a.actionInfo.Name)+" = "+this.buildArgumentsExpression(a.actionInfo.ArgumentInfo)+";";c=this.appendDisposeCommentIfRelevant(c,a);this.m_statements.push(c)};a.prototype.processTraceAction=function(b){var a="context.trace();";a=this.appendDisposeCommentIfRelevant(a,b);this.m_statements.push(a)};a.prototype.processEnsureUnchangedAction=function(b){var a=this.getObjVarName(b.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(b.actionInfo.ObjectState)+");";a=this.appendDisposeCommentIfRelevant(a,b);this.m_statements.push(a)};a.prototype.processUpdateAction=function(b){var a=this.getObjVarName(b.actionInfo.ObjectPathId)+".update("+JSON.stringify(b.actionInfo.ObjectState)+");";a=this.appendDisposeCommentIfRelevant(a,b);this.m_statements.push(a)};a.prototype.appendDisposeCommentIfRelevant=function(b,d){var e=this;if(this.m_showDispose){var a=d.actionInfo.L;if(a&&a.length>0){var c=a.map(function(a){return e.getObjVarName(a)}).join(", ");return b+" // And then dispose {"+c+"}"}}return b};a.prototype.buildQueryExpression=function(b){if(b.actionInfo.QueryInfo){var a={};a.select=b.actionInfo.QueryInfo.Select;a.expand=b.actionInfo.QueryInfo.Expand;a.skip=b.actionInfo.QueryInfo.Skip;a.top=b.actionInfo.QueryInfo.Top;if(typeof a.top==="undefined"&&typeof a.skip==="undefined"&&typeof a.expand==="undefined")if(typeof a.select==="undefined")return"";else return JSON.stringify(a.select);else return JSON.stringify(a)}return""};a.prototype.buildObjectPathExpressionWithParent=function(a){var b=a.objectPathInfo.ObjectPathType==5||a.objectPathInfo.ObjectPathType==3||a.objectPathInfo.ObjectPathType==4;if(b&&a.objectPathInfo.ParentObjectPathId)return this.getObjVarName(a.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(a);return this.buildObjectPathExpression(a)};a.prototype.buildObjectPathExpression=function(c){var a=this.buildObjectPathInfoExpression(c.objectPathInfo),b=c.originalObjectPathInfo;if(b)a=a+" /* originally "+this.buildObjectPathInfoExpression(b)+" */";return a};a.prototype.buildObjectPathInfoExpression=function(a){switch(a.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(a.ArgumentInfo)+")";case 3:return b._toCamelLowerCase(a.Name)+"("+this.buildArgumentsExpression(a.ArgumentInfo)+")";case 2:return a.Name+".newObject()";case 7:return"null";case 4:return b._toCamelLowerCase(a.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(a.Name)+")"}};a.prototype.buildArgumentsExpression=function(b){var a="";if(!b.Arguments||b.Arguments.length===0)return a;if(this.m_removePII){if(typeof b.Arguments[0]==="undefined")return a;return"..."}for(var c=0;c<b.Arguments.length;c++){if(c>0)a=a+", ";a=a+this.buildArgumentLiteral(b.Arguments[c],b.ReferencedObjectPathIds?b.ReferencedObjectPathIds[c]:null)}if(a==="undefined")a="";return a};a.prototype.buildArgumentLiteral=function(a,b){if(typeof a=="number"&&a===b)return this.getObjVarName(b);else return JSON.stringify(a)};a.prototype.getObjVarNameBase=function(f){var a="v",e=this.m_referencedObjectPaths[f];if(e)switch(e.objectPathInfo.ObjectPathType){case 1:a=this.m_globalObjName;break;case 4:a=b._toCamelLowerCase(e.objectPathInfo.Name);break;case 3:var c=e.objectPathInfo.Name;if(c.length>3&&c.substr(0,3)==="Get")c=c.substr(3);a=b._toCamelLowerCase(c);break;case 5:var d=this.getObjVarNameBase(e.objectPathInfo.ParentObjectPathId);if(d.charAt(d.length-1)==="s")a=d.substr(0,d.length-1);else a=d+"Item";break}return a};a.prototype.getObjVarName=function(b){if(this.m_variableNameForObjectPathMap[b])return this.m_variableNameForObjectPathMap[b];var a=this.getObjVarNameBase(b);if(!this.m_variableNameToObjectPathMap[a]){this.m_variableNameForObjectPathMap[b]=a;this.m_variableNameToObjectPathMap[a]=b;return a}var c=1;while(this.m_variableNameToObjectPathMap[a+c.toString()])c++;a=a+c.toString();this.m_variableNameForObjectPathMap[b]=a;this.m_variableNameToObjectPathMap[a]=b;return a};return a}(),p=function(b){__extends(a,b);function a(){return b!==null&&b.apply(this,arguments)||this}a.cannotRegisterEvent="CannotRegisterEvent";a.connectionFailureWithStatus="ConnectionFailureWithStatus";a.connectionFailureWithDetails="ConnectionFailureWithDetails";a.propertyNotLoaded="PropertyNotLoaded";a.runMustReturnPromise="RunMustReturnPromise";a.moreInfoInnerError="MoreInfoInnerError";a.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod";a.invalidOperationInCellEditMode="InvalidOperationInCellEditMode";a.objectIsUntracked="ObjectIsUntracked";a.customFunctionDefintionMissing="CustomFunctionDefintionMissing";a.customFunctionImplementationMissing="CustomFunctionImplementationMissing";a.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars";a.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit";a.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch";a.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing";a.customFunctionInvalidFunction="CustomFunctionInvalidFunction";a.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping";a.customFunctionWindowMissing="CustomFunctionWindowMissing";a.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow";a.pendingBatchInProgress="PendingBatchInProgress";a.notInsideBatch="NotInsideBatch";a.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty";return a}(w);c.ResourceStrings=p;a.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.",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 b=function(e){__extends(b,e);function b(){return e!==null&&e.apply(this,arguments)||this}b.fixObjectPathIfNecessary=function(a,b){a&&a._objectPath&&b&&a._objectPath.updateUsingObjectData(b,a)};b.load=function(a,b){a.context.load(a,b);return a};b.loadAndSync=function(a,b){a.context.load(a,b);return a.context.sync().then(function(){return a})};b.retrieve=function(d,f){var a=c._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;if(!a)a=!b.isSetSupported("RichApiRuntime","1.1");var e=new ab(d,a);d._retrieve(f,e);return e};b.retrieveAndSync=function(a,c){var d=b.retrieve(a,c);return a.context.sync().then(function(){return d})};b.toJson=function(h,g,f,e){var c={};for(var d in g){var a=g[d];if(typeof a!=="undefined")c[d]=a}for(var d in f){var a=f[d];if(typeof a!=="undefined")if(a[b.fieldName_isCollection]&&typeof a[b.fieldName_m__items]!=="undefined")c[d]=a.toJSON().items;else c[d]=a.toJSON()}if(e)c.items=e.map(function(a){return a.toJSON()});return c};b.throwError=function(c,e,b){throw new d.RuntimeError({code:c,message:a._getResourceString(c,e),debugInfo:b?{errorLocation:b}:undefined});};b.createRuntimeError=function(c,b,a){return new d.RuntimeError({code:c,message:b,debugInfo:{errorLocation:a}})};b.throwIfNotLoaded=function(c,e,d,f){if(!f&&a.isUndefined(e)&&c.charCodeAt(0)!=b.s_underscoreCharCode)throw b.createPropertyNotLoadedException(d,c);};b.createPropertyNotLoadedException=function(c,b){return new d.RuntimeError({code:A.propertyNotLoaded,message:a._getResourceString(p.propertyNotLoaded,b),debugInfo:c?{errorLocation:c+"."+b}:undefined})};b.createCannotUpdateReadOnlyPropertyException=function(c,b){return new d.RuntimeError({code:A.cannotUpdateReadOnlyProperty,message:a._getResourceString(p.cannotUpdateReadOnlyProperty,b),debugInfo:c?{errorLocation:c+"."+b}:undefined})};b.promisify=function(a){return new c.Promise(function(c,d){var b=function(a){if(a.status=="failed")d(a.error);else c(a.value)};a(b)})};b._addActionResultHandler=function(b,c,a){b.context._pendingRequest.addActionResultHandler(c,a)};b._handleNavigationPropertyResults=function(e,d,c){for(var b=0;b<c.length-1;b+=2)!a.isUndefined(d[c[b+1]])&&e[c[b]]._handleResult(d[c[b+1]])};b._fixupApiFlags=function(a){if(typeof a==="boolean")if(a)a=1;else a=0;return a};b.definePropertyThrowUnloadedException=function(d,c,a){Object.defineProperty(d,a,{configurable:true,enumerable:true,"get":function(){throw b.createPropertyNotLoadedException(c,a);},"set":function(){throw b.createCannotUpdateReadOnlyPropertyException(c,a);}})};b.defineReadOnlyPropertyWithValue=function(d,a,c){Object.defineProperty(d,a,{configurable:true,enumerable:true,"get":function(){return c},"set":function(){throw b.createCannotUpdateReadOnlyPropertyException(null,a);}})};b.processRetrieveResult=function(i,j,f,o){if(a.isNullOrUndefined(j))return;if(o){var k=j[g.itemsLowerCase];if(Array.isArray(k)){for(var p=[],c=0;c<k.length;c++){var q=o(k[c],c),n={};n[g.proxy]=q;q._handleRetrieveResult(k[c],n);p.push(n)}b.defineReadOnlyPropertyWithValue(f,g.itemsLowerCase,p)}}else{var m=i[g.scalarPropertyNames],l=i[g.navigationPropertyNames],s=i[g.className];if(m)for(var c=0;c<m.length;c++){var d=m[c],h=j[d];if(a.isUndefined(h))b.definePropertyThrowUnloadedException(f,s,d);else b.defineReadOnlyPropertyWithValue(f,d,h)}if(l)for(var c=0;c<l.length;c++){var d=l[c],h=j[d];if(a.isUndefined(h))b.definePropertyThrowUnloadedException(f,s,d);else{var r=i[d],e={};r._handleRetrieveResult(h,e);e[g.proxy]=r;if(Array.isArray(e[g.itemsLowerCase]))e=e[g.itemsLowerCase];b.defineReadOnlyPropertyWithValue(f,d,e)}}}};b.fieldName_m__items="m__items";b.fieldName_isCollection="_isCollection";b._synchronousCleanup=false;b.s_underscoreCharCode="_".charCodeAt(0);return b}(e);c.Utility=b;var db=function(){function a(){}a.invokeMethod=function(a,f,e,i,h,d){var g=n.createMethodAction(a.context,a,f,e,i,h),c=new z(d);b._addActionResultHandler(a,g,c);return c};a.invokeEnsureUnchanged=function(a,b){n.createEnsureUnchangedAction(a.context,a,b)};a.invokeSetProperty=function(a,c,b,d){n.createSetPropertyAction(a.context,a,c,b,d)};a.createRootServiceObject=function(c,a){var b=r.createGlobalObjectObjectPath(a);return new c(a,b)};a.createObjectFromReferenceId=function(d,a,b){var c=r.createReferenceIdObjectPath(a,b);return new d(a,c)};a.createTopLevelServiceObject=function(f,a,d,b,e){var c=r.createNewObjectObjectPath(a,d,b,e);return new f(a,c)};a.createPropertyObject=function(f,a,c,b,e){var d=r.createPropertyObjectPath(a.context,a,c,b,false,e);return new f(a.context,d)};a.createIndexerObject=function(d,a,c){var b=r.createIndexerObjectPath(a.context,a,c);return new d(a.context,b)};a.createMethodObject=function(j,a,f,d,i,e,b,c,h){var g=r.createMethodObjectPath(a.context,a,f,d,i,e,b,c,h);return new j(a.context,g)};a.createChildItemObject=function(f,b,a,d,e){var c=r.createChildItemObjectPathUsingIndexerOrGetItemAt(b,a.context,a,d,e);return new f(a.context,c)};return a}();c.BatchApiHelper=db;var O=1,C={invokeRequestModifier:function(a){a.DdaMethod.Version=O;return a},invokeResponseModifier:function(a){O=a.Version;if(a.Error){a.error={};a.error.Code=a.Error}return a}},h;(function(a){a.SendingId="sId";a.RespondingId="rId";a.CommandKey="command";a.SessionInfoKey="sessionInfo";a.ParamsKey="params";a.ApiReadyCommand="apiready";a.ExecuteMethodCommand="executeMethod";a.GetAppContextCommand="getAppContext";a.RegisterEventCommand="registerEvent";a.UnregisterEventCommand="unregisterEvent";a.FireEventCommand="fireEvent"})(h||(h={}));var u=function(){function a(){}a.sessionContext="sc";a.embeddingPageOrigin="EmbeddingPageOrigin";a.embeddingPageSessionInfo="EmbeddingPageSessionInfo";return a}();c.EmbeddedConstants=u;var bb=function(d){__extends(c,d);function c(c,b){var a=d.call(this)||this;a.m_chosenWindow=null;a.m_chosenOrigin=null;a.m_enabled=true;a.m_onMessageHandler=a._onMessage.bind(a);a.m_callbackList={};a.m_id=0;a.m_timeoutId=-1;a.m_appContext=null;a.m_url=c;a.m_options=b;if(!a.m_options)a.m_options={sessionKey:Math.random().toString()};if(!a.m_options.sessionKey)a.m_options.sessionKey=Math.random().toString();if(!a.m_options.container)a.m_options.container=document.body;if(!a.m_options.timeoutInMilliseconds)a.m_options.timeoutInMilliseconds=6e4;if(!a.m_options.height)a.m_options.height="400px";if(!a.m_options.width)a.m_options.width="100%";if(!(a.m_options.webApplication&&a.m_options.webApplication.accessToken&&a.m_options.webApplication.accessTokenTtl))a.m_options.webApplication=null;return a}c.prototype._getIFrameSrc=function(){var e=window.location.protocol+"//"+window.location.host,b=u.embeddingPageOrigin+"="+encodeURIComponent(e)+"&"+u.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),d=false;if(this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)d=true;var a=document.createElement("a");a.href=this.m_url;if(this.m_options.webApplication){var c=u.embeddingPageOrigin+"="+e+"&"+u.embeddingPageSessionInfo+"="+this.m_options.sessionKey;if(a.search.length===0||a.search==="?")a.search="?"+u.sessionContext+"="+encodeURIComponent(c);else a.search=a.search+"&"+u.sessionContext+"="+encodeURIComponent(c)}else if(d)if(a.hash.length===0||a.hash==="#")a.hash="#"+b;else a.hash=a.hash+"&"+b;else if(a.search.length===0||a.search==="?")a.search="?"+b;else a.search=a.search+"&"+b;var f=a.href;return f};c.prototype.init=function(){var c=this;window.addEventListener("message",this.m_onMessageHandler);var d=this._getIFrameSrc();return a.createPromise(function(k,l){var e=document.createElement("iframe");if(c.m_options.id){e.id=c.m_options.id;e.name=c.m_options.id}e.style.height=c.m_options.height;e.style.width=c.m_options.width;if(!c.m_options.webApplication){e.src=d;c.m_options.container.appendChild(e)}else{var g=document.createElement("form");g.setAttribute("action",d);g.setAttribute("method","post");g.setAttribute("target",e.name);c.m_options.container.appendChild(g);var j=document.createElement("input");j.setAttribute("type","hidden");j.setAttribute("name","access_token");j.setAttribute("value",c.m_options.webApplication.accessToken);g.appendChild(j);var h=document.createElement("input");h.setAttribute("type","hidden");h.setAttribute("name","access_token_ttl");h.setAttribute("value",c.m_options.webApplication.accessTokenTtl);g.appendChild(h);c.m_options.container.appendChild(e);g.submit()}c.m_timeoutId=window.setTimeout(function(){c.close();var d=b.createRuntimeError(f.timeout,a._getResourceString(i.timeout),"EmbeddedSession.init");l(d)},c.m_options.timeoutInMilliseconds);c.m_promiseResolver=k})};c.prototype._invoke=function(c,b,a){if(!this.m_enabled){b(5001,null);return}if(C.invokeRequestModifier)a=C.invokeRequestModifier(a);this._sendMessageWithCallback(this.m_id++,c,a,function(a){if(C.invokeResponseModifier)a=C.invokeResponseModifier(a);var c=a.Error;delete a.Error;b(c||0,a)})};c.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=false};Object.defineProperty(c.prototype,"eventRegistration",{"get":function(){if(!this.m_sessionEventManager)this.m_sessionEventManager=new I(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));return this.m_sessionEventManager},enumerable:true,configurable:true});c.prototype._createRequestExecutorOrNull=function(){return new V(this)};c.prototype._resolveRequestUrlAndHeaderInfo=function(){return a._createPromiseFromResult(null)};c.prototype._registerEventImpl=function(d,c){var b=this;return a.createPromise(function(a,e){b._sendMessageWithCallback(b.m_id++,h.RegisterEventCommand,{EventId:d,TargetId:c},function(){a(null)})})};c.prototype._unregisterEventImpl=function(d,c){var b=this;return a.createPromise(function(a,e){b._sendMessageWithCallback(b.m_id++,h.UnregisterEventCommand,{EventId:d,TargetId:c},function(){a()})})};c.prototype._onMessage=function(b){var c=this;if(!this.m_enabled)return;if(this.m_chosenWindow&&(this.m_chosenWindow!==b.source||this.m_chosenOrigin!==b.origin))return;var a=b.data;if(a&&a[h.CommandKey]===h.ApiReadyCommand){if(!this.m_chosenWindow&&this._isValidDescendant(b.source)&&a[h.SessionInfoKey]===this.m_options.sessionKey){this.m_chosenWindow=b.source;this.m_chosenOrigin=b.origin;this._sendMessageWithCallback(this.m_id++,h.GetAppContextCommand,null,function(a){c._setupContext(a);window.clearTimeout(c.m_timeoutId);c.m_promiseResolver()})}return}if(a&&a[h.CommandKey]===h.FireEventCommand){var d=a[h.ParamsKey],k=d.EventId,j=d.TargetId,l=d.Data;if(this.m_sessionEventManager)for(var g=this.m_sessionEventManager.getHandlers(k,j),e=0;e<g.length;e++)g[e](l);return}if(a&&a.hasOwnProperty(h.RespondingId)){var i=a[h.RespondingId],f=this.m_callbackList[i];typeof f==="function"&&f(a[h.ParamsKey]);delete this.m_callbackList[i]}};c.prototype._sendMessageWithCallback=function(b,d,e,c){this.m_callbackList[b]=c;var a={};a[h.SendingId]=b;a[h.CommandKey]=d;a[h.ParamsKey]=e;this.m_chosenWindow.postMessage(JSON.stringify(a),this.m_chosenOrigin)};c.prototype._isValidDescendant=function(f){var d=this.m_options.container||document.body;function b(a){if(a===f)return true;for(var c=0,d=a.frames.length;c<d;c++)if(b(a.frames[c]))return true;return false}for(var c=d.getElementsByTagName("iframe"),a=0,e=c.length;a<e;a++)if(b(c[a].contentWindow))return true;return false};c.prototype._setupContext=function(a){if(!(this.m_appContext=a))return};return c}(s);c.EmbeddedSession=bb;var V=function(){function b(a){this.m_session=a}b.prototype.executeAsync=function(f,e,d){var g=this,c=k.buildMessageArrayForIRequestExecutor(f,e,d,b.SourceLibHeaderValue);return a.createPromise(function(d,e){g.m_session._invoke(h.ExecuteMethodCommand,function(e,b){a.log("Response:");a.log(JSON.stringify(b));var c;if(e==0)c=k.buildResponseOnSuccess(k.getResponseBodyFromSafeArray(b.Data),k.getResponseHeadersFromSafeArray(b.Data));else c=k.buildResponseOnError(b.error.Code,b.error.Message);d(c)},b._transformMessageArrayIntoParams(c))})};b._transformMessageArrayIntoParams=function(a){return{ArrayData:a,DdaMethod:{DispatchId:b.DispidExecuteRichApiRequestMethod}}};b.DispidExecuteRichApiRequestMethod=93;b.SourceLibHeaderValue="Embedded";return b}()})(OfficeExtension||(OfficeExtension={}));var __extends=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(c,a){for(var b in a)if(a.hasOwnProperty(b))c[b]=a[b]};return function(c,b){a(c,b);function d(){this.constructor=c}c.prototype=b===null?Object.create(b):(d.prototype=b.prototype,new d)}}(),OfficeCore;(function(b){var x="OfficeCore",r="AgaveVisualApi",o=OfficeExtension.BatchApiHelper.createPropertyObject,q=OfficeExtension.BatchApiHelper.createMethodObject,p=OfficeExtension.BatchApiHelper.createIndexerObject,k=OfficeExtension.BatchApiHelper.createRootServiceObject,c=OfficeExtension.BatchApiHelper.createTopLevelServiceObject,m=OfficeExtension.BatchApiHelper.createChildItemObject,a=OfficeExtension.BatchApiHelper.invokeMethod,n=OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,s=OfficeExtension.BatchApiHelper.invokeSetProperty,g=OfficeExtension.Utility.isNullOrUndefined,v=OfficeExtension.Utility.isUndefined,u=OfficeExtension.Utility.throwIfNotLoaded,l=OfficeExtension.Utility.throwIfApiNotSupported,z=OfficeExtension.Utility.load,y=OfficeExtension.Utility.retrieve,h=OfficeExtension.Utility.toJson,d=OfficeExtension.Utility.fixObjectPathIfNecessary,j=OfficeExtension.Utility._handleNavigationPropertyResults,t=OfficeExtension.Utility.adjustToDateTime,e=OfficeExtension.Utility.processRetrieveResult,w="BiShim",i=function(i){__extends(f,i);function f(){return i!==null&&i.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"BiShim"},enumerable:true,configurable:true});f.prototype.initialize=function(b){a(this,"Initialize",0,[b],0,0)};f.prototype.getData=function(){return a(this,"getData",1,[],4,0)};f.prototype.setVisualObjects=function(b){a(this,"setVisualObjects",0,[b],2,0)};f.prototype.setVisualObjectsToPersist=function(b){a(this,"setVisualObjectsToPersist",0,[b],2,0)};f.prototype._handleResult=function(a){i.prototype._handleResult.call(this,a);if(g(a))return;var b=a;d(this,b)};f.prototype._handleRetrieveResult=function(b,a){i.prototype._handleRetrieveResult.call(this,b,a);e(this,b,a)};f.newObject=function(a){return c(b.BiShim,a,"Microsoft.AgaveVisual.BiShim",false,4)};f.prototype.toJSON=function(){return h(this,{},{})};return f}(OfficeExtension.ClientObject);b.BiShim=i;var f;(function(a){a.generalException="GeneralException"})(f=b.AgaveVisualErrorCodes||(b.AgaveVisualErrorCodes={}))})(OfficeCore||(OfficeCore={}));var OfficeCore;(function(a){var C="OfficeCore",z="ExperimentApi",w=OfficeExtension.BatchApiHelper.createPropertyObject,e=OfficeExtension.BatchApiHelper.createMethodObject,y=OfficeExtension.BatchApiHelper.createIndexerObject,t=OfficeExtension.BatchApiHelper.createRootServiceObject,h=OfficeExtension.BatchApiHelper.createTopLevelServiceObject,v=OfficeExtension.BatchApiHelper.createChildItemObject,b=OfficeExtension.BatchApiHelper.invokeMethod,i=OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,A=OfficeExtension.BatchApiHelper.invokeSetProperty,f=OfficeExtension.Utility.isNullOrUndefined,m=OfficeExtension.Utility.isUndefined,k=OfficeExtension.Utility.throwIfNotLoaded,u=OfficeExtension.Utility.throwIfApiNotSupported,r=OfficeExtension.Utility.load,p=OfficeExtension.Utility.retrieve,g=OfficeExtension.Utility.toJson,c=OfficeExtension.Utility.fixObjectPathIfNecessary,s=OfficeExtension.Utility._handleNavigationPropertyResults,B=OfficeExtension.Utility.adjustToDateTime,d=OfficeExtension.Utility.processRetrieveResult,x="FlightingService",l=function(j){__extends(i,j);function i(){return j!==null&&j.apply(this,arguments)||this}Object.defineProperty(i.prototype,"_className",{"get":function(){return"FlightingService"},enumerable:true,configurable:true});i.prototype.getClientSessionId=function(){return b(this,"GetClientSessionId",1,[],4,0)};i.prototype.getDeferredFlights=function(){return b(this,"GetDeferredFlights",1,[],4,0)};i.prototype.getFeature=function(d,f,c,b){return e(a.ABType,this,"GetFeature",1,[d,f,c,b],false,false,null,4)};i.prototype.getFeatureGate=function(b,c){return e(a.ABType,this,"GetFeatureGate",1,[b,c],false,false,null,4)};i.prototype.resetOverride=function(a){b(this,"ResetOverride",0,[a],0,0)};i.prototype.setOverride=function(a,d,c){b(this,"SetOverride",0,[a,d,c],0,0)};i.prototype._handleResult=function(a){j.prototype._handleResult.call(this,a);if(f(a))return;var b=a;c(this,b)};i.prototype._handleRetrieveResult=function(b,a){j.prototype._handleRetrieveResult.call(this,b,a);d(this,b,a)};i.newObject=function(b){return h(a.FlightingService,b,"Microsoft.Experiment.FlightingService",false,4)};i.prototype.toJSON=function(){return g(this,{},{})};return i}(OfficeExtension.ClientObject);a.FlightingService=l;var o="ABType",q=function(b){__extends(a,b);function a(){return b!==null&&b.apply(this,arguments)||this}Object.defineProperty(a.prototype,"_className",{"get":function(){return"ABType"},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"_scalarPropertyNames",{"get":function(){return["value"]},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"value",{"get":function(){k("value",this._V,o,this._isNull);return this._V},enumerable:true,configurable:true});a.prototype._handleResult=function(a){b.prototype._handleResult.call(this,a);if(f(a))return;var d=a;c(this,d);if(!m(d.Value))this._V=d.Value};a.prototype.load=function(a){return r(this,a)};a.prototype.retrieve=function(a){return p(this,a)};a.prototype._handleRetrieveResult=function(c,a){b.prototype._handleRetrieveResult.call(this,c,a);d(this,c,a)};a.prototype.toJSON=function(){return g(this,{value:this._V},{})};a.prototype.ensureUnchanged=function(a){i(this,a);return};return a}(OfficeExtension.ClientObject);a.ABType=q;var n;(function(a){a["boolean"]="Boolean";a.integer="Integer";a.string="String"})(n=a.FeatureType||(a.FeatureType={}));var j;(function(a){a.generalException="GeneralException"})(j=a.ExperimentErrorCodes||(a.ExperimentErrorCodes={}))})(OfficeCore||(OfficeCore={}));var OfficeCore;(function(a){a.OfficeOnlineDomainList=["*.dod.online.office365.us","*.gov.online.office365.us","*.officeapps-df.live.com","*.officeapps.live.com","*.online.office.de","*.partner.officewebapps.cn"];function b(){if(typeof window.external==="undefined"||typeof window.external.GetContext==="undefined"){var d=OSF.getClientEndPoint()._targetUrl,b=c(d);if(d.indexOf("https:")!=0)return false;a.OfficeOnlineDomainList.forEach(function(a){if(a.indexOf("*.")==0)a=a.substring(2);if(b.indexOf(a)==b.length-a.length)return true});return false}return true}a.isHostOriginTrusted=b;function c(b){var a="";a=b.split("/")[2];a=a.split(":")[0];a=a.split("?")[0];return a}})(OfficeCore||(OfficeCore={}));var OfficeCore;(function(a){var b=function(){function b(a){this.context=a}Object.defineProperty(b.prototype,"roamingSettings",{"get":function(){if(!this.m_roamingSettings)this.m_roamingSettings=a.AuthenticationService.newObject(this.context).roamingSettings;return this.m_roamingSettings},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"tap",{"get":function(){if(!this.m_tap)this.m_tap=a.Tap.newObject(this.context);return this.m_tap},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"skill",{"get":function(){if(!this.m_skill)this.m_skill=a.Skill.newObject(this.context);return this.m_skill},enumerable:true,configurable:true});return b}();a.FirstPartyApis=b;var c=function(d){__extends(c,d);function c(a){return d.call(this,a)||this}Object.defineProperty(c.prototype,"firstParty",{"get":function(){if(!this.m_firstPartyApis)this.m_firstPartyApis=new b(this);return this.m_firstPartyApis},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"flighting",{"get":function(){return this.flightingService},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"telemetry",{"get":function(){if(!this.m_telemetry)this.m_telemetry=a.TelemetryService.newObject(this);return this.m_telemetry},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"bi",{"get":function(){if(!this.m_biShim)this.m_biShim=a.BiShim.newObject(this);return this.m_biShim},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"flightingService",{"get":function(){if(!this.m_flightingService)this.m_flightingService=a.FlightingService.newObject(this);return this.m_flightingService},enumerable:true,configurable:true});return c}(OfficeExtension.ClientRequestContext);a.RequestContext=c;function d(b,c){return OfficeExtension.ClientRequestContext._runBatch("OfficeCore.run",arguments,function(b){return new a.RequestContext(b)})}a.run=d})(OfficeCore||(OfficeCore={}));var OfficeCore;(function(b){var x="Office",r="OfficeSharedApi",o=OfficeExtension.BatchApiHelper.createPropertyObject,q=OfficeExtension.BatchApiHelper.createMethodObject,p=OfficeExtension.BatchApiHelper.createIndexerObject,k=OfficeExtension.BatchApiHelper.createRootServiceObject,c=OfficeExtension.BatchApiHelper.createTopLevelServiceObject,m=OfficeExtension.BatchApiHelper.createChildItemObject,a=OfficeExtension.BatchApiHelper.invokeMethod,n=OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,s=OfficeExtension.BatchApiHelper.invokeSetProperty,f=OfficeExtension.Utility.isNullOrUndefined,v=OfficeExtension.Utility.isUndefined,u=OfficeExtension.Utility.throwIfNotLoaded,l=OfficeExtension.Utility.throwIfApiNotSupported,z=OfficeExtension.Utility.load,y=OfficeExtension.Utility.retrieve,h=OfficeExtension.Utility.toJson,d=OfficeExtension.Utility.fixObjectPathIfNecessary,j=OfficeExtension.Utility._handleNavigationPropertyResults,t=OfficeExtension.Utility.adjustToDateTime,e=OfficeExtension.Utility.processRetrieveResult,w="Skill",i=function(i){__extends(g,i);function g(){return i!==null&&i.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"Skill"},enumerable:true,configurable:true});g.prototype.executeAction=function(d,c,b){return a(this,"ExecuteAction",1,[d,c,b],4|1,0)};g.prototype.notifyPaneEvent=function(c,b){a(this,"NotifyPaneEvent",1,[c,b],4|1,0)};g.prototype.registerHostSkillEvent=function(){a(this,"RegisterHostSkillEvent",0,[],1,0)};g.prototype.testFireEvent=function(){a(this,"TestFireEvent",0,[],1,0)};g.prototype.unregisterHostSkillEvent=function(){a(this,"UnregisterHostSkillEvent",0,[],1,0)};g.prototype._handleResult=function(a){i.prototype._handleResult.call(this,a);if(f(a))return;var b=a;d(this,b)};g.prototype._handleRetrieveResult=function(b,a){i.prototype._handleRetrieveResult.call(this,b,a);e(this,b,a)};g.newObject=function(a){return c(b.Skill,a,"Microsoft.SkillApi.Skill",false,4)};Object.defineProperty(g.prototype,"onHostSkillEvent",{"get":function(){var a=this;if(!this.m_hostSkillEvent)this.m_hostSkillEvent=new OfficeExtension.GenericEventHandlers(this.context,this,"HostSkillEvent",{eventType:65538,registerFunc:function(){return a.registerHostSkillEvent()},unregisterFunc:function(){return a.unregisterHostSkillEvent()},getTargetIdFunc:function(){return null},eventArgsTransformFunc:function(a){var b={type:a.type,data:a.data};return OfficeExtension.Utility._createPromiseFromResult(b)}});return this.m_hostSkillEvent},enumerable:true,configurable:true});g.prototype.toJSON=function(){return h(this,{},{})};return g}(OfficeExtension.ClientObject);b.Skill=i;var g;(function(a){a.generalException="GeneralException"})(g=b.SkillErrorCodes||(b.SkillErrorCodes={}))})(OfficeCore||(OfficeCore={}));var OfficeCore;(function(a){var y="OfficeCore",t="TelemetryApi",p=OfficeExtension.BatchApiHelper.createPropertyObject,s=OfficeExtension.BatchApiHelper.createMethodObject,r=OfficeExtension.BatchApiHelper.createIndexerObject,l=OfficeExtension.BatchApiHelper.createRootServiceObject,b=OfficeExtension.BatchApiHelper.createTopLevelServiceObject,n=OfficeExtension.BatchApiHelper.createChildItemObject,i=OfficeExtension.BatchApiHelper.invokeMethod,o=OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,u=OfficeExtension.BatchApiHelper.invokeSetProperty,f=OfficeExtension.Utility.isNullOrUndefined,x=OfficeExtension.Utility.isUndefined,w=OfficeExtension.Utility.throwIfNotLoaded,m=OfficeExtension.Utility.throwIfApiNotSupported,A=OfficeExtension.Utility.load,z=OfficeExtension.Utility.retrieve,j=OfficeExtension.Utility.toJson,c=OfficeExtension.Utility.fixObjectPathIfNecessary,k=OfficeExtension.Utility._handleNavigationPropertyResults,v=OfficeExtension.Utility.adjustToDateTime,d=OfficeExtension.Utility.processRetrieveResult,q="TelemetryService",g=function(g){__extends(e,g);function e(){return g!==null&&g.apply(this,arguments)||this}Object.defineProperty(e.prototype,"_className",{"get":function(){return"TelemetryService"},enumerable:true,configurable:true});e.prototype.sendTelemetryEvent=function(a,d,b,c,e){i(this,"SendTelemetryEvent",1,[a,d,b,c,e],4,0)};e.prototype._handleResult=function(a){g.prototype._handleResult.call(this,a);if(f(a))return;var b=a;c(this,b)};e.prototype._handleRetrieveResult=function(b,a){g.prototype._handleRetrieveResult.call(this,b,a);d(this,b,a)};e.newObject=function(c){return b(a.TelemetryService,c,"Microsoft.Telemetry.TelemetryService",false,4)};e.prototype.toJSON=function(){return j(this,{},{})};return e}(OfficeExtension.ClientObject);a.TelemetryService=g;var h;(function(a){a.unset="Unset";a.string="String";a["boolean"]="Boolean";a.int64="Int64";a["double"]="Double"})(h=a.DataFieldType||(a.DataFieldType={}));var e;(function(a){a.generalException="GeneralException"})(e=a.TelemetryErrorCodes||(a.TelemetryErrorCodes={}))})(OfficeCore||(OfficeCore={}));var OfficeFirstPartyAuth;(function(a){function c(c){var a=new OfficeCore.RequestContext,b=OfficeCore.AuthenticationService.newObject(a);a._customData="WacPartition";if(OSF._OfficeAppFactory.getHostInfo().hostPlatform=="web"&&OSF._OfficeAppFactory.getHostInfo().hostType=="word"){var d=b.getAccessToken(c,null);return a.sync().then(function(){return d.value})}else return new OfficeExtension.CoreUtility.Promise(function(e,d){var f=b.onTokenReceived.add(function(b){if(!OfficeExtension.CoreUtility.isNullOrUndefined(b)){f.remove();a.sync()["catch"](function(){});if(b.code==0)e(b.tokenValue);else if(OfficeExtension.CoreUtility.isNullOrUndefined(b.errorInfo))d({code:b.code});else try{d(JSON.parse(b.errorInfo))}catch(c){d({code:b.code,message:b.errorInfo})}}return null});a.sync().then(function(){var d=b.getAccessToken(c,b._targetId);return a.sync().then(function(){if(OfficeExtension.CoreUtility.isNullOrUndefined(d.value))return null;var a=d.value.accessToken;!OfficeExtension.CoreUtility.isNullOrUndefined(a)&&e(d.value)})})["catch"](function(a){d(a)})})}a.getAccessToken=c;function b(){var a=new OfficeCore.RequestContext,c=OfficeCore.AuthenticationService.newObject(a);a._customData="WacPartition";var b=c.getPrimaryIdentityInfo();return a.sync().then(function(){return b.value})}a.getPrimaryIdentityInfo=b})(OfficeFirstPartyAuth||(OfficeFirstPartyAuth={}));var OfficeCore;(function(a){var v="Office",M="OfficeSharedApi",j=OfficeExtension.BatchApiHelper.createPropertyObject,k=OfficeExtension.BatchApiHelper.createMethodObject,z=OfficeExtension.BatchApiHelper.createIndexerObject,L=OfficeExtension.BatchApiHelper.createRootServiceObject,p=OfficeExtension.BatchApiHelper.createTopLevelServiceObject,r=OfficeExtension.BatchApiHelper.createChildItemObject,b=OfficeExtension.BatchApiHelper.invokeMethod,s=OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,n=OfficeExtension.BatchApiHelper.invokeSetProperty,d=OfficeExtension.Utility.isNullOrUndefined,c=OfficeExtension.Utility.isUndefined,e=OfficeExtension.Utility.throwIfNotLoaded,q=OfficeExtension.Utility.throwIfApiNotSupported,m=OfficeExtension.Utility.load,l=OfficeExtension.Utility.retrieve,i=OfficeExtension.Utility.toJson,g=OfficeExtension.Utility.fixObjectPathIfNecessary,o=OfficeExtension.Utility._handleNavigationPropertyResults,u=OfficeExtension.Utility.adjustToDateTime,h=OfficeExtension.Utility.processRetrieveResult,D;(function(a){a.organizationAccount="OrganizationAccount";a.microsoftAccount="MicrosoftAccount"})(D=a.IdentityType||(a.IdentityType={}));var K="AuthenticationService",y=function(e){__extends(c,e);function c(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(c.prototype,"_className",{"get":function(){return"AuthenticationService"},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"_navigationPropertyNames",{"get":function(){return["roamingSettings"]},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"_targetId",{"get":function(){if(this.m_targetId==undefined)if(typeof OSF!=="undefined"&&OSF.OUtil)this.m_targetId=OSF.OUtil.Guid.generateNewGuid();else this.m_targetId=""+this.context._nextId();return this.m_targetId},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"roamingSettings",{"get":function(){if(!this._R)this._R=j(a.RoamingSettingCollection,this,"RoamingSettings",false,4);return this._R},enumerable:true,configurable:true});c.prototype.getAccessToken=function(a,c){return b(this,"GetAccessToken",1,[a,c],4|1,0)};c.prototype.getPrimaryIdentityInfo=function(){q("AuthenticationService.getPrimaryIdentityInfo","FirstPartyAuthentication","1.2",v);return b(this,"GetPrimaryIdentityInfo",1,[],4|1,0)};c.prototype._handleResult=function(a){e.prototype._handleResult.call(this,a);if(d(a))return;var b=a;g(this,b);o(this,b,["roamingSettings","RoamingSettings"])};c.prototype.load=function(a){return m(this,a)};c.prototype.retrieve=function(a){return l(this,a)};c.prototype._handleRetrieveResult=function(b,a){e.prototype._handleRetrieveResult.call(this,b,a);h(this,b,a)};c.newObject=function(b){return p(a.AuthenticationService,b,"Microsoft.Authentication.AuthenticationService",false,4)};Object.defineProperty(c.prototype,"onTokenReceived",{"get":function(){var a=this;q("AuthenticationService.onTokenReceived","FirstPartyAuthentication","1.2",v);if(!this.m_tokenReceived)this.m_tokenReceived=new OfficeExtension.GenericEventHandlers(this.context,this,"TokenReceived",{eventType:3001,registerFunc:function(){},unregisterFunc:function(){},getTargetIdFunc:function(){return a._targetId},eventArgsTransformFunc:function(a){var b={tokenValue:a.tokenValue,code:a.code,errorInfo:a.errorInfo};return OfficeExtension.Utility._createPromiseFromResult(b)}});return this.m_tokenReceived},enumerable:true,configurable:true});c.prototype.toJSON=function(){return i(this,{},{})};return c}(OfficeExtension.ClientObject);a.AuthenticationService=y;var t="RoamingSetting",C=function(b){__extends(a,b);function a(){return b!==null&&b.apply(this,arguments)||this}Object.defineProperty(a.prototype,"_className",{"get":function(){return"RoamingSetting"},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"_scalarPropertyNames",{"get":function(){return["id","value"]},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"_scalarPropertyUpdateable",{"get":function(){return[false,true]},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"id",{"get":function(){e("id",this._I,t,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"value",{"get":function(){e("value",this._V,t,this._isNull);return this._V},"set":function(a){this._V=a;n(this,"Value",a,0)},enumerable:true,configurable:true});a.prototype.set=function(a,b){this._recursivelySet(a,b,["value"],[],[])};a.prototype.update=function(a){this._recursivelyUpdate(a)};a.prototype._handleResult=function(e){b.prototype._handleResult.call(this,e);if(d(e))return;var a=e;g(this,a);if(!c(a.Id))this._I=a.Id;if(!c(a.Value))this._V=a.Value};a.prototype.load=function(a){return m(this,a)};a.prototype.retrieve=function(a){return l(this,a)};a.prototype._handleIdResult=function(a){b.prototype._handleIdResult.call(this,a);if(d(a))return;if(!c(a.Id))this._I=a.Id};a.prototype._handleRetrieveResult=function(c,a){b.prototype._handleRetrieveResult.call(this,c,a);h(this,c,a)};a.prototype.toJSON=function(){return i(this,{id:this._I,value:this._V},{})};a.prototype.ensureUnchanged=function(a){s(this,a);return};return a}(OfficeExtension.ClientObject);a.RoamingSetting=C;var J="RoamingSettingCollection",w=function(c){__extends(b,c);function b(){return c!==null&&c.apply(this,arguments)||this}Object.defineProperty(b.prototype,"_className",{"get":function(){return"RoamingSettingCollection"},enumerable:true,configurable:true});b.prototype.getItem=function(b){return k(a.RoamingSetting,this,"GetItem",1,[b],false,false,null,4)};b.prototype.getItemOrNullObject=function(b){return k(a.RoamingSetting,this,"GetItemOrNullObject",1,[b],false,false,null,4)};b.prototype._handleResult=function(a){c.prototype._handleResult.call(this,a);if(d(a))return;var b=a;g(this,b)};b.prototype._handleRetrieveResult=function(b,a){c.prototype._handleRetrieveResult.call(this,b,a);h(this,b,a)};b.prototype.toJSON=function(){return i(this,{},{})};return b}(OfficeExtension.ClientObject);a.RoamingSettingCollection=w;var f="Comment",H=function(q){__extends(p,q);function p(){return q!==null&&q.apply(this,arguments)||this}Object.defineProperty(p.prototype,"_className",{"get":function(){return"Comment"},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"_scalarPropertyNames",{"get":function(){return["id","text","created","level","resolved","author","mentions"]},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"_scalarPropertyUpdateable",{"get":function(){return[false,true,false,false,true,false,false]},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"_navigationPropertyNames",{"get":function(){return["parent","parentOrNullObject","replies"]},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"parent",{"get":function(){if(!this._P)this._P=j(a.Comment,this,"Parent",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"parentOrNullObject",{"get":function(){if(!this._Pa)this._Pa=j(a.Comment,this,"ParentOrNullObject",false,4);return this._Pa},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"replies",{"get":function(){if(!this._R)this._R=j(a.CommentCollection,this,"Replies",true,4);return this._R},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"author",{"get":function(){e("author",this._A,f,this._isNull);return this._A},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"created",{"get":function(){e("created",this._C,f,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"id",{"get":function(){e("id",this._I,f,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"level",{"get":function(){e("level",this._L,f,this._isNull);return this._L},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"mentions",{"get":function(){e("mentions",this._M,f,this._isNull);return this._M},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"resolved",{"get":function(){e("resolved",this._Re,f,this._isNull);return this._Re},"set":function(a){this._Re=a;n(this,"Resolved",a,0)},enumerable:true,configurable:true});Object.defineProperty(p.prototype,"text",{"get":function(){e("text",this._T,f,this._isNull);return this._T},"set":function(a){this._T=a;n(this,"Text",a,0)},enumerable:true,configurable:true});p.prototype.set=function(a,b){this._recursivelySet(a,b,["text","resolved"],[],["parent","parentOrNullObject","replies"])};p.prototype.update=function(a){this._recursivelyUpdate(a)};p.prototype["delete"]=function(){b(this,"Delete",0,[],0,0)};p.prototype.getParentOrSelf=function(){return k(a.Comment,this,"GetParentOrSelf",1,[],false,false,null,4)};p.prototype.getRichText=function(a){return b(this,"GetRichText",1,[a],4,0)};p.prototype.reply=function(c,b){return k(a.Comment,this,"Reply",0,[c,b],false,false,null,0)};p.prototype.setRichText=function(c,a){return b(this,"SetRichText",0,[c,a],0,0)};p.prototype._handleResult=function(b){q.prototype._handleResult.call(this,b);if(d(b))return;var a=b;g(this,a);if(!c(a.Author))this._A=a.Author;if(!c(a.Created))this._C=u(a.Created);if(!c(a.Id))this._I=a.Id;if(!c(a.Level))this._L=a.Level;if(!c(a.Mentions))this._M=a.Mentions;if(!c(a.Resolved))this._Re=a.Resolved;if(!c(a.Text))this._T=a.Text;o(this,a,["parent","Parent","parentOrNullObject","ParentOrNullObject","replies","Replies"])};p.prototype.load=function(a){return m(this,a)};p.prototype.retrieve=function(a){return l(this,a)};p.prototype._handleIdResult=function(a){q.prototype._handleIdResult.call(this,a);if(d(a))return;if(!c(a.Id))this._I=a.Id};p.prototype._handleRetrieveResult=function(a,e){q.prototype._handleRetrieveResult.call(this,a,e);if(d(a))return;var b=a;if(!c(b.Created))b.created=u(b.created);h(this,a,e)};p.prototype.toJSON=function(){return i(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})};p.prototype.ensureUnchanged=function(a){s(this,a);return};return p}(OfficeExtension.ClientObject);a.Comment=H;var x="CommentCollection",A=function(f){__extends(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}Object.defineProperty(c.prototype,"_className",{"get":function(){return"CommentCollection"},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(c.prototype,"items",{"get":function(){e("items",this.m__items,x,this._isNull);return this.m__items},enumerable:true,configurable:true});c.prototype.getCount=function(){return b(this,"GetCount",1,[],4,0)};c.prototype.getItem=function(b){return z(a.Comment,this,[b])};c.prototype._handleResult=function(c){f.prototype._handleResult.call(this,c);if(d(c))return;var h=c;g(this,h);if(!d(h[OfficeExtension.Constants.items])){this.m__items=[];for(var e=h[OfficeExtension.Constants.items],b=0;b<e.length;b++){var i=r(a.Comment,true,this,e[b],b);i._handleResult(e[b]);this.m__items.push(i)}}};c.prototype.load=function(a){return m(this,a)};c.prototype.retrieve=function(a){return l(this,a)};c.prototype._handleRetrieveResult=function(c,b){var d=this;f.prototype._handleRetrieveResult.call(this,c,b);h(this,c,b,function(b,c){return r(a.Comment,true,d,b,c)})};c.prototype.toJSON=function(){return i(this,{},{},this.m__items)};return c}(OfficeExtension.ClientObject);a.CommentCollection=A;var B;(function(a){a.plain="Plain";a.markdown="Markdown";a.delta="Delta"})(B=a.CommentTextFormat||(a.CommentTextFormat={}));var N="Tap",I=function(e){__extends(c,e);function c(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(c.prototype,"_className",{"get":function(){return"Tap"},enumerable:true,configurable:true});c.prototype.getEnterpriseUserInfo=function(){return b(this,"GetEnterpriseUserInfo",1,[],4|1,0)};c.prototype.getMruFriendlyPath=function(a){return b(this,"GetMruFriendlyPath",1,[a],4|1,0)};c.prototype.launchFileUrlInOfficeApp=function(c,a){return b(this,"LaunchFileUrlInOfficeApp",1,[c,a],4|1,0)};c.prototype.performLocalSearch=function(e,d,a,c){return b(this,"PerformLocalSearch",1,[e,d,a,c],4|1,0)};c.prototype.readSearchCache=function(d,c,a){return b(this,"ReadSearchCache",1,[d,c,a],4|1,0)};c.prototype.writeSearchCache=function(c,d,a){return b(this,"WriteSearchCache",1,[c,d,a],4|1,0)};c.prototype._handleResult=function(a){e.prototype._handleResult.call(this,a);if(d(a))return;var b=a;g(this,b)};c.prototype._handleRetrieveResult=function(b,a){e.prototype._handleRetrieveResult.call(this,b,a);h(this,b,a)};c.newObject=function(b){return p(a.Tap,b,"Microsoft.TapRichApi.Tap",false,4)};c.prototype.toJSON=function(){return i(this,{},{})};return c}(OfficeExtension.ClientObject);a.Tap=I;var G;(function(a){a.unknown="Unknown";a.chart="Chart";a.smartArt="SmartArt";a.table="Table";a.image="Image";a.slide="Slide";a.ole="OLE";a.text="Text"})(G=a.ObjectType||(a.ObjectType={}));var E;(function(a){a.apiNotAvailable="ApiNotAvailable";a.clientError="ClientError";a.generalException="GeneralException";a.interactiveFlowAborted="InteractiveFlowAborted";a.invalidArgument="InvalidArgument";a.invalidGrant="InvalidGrant";a.invalidResourceUrl="InvalidResourceUrl";a.resourceNotSupported="ResourceNotSupported";a.serverError="ServerError";a.unsupportedUserIdentity="UnsupportedUserIdentity";a.userNotSignedIn="UserNotSignedIn"})(E=a.ErrorCodes||(a.ErrorCodes={}));var F;(function(a){})(F=a.Interfaces||(a.Interfaces={}))})(OfficeCore||(OfficeCore={}));var __extends=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(c,a){for(var b in a)if(a.hasOwnProperty(b))c[b]=a[b]};return function(c,b){a(c,b);function d(){this.constructor=c}c.prototype=b===null?Object.create(b):(d.prototype=b.prototype,new d)}}(),OneNote;(function(a){var r="OneNote",q="OneNoteApi",f=OfficeExtension.BatchApiHelper.createPropertyObject,g=OfficeExtension.BatchApiHelper.createMethodObject,s=OfficeExtension.BatchApiHelper.createIndexerObject,tc=OfficeExtension.BatchApiHelper.createRootServiceObject,sc=OfficeExtension.BatchApiHelper.createTopLevelServiceObject,m=OfficeExtension.BatchApiHelper.createChildItemObject,d=OfficeExtension.BatchApiHelper.invokeMethod,n=OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,t=OfficeExtension.BatchApiHelper.invokeSetProperty,e=OfficeExtension.Utility.isNullOrUndefined,b=OfficeExtension.Utility.isUndefined,c=OfficeExtension.Utility.throwIfNotLoaded,p=OfficeExtension.Utility.throwIfApiNotSupported,l=OfficeExtension.Utility.load,j=OfficeExtension.Utility.retrieve,k=OfficeExtension.Utility.toJson,h=OfficeExtension.Utility.fixObjectPathIfNecessary,o=OfficeExtension.Utility._handleNavigationPropertyResults,vc=OfficeExtension.Utility.adjustToDateTime,i=OfficeExtension.Utility.processRetrieveResult,Cb="Application",Ob=function(s){__extends(m,s);function m(){return s!==null&&s.apply(this,arguments)||this}Object.defineProperty(m.prototype,"_className",{"get":function(){return"Application"},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyNames",{"get":function(){return["_platform"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_navigationPropertyNames",{"get":function(){return["notebooks","noteTagManager"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"noteTagManager",{"get":function(){p("Application.noteTagManager",q,"1.3",r);if(!this._No)this._No=f(a.NoteTagManager,this,"NoteTagManager",false,4);return this._No},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"notebooks",{"get":function(){if(!this._N)this._N=f(a.NotebookCollection,this,"Notebooks",true,4);return this._N},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_platform",{"get":function(){c("_platform",this.__p,Cb,this._isNull);return this.__p},enumerable:true,configurable:true});m.prototype.getActiveNotebook=function(){return g(a.Notebook,this,"GetActiveNotebook",1,[],false,false,null,4)};m.prototype.getActiveNotebookOrNull=function(){return g(a.Notebook,this,"GetActiveNotebookOrNull",1,[],false,false,null,4)};m.prototype.getActiveOutline=function(){return g(a.Outline,this,"GetActiveOutline",1,[],false,false,null,4)};m.prototype.getActiveOutlineOrNull=function(){return g(a.Outline,this,"GetActiveOutlineOrNull",1,[],false,false,null,4)};m.prototype.getActivePage=function(){return g(a.Page,this,"GetActivePage",1,[],false,false,null,4)};m.prototype.getActivePageOrNull=function(){return g(a.Page,this,"GetActivePageOrNull",1,[],false,false,null,4)};m.prototype.getActiveParagraph=function(){return g(a.Paragraph,this,"GetActiveParagraph",1,[],false,false,null,4)};m.prototype.getActiveParagraphOrNull=function(){return g(a.Paragraph,this,"GetActiveParagraphOrNull",1,[],false,false,null,4)};m.prototype.getActiveSection=function(){return g(a.Section,this,"GetActiveSection",1,[],false,false,null,4)};m.prototype.getActiveSectionOrNull=function(){return g(a.Section,this,"GetActiveSectionOrNull",1,[],false,false,null,4)};m.prototype.getSelectedPages=function(){return g(a.PageCollection,this,"GetSelectedPages",1,[],true,false,null,4)};m.prototype.getWindowSize=function(){return d(this,"GetWindowSize",0,[],0,0)};m.prototype.insertHtmlAtCurrentPosition=function(a){d(this,"InsertHtmlAtCurrentPosition",0,[a],0,0)};m.prototype.isHighContrast=function(){p("Application.isHighContrast",q,"1.3",r);return d(this,"IsHighContrast",1,[],4,0)};m.prototype.isViewingDeletedNotes=function(){p("Application.isViewingDeletedNotes",q,"1.2",r);return d(this,"IsViewingDeletedNotes",1,[],4,0)};m.prototype.navigateToPage=function(a){d(this,"NavigateToPage",1,[a],4,0)};m.prototype.navigateToPageWithClientUrl=function(b){return g(a.Page,this,"NavigateToPageWithClientUrl",1,[b],false,false,null,4)};m.prototype._ClientLog=function(b,a,e,c){d(this,"_ClientLog",1,[b,a,e,c],4,0)};m.prototype._CreateNotebook=function(b,a){p("Application._CreateNotebook",q,"1.5",r);return d(this,"_CreateNotebook",1,[b,a],4,0)};m.prototype._EnableControl=function(a,b){d(this,"_EnableControl",0,[a,b],0,0)};m.prototype._EnterFullScreen=function(){d(this,"_EnterFullScreen",0,[],0,0)};m.prototype._ExitFullScreen=function(){d(this,"_ExitFullScreen",0,[],0,0)};m.prototype._FocusCanvas=function(){d(this,"_FocusCanvas",0,[],0,0)};m.prototype._GetAccountInfo=function(){return d(this,"_GetAccountInfo",1,[],4,0)};m.prototype._GetAccountInfoByType=function(a){return d(this,"_GetAccountInfoByType",1,[a],4,0)};m.prototype._GetAccountInfoCollection=function(){p("Application._GetAccountInfoCollection",q,"1.3",r);return d(this,"_GetAccountInfoCollection",1,[],4,0)};m.prototype._GetControlVisibility=function(a){return d(this,"_GetControlVisibility",1,[a],4,0)};m.prototype._GetLoggingInfo=function(){return d(this,"_GetLoggingInfo",1,[],4,0)};m.prototype._GetMathPaneContent=function(){return d(this,"_GetMathPaneContent",1,[],4,0)};m.prototype._GetNodeInternalProperties=function(a){p("Application._GetNodeInternalProperties",q,"1.3",r);return d(this,"_GetNodeInternalProperties",1,[a],4,0)};m.prototype._GetObjectByReferenceId=function(a){return d(this,"_GetObjectByReferenceId",1,[a],4,0)};m.prototype._GetObjectTypeNameByReferenceId=function(a){return d(this,"_GetObjectTypeNameByReferenceId",1,[a],4,0)};m.prototype._GetRoamingSetting=function(a,b){return d(this,"_GetRoamingSetting",0,[a,b],0,0)};m.prototype._GetServiceTokenByUrl=function(a){return d(this,"_GetServiceTokenByUrl",1,[a],4,0)};m.prototype._GetServiceTokenByUserEmail=function(c,a,b){p("Application._GetServiceTokenByUserEmail",q,"1.3",r);return d(this,"_GetServiceTokenByUserEmail",1,[c,a,b],4,0)};m.prototype._GetServiceTokens=function(a){return d(this,"_GetServiceTokens",1,[a],4,0)};m.prototype._GetServiceTokensExt=function(b,a){return d(this,"_GetServiceTokensExt",1,[b,a],4,0)};m.prototype._GetServiceUrl=function(a){return d(this,"_GetServiceUrl",1,[a],4,0)};m.prototype._IsAccountEdpManaged=function(a){p("Application._IsAccountEdpManaged",q,"1.3",r);return d(this,"_IsAccountEdpManaged",1,[a],4,0)};m.prototype._IsControlEnabled=function(a){return d(this,"_IsControlEnabled",1,[a],4,0)};m.prototype._RemoveAllReferences=function(){d(this,"_RemoveAllReferences",1,[],4,0)};m.prototype._RemoveReference=function(a){d(this,"_RemoveReference",1,[a],4,0)};m.prototype._SaveRoamingSetting=function(b,a){return d(this,"_SaveRoamingSetting",0,[b,a],0,0)};m.prototype._SendDataToLearningTools=function(b,a){return d(this,"_SendDataToLearningTools",0,[b,a],0,0)};m.prototype._SendDataToLearningToolsV2=function(b,a){return d(this,"_SendDataToLearningToolsV2",0,[b,a],0,0)};m.prototype._SetControlVisibility=function(a,b){d(this,"_SetControlVisibility",0,[a,b],0,0)};m.prototype._UploadToUserInfoService=function(b,a){d(this,"_UploadToUserInfoService",1,[b,a],4,0)};m.prototype._handleResult=function(c){s.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a._platform))this.__p=a._platform;o(this,a,["noteTagManager","NoteTagManager","notebooks","Notebooks"])};m.prototype.load=function(a){return l(this,a)};m.prototype.retrieve=function(a){return j(this,a)};m.prototype._handleRetrieveResult=function(b,a){s.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};m.prototype.toJSON=function(){return k(this,{},{notebooks:this._N,noteTagManager:this._No})};m.prototype.ensureUnchanged=function(a){n(this,a);return};return m}(OfficeExtension.ClientObject);a.Application=Ob;var eb="InkAnalysis",Qb=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"InkAnalysis"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["id","_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["paragraphs","page"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"page",{"get":function(){if(!this._P)this._P=f(a.Page,this,"Page",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"paragraphs",{"get":function(){if(!this._Pa)this._Pa=f(a.InkAnalysisParagraphCollection,this,"Paragraphs",true,4);return this._Pa},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,eb,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,eb,this._isNull);return this.__R},enumerable:true,configurable:true});g.prototype.set=function(a,b){this._recursivelySet(a,b,[],["page"],["paragraphs"])};g.prototype.update=function(a){this._recursivelyUpdate(a)};g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["page","Page","paragraphs","Paragraphs"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{id:this._I},{page:this._P,paragraphs:this._Pa})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.InkAnalysis=Qb;var bb="InkAnalysisParagraph",tb=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"InkAnalysisParagraph"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["id","_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["lines","inkAnalysis"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"inkAnalysis",{"get":function(){if(!this._In)this._In=f(a.InkAnalysis,this,"InkAnalysis",false,4);return this._In},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"lines",{"get":function(){if(!this._L)this._L=f(a.InkAnalysisLineCollection,this,"Lines",true,4);return this._L},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,bb,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,bb,this._isNull);return this.__R},enumerable:true,configurable:true});g.prototype.set=function(a,b){this._recursivelySet(a,b,[],["inkAnalysis"],["lines"])};g.prototype.update=function(a){this._recursivelyUpdate(a)};g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["inkAnalysis","InkAnalysis","lines","Lines"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{id:this._I},{inkAnalysis:this._In,lines:this._L})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.InkAnalysisParagraph=tb;var J="InkAnalysisParagraphCollection",lb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"InkAnalysisParagraphCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,J,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,J,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,J,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getItem=function(b){return s(a.InkAnalysisParagraph,this,[b])};f.prototype.getItemAt=function(b){return g(a.InkAnalysisParagraph,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.InkAnalysisParagraph,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.InkAnalysisParagraph,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.InkAnalysisParagraphCollection=lb;var cb="InkAnalysisLine",Db=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"InkAnalysisLine"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["id","_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["words","paragraph"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"paragraph",{"get":function(){if(!this._P)this._P=f(a.InkAnalysisParagraph,this,"Paragraph",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"words",{"get":function(){if(!this._W)this._W=f(a.InkAnalysisWordCollection,this,"Words",true,4);return this._W},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,cb,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,cb,this._isNull);return this.__R},enumerable:true,configurable:true});g.prototype.set=function(a,b){this._recursivelySet(a,b,[],["paragraph"],["words"])};g.prototype.update=function(a){this._recursivelyUpdate(a)};g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["paragraph","Paragraph","words","Words"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{id:this._I},{paragraph:this._P,words:this._W})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.InkAnalysisLine=Db;var K="InkAnalysisLineCollection",nb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"InkAnalysisLineCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,K,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,K,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,K,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getItem=function(b){return s(a.InkAnalysisLine,this,[b])};f.prototype.getItemAt=function(b){return g(a.InkAnalysisLine,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.InkAnalysisLine,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.InkAnalysisLine,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.InkAnalysisLineCollection=nb;var A="InkAnalysisWord",Eb=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"InkAnalysisWord"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["id","_ReferenceId","wordAlternates","strokePointers","languageId"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["line"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"line",{"get":function(){if(!this._Li)this._Li=f(a.InkAnalysisLine,this,"Line",false,4);return this._Li},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,A,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"languageId",{"get":function(){c("languageId",this._L,A,this._isNull);return this._L},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"strokePointers",{"get":function(){c("strokePointers",this._S,A,this._isNull);return this._S},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"wordAlternates",{"get":function(){c("wordAlternates",this._W,A,this._isNull);return this._W},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,A,this._isNull);return this.__R},enumerable:true,configurable:true});g.prototype.set=function(a,b){this._recursivelySet(a,b,[],["line"],[])};g.prototype.update=function(a){this._recursivelyUpdate(a)};g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a.LanguageId))this._L=a.LanguageId;if(!b(a.StrokePointers))this._S=a.StrokePointers;if(!b(a.WordAlternates))this._W=a.WordAlternates;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["line","Line"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{id:this._I,languageId:this._L,strokePointers:this._S,wordAlternates:this._W},{line:this._Li})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.InkAnalysisWord=Eb;var L="InkAnalysisWordCollection",ob=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"InkAnalysisWordCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,L,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,L,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,L,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getItem=function(b){return s(a.InkAnalysisWord,this,[b])};f.prototype.getItemAt=function(b){return g(a.InkAnalysisWord,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.InkAnalysisWord,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.InkAnalysisWord,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.InkAnalysisWordCollection=ob;var db="FloatingInk",Pb=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"FloatingInk"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["id","_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["inkStrokes","pageContent"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"inkStrokes",{"get":function(){if(!this._In)this._In=f(a.InkStrokeCollection,this,"InkStrokes",true,4);return this._In},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"pageContent",{"get":function(){if(!this._P)this._P=f(a.PageContent,this,"PageContent",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,db,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,db,this._isNull);return this.__R},enumerable:true,configurable:true});g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["inkStrokes","InkStrokes","pageContent","PageContent"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{id:this._I},{inkStrokes:this._In})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.FloatingInk=Pb;var fb="InkStroke",ac=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"InkStroke"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["id","_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["floatingInk"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"floatingInk",{"get":function(){if(!this._F)this._F=f(a.FloatingInk,this,"FloatingInk",false,4);return this._F},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,fb,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,fb,this._isNull);return this.__R},enumerable:true,configurable:true});g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["floatingInk","FloatingInk"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{id:this._I},{floatingInk:this._F})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.InkStroke=ac;var O="InkStrokeCollection",ub=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"InkStrokeCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,O,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,O,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,O,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getItem=function(b){return s(a.InkStroke,this,[b])};f.prototype.getItemAt=function(b){return g(a.InkStroke,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.InkStroke,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.InkStroke,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.InkStrokeCollection=ub;var I="InkWord",kc=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"InkWord"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["id","_ReferenceId","wordAlternates","languageId"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["paragraph"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"paragraph",{"get":function(){if(!this._P)this._P=f(a.Paragraph,this,"Paragraph",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,I,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"languageId",{"get":function(){c("languageId",this._L,I,this._isNull);return this._L},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"wordAlternates",{"get":function(){c("wordAlternates",this._W,I,this._isNull);return this._W},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,I,this._isNull);return this.__R},enumerable:true,configurable:true});g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a.LanguageId))this._L=a.LanguageId;if(!b(a.WordAlternates))this._W=a.WordAlternates;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["paragraph","Paragraph"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{id:this._I,languageId:this._L,wordAlternates:this._W},{})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.InkWord=kc;var T="InkWordCollection",zb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"InkWordCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,T,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,T,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,T,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getItem=function(b){return s(a.InkWord,this,[b])};f.prototype.getItemAt=function(b){return g(a.InkWord,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.InkWord,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.InkWord,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.InkWordCollection=zb;var x="Notebook",gc=function(s){__extends(m,s);function m(){return s!==null&&s.apply(this,arguments)||this}Object.defineProperty(m.prototype,"_className",{"get":function(){return"Notebook"},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyNames",{"get":function(){return["id","name","_ReferenceId","clientUrl","baseUrl","isVirtual"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_navigationPropertyNames",{"get":function(){return["sections","sectionGroups","accessibilityViolations"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"accessibilityViolations",{"get":function(){p("Notebook.accessibilityViolations",q,"1.2",r);if(!this._A)this._A=f(a.AccessibilityViolationsByEntityCollection,this,"AccessibilityViolations",true,4);return this._A},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"sectionGroups",{"get":function(){if(!this._S)this._S=f(a.SectionGroupCollection,this,"SectionGroups",true,4);return this._S},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"sections",{"get":function(){if(!this._Se)this._Se=f(a.SectionCollection,this,"Sections",true,4);return this._Se},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"baseUrl",{"get":function(){c("baseUrl",this._B,x,this._isNull);return this._B},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"clientUrl",{"get":function(){c("clientUrl",this._C,x,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"id",{"get":function(){c("id",this._I,x,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"isVirtual",{"get":function(){c("isVirtual",this._Is,x,this._isNull);p("Notebook.isVirtual",q,"1.2",r);return this._Is},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"name",{"get":function(){c("name",this._N,x,this._isNull);return this._N},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,x,this._isNull);return this.__R},enumerable:true,configurable:true});m.prototype.addSection=function(b){return g(a.Section,this,"AddSection",0,[b],false,true,null,0)};m.prototype.addSectionGroup=function(b){return g(a.SectionGroup,this,"AddSectionGroup",0,[b],false,true,null,0)};m.prototype.canCopyDataFromAccount=function(a){p("Notebook.canCopyDataFromAccount",q,"1.3",r);return d(this,"CanCopyDataFromAccount",1,[a],4,0)};m.prototype.canCopyDataToAccount=function(a){p("Notebook.canCopyDataToAccount",q,"1.3",r);return d(this,"CanCopyDataToAccount",1,[a],4,0)};m.prototype.getRestApiId=function(){return d(this,"GetRestApiId",1,[],4,0)};m.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};m.prototype._Sync=function(){d(this,"_Sync",0,[],0,0)};m.prototype._handleResult=function(c){s.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.BaseUrl))this._B=a.BaseUrl;if(!b(a.ClientUrl))this._C=a.ClientUrl;if(!b(a.Id))this._I=a.Id;if(!b(a.IsVirtual))this._Is=a.IsVirtual;if(!b(a.Name))this._N=a.Name;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["accessibilityViolations","AccessibilityViolations","sectionGroups","SectionGroups","sections","Sections"])};m.prototype.load=function(a){return l(this,a)};m.prototype.retrieve=function(a){return j(this,a)};m.prototype._handleIdResult=function(a){s.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};m.prototype._handleRetrieveResult=function(b,a){s.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};m.prototype.track=function(){this.context.trackedObjects.add(this);return this};m.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};m.prototype.toJSON=function(){return k(this,{baseUrl:this._B,clientUrl:this._C,id:this._I,isVirtual:this._Is,name:this._N},{accessibilityViolations:this._A,sectionGroups:this._S,sections:this._Se})};m.prototype.ensureUnchanged=function(a){n(this,a);return};return m}(OfficeExtension.ClientObject);a.Notebook=gc;var R="NotebookCollection",xb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"NotebookCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,R,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,R,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,R,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getByName=function(b){return g(a.NotebookCollection,this,"GetByName",1,[b],true,false,null,4)};f.prototype.getItem=function(b){return s(a.Notebook,this,[b])};f.prototype.getItemAt=function(b){return g(a.Notebook,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.Notebook,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.Notebook,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.NotebookCollection=xb;var F="SectionGroup",Mb=function(p){__extends(m,p);function m(){return p!==null&&p.apply(this,arguments)||this}Object.defineProperty(m.prototype,"_className",{"get":function(){return"SectionGroup"},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyNames",{"get":function(){return["id","name","_ReferenceId","clientUrl"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_navigationPropertyNames",{"get":function(){return["notebook","parentSectionGroup","parentSectionGroupOrNull","sections","sectionGroups"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"notebook",{"get":function(){if(!this._No)this._No=f(a.Notebook,this,"Notebook",false,4);return this._No},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"parentSectionGroup",{"get":function(){if(!this._P)this._P=f(a.SectionGroup,this,"ParentSectionGroup",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"parentSectionGroupOrNull",{"get":function(){if(!this._Pa)this._Pa=f(a.SectionGroup,this,"ParentSectionGroupOrNull",false,4);return this._Pa},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"sectionGroups",{"get":function(){if(!this._S)this._S=f(a.SectionGroupCollection,this,"SectionGroups",true,4);return this._S},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"sections",{"get":function(){if(!this._Se)this._Se=f(a.SectionCollection,this,"Sections",true,4);return this._Se},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"clientUrl",{"get":function(){c("clientUrl",this._C,F,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"id",{"get":function(){c("id",this._I,F,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"name",{"get":function(){c("name",this._N,F,this._isNull);return this._N},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,F,this._isNull);return this.__R},enumerable:true,configurable:true});m.prototype.addSection=function(b){return g(a.Section,this,"AddSection",0,[b],false,true,null,0)};m.prototype.addSectionGroup=function(b){return g(a.SectionGroup,this,"AddSectionGroup",0,[b],false,true,null,0)};m.prototype.getRestApiId=function(){return d(this,"GetRestApiId",1,[],4,0)};m.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};m.prototype._handleResult=function(c){p.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.ClientUrl))this._C=a.ClientUrl;if(!b(a.Id))this._I=a.Id;if(!b(a.Name))this._N=a.Name;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["notebook","Notebook","parentSectionGroup","ParentSectionGroup","parentSectionGroupOrNull","ParentSectionGroupOrNull","sectionGroups","SectionGroups","sections","Sections"])};m.prototype.load=function(a){return l(this,a)};m.prototype.retrieve=function(a){return j(this,a)};m.prototype._handleIdResult=function(a){p.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};m.prototype._handleRetrieveResult=function(b,a){p.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};m.prototype.track=function(){this.context.trackedObjects.add(this);return this};m.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};m.prototype.toJSON=function(){return k(this,{clientUrl:this._C,id:this._I,name:this._N},{sectionGroups:this._S,sections:this._Se})};m.prototype.ensureUnchanged=function(a){n(this,a);return};return m}(OfficeExtension.ClientObject);a.SectionGroup=Mb;var M="SectionGroupCollection",qb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"SectionGroupCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,M,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,M,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,M,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getByName=function(b){return g(a.SectionGroupCollection,this,"GetByName",1,[b],true,false,null,4)};f.prototype.getItem=function(b){return s(a.SectionGroup,this,[b])};f.prototype.getItemAt=function(b){return g(a.SectionGroup,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.SectionGroup,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.SectionGroup,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.SectionGroupCollection=qb;var u="Section",nc=function(s){__extends(m,s);function m(){return s!==null&&s.apply(this,arguments)||this}Object.defineProperty(m.prototype,"_className",{"get":function(){return"Section"},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyNames",{"get":function(){return["id","name","_ReferenceId","clientUrl","webUrl","isEncrypted","isLocked"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_navigationPropertyNames",{"get":function(){return["notebook","parentSectionGroup","parentSectionGroupOrNull","pages"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"notebook",{"get":function(){if(!this._No)this._No=f(a.Notebook,this,"Notebook",false,4);return this._No},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"pages",{"get":function(){if(!this._P)this._P=f(a.PageCollection,this,"Pages",true,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"parentSectionGroup",{"get":function(){if(!this._Pa)this._Pa=f(a.SectionGroup,this,"ParentSectionGroup",false,4);return this._Pa},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"parentSectionGroupOrNull",{"get":function(){if(!this._Par)this._Par=f(a.SectionGroup,this,"ParentSectionGroupOrNull",false,4);return this._Par},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"clientUrl",{"get":function(){c("clientUrl",this._C,u,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"id",{"get":function(){c("id",this._I,u,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"isEncrypted",{"get":function(){c("isEncrypted",this._Is,u,this._isNull);p("Section.isEncrypted",q,"1.2",r);return this._Is},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"isLocked",{"get":function(){c("isLocked",this._IsL,u,this._isNull);p("Section.isLocked",q,"1.2",r);return this._IsL},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"name",{"get":function(){c("name",this._N,u,this._isNull);return this._N},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"webUrl",{"get":function(){c("webUrl",this._W,u,this._isNull);return this._W},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,u,this._isNull);return this.__R},enumerable:true,configurable:true});m.prototype.addPage=function(b){return g(a.Page,this,"AddPage",0,[b],false,true,null,0)};m.prototype.copyToNotebook=function(b){return g(a.Section,this,"CopyToNotebook",0,[b],false,true,null,0)};m.prototype.copyToSectionGroup=function(b){return g(a.Section,this,"CopyToSectionGroup",0,[b],false,true,null,0)};m.prototype.getRestApiId=function(){return d(this,"GetRestApiId",1,[],4,0)};m.prototype.insertSectionAsSibling=function(b,c){return g(a.Section,this,"InsertSectionAsSibling",0,[b,c],false,true,null,0)};m.prototype._GetGeoInfo=function(){return d(this,"_GetGeoInfo",1,[],4,0)};m.prototype._GetGeoInfoAsync=function(){return d(this,"_GetGeoInfoAsync",1,[],4,0)};m.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};m.prototype._handleResult=function(c){s.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.ClientUrl))this._C=a.ClientUrl;if(!b(a.Id))this._I=a.Id;if(!b(a.IsEncrypted))this._Is=a.IsEncrypted;if(!b(a.IsLocked))this._IsL=a.IsLocked;if(!b(a.Name))this._N=a.Name;if(!b(a.WebUrl))this._W=a.WebUrl;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["notebook","Notebook","pages","Pages","parentSectionGroup","ParentSectionGroup","parentSectionGroupOrNull","ParentSectionGroupOrNull"])};m.prototype.load=function(a){return l(this,a)};m.prototype.retrieve=function(a){return j(this,a)};m.prototype._handleIdResult=function(a){s.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};m.prototype._handleRetrieveResult=function(b,a){s.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};m.prototype.track=function(){this.context.trackedObjects.add(this);return this};m.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};m.prototype.toJSON=function(){return k(this,{clientUrl:this._C,id:this._I,isEncrypted:this._Is,isLocked:this._IsL,name:this._N,webUrl:this._W},{pages:this._P})};m.prototype.ensureUnchanged=function(a){n(this,a);return};return m}(OfficeExtension.ClientObject);a.Section=nc;var V="SectionCollection",Bb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"SectionCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,V,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,V,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,V,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getByName=function(b){return g(a.SectionCollection,this,"GetByName",1,[b],true,false,null,4)};f.prototype.getItem=function(b){return s(a.Section,this,[b])};f.prototype.getItemAt=function(b){return g(a.Section,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.Section,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.Section,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.SectionCollection=Bb;var w="Page",rc=function(s){__extends(m,s);function m(){return s!==null&&s.apply(this,arguments)||this}Object.defineProperty(m.prototype,"_className",{"get":function(){return"Page"},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyNames",{"get":function(){return["id","title","pageLevel","_ReferenceId","clientUrl","webUrl","classNotebookPageSource"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyUpdateable",{"get":function(){return[false,true,true,false,false,false,false]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_navigationPropertyNames",{"get":function(){return["parentSection","contents","inkAnalysisOrNull","accessibilityViolations"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"accessibilityViolations",{"get":function(){p("Page.accessibilityViolations",q,"1.2",r);if(!this._A)this._A=f(a.AccessibilityViolationCollection,this,"AccessibilityViolations",true,4);return this._A},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"contents",{"get":function(){if(!this._Co)this._Co=f(a.PageContentCollection,this,"Contents",true,4);return this._Co},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"inkAnalysisOrNull",{"get":function(){if(!this._In)this._In=f(a.InkAnalysis,this,"InkAnalysisOrNull",false,4);return this._In},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"parentSection",{"get":function(){if(!this._Pa)this._Pa=f(a.Section,this,"ParentSection",false,4);return this._Pa},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"classNotebookPageSource",{"get":function(){c("classNotebookPageSource",this._C,w,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"clientUrl",{"get":function(){c("clientUrl",this._Cl,w,this._isNull);return this._Cl},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"id",{"get":function(){c("id",this._I,w,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"pageLevel",{"get":function(){c("pageLevel",this._P,w,this._isNull);return this._P},"set":function(a){this._P=a;t(this,"PageLevel",a,0)},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"title",{"get":function(){c("title",this._T,w,this._isNull);return this._T},"set":function(a){this._T=a;t(this,"Title",a,0)},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"webUrl",{"get":function(){c("webUrl",this._W,w,this._isNull);return this._W},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,w,this._isNull);return this.__R},enumerable:true,configurable:true});m.prototype.set=function(a,b){this._recursivelySet(a,b,["title","pageLevel"],["inkAnalysisOrNull"],["accessibilityViolations","contents","parentSection"])};m.prototype.update=function(a){this._recursivelyUpdate(a)};m.prototype.addOutline=function(c,d,b){return g(a.Outline,this,"AddOutline",0,[c,d,b],false,true,null,0)};m.prototype.analyzePage=function(){return d(this,"AnalyzePage",1,[],4,0)};m.prototype.applyTranslation=function(a){d(this,"ApplyTranslation",0,[a],0,0)};m.prototype.copyToSection=function(b){return g(a.Page,this,"CopyToSection",0,[b],false,true,null,0)};m.prototype.copyToSectionAndSetClassNotebookPageSource=function(b){return g(a.Page,this,"CopyToSectionAndSetClassNotebookPageSource",0,[b],false,true,null,0)};m.prototype.getRestApiId=function(){return d(this,"GetRestApiId",1,[],4,0)};m.prototype.hasTitleContent=function(){return d(this,"HasTitleContent",1,[],4,0)};m.prototype.insertPageAsSibling=function(b,c){return g(a.Page,this,"InsertPageAsSibling",0,[b,c],false,true,null,0)};m.prototype._GetInternalHierarchy=function(){p("Page._GetInternalHierarchy",q,"1.3",r);return d(this,"_GetInternalHierarchy",1,[],4,0)};m.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};m.prototype._Sync=function(){d(this,"_Sync",0,[],0,0)};m.prototype._handleResult=function(c){s.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.ClassNotebookPageSource))this._C=a.ClassNotebookPageSource;if(!b(a.ClientUrl))this._Cl=a.ClientUrl;if(!b(a.Id))this._I=a.Id;if(!b(a.PageLevel))this._P=a.PageLevel;if(!b(a.Title))this._T=a.Title;if(!b(a.WebUrl))this._W=a.WebUrl;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["accessibilityViolations","AccessibilityViolations","contents","Contents","inkAnalysisOrNull","InkAnalysisOrNull","parentSection","ParentSection"])};m.prototype.load=function(a){return l(this,a)};m.prototype.retrieve=function(a){return j(this,a)};m.prototype._handleIdResult=function(a){s.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};m.prototype._handleRetrieveResult=function(b,a){s.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};m.prototype.track=function(){this.context.trackedObjects.add(this);return this};m.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};m.prototype.toJSON=function(){return k(this,{classNotebookPageSource:this._C,clientUrl:this._Cl,id:this._I,pageLevel:this._P,title:this._T,webUrl:this._W},{accessibilityViolations:this._A,contents:this._Co,inkAnalysisOrNull:this._In})};m.prototype.ensureUnchanged=function(a){n(this,a);return};return m}(OfficeExtension.ClientObject);a.Page=rc;var W="PageCollection",Jb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"PageCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,W,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,W,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,W,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getByTitle=function(b){return g(a.PageCollection,this,"GetByTitle",1,[b],true,false,null,4)};f.prototype.getItem=function(b){return s(a.Page,this,[b])};f.prototype.getItemAt=function(b){return g(a.Page,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.Page,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.Page,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.PageCollection=Jb;var B="PageContent",Sb=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"PageContent"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["id","type","_ReferenceId","left","top"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyUpdateable",{"get":function(){return[false,false,false,true,true]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["parentPage","image","outline","ink"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"image",{"get":function(){if(!this._Im)this._Im=f(a.Image,this,"Image",false,4);return this._Im},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"ink",{"get":function(){if(!this._In)this._In=f(a.FloatingInk,this,"Ink",false,4);return this._In},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"outline",{"get":function(){if(!this._O)this._O=f(a.Outline,this,"Outline",false,4);return this._O},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"parentPage",{"get":function(){if(!this._P)this._P=f(a.Page,this,"ParentPage",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,B,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"left",{"get":function(){c("left",this._L,B,this._isNull);return this._L},"set":function(a){this._L=a;t(this,"Left",a,0)},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"top",{"get":function(){c("top",this._T,B,this._isNull);return this._T},"set":function(a){this._T=a;t(this,"Top",a,0)},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"type",{"get":function(){c("type",this._Ty,B,this._isNull);return this._Ty},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,B,this._isNull);return this.__R},enumerable:true,configurable:true});g.prototype.set=function(a,b){this._recursivelySet(a,b,["left","top"],["image"],["ink","outline","parentPage"])};g.prototype.update=function(a){this._recursivelyUpdate(a)};g.prototype["delete"]=function(){d(this,"Delete",0,[],0,0)};g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a.Left))this._L=a.Left;if(!b(a.Top))this._T=a.Top;if(!b(a.Type))this._Ty=a.Type;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["image","Image","ink","Ink","outline","Outline","parentPage","ParentPage"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{id:this._I,left:this._L,top:this._T,type:this._Ty},{image:this._Im,ink:this._In,outline:this._O})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.PageContent=Sb;var N="PageContentCollection",rb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"PageContentCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,N,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,N,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,N,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getItem=function(b){return s(a.PageContent,this,[b])};f.prototype.getItemAt=function(b){return g(a.PageContent,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.PageContent,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.PageContent,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.PageContentCollection=rb;var gb="Outline",mc=function(p){__extends(m,p);function m(){return p!==null&&p.apply(this,arguments)||this}Object.defineProperty(m.prototype,"_className",{"get":function(){return"Outline"},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyNames",{"get":function(){return["id","_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_navigationPropertyNames",{"get":function(){return["pageContent","paragraphs"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"pageContent",{"get":function(){if(!this._P)this._P=f(a.PageContent,this,"PageContent",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"paragraphs",{"get":function(){if(!this._Pa)this._Pa=f(a.ParagraphCollection,this,"Paragraphs",true,4);return this._Pa},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"id",{"get":function(){c("id",this._I,gb,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,gb,this._isNull);return this.__R},enumerable:true,configurable:true});m.prototype.appendHtml=function(a){d(this,"AppendHtml",0,[a],0,0)};m.prototype.appendImage=function(b,d,c){return g(a.Image,this,"AppendImage",0,[b,d,c],false,true,null,0)};m.prototype.appendRichText=function(b){return g(a.RichText,this,"AppendRichText",0,[b],false,true,null,0)};m.prototype.appendTable=function(c,b,d){return g(a.Table,this,"AppendTable",0,[c,b,d],false,true,null,0)};m.prototype.isTitle=function(){return d(this,"IsTitle",0,[],0,0)};m.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};m.prototype._handleResult=function(c){p.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["pageContent","PageContent","paragraphs","Paragraphs"])};m.prototype.load=function(a){return l(this,a)};m.prototype.retrieve=function(a){return j(this,a)};m.prototype._handleIdResult=function(a){p.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};m.prototype._handleRetrieveResult=function(b,a){p.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};m.prototype.track=function(){this.context.trackedObjects.add(this);return this};m.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};m.prototype.toJSON=function(){return k(this,{id:this._I},{paragraphs:this._Pa})};m.prototype.ensureUnchanged=function(a){n(this,a);return};return m}(OfficeExtension.ClientObject);a.Outline=mc;var X="Paragraph",bc=function(p){__extends(m,p);function m(){return p!==null&&p.apply(this,arguments)||this}Object.defineProperty(m.prototype,"_className",{"get":function(){return"Paragraph"},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyNames",{"get":function(){return["id","type","_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_navigationPropertyNames",{"get":function(){return["outline","parentTableCell","parentTableCellOrNull","richText","image","table","parentParagraph","parentParagraphOrNull","paragraphs","inkWords"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"image",{"get":function(){if(!this._Im)this._Im=f(a.Image,this,"Image",false,4);return this._Im},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"inkWords",{"get":function(){if(!this._In)this._In=f(a.InkWordCollection,this,"InkWords",true,4);return this._In},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"outline",{"get":function(){if(!this._O)this._O=f(a.Outline,this,"Outline",false,4);return this._O},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"paragraphs",{"get":function(){if(!this._P)this._P=f(a.ParagraphCollection,this,"Paragraphs",true,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"parentParagraph",{"get":function(){if(!this._Pa)this._Pa=f(a.Paragraph,this,"ParentParagraph",false,4);return this._Pa},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"parentParagraphOrNull",{"get":function(){if(!this._Par)this._Par=f(a.Paragraph,this,"ParentParagraphOrNull",false,4);return this._Par},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"parentTableCell",{"get":function(){if(!this._Pare)this._Pare=f(a.TableCell,this,"ParentTableCell",false,4);return this._Pare},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"parentTableCellOrNull",{"get":function(){if(!this._Paren)this._Paren=f(a.TableCell,this,"ParentTableCellOrNull",false,4);return this._Paren},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"richText",{"get":function(){if(!this._R)this._R=f(a.RichText,this,"RichText",false,4);return this._R},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"table",{"get":function(){if(!this._T)this._T=f(a.Table,this,"Table",false,4);return this._T},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"id",{"get":function(){c("id",this._I,X,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"type",{"get":function(){c("type",this._Ty,X,this._isNull);return this._Ty},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,X,this._isNull);return this.__R},enumerable:true,configurable:true});m.prototype.set=function(a,b){this._recursivelySet(a,b,[],["image","table"],["inkWords","outline","paragraphs","parentParagraph","parentParagraphOrNull","parentTableCell","parentTableCellOrNull","richText"])};m.prototype.update=function(a){this._recursivelyUpdate(a)};m.prototype.addNoteTag=function(c,b){return g(a.NoteTag,this,"AddNoteTag",0,[c,b],false,true,null,0)};m.prototype["delete"]=function(){d(this,"Delete",0,[],0,0)};m.prototype.getParagraphInfo=function(){return d(this,"GetParagraphInfo",0,[],0,0)};m.prototype.insertHtmlAsSibling=function(a,b){d(this,"InsertHtmlAsSibling",0,[a,b],0,0)};m.prototype.insertImageAsSibling=function(c,b,e,d){return g(a.Image,this,"InsertImageAsSibling",0,[c,b,e,d],false,true,null,0)};m.prototype.insertRichTextAsSibling=function(b,c){return g(a.RichText,this,"InsertRichTextAsSibling",0,[b,c],false,true,null,0)};m.prototype.insertTableAsSibling=function(b,d,c,e){return g(a.Table,this,"InsertTableAsSibling",0,[b,d,c,e],false,true,null,0)};m.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};m.prototype._handleResult=function(c){p.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a.Type))this._Ty=a.Type;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["image","Image","inkWords","InkWords","outline","Outline","paragraphs","Paragraphs","parentParagraph","ParentParagraph","parentParagraphOrNull","ParentParagraphOrNull","parentTableCell","ParentTableCell","parentTableCellOrNull","ParentTableCellOrNull","richText","RichText","table","Table"])};m.prototype.load=function(a){return l(this,a)};m.prototype.retrieve=function(a){return j(this,a)};m.prototype._handleIdResult=function(a){p.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};m.prototype._handleRetrieveResult=function(b,a){p.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};m.prototype.track=function(){this.context.trackedObjects.add(this);return this};m.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};m.prototype.toJSON=function(){return k(this,{id:this._I,type:this._Ty},{image:this._Im,inkWords:this._In,paragraphs:this._P,richText:this._R,table:this._T})};m.prototype.ensureUnchanged=function(a){n(this,a);return};return m}(OfficeExtension.ClientObject);a.Paragraph=bc;var P="ParagraphCollection",vb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"ParagraphCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,P,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,P,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,P,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getItem=function(b){return s(a.Paragraph,this,[b])};f.prototype.getItemAt=function(b){return g(a.Paragraph,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.Paragraph,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.Paragraph,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.ParagraphCollection=vb;var Y="NoteTag",lc=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"NoteTag"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["id","type","status"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["tagIcon"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"tagIcon",{"get":function(){p("NoteTag.tagIcon",q,"1.3",r);if(!this._T)this._T=f(a.TagIcon,this,"TagIcon",false,4);return this._T},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,Y,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"status",{"get":function(){c("status",this._S,Y,this._isNull);return this._S},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"type",{"get":function(){c("type",this._Ty,Y,this._isNull);return this._Ty},enumerable:true,configurable:true});g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a.Status))this._S=a.Status;if(!b(a.Type))this._Ty=a.Type;o(this,a,["tagIcon","TagIcon"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{id:this._I,status:this._S,type:this._Ty},{tagIcon:this._T})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.NoteTag=lc;var U="NoteTagCollection",Ab=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"NoteTagCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,U,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,U,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,U,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getItem=function(b){return s(a.NoteTag,this,[b])};f.prototype.getItemAt=function(b){return g(a.NoteTag,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.NoteTag,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.NoteTag,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.NoteTagCollection=Ab;var G="RichText",ic=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"RichText"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["text","_ReferenceId","id","languageId"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["paragraph"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"paragraph",{"get":function(){if(!this._P)this._P=f(a.Paragraph,this,"Paragraph",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,G,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"languageId",{"get":function(){c("languageId",this._L,G,this._isNull);return this._L},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"text",{"get":function(){c("text",this._T,G,this._isNull);return this._T},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,G,this._isNull);return this.__R},enumerable:true,configurable:true});g.prototype.getHtml=function(){return d(this,"GetHtml",1,[],4,0)};g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a.LanguageId))this._L=a.LanguageId;if(!b(a.Text))this._T=a.Text;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["paragraph","Paragraph"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{id:this._I,languageId:this._L,text:this._T},{})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.RichText=ic;var v="Image",pc=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"Image"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["description","height","hyperlink","width","_ReferenceId","id","ocrData"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyUpdateable",{"get":function(){return[true,true,true,true,false,false,false]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["paragraph","pageContent"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"pageContent",{"get":function(){if(!this._P)this._P=f(a.PageContent,this,"PageContent",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"paragraph",{"get":function(){if(!this._Pa)this._Pa=f(a.Paragraph,this,"Paragraph",false,4);return this._Pa},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"description",{"get":function(){c("description",this._D,v,this._isNull);return this._D},"set":function(a){this._D=a;t(this,"Description",a,0)},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"height",{"get":function(){c("height",this._H,v,this._isNull);return this._H},"set":function(a){this._H=a;t(this,"Height",a,0)},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"hyperlink",{"get":function(){c("hyperlink",this._Hy,v,this._isNull);return this._Hy},"set":function(a){this._Hy=a;t(this,"Hyperlink",a,0)},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,v,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"ocrData",{"get":function(){c("ocrData",this._O,v,this._isNull);return this._O},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"width",{"get":function(){c("width",this._W,v,this._isNull);return this._W},"set":function(a){this._W=a;t(this,"Width",a,0)},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,v,this._isNull);return this.__R},enumerable:true,configurable:true});g.prototype.set=function(a,b){this._recursivelySet(a,b,["description","height","hyperlink","width"],[],["pageContent","paragraph"])};g.prototype.update=function(a){this._recursivelyUpdate(a)};g.prototype.getBase64Image=function(){return d(this,"GetBase64Image",1,[],4,0)};g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Description))this._D=a.Description;if(!b(a.Height))this._H=a.Height;if(!b(a.Hyperlink))this._Hy=a.Hyperlink;if(!b(a.Id))this._I=a.Id;if(!b(a.OcrData))this._O=a.OcrData;if(!b(a.Width))this._W=a.Width;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["pageContent","PageContent","paragraph","Paragraph"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{description:this._D,height:this._H,hyperlink:this._Hy,id:this._I,ocrData:this._O,width:this._W},{})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.Image=pc;var E="Table",qc=function(p){__extends(m,p);function m(){return p!==null&&p.apply(this,arguments)||this}Object.defineProperty(m.prototype,"_className",{"get":function(){return"Table"},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyNames",{"get":function(){return["id","_ReferenceId","rowCount","columnCount","borderVisible"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyUpdateable",{"get":function(){return[false,false,false,false,true]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_navigationPropertyNames",{"get":function(){return["paragraph","rows"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"paragraph",{"get":function(){if(!this._P)this._P=f(a.Paragraph,this,"Paragraph",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"rows",{"get":function(){if(!this._Ro)this._Ro=f(a.TableRowCollection,this,"Rows",true,4);return this._Ro},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"borderVisible",{"get":function(){c("borderVisible",this._B,E,this._isNull);return this._B},"set":function(a){this._B=a;t(this,"BorderVisible",a,0)},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"columnCount",{"get":function(){c("columnCount",this._C,E,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"id",{"get":function(){c("id",this._I,E,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"rowCount",{"get":function(){c("rowCount",this._R,E,this._isNull);return this._R},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,E,this._isNull);return this.__R},enumerable:true,configurable:true});m.prototype.set=function(a,b){this._recursivelySet(a,b,["borderVisible"],[],["paragraph","rows"])};m.prototype.update=function(a){this._recursivelyUpdate(a)};m.prototype.appendColumn=function(a){d(this,"AppendColumn",0,[a],0,0)};m.prototype.appendRow=function(b){return g(a.TableRow,this,"AppendRow",0,[b],false,true,null,0)};m.prototype.clear=function(){d(this,"Clear",0,[],0,0)};m.prototype.getCell=function(c,b){return g(a.TableCell,this,"GetCell",1,[c,b],false,false,null,4)};m.prototype.insertColumn=function(b,a){d(this,"InsertColumn",0,[b,a],0,0)};m.prototype.insertRow=function(c,b){return g(a.TableRow,this,"InsertRow",0,[c,b],false,true,null,0)};m.prototype.setShadingColor=function(a){d(this,"SetShadingColor",0,[a],0,0)};m.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};m.prototype._handleResult=function(c){p.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.BorderVisible))this._B=a.BorderVisible;if(!b(a.ColumnCount))this._C=a.ColumnCount;if(!b(a.Id))this._I=a.Id;if(!b(a.RowCount))this._R=a.RowCount;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["paragraph","Paragraph","rows","Rows"])};m.prototype.load=function(a){return l(this,a)};m.prototype.retrieve=function(a){return j(this,a)};m.prototype._handleIdResult=function(a){p.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};m.prototype._handleRetrieveResult=function(b,a){p.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};m.prototype.track=function(){this.context.trackedObjects.add(this);return this};m.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};m.prototype.toJSON=function(){return k(this,{borderVisible:this._B,columnCount:this._C,id:this._I,rowCount:this._R},{rows:this._Ro})};m.prototype.ensureUnchanged=function(a){n(this,a);return};return m}(OfficeExtension.ClientObject);a.Table=qc;var H="TableRow",jc=function(p){__extends(m,p);function m(){return p!==null&&p.apply(this,arguments)||this}Object.defineProperty(m.prototype,"_className",{"get":function(){return"TableRow"},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyNames",{"get":function(){return["id","_ReferenceId","cellCount","rowIndex"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_navigationPropertyNames",{"get":function(){return["cells","parentTable"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"cells",{"get":function(){if(!this._Ce)this._Ce=f(a.TableCellCollection,this,"Cells",true,4);return this._Ce},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"parentTable",{"get":function(){if(!this._P)this._P=f(a.Table,this,"ParentTable",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"cellCount",{"get":function(){c("cellCount",this._C,H,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"id",{"get":function(){c("id",this._I,H,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"rowIndex",{"get":function(){c("rowIndex",this._R,H,this._isNull);return this._R},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,H,this._isNull);return this.__R},enumerable:true,configurable:true});m.prototype.clear=function(){d(this,"Clear",0,[],0,0)};m.prototype.insertRowAsSibling=function(b,c){return g(a.TableRow,this,"InsertRowAsSibling",0,[b,c],false,true,null,0)};m.prototype.setShadingColor=function(a){d(this,"SetShadingColor",0,[a],0,0)};m.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};m.prototype._handleResult=function(c){p.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.CellCount))this._C=a.CellCount;if(!b(a.Id))this._I=a.Id;if(!b(a.RowIndex))this._R=a.RowIndex;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["cells","Cells","parentTable","ParentTable"])};m.prototype.load=function(a){return l(this,a)};m.prototype.retrieve=function(a){return j(this,a)};m.prototype._handleIdResult=function(a){p.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};m.prototype._handleRetrieveResult=function(b,a){p.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};m.prototype.track=function(){this.context.trackedObjects.add(this);return this};m.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};m.prototype.toJSON=function(){return k(this,{cellCount:this._C,id:this._I,rowIndex:this._R},{cells:this._Ce})};m.prototype.ensureUnchanged=function(a){n(this,a);return};return m}(OfficeExtension.ClientObject);a.TableRow=jc;var S="TableRowCollection",yb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"TableRowCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,S,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,S,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,S,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getItem=function(b){return s(a.TableRow,this,[b])};f.prototype.getItemAt=function(b){return g(a.TableRow,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.TableRow,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.TableRow,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.TableRowCollection=yb;var C="TableCell",dc=function(p){__extends(m,p);function m(){return p!==null&&p.apply(this,arguments)||this}Object.defineProperty(m.prototype,"_className",{"get":function(){return"TableCell"},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyNames",{"get":function(){return["id","_ReferenceId","rowIndex","cellIndex","shadingColor"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_scalarPropertyUpdateable",{"get":function(){return[false,false,false,false,true]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_navigationPropertyNames",{"get":function(){return["parentRow","paragraphs"]},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"paragraphs",{"get":function(){if(!this._P)this._P=f(a.ParagraphCollection,this,"Paragraphs",true,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"parentRow",{"get":function(){if(!this._Pa)this._Pa=f(a.TableRow,this,"ParentRow",false,4);return this._Pa},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"cellIndex",{"get":function(){c("cellIndex",this._C,C,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"id",{"get":function(){c("id",this._I,C,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"rowIndex",{"get":function(){c("rowIndex",this._R,C,this._isNull);return this._R},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"shadingColor",{"get":function(){c("shadingColor",this._S,C,this._isNull);return this._S},"set":function(a){this._S=a;t(this,"ShadingColor",a,0)},enumerable:true,configurable:true});Object.defineProperty(m.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,C,this._isNull);return this.__R},enumerable:true,configurable:true});m.prototype.set=function(a,b){this._recursivelySet(a,b,["shadingColor"],[],["paragraphs","parentRow"])};m.prototype.update=function(a){this._recursivelyUpdate(a)};m.prototype.appendHtml=function(a){d(this,"AppendHtml",0,[a],0,0)};m.prototype.appendImage=function(b,d,c){return g(a.Image,this,"AppendImage",0,[b,d,c],false,true,null,0)};m.prototype.appendRichText=function(b){return g(a.RichText,this,"AppendRichText",0,[b],false,true,null,0)};m.prototype.appendTable=function(c,b,d){return g(a.Table,this,"AppendTable",0,[c,b,d],false,true,null,0)};m.prototype.clear=function(){d(this,"Clear",0,[],0,0)};m.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};m.prototype._handleResult=function(c){p.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.CellIndex))this._C=a.CellIndex;if(!b(a.Id))this._I=a.Id;if(!b(a.RowIndex))this._R=a.RowIndex;if(!b(a.ShadingColor))this._S=a.ShadingColor;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["paragraphs","Paragraphs","parentRow","ParentRow"])};m.prototype.load=function(a){return l(this,a)};m.prototype.retrieve=function(a){return j(this,a)};m.prototype._handleIdResult=function(a){p.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};m.prototype._handleRetrieveResult=function(b,a){p.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};m.prototype.track=function(){this.context.trackedObjects.add(this);return this};m.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};m.prototype.toJSON=function(){return k(this,{cellIndex:this._C,id:this._I,rowIndex:this._R,shadingColor:this._S},{paragraphs:this._P})};m.prototype.ensureUnchanged=function(a){n(this,a);return};return m}(OfficeExtension.ClientObject);a.TableCell=dc;var Q="TableCellCollection",wb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"TableCellCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId","count"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,Q,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"count",{"get":function(){c("count",this._C,Q,this._isNull);return this._C},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,Q,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getItem=function(b){return s(a.TableCell,this,[b])};f.prototype.getItemAt=function(b){return g(a.TableCell,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c.Count))this._C=c.Count;if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.TableCell,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.TableCell,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{count:this._C},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.TableCellCollection=wb;var z="AccessibilityViolation",pb=function(f){__extends(a,f);function a(){return f!==null&&f.apply(this,arguments)||this}Object.defineProperty(a.prototype,"_className",{"get":function(){return"AccessibilityViolation"},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"_scalarPropertyNames",{"get":function(){return["id","type","location","name","_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"id",{"get":function(){c("id",this._I,z,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"location",{"get":function(){c("location",this._L,z,this._isNull);return this._L},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"name",{"get":function(){c("name",this._N,z,this._isNull);return this._N},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"type",{"get":function(){c("type",this._T,z,this._isNull);return this._T},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,z,this._isNull);return this.__R},enumerable:true,configurable:true});a.prototype.show=function(a){d(this,"Show",0,[a],0,0)};a.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};a.prototype._handleResult=function(c){f.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Id))this._I=a.Id;if(!b(a.Location))this._L=a.Location;if(!b(a.Name))this._N=a.Name;if(!b(a.Type))this._T=a.Type;if(!b(a._ReferenceId))this.__R=a._ReferenceId};a.prototype.load=function(a){return l(this,a)};a.prototype.retrieve=function(a){return j(this,a)};a.prototype._handleIdResult=function(a){f.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};a.prototype._handleRetrieveResult=function(b,a){f.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};a.prototype.track=function(){this.context.trackedObjects.add(this);return this};a.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};a.prototype.toJSON=function(){return k(this,{id:this._I,location:this._L,name:this._N,type:this._T},{})};a.prototype.ensureUnchanged=function(a){n(this,a);return};return a}(OfficeExtension.ClientObject);a.AccessibilityViolation=pb;var ab="AccessibilityViolationCollection",ib=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"AccessibilityViolationCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,ab,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,ab,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getCount=function(){return d(this,"GetCount",1,[],4,0)};f.prototype.getItem=function(b){return s(a.AccessibilityViolation,this,[b])};f.prototype.getItemAt=function(b){return g(a.AccessibilityViolation,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype.isScanCompleted=function(){return d(this,"IsScanCompleted",1,[],4,0)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.AccessibilityViolation,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.AccessibilityViolation,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.AccessibilityViolationCollection=ib;var y="AccessibilityViolationsByEntity",jb=function(m){__extends(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}Object.defineProperty(g.prototype,"_className",{"get":function(){return"AccessibilityViolationsByEntity"},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_scalarPropertyNames",{"get":function(){return["id","entityType","entityName","violationsCount","_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_navigationPropertyNames",{"get":function(){return["parentSectionOrNull","parentSectionGroupOrNull"]},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"parentSectionGroupOrNull",{"get":function(){if(!this._P)this._P=f(a.SectionGroup,this,"ParentSectionGroupOrNull",false,4);return this._P},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"parentSectionOrNull",{"get":function(){if(!this._Pa)this._Pa=f(a.Section,this,"ParentSectionOrNull",false,4);return this._Pa},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"entityName",{"get":function(){c("entityName",this._E,y,this._isNull);return this._E},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"entityType",{"get":function(){c("entityType",this._En,y,this._isNull);return this._En},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"id",{"get":function(){c("id",this._I,y,this._isNull);return this._I},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"violationsCount",{"get":function(){c("violationsCount",this._V,y,this._isNull);return this._V},enumerable:true,configurable:true});Object.defineProperty(g.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,y,this._isNull);return this.__R},enumerable:true,configurable:true});g.prototype.navigate=function(){d(this,"Navigate",0,[],0,0)};g.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};g.prototype._handleResult=function(c){m.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.EntityName))this._E=a.EntityName;if(!b(a.EntityType))this._En=a.EntityType;if(!b(a.Id))this._I=a.Id;if(!b(a.ViolationsCount))this._V=a.ViolationsCount;if(!b(a._ReferenceId))this.__R=a._ReferenceId;o(this,a,["parentSectionGroupOrNull","ParentSectionGroupOrNull","parentSectionOrNull","ParentSectionOrNull"])};g.prototype.load=function(a){return l(this,a)};g.prototype.retrieve=function(a){return j(this,a)};g.prototype._handleIdResult=function(a){m.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId;if(!b(a.Id))this._I=a.Id};g.prototype._handleRetrieveResult=function(b,a){m.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};g.prototype.track=function(){this.context.trackedObjects.add(this);return this};g.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};g.prototype.toJSON=function(){return k(this,{entityName:this._E,entityType:this._En,id:this._I,violationsCount:this._V},{parentSectionGroupOrNull:this._P,parentSectionOrNull:this._Pa})};g.prototype.ensureUnchanged=function(a){n(this,a);return};return g}(OfficeExtension.ClientObject);a.AccessibilityViolationsByEntity=jb;var Z="AccessibilityViolationsByEntityCollection",hb=function(n){__extends(f,n);function f(){return n!==null&&n.apply(this,arguments)||this}Object.defineProperty(f.prototype,"_className",{"get":function(){return"AccessibilityViolationsByEntityCollection"},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_isCollection",{"get":function(){return true},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_scalarPropertyNames",{"get":function(){return["_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"items",{"get":function(){c("items",this.m__items,Z,this._isNull);return this.m__items},enumerable:true,configurable:true});Object.defineProperty(f.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,Z,this._isNull);return this.__R},enumerable:true,configurable:true});f.prototype.getCount=function(){return d(this,"GetCount",1,[],4,0)};f.prototype.getItem=function(b){return s(a.AccessibilityViolationsByEntity,this,[b])};f.prototype.getItemAt=function(b){return g(a.AccessibilityViolationsByEntity,this,"GetItemAt",1,[b],false,false,null,4)};f.prototype.isScanCompleted=function(){return d(this,"IsScanCompleted",1,[],4,0)};f.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};f.prototype._handleResult=function(f){n.prototype._handleResult.call(this,f);if(e(f))return;var c=f;h(this,c);if(!b(c._ReferenceId))this.__R=c._ReferenceId;if(!e(c[OfficeExtension.Constants.items])){this.m__items=[];for(var g=c[OfficeExtension.Constants.items],d=0;d<g.length;d++){var i=m(a.AccessibilityViolationsByEntity,true,this,g[d],d);i._handleResult(g[d]);this.m__items.push(i)}}};f.prototype.load=function(a){return l(this,a)};f.prototype.retrieve=function(a){return j(this,a)};f.prototype._handleIdResult=function(a){n.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};f.prototype._handleRetrieveResult=function(c,b){var d=this;n.prototype._handleRetrieveResult.call(this,c,b);i(this,c,b,function(b,c){return m(a.AccessibilityViolationsByEntity,true,d,b,c)})};f.prototype.track=function(){this.context.trackedObjects.add(this);return this};f.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};f.prototype.toJSON=function(){return k(this,{},{},this.m__items)};return f}(OfficeExtension.ClientObject);a.AccessibilityViolationsByEntityCollection=hb;var D="TagIcon",oc=function(f){__extends(a,f);function a(){return f!==null&&f.apply(this,arguments)||this}Object.defineProperty(a.prototype,"_className",{"get":function(){return"TagIcon"},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"_scalarPropertyNames",{"get":function(){return["name","type","bitmaps","noteTagShape","_ReferenceId"]},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"bitmaps",{"get":function(){c("bitmaps",this._B,D,this._isNull);return this._B},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"name",{"get":function(){c("name",this._N,D,this._isNull);return this._N},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"noteTagShape",{"get":function(){c("noteTagShape",this._No,D,this._isNull);return this._No},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"type",{"get":function(){c("type",this._T,D,this._isNull);return this._T},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"_ReferenceId",{"get":function(){c("_ReferenceId",this.__R,D,this._isNull);return this.__R},enumerable:true,configurable:true});a.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};a.prototype._handleResult=function(c){f.prototype._handleResult.call(this,c);if(e(c))return;var a=c;h(this,a);if(!b(a.Bitmaps))this._B=a.Bitmaps;if(!b(a.Name))this._N=a.Name;if(!b(a.NoteTagShape))this._No=a.NoteTagShape;if(!b(a.Type))this._T=a.Type;if(!b(a._ReferenceId))this.__R=a._ReferenceId};a.prototype.load=function(a){return l(this,a)};a.prototype.retrieve=function(a){return j(this,a)};a.prototype._handleIdResult=function(a){f.prototype._handleIdResult.call(this,a);if(e(a))return;if(!b(a._ReferenceId))this.__R=a._ReferenceId};a.prototype._handleRetrieveResult=function(b,a){f.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};a.prototype.track=function(){this.context.trackedObjects.add(this);return this};a.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};a.prototype.toJSON=function(){return k(this,{bitmaps:this._B,name:this._N,noteTagShape:this._No,type:this._T},{})};a.prototype.ensureUnchanged=function(a){n(this,a);return};return a}(OfficeExtension.ClientObject);a.TagIcon=oc;var uc="NoteTagManager",Ib=function(c){__extends(b,c);function b(){return c!==null&&c.apply(this,arguments)||this}Object.defineProperty(b.prototype,"_className",{"get":function(){return"NoteTagManager"},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"_navigationPropertyNames",{"get":function(){return["allNoteTags","featuredNoteTags"]},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"allNoteTags",{"get":function(){p("NoteTagManager.allNoteTags",q,"1.4",r);if(!this._A)this._A=f(a.NoteTagCollection,this,"AllNoteTags",true,4);return this._A},enumerable:true,configurable:true});Object.defineProperty(b.prototype,"featuredNoteTags",{"get":function(){p("NoteTagManager.featuredNoteTags",q,"1.4",r);if(!this._F)this._F=f(a.NoteTagCollection,this,"FeaturedNoteTags",true,4);return this._F},enumerable:true,configurable:true});b.prototype.getModificationResult=function(a){return d(this,"GetModificationResult",1,[a],4,0)};b.prototype.setCustomTag=function(c,b,a){return d(this,"SetCustomTag",1,[c,b,a],4,0)};b.prototype._KeepReference=function(){d(this,"_KeepReference",1,[],4,0)};b.prototype._handleResult=function(a){c.prototype._handleResult.call(this,a);if(e(a))return;var b=a;h(this,b);o(this,b,["allNoteTags","AllNoteTags","featuredNoteTags","FeaturedNoteTags"])};b.prototype.load=function(a){return l(this,a)};b.prototype.retrieve=function(a){return j(this,a)};b.prototype._handleRetrieveResult=function(b,a){c.prototype._handleRetrieveResult.call(this,b,a);i(this,b,a)};b.prototype.track=function(){this.context.trackedObjects.add(this);return this};b.prototype.untrack=function(){this.context.trackedObjects.remove(this);return this};b.prototype.toJSON=function(){return k(this,{},{allNoteTags:this._A,featuredNoteTags:this._F})};b.prototype.ensureUnchanged=function(a){n(this,a);return};return b}(OfficeExtension.ClientObject);a.NoteTagManager=Ib;var Ub;(function(a){a.notebook="Notebook";a.sectionGroup="SectionGroup";a.section="Section";a.page="Page"})(Ub=a.EntityType||(a.EntityType={}));var Hb;(function(a){a.before="Before";a.after="After"})(Hb=a.InsertLocation||(a.InsertLocation={}));var hc;(function(a){a.other="Other";a.web="Web";a.uwp="UWP";a.win32="Win32";a.mac="Mac";a.ios="IOS"})(hc=a.Platform||(a.Platform={}));var Fb;(function(a){a.outline="Outline";a.image="Image";a.ink="Ink";a.other="Other"})(Fb=a.PageContentType||(a.PageContentType={}));var Lb;(function(a){a.richText="RichText";a.image="Image";a.table="Table";a.ink="Ink";a.other="Other"})(Lb=a.ParagraphType||(a.ParagraphType={}));var Rb;(function(a){a.unknown="Unknown";a.toDo="ToDo";a.important="Important";a.question="Question";a.contact="Contact";a.address="Address";a.phoneNumber="PhoneNumber";a.website="Website";a.idea="Idea";a.critical="Critical";a.toDoPriority1="ToDoPriority1";a.toDoPriority2="ToDoPriority2"})(Rb=a.NoteTagType||(a.NoteTagType={}));var Kb;(function(a){a.unknown="Unknown";a.normal="Normal";a.completed="Completed";a.disabled="Disabled";a.outlookTask="OutlookTask";a.taskNotSyncedYet="TaskNotSyncedYet";a.taskRemoved="TaskRemoved"})(Kb=a.NoteTagStatus||(a.NoteTagStatus={}));var cc;(function(a){a.form="Form";a.entity="Entity";a.graph="Graph";a.oneService="OneService"})(cc=a.ServiceId||(a.ServiceId={}));var Gb;(function(a){a.selection="Selection";a.activeProfile="ActiveProfile";a.liveId="LiveId";a.orgId="OrgId";a.adal="ADAL";a.notebook="Notebook"})(Gb=a.IdentityFilter||(a.IdentityFilter={}));var ec;(function(a){a.none="None";a.number="Number";a.bullet="Bullet"})(ec=a.ListType||(a.ListType={}));var Nb;(function(a){a.other="Other";a.liveId="LiveId";a.orgId="OrgId";a.adal="ADAL"})(Nb=a.AccountType||(a.AccountType={}));var fc;(function(a){a.trace="Trace";a.data="Data";a.exception="Exception";a.warning="Warning"})(fc=a.LogLevel||(a.LogLevel={}));var Zb;(function(a){a.defaultFlag="DefaultFlag";a.criticalFlag="CriticalFlag";a.measureFlag="MeasureFlag"})(Zb=a.EventFlag||(a.EventFlag={}));var Xb;(function(a){a.none="None";a.arabic="Arabic";a.ucroman="UCRoman";a.lcroman="LCRoman";a.ucletter="UCLetter";a.lcletter="LCLetter";a.ordinal="Ordinal";a.cardtext="Cardtext";a.ordtext="Ordtext";a.hex="Hex";a.chiManSty="ChiManSty";a.dbNum1="DbNum1";a.dbNum2="DbNum2";a.aiueo="Aiueo";a.iroha="Iroha";a.dbChar="DbChar";a.sbChar="SbChar";a.dbNum3="DbNum3";a.dbNum4="DbNum4";a.circlenum="Circlenum";a.darabic="DArabic";a.daiueo="DAiueo";a.diroha="DIroha";a.arabicLZ="ArabicLZ";a.bullet="Bullet";a.ganada="Ganada";a.chosung="Chosung";a.gb1="GB1";a.gb2="GB2";a.gb3="GB3";a.gb4="GB4";a.zodiac1="Zodiac1";a.zodiac2="Zodiac2";a.zodiac3="Zodiac3";a.tpeDbNum1="TpeDbNum1";a.tpeDbNum2="TpeDbNum2";a.tpeDbNum3="TpeDbNum3";a.tpeDbNum4="TpeDbNum4";a.chnDbNum1="ChnDbNum1";a.chnDbNum2="ChnDbNum2";a.chnDbNum3="ChnDbNum3";a.chnDbNum4="ChnDbNum4";a.korDbNum1="KorDbNum1";a.korDbNum2="KorDbNum2";a.korDbNum3="KorDbNum3";a.korDbNum4="KorDbNum4";a.hebrew1="Hebrew1";a.arabic1="Arabic1";a.hebrew2="Hebrew2";a.arabic2="Arabic2";a.hindi1="Hindi1";a.hindi2="Hindi2";a.hindi3="Hindi3";a.thai1="Thai1";a.thai2="Thai2";a.numInDash="NumInDash";a.lcrus="LCRus";a.ucrus="UCRus";a.lcgreek="LCGreek";a.ucgreek="UCGreek";a.lim="Lim";a.custom="Custom"})(Xb=a.NumberType||(a.NumberType={}));var Yb;(function(a){a.preinstallClassNotebook="PreinstallClassNotebook";a.distributePageId="DistributePageId";a.distributeSection="DistributeSection";a.reviewStudentWork="ReviewStudentWork";a.openTabForCreateClassNotebook="OpenTabForCreateClassNotebook";a.openTabForManageStudent="OpenTabForManageStudent";a.openTabForManageTeacher="OpenTabForManageTeacher";a.openTabForGetNotebookLink="OpenTabForGetNotebookLink";a.openTabForTeacherTraining="OpenTabForTeacherTraining";a.openTabForAddinGuide="OpenTabForAddinGuide";a.openTabForEducationBlog="OpenTabForEducationBlog";a.openTabForEducatorCommunity="OpenTabForEducatorCommunity";a.openTabToSendFeedback="OpenTabToSendFeedback";a.openTabForViewKnowledgeBase="OpenTabForViewKnowledgeBase";a.openTabForSuggestingFeature="OpenTabForSuggestingFeature";a.createAssignment="CreateAssignment";a.connections="Connections";a.mapClassNotebooks="MapClassNotebooks";a.mapStudents="MapStudents";a.manageClasses="ManageClasses"})(Yb=a.ControlId||(a.ControlId={}));var mb;(function(a){a.none="None";a.missingAltText="MissingAltText";a.tableWithNoHeaderRow="TableWithNoHeaderRow";a.untitledPage="UntitledPage";a.unnamedSection="UnnamedSection";a.unnamedSectionGroup="UnnamedSectionGroup";a.nonDescriptiveAltText="NonDescriptiveAltText";a.nestedTable="NestedTable";a.headingOutOfOrder="HeadingOutOfOrder";a.extraOutline="ExtraOutline";a.extraWhitespace="ExtraWhitespace";a.noHeadingsInALongDocument="NoHeadingsInALongDocument";a.insufficientTextContrast="InsufficientTextContrast"})(mb=a.AccessibilityViolationType||(a.AccessibilityViolationType={}));var kb;(function(a){a.none="None";a.onHighlight="OnHighlight";a.onMultipleParagraphs="OnMultipleParagraphs";a.onOutline="OnOutline";a.onPage="OnPage";a.onParagraph="OnParagraph";a.onParagraphBegin="OnParagraphBegin";a.onParagraphEnd="OnParagraphEnd";a.onTable="OnTable";a.withinParagraph="WithinParagraph"})(kb=a.AccessibilityViolationLocation||(a.AccessibilityViolationLocation={}));var Tb;(function(a){a["static"]="Static";a.interactive="Interactive"})(Tb=a.TagIconType||(a.TagIconType={}));var sb;(function(a){a.success="Success";a.pending="Pending";a.invalidIdentity="InvalidIdentity";a.previousStorageError="PreviousStorageError";a.storageError="StorageError";a.alreadyExists="AlreadyExists";a.invalidGUID="InvalidGUID";a.invalidLabel="InvalidLabel"})(sb=a.TagModificationResult||(a.TagModificationResult={}));var Vb;(function(a){a.generalException="GeneralException"})(Vb=a.ErrorCodes||(a.ErrorCodes={}));var Wb;(function(a){})(Wb=a.Interfaces||(a.Interfaces={}))})(OneNote||(OneNote={}));var OneNote;(function(a){var b=function(c){__extends(b,c);function b(d){var b=c.call(this,d)||this;b.m_onenote=new a.Application(b,OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(b));b._rootObject=b.m_onenote;return b}Object.defineProperty(b.prototype,"application",{"get":function(){return this.m_onenote},enumerable:true,configurable:true});return b}(OfficeCore.RequestContext);a.RequestContext=b;function c(b,c){return OfficeExtension.ClientRequestContext._runBatch("OneNote.run",arguments,function(){return new a.RequestContext})}a.run=c})(OneNote||(OneNote={}));OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel=true