text: /* OneNote iOS-specific API library */
  /* Version: 16.0.9005.3000 */
  
  /* Office.js Version: 16.0.8828.1000 */ 
  /*
  	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
  */
  
  var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFWebkit,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExt,OfficeExtension,OfficeCore,OneNote;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t<u;t++)i=this._internalStorage.key(t),i.indexOf(n)===0&&r.push(i)}catch(f){}return r},n}();n.SafeStorage=t}(OfficeExt||(OfficeExt={}));OSF.XdmFieldName={ConversationUrl:"ConversationUrl",AppId:"AppId"};OSF.WindowNameItemKeys={BaseFrameName:"baseFrameName",HostInfo:"hostInfo",XdmInfo:"xdmInfo",SerializerVersion:"serializerVersion",AppContext:"appContext"};OSF.OUtil=function(){function rt(){var n=l*Math.random();return n^=e^(new Date).getMilliseconds()<<Math.floor(Math.random()*21),n.toString(16)}function b(){if(!p){try{var t=window.sessionStorage}catch(i){t=n}p=new OfficeExt.SafeStorage(t)}return p}function ut(n){for(var r=[],i=[],f=n.length,t,u=0;u<f;u++)t=n[u],t.tabIndex?t.tabIndex>0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t<n.length;t+=4){for(r=0,i=0;i<4&&t+i<n.length;i++)r=(r<<8)+n.charCodeAt(t+i);e^=r}else e^=typeof n=="number"?n:l*Math.random();e&=l},extend:function(n,t){var i=function(){};i.prototype=t.prototype;n.prototype=new i;n.prototype.constructor=n;n.uber=t.prototype;t.prototype.constructor===Object.prototype.constructor&&(t.prototype.constructor=t)},setNamespace:function(n,t){t&&n&&!t[n]&&(t[n]={})},unsetNamespace:function(n,t){t&&n&&t[n]&&delete t[n]},serializeSettings:function(n){var r={},i,t;for(i in n){t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var f={},u,t;n=n||{};for(u in n){t=n[u];try{t=JSON?JSON.parse(t,function(n,t){var i;return typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t<r;t++)u=e.pendingCallbacks.shift(),u()},c=function(){var i,t,u;for(delete y[r],e.timer!=n&&(clearTimeout(e.timer),delete e.timer),i=e.pendingCallbacks.length,t=0;t<i;t++)u=e.pendingCallbacks.shift(),u()},o.readyState?o.onreadystatechange=function(){(o.readyState=="loaded"||o.readyState=="complete")&&(o.onreadystatechange=n,h())}:o.onload=h,o.onerror=c,f=f||et,e.timer=setTimeout(c,f),o.setAttribute("crossOrigin","anonymous"),o.src=r,s.getElementsByTagName("head")[0].appendChild(o)))},loadCSS:function(n){if(n){var i=window.document,t=i.createElement("link");t.type="text/css";t.rel="stylesheet";t.href=n;i.getElementsByTagName("head")[0].appendChild(t)}},parseEnum:function(n,t){var i=t[n.trim()];if(typeof i==c){OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+n);throw OsfMsAjaxFactory.msAjaxError.argument("str");}return i},delayExecutionAndCache:function(){var n={calc:arguments[0]};return function(){return n.calc&&(n.val=n.calc.apply(this,arguments),delete n.calc),n.val}},getUniqueId:function(){return a=a+1,a.toString()},formatString:function(){var n=arguments,t=n[0];return t.replace(/{(\d+)}/gm,function(t,i){var r=parseInt(i,10)+1;return n[r]===undefined?"{"+i+"}":n[r]})},generateConversationId:function(){return[rt(),rt(),(new Date).getTime().toString()].join("_")},getFrameName:function(n){return tt+n+this.generateConversationId()},addXdmInfoAsHash:function(n,i){return OSF.OUtil.addInfoAsHash(n,g,i,t)},addSerializerVersionAsHash:function(n,t){return OSF.OUtil.addInfoAsHash(n,nt,t,i)},addInfoAsHash:function(n,t,i,r){n=n.trim()||u;var f=n.split(v),s=f.shift(),e=f.join(v),o;return o=r?[t,encodeURIComponent(i),e].join(u):[e,t,i].join(u),[s,v,o].join(u)},parseHostInfoFromWindowName:function(n,t){return OSF.OUtil.parseInfoFromWindowName(n,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(n){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(n,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(n,window.name)),t},parseXdmInfoFromWindowName:function(n,t){return OSF.OUtil.parseInfoFromWindowName(n,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(n,i){return OSF.OUtil.parseInfoWithGivenFragment(g,tt,t,n,i)},parseSerializerVersion:function(n){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(n,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(n,window.name)),t},parseSerializerVersionFromWindowName:function(n,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(n,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(n,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment(nt,ft,i,n,t))},parseInfoFromWindowName:function(t,i,r){var o;try{var u=JSON.parse(i),f=u!=n?u[r]:n,e=b();return!t&&e&&u!=n&&(o=u[OSF.WindowNameItemKeys.BaseFrameName]+r,f?e.setItem(o,f):f=e.getItem(o)),f}catch(s){return n}},parseInfoWithGivenFragment:function(t,i,u,f,e){var l=e.split(t),o=l.length>1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f<s;f++)e=o[f],u=Object.getOwnPropertyDescriptor(n,e),u.get||u.set||(u.writable=r.writable||t),u.configurable=r.configurable||t,u.enumerable=r.enumerable||i,Object.defineProperty(n,e,u);return n},mapList:function(n,t){var i=[],r;if(n)for(r in n)i.push(t(n[r]));return i},listContainsKey:function(n,r){for(var u in n)if(r==u)return i;return t},listContainsValue:function(n,r){for(var u in n)if(r==n[u])return i;return t},augmentList:function(n,t){var r=n.push?function(t,i){n.push(i)}:function(t,i){n[t]=i};for(var i in t)r(i,t[i])},redefineList:function(n,t){var r,i;for(r in n)delete n[r];for(i in t)n[i]=t[i]},isArray:function(n){return Object.prototype.toString.apply(n)==="[object Array]"},isFunction:function(n){return Object.prototype.toString.apply(n)==="[object Function]"},isDate:function(n){return Object.prototype.toString.apply(n)==="[object Date]"},addEventListener:function(n,i,r){n.addEventListener?n.addEventListener(i,r,t):Sys.Browser.agent===Sys.Browser.InternetExplorer&&n.attachEvent?n.attachEvent(s+i,r):n[s+i]=r},removeEventListener:function(i,r,u){i.removeEventListener?i.removeEventListener(r,u,t):Sys.Browser.agent===Sys.Browser.InternetExplorer&&i.detachEvent?i.detachEvent(s+r,u):i[s+r]=n},getCookieValue:function(n){var t=RegExp(n+"[^;]+").exec(document.cookie);return t.toString().replace(/^[^=]+./,u)},xhrGet:function(n,t,r){var u;try{u=new XMLHttpRequest;u.onreadystatechange=function(){u.readyState==4&&(u.status==200?t(u.responseText):r(u.status))};u.open("GET",n,i);u.send()}catch(f){r(f)}},xhrGetFull:function(n,t,r,u){var f,e=t;try{f=new XMLHttpRequest;f.onreadystatechange=function(){f.readyState==4&&(f.status==200?r(f,e):u(f.status))};f.open("GET",n,i);f.send()}catch(o){u(o)}},encodeBase64:function(n){var c;if(!n)return n;var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=[],i=[],s=0,l,o,h,r,f,e,t,y=n.length;do for(l=n.charCodeAt(s++),o=n.charCodeAt(s++),h=n.charCodeAt(s++),t=0,r=l&255,f=l>>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c<t;c++)a.push(v.charAt(i[c]));while(s<y);return a.join(u)},getSessionStorage:function(){return b()},getLocalStorage:function(){if(!w){try{var t=window.localStorage}catch(i){t=n}w=new OfficeExt.SafeStorage(t)}return w},convertIntToCssHexColor:function(n){return"#"+(Number(n)+16777216).toString(16).slice(-6)},attachClickHandler:function(n,t){n.onclick=function(){t()};n.ontouchend=function(n){t();n.preventDefault()}},getQueryStringParamValue:function(n,i){var f=Function._validateParams(arguments,[{name:"queryString",type:String,mayBeNull:t},{name:"paramName",type:String,mayBeNull:t}]),r;return f?(OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."),u):(r=new RegExp("[\\?&]"+i+"=([^&#]*)","i"),!r.test(n))?(OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."),u):r.exec(n)[1]},isiOS:function(){return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?i:t},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(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;i<t.length;i++)u.push(t[i]);return u}else{f=t.constructor();for(r in t)t.hasOwnProperty(r)&&(f[r]=t[r]);return f}else return t},createObject:function(t){var r=n,u,i;if(t)for(r={},u=t.length,i=0;i<u;i++)r[t[i].name]=t[i].value;return r},addClass:function(n,t){if(!OSF.OUtil.hasClass(n,t)){var i=n.getAttribute(f);i?n.setAttribute(f,i+" "+t):n.setAttribute(f,t)}},removeClass:function(n,t){if(OSF.OUtil.hasClass(n,t)){var i=n.getAttribute(f),r=new RegExp("(\\s|^)"+t+"(\\s|$)");i=i.replace(r,u);n.setAttribute(f,i)}},hasClass:function(n,t){var i=n.getAttribute(f);return i&&i.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},focusToFirstTabbable:function(u,f){var e,h=t,s,c=function(){h=i},l=function(n,t,i){if(t<0||t>n)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&e<u.length)s=u[e],window.focus(),s.addEventListener(o,c),s.focus(),s.removeEventListener(o,c),e=l(u.length,e,f),h||s!==document.activeElement||(h=i);return h?s:n},focusToNextTabbable:function(u,f,e){var l,s,c=t,h,a=function(){c=i},y=function(n,t){for(var i=0;i<n.length;i++)if(n[i]===t)return i;return r},v=function(n,t,i){if(t<0||t>n)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s<u.length)h=u[s],h.addEventListener(o,a),h.focus(),h.removeEventListener(o,a),s=v(u.length,s,e),c||h!==document.activeElement||(c=i);return c?h:n}}}();OSF.OUtil.Guid=function(){var n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return{generateNewGuid:function(){for(var i="",r=(new Date).getTime(),t=0;t<32&&r>0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();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};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};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.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.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};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",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",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};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(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,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,dispidMethodMax:145};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,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},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,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},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,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 n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.length<e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments);for(f=[],u=0;u<e;u++)f.push(t[u]);for(this.verifyArguments(n,f),h={},u=0;u<e;u++){if(s=n[u],c=f[u],s.verify&&(l=s.verify(c,i,r),!l))throw o();h[s.name]=c}return h};f.fillOptions=function(n,i,r,u){var o,f,e;n=n||{};for(o in t)OSF.OUtil.listContainsKey(n,o)||(f=undefined,e=t[o],e.calculate&&i&&(f=e.calculate(i,r,u)),f||e.defaultValue===undefined||(f=e.defaultValue),n[o]=f);return n};f.constructCallArgs=function(n,t,u,f){var e={},o,s,h;for(o in n)e[o]=n[o];for(s in t)e[s]=t[s];for(h in i)e[h]=i[h](u,f);return r&&(e=r(e,u,f)),e}};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(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.AsyncMethodNames[t]=i};OSF.DDA.AsyncMethodCall=function(n,t,i,r,u,f,e){function c(n,i,r,u){var f,e,c,l;if(n.length>s+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t<r;t++)i[n[t].name]=n[t].value;return i}var i=new OSF.DDA.HostParameterMap(n),f=i.self,u;i.define=function(n){var t={},u=r(n.toHost);n.invertible?t.map=u:n.canonical?t.toHost=t.fromHost=u:(t.toHost=u,t.fromHost=r(n.fromHost));i.addMapping(n.type,t);n.isComplexType&&i.addComplexType(n.type)};for(u in t)i.define(t[u]);return i};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(n,t){function y(n){return n==OSF.DDA.EventDispId.dispidObjectDeletedEvent||n==OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent||n==OSF.DDA.EventDispId.dispidObjectDataChangedEvent||n==OSF.DDA.EventDispId.dispidContentControlAddedEvent}function o(n,t,i,r){if(typeof n=="number")r||(r=t.getCallArgs(i)),OSF.DDA.issueAsyncResult(r,n,OSF.DDA.ErrorCodeManager.getErrorArgs(n));else throw n;}var s=!1,h=null,e=this,r={},u=OSF.DDA.AsyncMethodNames,i=OSF.DDA.MethodDispId,v={GoToByIdAsync:i.dispidNavigateToMethod,GetSelectedDataAsync:i.dispidGetSelectedDataMethod,SetSelectedDataAsync:i.dispidSetSelectedDataMethod,GetDocumentCopyChunkAsync:i.dispidGetDocumentCopyChunkMethod,ReleaseDocumentCopyAsync:i.dispidReleaseDocumentCopyMethod,GetDocumentCopyAsync:i.dispidGetDocumentCopyMethod,AddFromSelectionAsync:i.dispidAddBindingFromSelectionMethod,AddFromPromptAsync:i.dispidAddBindingFromPromptMethod,AddFromNamedItemAsync:i.dispidAddBindingFromNamedItemMethod,GetAllAsync:i.dispidGetAllBindingsMethod,GetByIdAsync:i.dispidGetBindingMethod,ReleaseByIdAsync:i.dispidReleaseBindingMethod,GetDataAsync:i.dispidGetBindingDataMethod,SetDataAsync:i.dispidSetBindingDataMethod,AddRowsAsync:i.dispidAddRowsMethod,AddColumnsAsync:i.dispidAddColumnsMethod,DeleteAllDataValuesAsync:i.dispidClearAllRowsMethod,RefreshAsync:i.dispidLoadSettingsMethod,SaveAsync:i.dispidSaveSettingsMethod,GetActiveViewAsync:i.dispidGetActiveViewMethod,GetFilePropertiesAsync:i.dispidGetFilePropertiesMethod,GetOfficeThemeAsync:i.dispidGetOfficeThemeMethod,GetDocumentThemeAsync:i.dispidGetDocumentThemeMethod,ClearFormatsAsync:i.dispidClearFormatsMethod,SetTableOptionsAsync:i.dispidSetTableOptionsMethod,SetFormatsAsync:i.dispidSetFormatsMethod,GetAccessTokenAsync:i.dispidGetAccessTokenMethod,ExecuteRichApiRequestAsync:i.dispidExecuteRichApiRequestMethod,AppCommandInvocationCompletedAsync:i.dispidAppCommandInvocationCompletedMethod,CloseContainerAsync:i.dispidCloseContainerMethod,OpenBrowserWindow:i.dispidOpenBrowserWindow,AddDataPartAsync:i.dispidAddDataPartMethod,GetDataPartByIdAsync:i.dispidGetDataPartByIdMethod,GetDataPartsByNameSpaceAsync:i.dispidGetDataPartsByNamespaceMethod,GetPartXmlAsync:i.dispidGetDataPartXmlMethod,GetPartNodesAsync:i.dispidGetDataPartNodesMethod,DeleteDataPartAsync:i.dispidDeleteDataPartMethod,GetNodeValueAsync:i.dispidGetDataNodeValueMethod,GetNodeXmlAsync:i.dispidGetDataNodeXmlMethod,GetRelativeNodesAsync:i.dispidGetDataNodesMethod,SetNodeValueAsync:i.dispidSetDataNodeValueMethod,SetNodeXmlAsync:i.dispidSetDataNodeXmlMethod,AddDataPartNamespaceAsync:i.dispidAddDataNamespaceMethod,GetDataPartNamespaceAsync:i.dispidGetDataUriByPrefixMethod,GetDataPartPrefixAsync:i.dispidGetDataPrefixByUriMethod,GetNodeTextAsync:i.dispidGetDataNodeTextMethod,SetNodeTextAsync:i.dispidSetDataNodeTextMethod,GetSelectedTask:i.dispidGetSelectedTaskMethod,GetTask:i.dispidGetTaskMethod,GetWSSUrl:i.dispidGetWSSUrlMethod,GetTaskField:i.dispidGetTaskFieldMethod,GetSelectedResource:i.dispidGetSelectedResourceMethod,GetResourceField:i.dispidGetResourceFieldMethod,GetProjectField:i.dispidGetProjectFieldMethod,GetSelectedView:i.dispidGetSelectedViewMethod,GetTaskByIndex:i.dispidGetTaskByIndexMethod,GetResourceByIndex:i.dispidGetResourceByIndexMethod,SetTaskField:i.dispidSetTaskFieldMethod,SetResourceField:i.dispidSetResourceFieldMethod,GetMaxTaskIndex:i.dispidGetMaxTaskIndexMethod,GetMaxResourceIndex:i.dispidGetMaxResourceIndexMethod,CreateTask:i.dispidCreateTaskMethod},l,f,a,c;for(f in v)u[f]&&(r[u[f].id]=v[f]);u=OSF.DDA.SyncMethodNames;i=OSF.DDA.MethodDispId;l={MessageParent:i.dispidMessageParentMethod,SendMessage:i.dispidSendMessageMethod};for(f in l)u[f]&&(r[u[f].id]=l[f]);u=Microsoft.Office.WebExtension.EventType;i=OSF.DDA.EventDispId;a={SettingsChanged:i.dispidSettingsChangedEvent,DocumentSelectionChanged:i.dispidDocumentSelectionChangedEvent,BindingSelectionChanged:i.dispidBindingSelectionChangedEvent,BindingDataChanged:i.dispidBindingDataChangedEvent,ActiveViewChanged:i.dispidActiveViewChangedEvent,OfficeThemeChanged:i.dispidOfficeThemeChangedEvent,DocumentThemeChanged:i.dispidDocumentThemeChangedEvent,AppCommandInvoked:i.dispidAppCommandInvokedEvent,DialogMessageReceived:i.dispidDialogMessageReceivedEvent,DialogParentMessageReceived:i.dispidDialogParentMessageReceivedEvent,ObjectDeleted:i.dispidObjectDeletedEvent,ObjectSelectionChanged:i.dispidObjectSelectionChangedEvent,ObjectDataChanged:i.dispidObjectDataChangedEvent,ContentControlAdded:i.dispidContentControlAddedEvent,RichApiMessage:i.dispidRichApiMessageEvent,ItemChanged:i.dispidOlkItemSelectedChangedEvent,RecipientsChanged:i.dispidOlkRecipientsChangedEvent,AppointmentTimeChanged:i.dispidOlkAppointmentTimeChangedEvent,TaskSelectionChanged:i.dispidTaskSelectionChangedEvent,ResourceSelectionChanged:i.dispidResourceSelectionChangedEvent,ViewSelectionChanged:i.dispidViewSelectionChangedEvent,DataNodeInserted:i.dispidDataNodeAddedEvent,DataNodeReplaced:i.dispidDataNodeReplacedEvent,DataNodeDeleted:i.dispidDataNodeDeletedEvent};for(c in a)u[c]&&(r[u[c]]=a[c]);e[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function(i,u,f,e){var s,a,v,l,p,b,w,k;try{a=i.id;v=OSF.DDA.AsyncMethodCalls[a];s=v.verifyAndExtractCall(u,f,e);var y=r[a],d=n(a),c=h;window.Excel&&window.Office.context.requirements.isSetSupported("RedirectV1Api")&&(window.Excel._RedirectV1APIs=!0);window.Excel&&window.Excel._RedirectV1APIs&&(c=window.Excel._V1APIMap[a])?(l=OSF.OUtil.shallowCopy(s),delete l[Microsoft.Office.WebExtension.Parameters.AsyncContext],c.preprocess&&(l=c.preprocess(l)),p=new window.Excel.RequestContext,b=c.call(p,l),p.sync().then(function(){var n=b.value,t=n.status;delete n.status;delete n["@odata.type"];c.postprocess&&(n=c.postprocess(n,l));t!=0&&(n=OSF.DDA.ErrorCodeManager.getErrorArgs(t));OSF.DDA.issueAsyncResult(s,t,n)})["catch"](function(){OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,h)})):(w=t.toHost?t.toHost(y,s):s,k=(new Date).getTime(),d[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:y,hostCallArgs:w,onCalling:function(){},onReceiving:function(){},onComplete:function(n,i){var r,u;r=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?t.fromHost?t.fromHost(y,i):i:i;u=v.processResponse(n,r,f,s);OSF.DDA.issueAsyncResult(s,n,u);OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(y,w,Math.abs((new Date).getTime()-k),n)}}))}catch(g){o(g,v,u,s)}};e[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function(i,u,f,e){function w(n){var t,i;n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(t=l?u.addObjectEventHandler(h,c[Microsoft.Office.WebExtension.Parameters.Id],p):u.addEventHandler(h,p),t||(n=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed));n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(i=OSF.DDA.ErrorCodeManager.getErrorArgs(n));OSF.DDA.issueAsyncResult(c,n,i)}var c,h,p,l=s,b,v,a,k,d;try{if(b=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id],c=b.verifyAndExtractCall(i,f,u),h=c[Microsoft.Office.WebExtension.Parameters.EventType],p=c[Microsoft.Office.WebExtension.Parameters.Handler],e){w(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);return}v=r[h];l=y(v);a=l?c[Microsoft.Office.WebExtension.Parameters.Id]:f.id||"";k=l?u.getObjectEventHandlerCount(h,a):u.getEventHandlerCount(h);k==0?(d=n(h)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync],d({eventType:h,dispId:v,targetId:a,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:w,onEvent:function(n){var i=t.fromHost(v,n);l?u.fireObjectEvent(a,OSF.DDA.OMFactory.manufactureEventArgs(h,a,i)):u.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(h,f,i))}})):w(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(g){o(g,b,i,c)}};e[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function(t,i,u){function k(n){var t;n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(t=OSF.DDA.ErrorCodeManager.getErrorArgs(n));OSF.DDA.issueAsyncResult(e,n,t)}var e,f,a,c=s,p,w,l,b,v,d,g;try{p=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];e=p.verifyAndExtractCall(t,u,i);f=e[Microsoft.Office.WebExtension.Parameters.EventType];a=e[Microsoft.Office.WebExtension.Parameters.Handler];w=r[f];c=y(w);l=c?e[Microsoft.Office.WebExtension.Parameters.Id]:u.id||"";a===h?(v=c?i.clearObjectEventHandlers(f,l):i.clearEventHandlers(f),b=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):(v=c?i.removeObjectEventHandler(f,l,a):i.removeEventHandler(f,a),b=v?OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist);d=c?i.getObjectEventHandlerCount(f,l):i.getEventHandlerCount(f);v&&d==0?(g=n(f)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync],g({eventType:f,dispId:w,targetId:l,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:k})):k(b)}catch(nt){o(nt,p,t,e)}};e[OSF.DDA.DispIdHost.Methods.OpenDialog]=function(i,u,f){function y(n){var t,i;n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?i=OSF.DDA.ErrorCodeManager.getErrorArgs(n):(t={},t[Microsoft.Office.WebExtension.Parameters.Id]=v,t[Microsoft.Office.WebExtension.Parameters.Data]=u,i=a.processResponse(n,t,f,c),OSF.DialogShownStatus.hasDialogShown=!0,u.clearEventHandlers(e),u.clearEventHandlers(l));OSF.DDA.issueAsyncResult(c,n,i)}var c,v,e=Microsoft.Office.WebExtension.EventType.DialogMessageReceived,l=Microsoft.Office.WebExtension.EventType.DialogEventReceived,a;try{if((e==undefined||l==undefined)&&y(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported),OSF.DDA.AsyncMethodNames.DisplayDialogAsync==h){y(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);return}a=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id];c=a.verifyAndExtractCall(i,f,u);var w=r[e],p=n(e),b=p[OSF.DDA.DispIdHost.Delegates.OpenDialog]!=undefined?p[OSF.DDA.DispIdHost.Delegates.OpenDialog]:p[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];v=JSON.stringify(c);OSF.DialogShownStatus.hasDialogShown||(u.clearQueuedEvent(e),u.clearQueuedEvent(l),u.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived));b({eventType:e,dispId:w,targetId:v,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:y,onEvent:function(n){var h=t.fromHost(w,n),o=OSF.DDA.OMFactory.manufactureEventArgs(e,f,h),r,i;o.type==l&&(r=OSF.DDA.ErrorCodeManager.getErrorArgs(o.error),i={},i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=r.name||r,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=r.message||r,o.error=new OSF.DDA.Error(i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]));u.fireOrQueueEvent(o);h[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed&&(u.clearEventHandlers(e),u.clearEventHandlers(l),u.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived),OSF.DialogShownStatus.hasDialogShown=s)}})}catch(k){o(k,a,i,c)}};e[OSF.DDA.DispIdHost.Methods.CloseDialog]=function(t,i,u,f){function y(n){h=n;OSF.DialogShownStatus.hasDialogShown=s}var a,e,v,h=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,c;try{c=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id];a=c.verifyAndExtractCall(t,f,u);e=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;v=Microsoft.Office.WebExtension.EventType.DialogEventReceived;u.clearEventHandlers(e);u.clearEventHandlers(v);var p=r[e],l=n(e),w=l[OSF.DDA.DispIdHost.Delegates.CloseDialog]!=undefined?l[OSF.DDA.DispIdHost.Delegates.CloseDialog]:l[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];w({eventType:e,dispId:p,targetId:i,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:y})}catch(b){o(b,c,t,a)}if(h!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,h);};e[OSF.DDA.DispIdHost.Methods.MessageParent]=function(t,i){var u={},f=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id],e=f.verifyAndExtractCall(t,i,u),o=n(OSF.DDA.SyncMethodNames.MessageParent.id),s=o[OSF.DDA.DispIdHost.Delegates.MessageParent],h=r[OSF.DDA.SyncMethodNames.MessageParent.id];return s({dispId:h,hostCallArgs:e,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})};e[OSF.DDA.DispIdHost.Methods.SendMessage]=function(t,i,u){var f={},e=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id],o=e.verifyAndExtractCall(t,u,f),s=n(OSF.DDA.SyncMethodNames.SendMessage.id),h=s[OSF.DDA.DispIdHost.Delegates.SendMessage],c=r[OSF.DDA.SyncMethodNames.SendMessage.id];return h({dispId:c,hostCallArgs:o,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})}};OSF.DDA.DispIdHost.addAsyncMethods=function(n,t,i){var f,r,u;for(f in t)r=t[f],u=r.displayName,n[u]||OSF.OUtil.defineEnumerableProperty(n,u,{value:function(t){return function(){var r=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod];r(t,arguments,n,i)}}(r)})};OSF.DDA.DispIdHost.addEventSupport=function(n,t,i){var r=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName,u=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;n[r]||OSF.OUtil.defineEnumerableProperty(n,r,{value:function(){var r=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler];r(arguments,t,n,i)}});n[u]||OSF.OUtil.defineEnumerableProperty(n,u,{value:function(){var i=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler];i(arguments,t,n)}})},function(n){var e="\n",i=!0,t=null,r="undefined",h=function(){function n(){}return n.isInstanceOfType=function(n,u){if(typeof u===r||u===t)return!1;if(u instanceof n)return i;var f=u.constructor;return f&&typeof f=="function"&&f.__typeName&&f.__typeName!=="Object"||(f=Object),!!(f===n)||f.__typeName&&n.__typeName&&f.__typeName===n.__typeName},n}(),o,u,s,f;n.MsAjaxTypeHelper=h;o=function(){function n(){}var i="Parameter name: {0}";return n.create=function(n,t){var i=new Error(n),r;if(i.message=n,t)for(r in t)i[r]=t[r];return i.popStackFrame(),i},n.parameterCount=function(t){var r="Sys.ParameterCountException: "+(t?t:"Parameter count mismatch."),i=n.create(r,{name:"Sys.ParameterCountException"});return i.popStackFrame(),i},n.argument=function(t,r){var o="Sys.ArgumentException: "+(r?r:"Value does not fall within the expected range."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentException",paramName:t}),f.popStackFrame(),f},n.argumentNull=function(t,r){var o="Sys.ArgumentNullException: "+(r?r:"Value cannot be null."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentNullException",paramName:t}),f.popStackFrame(),f},n.argumentOutOfRange=function(f,o,s){var h="Sys.ArgumentOutOfRangeException: "+(s?s:"Specified argument was out of the range of valid values."),c;return f&&(h+=e+u.format(i,f)),typeof o!==r&&o!==t&&(h+=e+u.format("Actual value was {0}.",o)),c=n.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:f,actualValue:o}),c.popStackFrame(),c},n.argumentType=function(t,r,f,o){var s="Sys.ArgumentTypeException: ",h;return s+=o?o:r&&f?u.format("Object of type '{0}' cannot be converted to type '{1}'.",r.getName?r.getName():r,f.getName?f.getName():f):"Object cannot be converted to the required type.",t&&(s+=e+u.format(i,t)),h=n.create(s,{name:"Sys.ArgumentTypeException",paramName:t,actualType:r,expectedType:f}),h.popStackFrame(),h},n.argumentUndefined=function(t,r){var o="Sys.ArgumentUndefinedException: "+(r?r:"Value cannot be undefined."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentUndefinedException",paramName:t}),f.popStackFrame(),f},n.invalidOperation=function(t){var r="Sys.InvalidOperationException: "+(t?t:"Operation is not valid due to the current state of the object."),i=n.create(r,{name:"Sys.InvalidOperationException"});return i.popStackFrame(),i},n}();n.MsAjaxError=o;u=function(){function n(){}return n.format=function(n){for(var r,i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return r=n,r.replace(/{(\d+)}/gm,function(n,t){var r=parseInt(t,10);return i[r]===undefined?"{"+t+"}":i[r]})},n.startsWith=function(n,t){return n.substr(0,t.length)===t},n}();n.MsAjaxString=u;s=function(){function n(){}return n.trace=function(){},n}();n.MsAjaxDebug=s;OsfMsAjaxFactory.isMsAjaxLoaded()||(f=function(n,t,i){n.__typeName===undefined&&(n.__typeName=t);n.__class===undefined&&(n.__class=i)},f(Function,"Function",i),f(Error,"Error",i),f(Object,"Object",i),f(String,"String",i),f(Boolean,"Boolean",i),f(Date,"Date",i),f(Number,"Number",i),f(RegExp,"RegExp",i),f(Array,"Array",i),Function.createCallback||(Function.createCallback=function(n,t){var r=Function._validateParams(arguments,[{name:"method",type:Function},{name:"context",mayBeNull:i}]);if(r)throw r;return function(){var u=arguments.length,r,i;if(u>0){for(r=[],i=0;i<u;i++)r[i]=arguments[i];return r[u]=t,n.apply(this,r)}return n.call(this,t)}}),Function.createDelegate||(Function.createDelegate=function(n,t){var r=Function._validateParams(arguments,[{name:"instance",mayBeNull:i},{name:"method",type:Function}]);if(r)throw r;return function(){return t.apply(n,arguments)}}),Function._validateParams||(Function._validateParams=function(n,i,u){var f,s=i.length,e,c,o,h;if(u=u||typeof u===r,f=Function._validateParameterCount(n,i,u),f)return f.popStackFrame(),f;for(e=0,c=n.length;e<c;e++){if(o=i[Math.min(e,s-1)],h=o.name,o.parameterArray)h+="["+(e-s+1)+"]";else if(!u&&e>=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(h<e){for(c=e,f=0;f<e;f++)l=r[f],(l.optional||l.parameterArray)&&c--;h<c&&(s=i)}else if(u&&h>e)for(s=i,f=0;f<e;f++)if(r[f].parameterArray){s=!1;break}return s?(a=o.parameterCount(),a.popStackFrame(),a):t}),Function._validateParameter||(Function._validateParameter=function(n,i,u){var f,h=i.type,l=!!i.integer,a=!!i.domElement,v=!!i.mayBeNull,o,s,c;if(f=Function._validateParameterType(n,h,l,a,v,u),f)return f.popStackFrame(),f;if(o=i.elementType,s=!!i.elementMayBeNull,h===Array&&typeof n!==r&&n!==t&&(o||!s))for(var y=!!i.elementInteger,p=!!i.elementDomElement,e=0;e<n.length;e++)if(c=n[e],f=Function._validateParameterType(c,o,y,p,s,u+"["+e+"]"),f)return f.popStackFrame(),f;return t}),Function._validateParameterType||(Function._validateParameterType=function(i,u,f,e,o,s){var h,c;return typeof i===r?o?t:(h=n.MsAjaxError.argumentUndefined(s),h.popStackFrame(),h):i===t?o?t:(h=n.MsAjaxError.argumentNull(s),h.popStackFrame(),h):u&&!n.MsAjaxTypeHelper.isInstanceOfType(u,i)?(h=n.MsAjaxError.argumentType(s,typeof i,u),h.popStackFrame(),h):t}),window.Type||(window.Type=Function),Type.registerNamespace||(Type.registerNamespace=function(n){for(var i=n.split("."),r=window,t=0;t<i.length;t++)r[i[t]]=r[i[t]]||{},r=r[i[t]]}),Type.prototype.registerClass||(Type.prototype.registerClass=function(n){n={}}),typeof Sys===r&&Type.registerNamespace("Sys"),Error.prototype.popStackFrame||(Error.prototype.popStackFrame=function(){var n=this,s,u;if(arguments.length!==0)throw o.parameterCount();if(typeof n.stack!==r&&n.stack!==t&&typeof n.fileName!==r&&n.fileName!==t&&typeof n.lineNumber!==r&&n.lineNumber!==t){for(var i=n.stack.split(e),f=i[0],h=n.fileName+":"+n.lineNumber;typeof f!==r&&f!==t&&f.indexOf(h)===-1;)i.shift(),f=i[0];(s=i[1],typeof s!==r&&s!==t)&&(u=s.match(/@(.*):(\d+)$/),typeof u!==r&&u!==t)&&(n.fileName=u[1],n.lineNumber=parseInt(u[2]),i.shift(),n.stack=i.join(e))}}),OsfMsAjaxFactory.msAjaxError=o,OsfMsAjaxFactory.msAjaxString=u,OsfMsAjaxFactory.msAjaxDebug=s)}(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(n,t){var i,r=n.number;if(r)switch(r){case-2146828218:i=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case-2147467259:i=OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened;break;case-2146828283:i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam;break;case-2147209089:i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam;break;case-2146827850:default:i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}t.onComplete&&t.onComplete(i||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod=function(n){var t,i=n.number;if(i)switch(i){case-2146828218:t=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case-2146827850:default:t=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}return t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError};OSF.DDA.SafeArray.Delegate.SpecialProcessor=function(){function n(n){var t,e,i,r,u,f,o;try{if(e=n.ubound(1),i=n.ubound(2),n=n.toArray(),e==1&&i==1)t=[n];else for(t=[],r=0;r<e;r++){for(u=[],f=0;f<i;f++)o=n[r*i+f],o!=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid&&u.push(o);u.length>0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r<f;r++)i[r]=t(i[r]);else if(OSF.OUtil.isDate(n))i=n.getVarDate();else if(typeof n=="object"&&!OSF.OUtil.isArray(n)){i=[];for(u in n)OSF.OUtil.isFunction(n[u])||(i[u]=t(n[u]))}return i}function i(n){var u=n,r,t;if(n!=null&&n.toArray)for(r=n.toArray(),u=new Array(r.length),t=0;t<r.length;t++)u[t]=i(r[t]);return u}try{n.onCalling&&n.onCalling();OSF.ClientHostController.execute(n.dispId,t(n.hostCallArgs),function(t){var u=t.toArray(),e=u[OSF.DDA.SafeArray.Response.Status],r,f,o;if(e==OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult)return r=u[OSF.DDA.SafeArray.Response.Payload],r=i(r),r!=null&&(n._chunkResultData||(n._chunkResultData=[]),n._chunkResultData[r[0]]=r[1]),!1;if(n.onReceiving&&n.onReceiving(),n.onComplete){if(e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){if(u.length>2)for(r=[],f=1;f<u.length;f++)r[f-1]=u[f];else r=u[OSF.DDA.SafeArray.Response.Payload];n._chunkResultData&&(r=i(r),r!=null&&(o=r[r.length-1],n._chunkResultData.length==o?r[r.length-1]=n._chunkResultData:e=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))}else r=u[OSF.DDA.SafeArray.Response.Payload];n.onComplete(e,r)}return!0})}catch(r){OSF.DDA.SafeArray.Delegate._onException(r,n)}};OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function(n,t){var i=(new Date).getTime();return function(r){t.onReceiving&&t.onReceiving();var u=r.toArray?r.toArray()[OSF.DDA.SafeArray.Response.Status]:r;t.onComplete&&t.onComplete(u);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs((new Date).getTime()-i),u)}};OSF.DDA.SafeArray.Delegate.registerEventAsync=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);try{OSF.ClientHostController.registerEvent(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.unregisterEvent(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.ClientMode={ReadWrite:0,ReadOnly:1};OSF.DDA.RichInitializationReason={1:Microsoft.Office.WebExtension.InitializationReason.Inserted,2:Microsoft.Office.WebExtension.InitializationReason.DocumentOpened};OSF.InitializationHelper=function(n,t,i,r,u){var f=this;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._initializeSettings=f.initializeSettings};OSF.InitializationHelper.prototype.deserializeSettings=function(n,t){var r=OSF.OUtil.getSessionStorage(),i,u;return r&&(i=r.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()),i?n=JSON.parse(i):(i=JSON.stringify(n),r.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i))),u=OSF.DDA.SettingsManager.deserializeSettings(n),t?new OSF.DDA.RefreshableSettings(u):new OSF.DDA.Settings(u)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(){};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(n){this.prepareApiSurface(n);Microsoft.Office.WebExtension.initialize(this.getInitializationReason(n))};OSF.InitializationHelper.prototype.prepareApiSurface=function(n){var r=new OSF.DDA.License(n.get_eToken()),u=OSF.DDA.OfficeTheme&&OSF.DDA.OfficeTheme.getOfficeTheme?OSF.DDA.OfficeTheme.getOfficeTheme:null,t,i;n.get_isDialog()?OSF.DDA.UI.ChildUI&&(n.ui=new OSF.DDA.UI.ChildUI):OSF.DDA.UI.ParentUI&&(n.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]));OSF.DDA.OpenBrowser&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.OpenBrowserWindow]);OSF.DDA.Auth&&(n.auth=new OSF.DDA.Auth,OSF.DDA.DispIdHost.addAsyncMethods(n.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]));OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(n,n.doc,r,null,u));t=OSF.DDA.DispIdHost.getClientDelegateMethods;i=OSF.DDA.SafeArray.Delegate.ParameterMap;OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(t,i))};OSF.InitializationHelper.prototype.getInitializationReason=function(n){return OSF.DDA.RichInitializationReason[n.get_reason()]};OSF.DDA.DispIdHost.getClientDelegateMethods=function(n){var t={},i,r;return t[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync,t[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync,t[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync,t[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.SafeArray.Delegate.openDialog,t[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.SafeArray.Delegate.closeDialog,t[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.messageParent,t[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.SafeArray.Delegate.sendMessage,OSF.DDA.AsyncMethodNames.RefreshAsync&&n==OSF.DDA.AsyncMethodNames.RefreshAsync.id&&(i=function(n,t,i){return OSF.DDA.ClientSettingsManager.read(t,i)},t[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(i)),OSF.DDA.AsyncMethodNames.SaveAsync&&n==OSF.DDA.AsyncMethodNames.SaveAsync.id&&(r=function(n,t,i){return OSF.DDA.ClientSettingsManager.write(n[OSF.DDA.SettingsManager.SerializedSettings],n[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],t,i)},t[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(r)),t};OSF=OSF||{},function(n){var t=function(){function n(n){this.data=n;this.safeArrayFlag=this.isSafeArray(n)}var t=!1;return n.prototype.dimensions=function(){var n=0;return this.safeArrayFlag?n=this.data[0][0]:this.isArray()&&(n=2),n},n.prototype.getItem=function(){var i=[],n=null,t;for(i=this.safeArrayFlag?this.toArray():this.data,n=i,t=0;t<arguments.length;t++)n=n[arguments[t]];return n},n.prototype.lbound=function(){return 0},n.prototype.ubound=function(n){var t=this,i=0;if(t.safeArrayFlag)i=t.data[0][n];else if(t.isArray())if(n==1)return t.data.length;else if(n==2)if(OSF.OUtil.isArray(t.data[0]))return t.data[0].length;else if(t.data[0]!=null)return 1;return i},n.prototype.toArray=function(){var i=this,r;if(i.isArray()==t)return i.data;for(var u=[],e=i.safeArrayFlag?1:0,f=e;f<i.data.length;f++)r=i.data[f],i.isSafeArray(r)?u.push(new n(r)):u.push(r);return u},n.prototype.isArray=function(){return OSF.OUtil.isArray(this.data)},n.prototype.isSafeArray=function(n){var e=t,i,o,r,u,f;if(OSF.OUtil.isArray(n)&&OSF.OUtil.isArray(n[0])){if(i=n[0],o=i[0],i.length!=o+1)return t;for(r=1,u=1;u<i.length;u++){if(f=i[u],isFinite(f)==t)return t;r=r*f}r++;e=r==n.length}return e},n}();n.WebkitSafeArray=t}(OSFWebkit||(OSFWebkit={})),function(n){var t;(function(n){function u(n,i){t.agaveHostCallback(n,i)}function f(n,i){t.agaveHostEventCallback(n,i)}function e(){return t==null&&(t=new i("OSF.ScriptMessaging.agaveHostCallback","OSF.ScriptMessaging.agaveHostEventCallback")),t}var t=null,r,i;n.agaveHostCallback=u;n.agaveHostEventCallback=f;n.GetScriptMessenger=e;r=function(){function n(n,t,i){this.id=n;this.targetId=t;this.handler=i}return n}();i=function(){function n(t,i){var r=this;r.callingIndex=0;r.callbackList={};r.eventHandlerList={};r.asyncMethodCallbackFunctionName=t;r.eventCallbackFunctionName=i;r.conversationId=n.getCurrentTimeMS().toString()}return n.prototype.invokeMethod=function(n,t,i,r){var u={};this.postWebkitMessage(u,n,t,i,r)},n.prototype.registerEvent=function(n,t,i,u,f,e){var o={eventCallbackFunction:this.eventCallbackFunctionName},s={id:i,targetId:u},h=this.postWebkitMessage(o,n,t,s,e);this.eventHandlerList[h]=new r(i,u,f)},n.prototype.unregisterEvent=function(n,t,i,r,u){var f=this,s={id:i,targetId:r},e,o;for(e in f.eventHandlerList)f.eventHandlerList.hasOwnProperty(e)&&(o=f.eventHandlerList[e],o.id==i&&o.targetId==r&&delete f.eventHandlerList[e]);f.invokeMethod(n,t,s,u)},n.prototype.agaveHostCallback=function(n,t){var r=this.callbackList[n],i;r&&(i=r(t),(i===undefined||i===!0)&&delete this.callbackList[n])},n.prototype.agaveHostEventCallback=function(n,t){var i=this.eventHandlerList[n];i&&i.handler(t)},n.prototype.postWebkitMessage=function(t,i,r,u,f){var e=this,s=e.generateCorrelationId(),h,o;return e.callbackList[s]=f,t.methodId=r,t.params=u,t.callbackId=s,t.callbackFunction=e.asyncMethodCallbackFunctionName,h=function(){window.webkit.messageHandlers[i].postMessage(JSON.stringify(t))},o=n.getCurrentTimeMS(),e.lastMessageTimestamp==null||o-e.lastMessageTimestamp>=n.MESSAGE_TIME_DELTA?(h(),e.lastMessageTimestamp=o):(e.lastMessageTimestamp+=n.MESSAGE_TIME_DELTA,setTimeout(function(){h()},e.lastMessageTimestamp-o)),s},n.prototype.generateCorrelationId=function(){return++this.callingIndex,this.conversationId+this.callingIndex},n.getCurrentTimeMS=function(){return(new Date).getTime()},n.MESSAGE_TIME_DELTA=10,n}();n.WebkitScriptMessaging=i})(t=n.ScriptMessaging||(n.ScriptMessaging={}))}(OSFWebkit||(OSFWebkit={}));OSF.ScriptMessaging=OSFWebkit.ScriptMessaging,function(n){var i,r,t;n.MessageHandlerName="Agave";n.PopupMessageHandlerName="WefPopupHandler",function(n){var t="HostFullVersion",i="HostCustomMessage",r="RequirementMatrix",u="CommerceAllowed",f="TouchEnabled",e="InstanceId",o="CorrelationId",s="APISetVersion",h="SolutionToken",c="ControlIntegrationLevel",l="ActivationMode",a="DocumentUrl",v="BindingCount",y="AppDataLocale",p="APPUILocale",w="AppCapabilities",b="APIVersionSequence",k="RevisionVersion",d="MinorVersion",g="MajorVersion",nt="SolutionReferenceId",tt="Settings";n[n[tt]=0]=tt;n[n[nt]=1]=nt;n[n.AppType=2]="AppType";n[n[g]=3]=g;n[n[d]=4]=d;n[n[k]=5]=k;n[n[b]=6]=b;n[n[w]=7]=w;n[n[p]=8]=p;n[n[y]=9]=y;n[n[v]=10]=v;n[n[a]=11]=a;n[n[l]=12]=l;n[n[c]=13]=c;n[n[h]=14]=h;n[n[s]=15]=s;n[n[o]=16]=o;n[n[e]=17]=e;n[n[f]=18]=f;n[n[u]=19]=u;n[n[r]=20]=r;n[n[i]=21]=i;n[n[t]=22]=t}(n.AppContextProperties||(n.AppContextProperties={}));i=n.AppContextProperties,function(n){var t="SendMessage",i="GetContext",r="WriteSettings",u="UnregisterEvent",f="RegisterEvent";n[n.Execute=1]="Execute";n[n[f]=2]=f;n[n[u]=3]=u;n[n[r]=4]=r;n[n[i]=5]=i;n[n[t]=6]=t}(n.MethodId||(n.MethodId={}));r=n.MethodId;t=function(){function t(n){this.hostScriptProxy=n}var r="message",i=null;return t.prototype.execute=function(t,r,u){var f=r,e,o;f==i&&(f=[]);e={id:t,apiArgs:f};o=function(t){var e,f,r;if(u){if(e=[],OSF.OUtil.isArray(t))for(f=0;f<t.length;f++)r=t[f],OSF.OUtil.isArray(r)&&(r=new n.WebkitSafeArray(r)),e.unshift(r);return u.apply(i,e)}};this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.Execute,e,o)},t.prototype.registerEvent=function(t,i,r,u){var f=function(t){var i=t,u=0;OSF.OUtil.isArray(t)&&t.length>=2&&(i=t[0],u=t[1]);r&&r(u,new n.WebkitSafeArray(i))},e=function(t){if(u)return u(new n.WebkitSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebkitSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(i),window.location.origin)},t.prototype.openDialog=function(n,u,f,e){function c(t){if(t.origin==window.location.origin)try{var i=JSON.parse(t.data);i.dialogMessage&&f(n,[OSF.DialogMessageType.DialogMessageReceived,i.dialogMessage.messageContent])}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+t.data)}}function k(){try{(t.popup==i||t.popup.closed)&&(window.clearInterval(t.interval),window.removeEventListener(r,c),t.NotifyError=i,t.popup=i,f(n,[OSF.DialogMessageType.DialogClosed]))}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}var l,o,h,y;if(t.popup&&!t.popup.closed){e(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}l="action=displayDialog";t.OpenDialogCallback=undefined;var a="#",s=JSON.parse(u),v=s.url;if(v){o=v.split(a);h="?";o[0].indexOf("?")>-1&&(h="&");var p=screen.width*s.width/100,w=screen.height*s.height/100,b="width="+p+", height="+w;o[0]=o[0].concat(h).concat(l);y=o.join(a);t.popup=window.open(y,"",b);t.OpenDialogCallback=function(i){if(i==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){window.addEventListener(r,c);this.messageEventListener=c;t.interval=window.setInterval(k,1e3);function u(t){f(n,[t])}t.NotifyError=u}e(i)}}},t.prototype.closeDialog=function(n,u,f){t.popup?(t.interval&&window.clearInterval(t.interval),t.popup.close(),t.popup=i,window.removeEventListener(r,this.messageEventListener),t.NotifyError=i,f(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):f(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},t.prototype.sendMessage=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.SendMessage,t,i)},t}();n.WebkitHostController=t}(OSFWebkit||(OSFWebkit={}));OSF.Webkit=OSFWebkit;OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger());OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){for(var f,i=OSF.Webkit.AppContextProperties,h=n[i.AppType],e=n[i.Settings],o={},s=e[0],c=e[1],r=0;r<s.length;r++)o[s[r]]=c[r];var l=n[i.SolutionReferenceId],a=n[i.MajorVersion],v=n[i.MinorVersion],y=n[i.AppCapabilities],p=n[i.APPUILocale],w=n[i.AppDataLocale],b=n[i.DocumentUrl],k=n[i.ActivationMode],d=n[i.ControlIntegrationLevel],u=n[i.SolutionToken];u=u?u.toString():"";var g=n[i.CorrelationId],nt=n[i.InstanceId],tt=n[i.TouchEnabled],it=n[i.CommerceAllowed],rt=n[i.RequirementMatrix],ut=n[i.HostCustomMessage],ft=n[i.HostFullVersion];f=new OSF.OfficeAppContext(l,h,a,p,w,b,y,o,k,d,u,g,nt,tt,it,v,rt,ut,ft);OSF.AppTelemetry&&OSF.AppTelemetry.initialize(f);t(f)},i;i=this._hostInfo.isDialog?OSF.Webkit.PopupMessageHandlerName:OSF.Webkit.MessageHandlerName;OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(i,OSF.Webkit.MethodId.GetContext,[],r)},function(n){var u="ResponseTime",f="Message",i="SessionId",r="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}return Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t}),Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t}),n.prototype.SerializeFields=function(){},n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())},n.prototype.SerializeRow=function(){var n=this;return n._serializedFields={},n.SetSerializedField("Table",n._table),n.SerializeFields(),JSON.stringify(n._serializedFields)},n}(),o,s,h,c,l;n.BaseUsageData=e;o=function(n){function u(){n.call(this,"AppActivated")}var e="IsFromWacAutomation",o="WacHostEnvironment",s="HostJSVersion",h="OfficeJSVersion",c="DocUrl",l="AppSizeHeight",a="AppSizeWidth",v="ClientId",y="HostVersion",p="Host",w="UserId",b="Browser",k="AssetId",d="AppURL",g="AppInstanceId",nt="AppId";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(nt,n.AppId);n.SetSerializedField(g,n.AppInstanceId);n.SetSerializedField(d,n.AppURL);n.SetSerializedField(k,n.AssetId);n.SetSerializedField(b,n.Browser);n.SetSerializedField(w,n.UserId);n.SetSerializedField(p,n.Host);n.SetSerializedField(y,n.HostVersion);n.SetSerializedField(v,n.ClientId);n.SetSerializedField(a,n.AppSizeWidth);n.SetSerializedField(l,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(c,n.DocUrl);n.SetSerializedField(h,n.OfficeJSVersion);n.SetSerializedField(s,n.HostJSVersion);n.SetSerializedField(o,n.WacHostEnvironment);n.SetSerializedField(e,n.IsFromWacAutomation)},u}(e);n.AppActivatedUsageData=o;s=function(n){function f(){n.call(this,"ScriptLoad")}var e="StartTime",o="ScriptId";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)},f}(e);n.ScriptLoadUsageData=s;h=function(n){function u(){n.call(this,"AppClosed")}var f="CloseMethod",e="OpenTime",o="AppSizeFinalHeight",s="AppSizeFinalWidth",h="FocusTime";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.FocusTime);n.SetSerializedField(s,n.AppSizeFinalWidth);n.SetSerializedField(o,n.AppSizeFinalHeight);n.SetSerializedField(e,n.OpenTime);n.SetSerializedField(f,n.CloseMethod)},u}(e);n.AppClosedUsageData=h;c=function(n){function f(){n.call(this,"APIUsage")}var e="ErrorType",o="Parameters",s="APIID",h="APIType";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.APIType);n.SetSerializedField(s,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(e,n.ErrorType)},f}(e);n.APIUsageUsageData=c;l=function(n){function u(){n.call(this,"AppInitialization")}var e="SuccessCode";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)},u}(e);n.AppInitializationUsageData=l}(OSFLog||(OSFLog={})),function(n){"use strict";function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}function f(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var r={traceLevel:n,message:t,flag:i,internalLog:!0},u=JSON.stringify(r);OSF.Logger.ulsEndpoint.writeLog(u)}}function e(){try{return new t}catch(n){return null}}var i,r,t;(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));i=n.TraceLevel,function(n){n[n.none=0]="none";n[n.flush=1]="flush"}(n.SendFlag||(n.SendFlag={}));r=n.SendFlag;n.allowUploadingData=u;n.sendLog=f;t=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}return n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)},n.prototype.loadProxyFrame=function(){var n=this;n.proxyFrame==null&&(n.proxyFrame=document.createElement("iframe"),n.proxyFrame.setAttribute("style","display:none"),n.proxyFrame.setAttribute("src",n.telemetryEndPoint),document.head.appendChild(n.proxyFrame))},n.prototype.tellProxyFrameReady=function(t){var i=this,e=i,r,u,f;if(t.data==="ProxyFrameReadyToLog"){for(i.proxyFrameReady=!0,r=0;r<i.buffer.length;r++)i.writeLog(i.buffer[r]);i.buffer.length=0;OSF.OUtil.removeEventListener(window,"message",function(n){return e.tellProxyFrameReady(n)})}else t.data==="ProxyFrameReadyToInit"&&(u={appName:"Office APPs",sessionId:OSF.OUtil.Guid.generateNewGuid()},f=JSON.stringify(u),i.proxyFrame.contentWindow.postMessage(f,n.telemetryOrigin))},n.telemetryOrigin="https://telemetryservice.firstpartyapps.oaspapps.com",n}();OSF.Logger||(OSF.Logger=n);n.ulsEndpoint=e()}(Logger||(Logger={})),function(n){var t=function(){function n(){}return n.prototype.getAriaCDNLocation=function(){return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"},n.getInstance=function(){return n.AriaLoggerObj===undefined&&(n.AriaLoggerObj=new n),n.AriaLoggerObj},n.prototype.isIUsageData=function(n){return n.Fields!==undefined},n.prototype.loadAriaScriptAndLog=function(n,t){var i=1e3;OSF.OUtil.loadScript(this.getAriaCDNLocation(),function(){var u,i,r,f;try{this.ALogger||(u="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439",this.ALogger=AWTLogManager.initialize(u));i=new AWTEventProperties;i.setName("Office.Extensibility.OfficeJS."+n);for(r in t)r.toLowerCase()!=="table"&&i.setProperty(r,t[r]);f=new Date;i.setProperty("Date",f.toISOString());this.ALogger.logEvent(i)}catch(e){}},i)},n.prototype.logData=function(n){this.isIUsageData(n)?this.loadAriaScriptAndLog(n.Table,n.Fields):this.loadAriaScriptAndLog(n.Table,n)},n}();n.AriaLogger=t}(OSFAriaLogger||(OSFAriaLogger={})),function(n){function u(n){return n&&(n=n.replace(/[{}]/g,r).toLowerCase()),n||r}function y(f){var h,o;OSF.Logger&&(t||(t=new v,t.hostVersion=f.get_hostFullVersion()?f.get_hostFullVersion():f.get_appVersion(),t.appId=f.get_id(),t.host=f.get_appName(),t.browser=window.navigator.userAgent,t.correlationId=u(f.get_correlationId()),t.clientId=(new c).getClientId(),t.appInstanceId=f.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=t.appInstanceId.replace(/[{}]/g,r).toLowerCase()),t.message=f.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="16.0.8828.1000",f._wacHostEnvironment&&(t.wacHostEnvironment=f._wacHostEnvironment),f._isFromWacAutomation!==undefined&&f._isFromWacAutomation!==i&&(t.isFromWacAutomation=f._isFromWacAutomation.toString().toLowerCase()),h=f.get_docUrl(),t.docUrl=a.test(h)?h:r,o=location.href,o&&(o=o.split("?")[0].split("#")[0]),t.appURL=o,function(n,t){var o,s,u,f,e;t.assetId=r;t.userId=r;try{o=decodeURIComponent(n);s=new DOMParser;u=s.parseFromString(o,"text/xml");f=u.getElementsByTagName("t")[0].attributes.getNamedItem("cid");e=u.getElementsByTagName("t")[0].attributes.getNamedItem("oid");f&&f.nodeValue?t.userId=f.nodeValue:e&&e.nodeValue&&(t.userId=e.nodeValue);t.assetId=u.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(h){}finally{o=i;u=i;s=i}}(f.get_eToken(),t),function(){var l=new Date,r=i,o=0,c=!1,u=function(){document.hasFocus()?r==i&&(r=new Date):r&&(o+=Math.abs((new Date).getTime()-r.getTime()),r=i)},t=[],h,f;for(t.push(new e("focus",u)),t.push(new e("blur",u)),t.push(new e("focusout",u)),t.push(new e("focusin",u)),h=function(){for(var u=0;u<t.length;u++)OSF.OUtil.removeEventListener(window,t[u].name,t[u].handler);if(t.length=0,!c){document.hasFocus()&&r&&(o+=Math.abs((new Date).getTime()-r.getTime()),r=i);n.onAppClosed(Math.abs((new Date).getTime()-l.getTime()),o);c=s}},t.push(new e("beforeunload",h)),t.push(new e("unload",h)),f=0;f<t.length;f++)OSF.OUtil.addEventListener(window,t[f].name,t[f].handler);u()}(),n.onAppActivated()))}function p(){if(t){(new c).enumerateLog(function(n,t){return(new o).LogRawData(t)},s);var n=new OSFLog.AppActivatedUsageData;n.SessionId=f;n.AppId=t.appId;n.AssetId=t.assetId;n.AppURL=t.appURL;n.UserId=t.userId;n.ClientId=t.clientId;n.Browser=t.browser;n.Host=t.host;n.HostVersion=t.hostVersion;n.CorrelationId=u(t.correlationId);n.AppSizeWidth=window.innerWidth;n.AppSizeHeight=window.innerHeight;n.AppInstanceId=t.appInstanceId;n.Message=t.message;n.DocUrl=t.docUrl;n.OfficeJSVersion=t.officeJSVersion;n.HostJSVersion=t.hostJSVersion;t.wacHostEnvironment&&(n.WacHostEnvironment=t.wacHostEnvironment);t.isFromWacAutomation!==undefined&&t.isFromWacAutomation!==i&&(n.IsFromWacAutomation=t.isFromWacAutomation);(new o).LogData(n);setTimeout(function(){OSF.Logger&&OSF.Logger.allowUploadingData()},100)}}function w(n,t,i,r){var e=new OSFLog.ScriptLoadUsageData;e.CorrelationId=u(r);e.SessionId=f;e.ScriptId=n;e.StartTime=t;e.ResponseTime=i;(new o).LogData(e)}function b(n,i,r,e,s){if(t){var c=new OSFLog.APIUsageUsageData;c.CorrelationId=u(h);c.SessionId=f;c.APIType=n;c.APIID=i;c.Parameters=r;c.ResponseTime=e;c.ErrorType=s;(new o).LogData(c)}}function k(n,t,u,f){var e=i,o;if(t)if(typeof t=="number")e=String(t);else if(typeof t=="object")for(o in t)e!==i?e+=",":e=r,typeof t[o]=="number"&&(e+=String(t[o]));else e=r;OSF.AppTelemetry.onCallDone("method",n,e,u,f)}function d(n,t){OSF.AppTelemetry.onCallDone("property",-1,n,t)}function g(n,t){OSF.AppTelemetry.onCallDone("event",n,i,0,t)}function nt(n,t,r,u){OSF.AppTelemetry.onCallDone(n?"registerevent":"unregisterevent",t,i,r,u)}function tt(n,i){if(t){var r=new OSFLog.AppClosedUsageData;r.CorrelationId=u(h);r.SessionId=f;r.FocusTime=i;r.OpenTime=n;r.AppSizeFinalWidth=window.innerWidth;r.AppSizeFinalHeight=window.innerHeight;(new c).saveLog(f,r.SerializeRow())}}function it(n){h=u(n)}function l(n,t){var i=new OSFLog.AppInitializationUsageData;i.CorrelationId=u(h);i.SessionId=f;i.SuccessCode=n?1:0;i.Message=t;(new o).LogData(i)}function rt(n){l(!1,n)}function ut(n){l(s,n)}var i=null,s=!0,r="";"use strict";var t,f=OSF.OUtil.Guid.generateNewGuid(),h=r,a=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");n.enableTelemetry=s;var v=function(){function n(){}return n}(),e=function(){function n(n,t){this.name=n;this.handler=t}return n}(),c=function(){function n(){this.clientIDKey="Office API client";this.logIdSetKey="Office App Log Id Set"}return n.prototype.getClientId=function(){var t=this,n=t.getValue(t.clientIDKey);return(!n||n.length<=0||n.length>40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync:"closeContainer"}),function(n){var t=function(){function n(){}return n}();n.Container=t}(OfficeExt||(OfficeExt={}));OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseContainerAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidCloseContainerMethod,fromHost:[],toHost:[]});Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u<r.length;u++)if(r[u]===i)return!0;return!1},addEventHandler:function(n,t){if(typeof t!="function")return!1;var i=this._eventHandlers[n];return i&&!this.hasEventHandler(n,t)?(i.push(t),!0):!1},addObjectEventHandler:function(n,t,i){if(typeof i!="function")return!1;var r=this._objectEventHandlers[n];return r&&!this.hasObjectEventHandler(n,t,i)?(r[t]==null&&(r[t]=[]),r[t].push(i),!0):!1},addEventHandlerAndFireQueuedEvent:function(n,t){var r=this._eventHandlers[n],u=r.length==0,i=this.addEventHandler(n,t);return u&&i&&this.fireQueuedEvent(n),i},removeEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r=0;r<i.length;r++)if(i[r]===t)return i.splice(r,1),!0;return!1},removeObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u<r.length;u++)if(r[u]===i)return r.splice(u,1),!0;return!1},clearEventHandlers:function(n){return typeof this._eventHandlers[n]!="undefined"&&this._eventHandlers[n].length>0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u<r.length;u++)r[u](t);return!0}return!1},fireOrQueueEvent:function(n){var t=this,i=n.type,r,u;return i&&t._eventHandlers[i]?(r=t._eventHandlers[i],u=t._queuedEventsArgs[i],r.length==0?u.push(n):t.fireEvent(n),!0):!1},fireQueuedEvent:function(n){var t,i,r,u;if(n&&this._eventHandlers[n]&&(t=this._eventHandlers[n],i=this._queuedEventsArgs[n],t.length>0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),OSF._OfficeAppFactory.getHostInfo().hostPlatform=="win32"&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{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(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});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 i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[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:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});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(n,t,i){return i.supportsEvent(n)}},{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(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"});OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});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(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:65536}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[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(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[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(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[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(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";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:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],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(n){return OSF.OUtil.serializeSettings(n)},deserializeSettings:function(n){return OSF.OUtil.deserializeSettings(n)}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);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(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};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(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};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(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i<n.length;i++)t=Math.max(t,OSF.DDA.DataCoercion.findArrayDimensionality(n[i]));return t+1}else return 0},getCoercionDefaultForBinding:function(n){switch(n){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(n){switch(n){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(t){if(t==n||t==undefined)return n;var i=n,r=typeof t;if(t.rows!==undefined)i=Microsoft.Office.WebExtension.CoercionType.Table;else if(OSF.OUtil.isArray(t))i=Microsoft.Office.WebExtension.CoercionType.Matrix;else if(r=="string"||r=="number"||r=="boolean"||OSF.OUtil.isDate(t))i=Microsoft.Office.WebExtension.CoercionType.Text;else throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject;return i},coerceData:function(n,t,i){return i=i||OSF.DDA.DataCoercion.determineCoercionType(n),i&&i!=t&&(OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin),n=OSF.DDA.DataCoercion._coerceDataFromTable(t,OSF.DDA.DataCoercion._coerceDataToTable(n,i)),OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd)),n},_matrixToText:function(n){if(n.length==1&&n[0].length==1)return""+n[0][0];for(var t="",i=0;i<n.length;i++)t+=n[i].join("\t")+"\n";return t.substring(0,t.length-1)},_textToMatrix:function(n){for(var t=n.split("\n"),i=0;i<t.length;i++)t[i]=t[i].split("\t");return t},_tableToText:function(t){var i="",r;return t.headers!=n&&(i=OSF.DDA.DataCoercion._matrixToText([t.headers])+"\n"),r=OSF.DDA.DataCoercion._matrixToText(t.rows),r==""&&(i=i.substring(0,i.length-1)),i+r},_tableToMatrix:function(t){var i=t.rows;return t.headers!=n&&i.unshift(t.headers),i},_coerceDataFromTable:function(t,i){var r;switch(t){case Microsoft.Office.WebExtension.CoercionType.Table:r=i;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:r=OSF.DDA.DataCoercion._tableToMatrix(i);break;case Microsoft.Office.WebExtension.CoercionType.SlideRange:r=n;OSF.DDA.OMFactory.manufactureSlideRange&&(r=OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(i)));r==n&&(r=OSF.DDA.DataCoercion._tableToText(i));break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:r=OSF.DDA.DataCoercion._tableToText(i)}return r},_coerceDataToTable:function(n,t){t==undefined&&(t=OSF.DDA.DataCoercion.determineCoercionType(n));var i;switch(t){case Microsoft.Office.WebExtension.CoercionType.Table:i=n;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:i=new Microsoft.Office.WebExtension.TableData(n);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:i=new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(n))}return i}}}();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.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 n=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[n.AddDataPartAsync,n.GetDataPartByIdAsync,n.GetDataPartsByNameSpaceAsync])};OSF.DDA.CustomXmlPart=function(n,t,i){var u,e,r,f;OSF.OUtil.defineEnumerableProperties(this,{builtIn:{value:i},id:{value:t},namespaceManager:{value:new OSF.DDA.CustomXmlPrefixMappings(t)}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.DeleteDataPartAsync,u.GetPartNodesAsync,u.GetPartXmlAsync]);e=n._eventDispatches;r=e[t];r||(f=Microsoft.Office.WebExtension.EventType,r=new OSF.EventDispatch([f.DataNodeDeleted,f.DataNodeInserted,f.DataNodeReplaced]),e[t]=r);OSF.DDA.DispIdHost.addEventSupport(this,r)};OSF.DDA.CustomXmlPrefixMappings=function(n){var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddDataPartNamespaceAsync,t.GetDataPartNamespaceAsync,t.GetDataPartPrefixAsync],n)};OSF.DDA.CustomXmlNode=function(n,t,i,r){OSF.OUtil.defineEnumerableProperties(this,{baseName:{value:r},namespaceUri:{value:i},nodeType:{value:t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetRelativeNodesAsync,u.GetNodeValueAsync,u.GetNodeXmlAsync,u.SetNodeValueAsync,u.SetNodeXmlAsync,u.GetNodeTextAsync,u.SetNodeTextAsync],n)};OSF.DDA.NodeInsertedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeInserted},newNode:{value:n},inUndoRedo:{value:t}})};OSF.DDA.NodeReplacedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeReplaced},oldNode:{value:n},newNode:{value:t},inUndoRedo:{value:i}})};OSF.DDA.NodeDeletedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeDeleted},oldNode:{value:n},oldNextSibling:{value:t},inUndoRedo:{value:i}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureDataNode=function(n){if(n)return new OSF.DDA.CustomXmlNode(n[OSF.DDA.DataNodeProperties.Handle],n[OSF.DDA.DataNodeProperties.NodeType],n[OSF.DDA.DataNodeProperties.NamespaceUri],n[OSF.DDA.DataNodeProperties.BaseName])};OSF.DDA.OMFactory.manufactureDataPart=function(n,t){return new OSF.DDA.CustomXmlPart(t,n[OSF.DDA.DataPartProperties.Id],n[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 r(n){return OSF.DDA.OMFactory.manufactureDataPart(n,Microsoft.Office.WebExtension.context.document.customXmlParts)}function e(n){return OSF.DDA.OMFactory.manufactureDataNode(n)}function i(n){var t=n[Microsoft.Office.WebExtension.Parameters.Data];return t==undefined?null:t}function u(n){return n.id}function f(n,t){return t}function t(n,t){return t}var n="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataPartList],r)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeTextAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Text,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataPartProperties,fromHost:[{name:OSF.DDA.DataPartProperties.Id,value:0},{name:OSF.DDA.DataPartProperties.BuiltIn,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataNodeProperties,fromHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:OSF.DDA.DataNodeProperties.BaseName,value:1},{name:OSF.DDA.DataNodeProperties.NamespaceUri,value:2},{name:OSF.DDA.DataNodeProperties.NodeType,value:3}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:0},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:0},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:1},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:0},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:1},{name:OSF.DDA.DataNodeEventProperties.NextSiblingNode,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.OldNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NewNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NextSiblingNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataPartMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Xml,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartByIdMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartsByNamespaceMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataPartList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidDeleteDataPartMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeValueMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeValueMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeXmlMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:Microsoft.Office.WebExtension.Parameters.Xml,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataNamespaceMethod,toHost:[{name:OSF.DDA.DataPartProperties.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:1},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataUriByPrefixMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataPartProperties.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPrefixByUriMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataPartProperties.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeTextMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeTextMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:Microsoft.Office.WebExtension.Parameters.Text,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeAddedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeReplacedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeDeletedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Image,value:8}]}),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.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:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});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=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r<t.length-1;r++)if(i[t[r]]&&(typeof i[t[r]]==f||typeof i[t[r]]==s))i=i[t[r]];else return e;if(o=i[t[t.length-1]],typeof o!=s)return e}catch(h){return e}return{callback:o,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}},r.prototype._invokeAppCommandCompletedMethod=function(n,t,i){this._pseudoDocument.appCommandInvocationCompletedAsync(n,t,i)},r.prototype._constructEventObjectForCallback=function(n){var f=this,t=new i,r;try{r=JSON.parse(n.eventObjStr);this._translateEventObjectInternal(r,t);Object.defineProperty(t,"completed",{value:function(i){t.completedContext=i;var r=JSON.stringify(t);f._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,r)},enumerable:!0})}catch(e){t=u}return t},r.prototype._translateEventObjectInternal=function(n,t){var i,r;for(i in n)n.hasOwnProperty(i)&&(r=n[i],typeof r==f&&r!=u?(OSF.OUtil.defineEnumerableProperty(t,i,{value:{}}),this._translateEventObjectInternal(r,t[i])):Object.defineProperty(t,i,{value:r,enumerable:!0,writable:!0}))},r.prototype._constructObjectByTemplate=function(n,t){var r={},i;if(!n||!t)return r;for(i in n)if(n.hasOwnProperty(i)&&(r[i]=u,t[i]!=u)){var o=n[i],s=t[i],h=typeof s;typeof o==f&&o!=u?r[i]=this._constructObjectByTemplate(o,s):(h=="number"||h==e||h=="boolean")&&(r[i]=s)}return r},r.instance=function(){return r._instance==u&&(r._instance=new r),r._instance},r._instance=u,r}(),r,i;t.AppCommandManager=u;r=function(){function n(n,t,i){var r=this;r.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked;r.appCommandId=n;r.callbackName=t;r.eventObjStr=i}return n.create=function(i){return new n(i[t.AppCommandInvokedEventEnums.AppCommandId],i[t.AppCommandInvokedEventEnums.CallbackName],i[t.AppCommandInvokedEventEnums.EventObjStr])},n}();t.AppCommandInvokedEventArgs=r;i=function(){function n(){}return n}();t.AppCommandCallbackEventArgs=i;t.AppCommandInvokedEventEnums={AppCommandId:"appCommandId",CallbackName:"callbackName",EventObjStr:"eventObjStr"}})(t=n.AppCommand||(n.AppCommand={}))}(OfficeExt||(OfficeExt={}));OfficeExt.AppCommand.AppCommandManager.initializeOsfDda(),function(n){var t;(function(t){function i(){if(OSF.DDA.SafeArray){var t=OSF.DDA.SafeArray.Delegate.ParameterMap;t.define({type:OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Status,value:1},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,value:2}]});t.define({type:OSF.DDA.EventDispId.dispidAppCommandInvokedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,value:t.self}],isComplexType:!0});t.define({type:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,fromHost:[{name:n.AppCommand.AppCommandInvokedEventEnums.AppCommandId,value:0},{name:n.AppCommand.AppCommandInvokedEventEnums.CallbackName,value:1},{name:n.AppCommand.AppCommandInvokedEventEnums.EventObjStr,value:2}],isComplexType:!0})}}t.registerDdaFacade=i})(t=n.AppCommand||(n.AppCommand={}))}(OfficeExt||(OfficeExt={}));OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=OfficeExt.AppCommand.AppCommandManager.instance();n.initializeAndChangeOnce();OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.AddinInitialized,{})};OSF.DDA.OneNoteDocument=function(n,t){OSF.DDA.OneNoteDocument.uber.constructor.call(this,n,null,t);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.OneNoteDocument,OSF.DDA.JsomDocument);OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.OneNoteDocument(n,this._initializeSettings(n,!1));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()};__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t,i){this.m_actionInfo=n;this.m_isWriteOperation=t;this.m_isRestrictedResourceAccess=i}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_callback=n}return n.prototype._handleResult=function(n){this.m_callback&&this.m_callback()},n}(),i=function(){function i(){}return i.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var o={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],e=n.Utility.setMethodArguments(t,o.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(e),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(e),f=new n.Action(o,!0,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(e),f.referencedObjectPath=i._objectPath,f.referencedArgumentObjectPaths=e,f},i.createMethodAction=function(t,i,r,u,f,e){var h,o,c,s;return n.Utility.validateObjectPath(i),h={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,h.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(o),c=u!=1,s=new n.Action(h,c,e),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s.referencedObjectPath=i._objectPath,s.referencedArgumentObjectPaths=o,s},i.createQueryAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createQueryAsJsonAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:7,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createEnsureUnchangedAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:8,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,ObjectState:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createUpdateAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:9,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,ObjectState:r},u=new n.Action(f,!0,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath.parentObjectPath);t._pendingRequest.ensureInstantiateObjectPaths(i._objectPath.argumentObjectPaths);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1,!1);return r.referencedObjectPath=i._objectPath,t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r},i.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},i.createTraceMarkerForCallback=function(n,r){var u=i.createTraceAction(n,null,!1);n._pendingRequest.addActionResultHandler(u,new t(r))},i}();n.ActionFactory=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleRetrieveResult=function(n,t){this._handleIdResult(n)},t.prototype._recursivelySet=function(i,r,u,f,e){var c=i instanceof t,v=i,o,a,h,s,l;if(c)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s<u.length;s++)o=u[s],i.hasOwnProperty(o)&&typeof i[o]!="undefined"&&(this[o]=i[o]);for(s=0;s<f.length;s++)o=f[s],i.hasOwnProperty(o)&&typeof i[o]!="undefined"&&(a=c?v[o]:i[o],this[o].set(a,r));for(h=!c,r&&!n.Utility.isNullOrUndefined(h)&&(h=r.throwOnReadOnly),s=0;s<e.length;s++)if(o=e[s],i.hasOwnProperty(o)&&typeof i[o]!="undefined"&&h)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.cannotApplyPropertyThroughSetMethod,o),debugInfo:{errorLocation:o}});for(o in i)if(u.indexOf(o)<0&&f.indexOf(o)<0){if(l=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o),!l)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.propertyDoesNotExist,o),debugInfo:{errorLocation:o}});if(h&&!l.set)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.attemptingToSetReadOnlyProperty,o),debugInfo:{errorLocation:o}});}}catch(y){throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.invalidArgument,"properties"),debugInfo:{errorLocation:this._className+".set"},innerError:y});}},t.prototype._recursivelyUpdate=function(t){var o=n._internalConfig.alwaysPolyfillClientObjectUpdateMethod,r,f,e,c,u,l,i,v,y;o||(o=!n.Utility.isSetSupported("RichApiRuntime","1.2"));try{if(r=this[n.Constants.scalarPropertyNames],r||(r=[]),f=this[n.Constants.scalarPropertyUpdateable],!f)for(f=[],u=0;u<r.length;u++)f.push(!1);e=this[n.Constants.navigationPropertyNames];e||(e=[]);var s={},h={},a=0;for(i in t)if(c=r.indexOf(i),c>=0){if(!f[c])throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.attemptingToSetReadOnlyProperty,i),debugInfo:{errorLocation:i}});s[i]=t[i];++a}else if(e.indexOf(i)>=0)h[i]=t[i];else throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.propertyDoesNotExist,i),debugInfo:{errorLocation:i}});if(a>0)if(o)for(u=0;u<r.length;u++)i=r[u],l=s[i],n.Utility.isUndefined(l)||n.ActionFactory.createSetPropertyAction(this.context,this,i,l);else n.ActionFactory.createUpdateAction(this.context,this,s);for(i in h)v=this[i],y=h[i],v._recursivelyUpdate(y)}catch(p){throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.invalidArgument,"properties"),debugInfo:{errorLocation:this._className+".update"},innerError:p});}},t}();n.ClientObject=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n;this.m_actions=[];this.m_actionResultHandler={};this.m_referencedObjectPaths={};this.m_instantiatedObjectPaths={};this.m_flags=0;this.m_traceInfos={};this.m_pendingProcessEventHandlers=[];this.m_pendingEventHandlerActions={};this.m_responseTraceIds={};this.m_responseTraceMessages=[];this.m_preSyncPromises=[]}return Object.defineProperty(t.prototype,"flags",{get:function(){return this.m_flags},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"traceInfos",{get:function(){return this.m_traceInfos},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_responseTraceMessages",{get:function(){return this.m_responseTraceMessages},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_responseTraceIds",{get:function(){return this.m_responseTraceIds},enumerable:!0,configurable:!0}),t.prototype._setResponseTraceIds=function(t){var i,r,u;if(t)for(i=0;i<t.length;i++)r=t[i],this.m_responseTraceIds[r]=r,u=this.m_traceInfos[r],n.Utility.isNullOrUndefined(u)||this.m_responseTraceMessages.push(u)},t.prototype.addAction=function(n){if(this.m_context.batchMode===1){var t=!1;n.actionInfo.ActionType===1&&n.referencedObjectPath.objectPathInfo.ObjectPathType===4&&(t=!0);t||this.m_context.ensureInProgressBatchIfBatchMode()}n.isWriteOperation&&(this.m_flags=this.m_flags|1);n.isRestrictedResourceAccess&&(this.m_flags=this.m_flags|2);this.m_actions.push(n);n.actionInfo.ActionType==1&&(this.m_instantiatedObjectPaths[n.actionInfo.ObjectPathId]=n)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addReferencedObjectPath(t);this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t<n.length;t++)this.ensureInstantiateObjectPath(n[t])},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),t.isRestrictedResourceAccess&&(this.m_flags=this.m_flags|2),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t<n.length;t++)this.addReferencedObjectPath(n[t])},t.prototype.addActionResultHandler=function(n,t){this.m_actionResultHandler[n.actionInfo.Id]=t},t.prototype.buildRequestMessageBody=function(){var r,u,f,i;n._internalConfig.enableEarlyDispose&&t._calculateLastUsedObjectPathIds(this.m_actions);r={};for(u in this.m_referencedObjectPaths)r[u]=this.m_referencedObjectPaths[u].objectPathInfo;for(f=[],i=0;i<this.m_actions.length;i++)f.push(this.m_actions[i].actionInfo);return{AutoKeepReference:this.m_context._autoCleanup,Actions:f,ObjectPaths:r}},t.prototype.processResponse=function(n){var t,i,r;if(n)for(t=0;t<n.length;t++)i=n[t],r=this.m_actionResultHandler[i.ActionId],r&&r._handleResult(i.Value)},t.prototype.invalidatePendingInvalidObjectPaths=function(){for(var n in this.m_referencedObjectPaths)this.m_referencedObjectPaths[n].isInvalidAfterRequest&&(this.m_referencedObjectPaths[n].isValid=!1)},t.prototype._addPendingEventHandlerAction=function(n,t){this.m_pendingEventHandlerActions[n._id]||(this.m_pendingEventHandlerActions[n._id]=[],this.m_pendingProcessEventHandlers.push(n));this.m_pendingEventHandlerActions[n._id].push(t)},Object.defineProperty(t.prototype,"_pendingProcessEventHandlers",{get:function(){return this.m_pendingProcessEventHandlers},enumerable:!0,configurable:!0}),t.prototype._getPendingEventHandlerActions=function(n){return this.m_pendingEventHandlerActions[n._id]},t.prototype._addPreSyncPromise=function(n){this.m_preSyncPromises.push(n)},Object.defineProperty(t.prototype,"_preSyncPromises",{get:function(){return this.m_preSyncPromises},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_actions",{get:function(){return this.m_actions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPaths",{get:function(){return this.m_referencedObjectPaths},enumerable:!0,configurable:!0}),t._updateLastUsedActionIdOfObjectPathId=function(n,i,r){for(var u,e,f;i;){if(n[i.objectPathInfo.Id])return;if(n[i.objectPathInfo.Id]=r,u=i.argumentObjectPaths,u)for(e=u.length,f=0;f<e;f++)t._updateLastUsedActionIdOfObjectPathId(n,u[f],r);i=i.parentObjectPath}},t._calculateLastUsedObjectPathIds=function(n){for(var o,v,s,h,l,u,f,i,c,e={},a=n.length,r=a-1;r>=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s<v;s++)t._updateLastUsedActionIdOfObjectPathId(e,o[s],u);h={};for(l in e)u=e[l],f=h[u],f||(f=[],h[u]=f),f.push(parseInt(l));for(r=0;r<a;r++)i=n[r],c=h[i.actionInfo.Id],c&&c.length>0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this.m_batchMode=0,this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"batchMode",{get:function(){return this.m_batchMode},enumerable:!0,configurable:!0}),i.prototype.ensureInProgressBatchIfBatchMode=function(){if(this.m_batchMode===1&&!this.m_explicitBatchInProgress)throw n.Utility.createRuntimeError(n.ErrorCodes.generalException,n.Utility._getResourceString(n.ResourceStrings.notInsideBatch),null);},i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.ensureRequestUrlAndHeaderInfo=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})})},i.prototype.syncPrivateMain=function(){var n=this;return this.ensureRequestUrlAndHeaderInfo().then(function(){var t=n._pendingRequest;return n.m_pendingRequest=null,n.processPreSyncPromises(t).then(function(){return n.syncPrivate(t)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r<t._pendingProcessEventHandlers.length;r++)u=t._pendingProcessEventHandlers[r],i=i.then(this.createProcessOneEventHandlersFunc(u,t));return i},i.prototype.createProcessOneEventHandlersFunc=function(n,t){return function(){return n._processRegistration(t)}},i.prototype.processPreSyncPromises=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r<t._preSyncPromises.length;r++)u=t._preSyncPromises[r],i=i.then(this.createProcessOneProSyncFunc(u));return i},i.prototype.createProcessOneProSyncFunc=function(n){return function(){return n}},i.prototype.sync=function(n){return this.syncPrivateMain().then(function(){return n})},i.prototype.batch=function(t){var i=this,u,r,f,e;if(this.m_batchMode!==1)return n._Internal.OfficePromise.reject(n.Utility.createRuntimeError(n.ErrorCodes.generalException,null,null));if(this.m_explicitBatchInProgress)return n._Internal.OfficePromise.reject(n.Utility.createRuntimeError(n.ErrorCodes.generalException,n.Utility._getResourceString(n.ResourceStrings.pendingBatchInProgress),null));if(n.Utility.isNullOrUndefined(t))return n.Utility._createPromiseFromResult(null);this.m_explicitBatchInProgress=!0;u=this.m_pendingRequest;this.m_pendingRequest=new n.ClientRequest(this);try{r=t(this._rootObject,this)}catch(o){return this.m_explicitBatchInProgress=!1,this.m_pendingRequest=u,n._Internal.OfficePromise.reject(o)}return typeof r=="object"&&r&&typeof r.then=="function"?e=n.Utility._createPromiseFromResult(null).then(function(){return r}).then(function(n){return i.m_explicitBatchInProgress=!1,f=i.m_pendingRequest,i.m_pendingRequest=u,n}).catch(function(t){return i.m_explicitBatchInProgress=!1,f=i.m_pendingRequest,i.m_pendingRequest=u,n._Internal.OfficePromise.reject(t)}):(this.m_explicitBatchInProgress=!1,f=this.m_pendingRequest,this.m_pendingRequest=u,e=n.Utility._createPromiseFromResult(r)),e.then(function(n){return i.ensureRequestUrlAndHeaderInfo().then(function(){return i.syncPrivate(f)}).then(function(){return n})})},i._run=function(n,t,r,u,f,e){return r===void 0&&(r=3),u===void 0&&(u=5e3),i._runCommon("run",null,n,0,t,r,u,f,e)},i.isRequestUrlAndHeaderInfo=function(t){return typeof t=="object"&&t!==null&&Object.getPrototypeOf(t)===Object.getPrototypeOf({})&&!n.Utility.isNullOrUndefined(t.url)},i.isRequestUrlAndHeaderInfoResolver=function(n){return typeof n=="object"&&n!==null&&typeof n._resolveRequestUrlAndHeaderInfo=="function"},i._runBatch=function(n,t,r,u,f,e,o){return u===void 0&&(u=3),f===void 0&&(f=5e3),i._runBatchCommon(0,n,t,r,u,f,e,o)},i._runExplicitBatch=function(n,t,r,u,f,e,o){return u===void 0&&(u=3),f===void 0&&(f=5e3),i._runBatchCommon(1,n,t,r,u,f,e,o)},i._runBatchCommon=function(t,r,u,f,e,o,s,h){var a,y,p,c,l,v;if(e===void 0&&(e=3),o===void 0&&(o=5e3),p=null,c=0,u.length>0&&(typeof u[0]=="string"||i.isRequestUrlAndHeaderInfo(u[0])||i.isRequestUrlAndHeaderInfoResolver(u[0]))&&(p=u[0],c=1),u.length==c+1)a=f,y=u[c+0];else if(u.length==c+2){if(n.Utility.isNullOrUndefined(u[c+0]))a=f;else if(u[c+0]instanceof n.ClientObject)a=function(){return u[c+0].context};else if(u[c+0]instanceof i)a=function(){return u[c+0]};else if(Array.isArray(u[c+0])){if(l=u[c+0],l.length==0)return i.createErrorPromise(r);for(v=0;v<l.length;v++){if(!(l[v]instanceof n.ClientObject))return i.createErrorPromise(r);if(l[v].context!=l[0].context)return i.createErrorPromise(r,n.ResourceStrings.invalidRequestContext)}a=function(){return l[0].context}}else return i.createErrorPromise(r);y=u[c+1]}else return i.createErrorPromise(r);return i._runCommon(r,p,a,t,y,e,o,s,h)},i.createErrorPromise=function(t,i){return i===void 0&&(i=n.ResourceStrings.invalidArgument),n._Internal.OfficePromise.reject(n.Utility.createRuntimeError(i,n.Utility._getResourceString(i),t))},i._runCommon=function(t,r,u,f,e,o,s,h,c){i._overrideSession&&(r=i._overrideSession);var p=new n._Internal.OfficePromise(function(n,t){n()}),l,v=!1,a,y;return p.then(function(){if(l=u(r),l._autoCleanup)return new n._Internal.OfficePromise(function(n,t){l._onRunFinishedNotifiers.push(function(){l._autoCleanup=!0;n()})});else l._autoCleanup=!0}).then(function(){if(typeof e!="function")return i.createErrorPromise(t);y=l.m_batchMode;l.m_batchMode=f;var r;return r=f==1?e(l.batch.bind(l)):e(l),(n.Utility.isNullOrUndefined(r)||typeof r.then!="function")&&n.Utility.throwError(n.ResourceStrings.runMustReturnPromise),r}).then(function(n){return f===1?n:l.sync(n)}).then(function(n){v=!0;a=n}).catch(function(n){a=n}).then(function(){function f(){var r;t++;var e=l.m_pendingRequest,a=l.m_batchMode,i=new n.ClientRequest(l);l.m_pendingRequest=i;l.m_batchMode=0;try{for(r in u)l.trackedObjects.remove(u[r])}finally{l.m_batchMode=a;l.m_pendingRequest=e}return l.syncPrivate(i).then(function(){h&&h(t)}).catch(function(){c&&c(t);t<o&&setTimeout(function(){f()},s)})}var u=l.trackedObjects._retrieveAndClearAutoCleanupList(),e,t;l._autoCleanup=!1;l.m_batchMode=y;for(e in u)u[e]._objectPath.isValid=!1;if(t=0,n.Utility._synchronousCleanup||i.isRequestUrlAndHeaderInfoResolver(r))return f();else f()}).then(function(){if(l._onRunFinishedNotifiers&&l._onRunFinishedNotifiers.length>0){var n=l._onRunFinishedNotifiers.shift();n()}if(v)return a;else throw a;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(t,i){var r;this.m_proxy=t;this.m_shouldPolyfill=i;var u=t[n.Constants.scalarPropertyNames],f=t[n.Constants.navigationPropertyNames],e=t[n.Constants.className],o=t[n.Constants.isCollection];if(u)for(r=0;r<u.length;r++)n.Utility.definePropertyThrowUnloadedException(this,e,u[r]);if(f)for(r=0;r<f.length;r++)n.Utility.definePropertyThrowUnloadedException(this,e,f[r]);o&&n.Utility.definePropertyThrowUnloadedException(this,e,n.Constants.itemsLowerCase)}return Object.defineProperty(t.prototype,"$proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$isNullObject",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.$isNullObject"}});return this.m_isNullObject},enumerable:!0,configurable:!0}),t.prototype.toJSON=function(){return this.m_isLoaded?this.m_isNullObject?null:(n.Utility.isUndefined(this.m_json)&&(this.m_json=this.purifyJson(this.m_value)),this.m_json):undefined},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.prototype._handleResult=function(n){this.m_isLoaded=!0;n===null||typeof n=="object"&&n&&n._IsNull?(this.m_isNullObject=!0,n=null):this.m_isNullObject=!1;this.m_shouldPolyfill&&(n=this.changePropertyNameToCamelLowerCase(n));this.m_value=n;this.m_proxy._handleRetrieveResult(n,this)},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,r,i,u,f,e;if(Array.isArray(t)){for(i=[],r=0;r<t.length;r++)i.push(this.changePropertyNameToCamelLowerCase(t[r]));return i}else if(typeof t=="object"&&t!==null){i={};for(u in t)if(f=t[u],u===n.Constants.items){i={};i[n.Constants.itemsLowerCase]=this.changePropertyNameToCamelLowerCase(f);break}else e=n.Utility._toCamelLowerCase(u),i[e]=this.changePropertyNameToCamelLowerCase(f);return i}else return t},t.prototype.purifyJson=function(n){var f=95,r,i,u,t;if(Array.isArray(n)){for(i=[],r=0;r<n.length;r++)i.push(this.purifyJson(n[r]));return i}else if(typeof n=="object"&&n!==null){i={};for(u in n)u.charCodeAt(0)!==f&&(t=n[u],typeof t=="object"&&t!==null&&Array.isArray(t.items)&&(t=t.items),i[u]=this.purifyJson(t));return i}else return n},t}();n.RetrieveResultImpl=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idLowerCase="id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n.eventMessageCategory=65536,n.eventWorkbookId="Workbook",n.eventSourceRemote="Remote",n.itemsLowerCase="items",n.proxy="$proxy",n.scalarPropertyNames="_scalarPropertyNames",n.navigationPropertyNames="_navigationPropertyNames",n.className="_className",n.isCollection="_isCollection",n.scalarPropertyUpdateable="_scalarPropertyUpdateable",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return(this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r<e.length;r++)e[r](l);return}i&&i.hasOwnProperty(t.RespondingId)&&(o=i[t.RespondingId],s=this.m_callbackList[o],typeof s=="function"&&s(i[t.ParamsKey]),delete this.m_callbackList[o])}},f.prototype._sendMessageWithCallback=function(n,i,r,u){this.m_callbackList[n]=u;var f={};f[t.SendingId]=n;f[t.CommandKey]=i;f[t.ParamsKey]=r;this.m_chosenWindow.postMessage(JSON.stringify(f),this.m_chosenOrigin)},f.prototype._isValidDescendant=function(n){function i(t){if(t===n)return!0;for(var r=0,u=t.frames.length;r<u;r++)if(i(t.frames[r]))return!0;return!1}for(var u=this.m_options.container||document.body,r=u.getElementsByTagName("iframe"),t=0,f=r.length;t<f;t++)if(i(r[t].contentWindow))return!0;return!1},f.prototype._setupContext=function(n){!(this.m_appContext=n)},f}(n.SessionBase);n.EmbeddedSession=f;e=function(){function r(n){this.m_session=n}return r.prototype.executeAsync=function(u,f,e){var o=this,s=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(u,f,e,r.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(u,f){o.m_session._invoke(t.ExecuteMethodCommand,function(t,r){n.Utility.log("Response:");n.Utility.log(JSON.stringify(r));var f;f=t==i.Success?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBodyFromSafeArray(r.Data),n.RichApiMessageUtility.getResponseHeadersFromSafeArray(r.Data)):n.RichApiMessageUtility.buildResponseOnError(r.error.Code,r.error.Message);u(f)},r._transformMessageArrayIntoParams(s))})},r._transformMessageArrayIntoParams=function(n){return{ArrayData:n,DdaMethod:{DispatchId:r.DispidExecuteRichApiRequestMethod}}},r.DispidExecuteRichApiRequestMethod=93,r.SourceLibHeaderValue="Embedded",r}()}(OfficeExtension||(OfficeExtension={})),function(n){var t;(function(t){var i=function(i){function r(n){i.call(this,typeof n=="string"?n:n.message);this.name="OfficeExtension.Error";typeof n=="string"?this.message=n:(this.code=n.code,this.message=n.message,this.traceMessages=n.traceMessages||[],this.innerError=n.innerError||null,this.debugInfo=this._createDebugInfo(n.debugInfo||{}))}return __extends(r,i),r.prototype.toString=function(){return this.code+": "+this.message},r.prototype._createDebugInfo=function(t){var i={code:this.code,message:this.message,toString:function(){return JSON.stringify(this)}};for(var r in t)i[r]=t[r];return this.innerError&&(i.innerError=this.innerError instanceof n._Internal.RuntimeError?this.innerError.debugInfo:this.innerError),i},r._createInvalidArgError=function(i){return new t.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility.isNullOrEmptyString(i.argumentName)?n.Utility._getResourceString(n.ResourceStrings.invalidArgumentGeneric):n.Utility._getResourceString(n.ResourceStrings.invalidArgument,i.argumentName),debugInfo:i.errorLocation?{errorLocation:i.errorLocation}:{},innerError:i.innerError})},r}(Error);t.RuntimeError=i})(t=n._Internal||(n._Internal={}));n.Error=t.RuntimeError}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.accessDenied="AccessDenied",n.generalException="GeneralException",n.activityLimitReached="ActivityLimitReached",n.invalidObjectPath="InvalidObjectPath",n.propertyNotLoaded="PropertyNotLoaded",n.valueNotLoaded="ValueNotLoaded",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.runMustReturnPromise="RunMustReturnPromise",n.cannotRegisterEvent="CannotRegisterEvent",n.apiNotFound="ApiNotFound",n.connectionFailure="ConnectionFailure",n.timeout="Timeout",n.invalidOrTimedOutSession="InvalidOrTimedOutSession",n.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",n}();n.ErrorCodes=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){var u=this;this.m_id=n._nextId();this.m_context=n;this.m_name=i;this.m_handlers=[];this.m_registered=!1;this.m_eventInfo=r;this.m_callback=function(n){u.m_eventInfo.eventArgsTransformFunc(n).then(function(n){return u.fireEvent(n)})}}return Object.defineProperty(t.prototype,"_registered",{get:function(){return this.m_registered},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_id",{get:function(){return this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_handlers",{get:function(){return this.m_handlers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_callback",{get:function(){return this.m_callback},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var i=n.ActionFactory.createTraceAction(this.m_context,null,!1);return this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:i.actionInfo.Id,handler:t,operation:0}),new n.EventHandlerResult(this.m_context,this,t)},t.prototype.remove=function(t){var i=n.ActionFactory.createTraceAction(this.m_context,null,!1);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:i.actionInfo.Id,handler:t,operation:1})},t.prototype.removeAll=function(){var t=n.ActionFactory.createTraceAction(this.m_context,null,!1);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:t.actionInfo.Id,handler:null,operation:2})},t.prototype._processRegistration=function(t){var f=this,u=n.Utility._createPromiseFromResult(null),e=t._getPendingEventHandlerActions(this),r,s,i,o;if(!e)return u;for(r=[],i=0;i<this.m_handlers.length;i++)r.push(this.m_handlers[i]);for(s=!1,i=0;i<e.length;i++)if(t._responseTraceIds[e[i].id]){s=!0;switch(e[i].operation){case 0:r.push(e[i].handler);break;case 1:for(o=r.length-1;o>=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i<this.m_handlers.length;i++)u=this.m_handlers[i],f=n.Utility._createPromiseFromResult(null).then(this.createFireOneEventHandlerFunc(u,t)).catch(function(t){n.Utility.log("Error when invoke handler: "+JSON.stringify(t))}),r.push(f);n._Internal.OfficePromise.all(r)},t.prototype.createFireOneEventHandlerFunc=function(n,t){return function(){return n(t)}},t}();n.EventHandlers=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n,t,i){this.m_context=n;this.m_allHandlers=t;this.m_handler=i}return Object.defineProperty(n.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),n.prototype.remove=function(){this.m_allHandlers&&this.m_handler&&(this.m_allHandlers.remove(this.m_handler),this.m_allHandlers=null,this.m_handler=null)},n}();n.EventHandlerResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(t){var i=function(){function i(){}return i.prototype.register=function(i,r,u){switch(i){case 4:return n.Utility.promisify(function(n){return Office.context.document.bindings.getByIdAsync(r,n)}).then(function(t){return n.Utility.promisify(function(n){return t.addHandlerAsync(Office.EventType.BindingDataChanged,u,n)})});case 3:return n.Utility.promisify(function(n){return Office.context.document.bindings.getByIdAsync(r,n)}).then(function(t){return n.Utility.promisify(function(n){return t.addHandlerAsync(Office.EventType.BindingSelectionChanged,u,n)})});case 2:return n.Utility.promisify(function(n){return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged,u,n)});case 1:return n.Utility.promisify(function(n){return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged,u,n)});case 5:return n.Utility.promisify(function(n){return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage",u,n)});case 13:return n.Utility.promisify(function(n){return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted,u,{id:r},n)});case 14:return n.Utility.promisify(function(n){return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged,u,{id:r},n)});case 15:return n.Utility.promisify(function(n){return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged,u,{id:r},n)});case 16:return n.Utility.promisify(function(n){return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded,u,{id:r},n)});default:throw t.RuntimeError._createInvalidArgError("eventId");}},i.prototype.unregister=function(i,r,u){switch(i){case 4:return n.Utility.promisify(function(n){return Office.context.document.bindings.getByIdAsync(r,n)}).then(function(t){return n.Utility.promisify(function(n){return t.removeHandlerAsync(Office.EventType.BindingDataChanged,{handler:u},n)})});case 3:return n.Utility.promisify(function(n){return Office.context.document.bindings.getByIdAsync(r,n)}).then(function(t){return n.Utility.promisify(function(n){return t.removeHandlerAsync(Office.EventType.BindingSelectionChanged,{handler:u},n)})});case 2:return n.Utility.promisify(function(n){return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged,{handler:u},n)});case 1:return n.Utility.promisify(function(n){return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged,{handler:u},n)});case 5:return n.Utility.promisify(function(n){return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage",{handler:u},n)});case 13:return n.Utility.promisify(function(n){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted,{id:r,handler:u},n)});case 14:return n.Utility.promisify(function(n){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged,{id:r,handler:u},n)});case 15:return n.Utility.promisify(function(n){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged,{id:r,handler:u},n)});case 16:return n.Utility.promisify(function(n){return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded,{id:r,handler:u},n)});default:throw t.RuntimeError._createInvalidArgError("eventId");}},i}();t.officeJsEventRegistration=new i})(t=n._Internal||(n._Internal={}));i=function(){function i(n,t){this.m_handlersByEventByTarget={};this.m_registerEventImpl=n;this.m_unregisterEventImpl=t}return i.prototype.getHandlers=function(t,i){var r,u;return n.Utility.isNullOrUndefined(i)&&(i=""),r=this.m_handlersByEventByTarget[t],r||(r={},this.m_handlersByEventByTarget[t]=r),u=r[i],u||(u=[],r[i]=u),u},i.prototype.register=function(i,r,u){if(!u)throw t.RuntimeError._createInvalidArgError("handler");var f=this.getHandlers(i,r);return(f.push(u),f.length===1)?this.m_registerEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i.prototype.unregister=function(i,r,u){var f,e;if(!u)throw t.RuntimeError._createInvalidArgError("handler");for(f=this.getHandlers(i,r),e=f.length-1;e>=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r<t.entries.length;r++)if(i=t.entries[r],i.messageCategory==n.Constants.eventMessageCategory&&(n.Utility._logEnabled&&n.Utility.log(JSON.stringify(i)),u=this.m_eventRegistration.getHandlers(i.messageType,i.targetId),u.length>0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f<u.length;f++)u[f](e)},t.getGenericEventRegistration=function(){return t.s_genericEventRegistration||(t.s_genericEventRegistration=new t),t.s_genericEventRegistration},t.richApiMessageEventCategory=65536,t}(),i;n._testSetRichApiMessageReadyImpl=r;n._testTriggerRichApiMessageEvent=u;i=function(i){function r(n,t,r,u){i.call(this,n,t,r,u);this.m_genericEventInfo=u}return __extends(r,i),r.prototype.add=function(i){var r=this;return this._handlers.length==0&&this.m_genericEventInfo.registerFunc&&this.m_genericEventInfo.registerFunc(),t.getGenericEventRegistration().isReady||this._context._pendingRequest._addPreSyncPromise(t.getGenericEventRegistration().ready()),n.ActionFactory.createTraceMarkerForCallback(this._context,function(){r._handlers.push(i);r._handlers.length==1&&t.getGenericEventRegistration().register(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)}),new n.EventHandlerResult(this._context,this,i)},r.prototype.remove=function(i){var r=this;this._handlers.length==1&&this.m_genericEventInfo.unregisterFunc&&this.m_genericEventInfo.unregisterFunc();n.ActionFactory.createTraceMarkerForCallback(this._context,function(){for(var n=r._handlers,u=n.length-1;u>=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],u,o,r,f;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,r=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(r))&&(f=n.Utility.tryGetObjectIdFromLoadOrRetrieveResult(i),!n.Utility.isNullOrUndefined(f))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(r)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=r,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[f];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=n.Utility.tryGetObjectIdFromLoadOrRetrieveResult(f);return i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=n.Utility.tryGetObjectIdFromLoadOrRetrieveResult(r),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n<h;n+=2)t=e[n],i=e[n+1],t(i),e[n]=undefined,e[n+1]=undefined;h=0}function l(){}function ui(){return new TypeError("You cannot resolve a promise with itself")}function fi(){return new TypeError("A promises callback cannot return that same promise.")}function ei(n){try{return n.then}catch(t){return y.error=t,y}}function oi(n,t,i,r){try{n.call(t,i,r)}catch(u){return u}}function si(n,i,u){f(function(n){var f=!1,e=oi(u,i,function(t){f||(f=!0,i!==t?v(n,t):r(n,t))},function(i){f||(f=!0,t(n,i))},"Settle: "+(n._label||" unknown promise"));!f&&e&&(f=!0,t(n,e))},n)}function hi(n,i){i._state===a?r(n,i._result):i._state===s?t(n,i._result):p(i,undefined,function(t){v(n,t)},function(i){t(n,i)})}function ci(n,i){if(i.constructor===n.constructor)hi(n,i);else{var u=ei(i);u===y?t(n,y.error):u===undefined?r(n,i):b(u)?si(n,i,u):r(n,i)}}function v(n,i){n===i?t(n,ui()):vt(i)?ci(n,i):r(n,i)}function li(n){n._onerror&&n._onerror(n._result);d(n)}function r(n,t){n._state===o&&(n._result=t,n._state=a,n._subscribers.length!==0&&f(d,n))}function t(n,t){n._state===o&&(n._state=s,n._result=t,f(li,n))}function p(n,t,i,r){var u=n._subscribers,e=u.length;n._onerror=null;u[e]=t;u[e+a]=i;u[e+s]=r;e===0&&n._state&&f(d,n)}function d(n){var i=n._subscribers,e=n._state,r,u,f,t;if(i.length!==0){for(f=n._result,t=0;t<i.length;t+=3)r=i[t],u=i[t+e],r?ft(e,r,u,f):u(f);n._subscribers.length=0}}function ut(){this.error=null}function ai(n,t){try{return n(t)}catch(i){return w.error=i,w}}function ft(n,i,u,f){var c=b(u),e,l,h,y;if(c){if(e=ai(u,f),e===w?(y=!0,l=e.error,e=null):h=!0,i===e){t(i,fi());return}}else e=f,h=!0;i._state!==o||(c&&h?v(i,e):y?t(i,l):n===a?r(i,e):n===s&&t(i,e))}function vi(n,i){try{i(function(t){v(n,t)},function(i){t(n,i)})}catch(r){t(n,r)}}function u(n,i){var u=this;u._instanceConstructor=n;u.promise=new n(l);u._validateInput(i)?(u._input=i,u.length=i.length,u._remaining=i.length,u._init(),u.length===0?r(u.promise,u._result):(u.length=u.length||0,u._enumerate(),u._remaining===0&&r(u.promise,u._result))):t(u.promise,u._validationError())}function yi(n){return new et(this,n).promise}function pi(n){function e(n){v(i,n)}function s(n){t(i,n)}var u=this,i=new u(l),f,r;if(!nt(n))return t(i,new TypeError("You must pass an array to race.")),i;for(f=n.length,r=0;i._state===o&&r<f;r++)p(u.resolve(n[r]),undefined,e,s);return i}function wi(n){var i=this,t;return n&&typeof n=="object"&&n.constructor===i?n:(t=new i(l),v(t,n),t)}function bi(n){var r=this,i=new r(l);return t(i,n),i}function ki(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");}function di(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");}function i(n){this._id=lt++;this._state=undefined;this._result=undefined;this._subscribers=[];l!==n&&(b(n)||ki(),this instanceof i||di(),vi(this,n))}var g,e,rt,w,et,ot,st,ht,ct,lt,at;g=Array.isArray?Array.isArray:function(n){return Object.prototype.toString.call(n)==="[object Array]"};var nt=g,h=0,gi={}.toString,pt,k,f=function(n,t){e[h]=n;e[h+1]=t;h+=2;h===2&&(k?k(c):rt())};var kt=typeof window!="undefined"?window:undefined,tt=kt||{},it=tt.MutationObserver||tt.WebKitMutationObserver,dt=typeof process!="undefined"&&{}.toString.call(process)==="[object process]",gt=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";e=new Array(1e3);rt=dt?ni():it?ti():gt?ii():ri();var o=void 0,a=1,s=2,y=new ut;return w=new ut,u.prototype._validateInput=function(n){return nt(n)},u.prototype._validationError=function(){return new n.Error("Array Methods must be provided an Array")},u.prototype._init=function(){this._result=new Array(this.length)},et=u,u.prototype._enumerate=function(){for(var n=this,i=n.length,r=n.promise,u=n._input,t=0;r._state===o&&t<i;t++)n._eachEntry(u[t],t)},u.prototype._eachEntry=function(n,t){var i=this,r=i._instanceConstructor;yt(n)?n.constructor===r&&n._state!==o?(n._onerror=null,i._settledAt(n._state,t,n._result)):i._willSettleAt(r.resolve(n),t):(i._remaining--,i._result[t]=n)},u.prototype._settledAt=function(n,i,u){var f=this,e=f.promise;e._state===o&&(f._remaining--,n===s?t(e,u):f._result[i]=u);f._remaining===0&&r(e,f._result)},u.prototype._willSettleAt=function(n,t){var i=this;p(n,undefined,function(n){i._settledAt(a,t,n)},function(n){i._settledAt(s,t,n)})},ot=yi,st=pi,ht=wi,ct=bi,lt=0,at=i,i.all=ot,i.race=st,i.resolve=ht,i.reject=ct,i._setScheduler=wt,i._setAsap=bt,i._asap=f,i.prototype={constructor:i,then:function(n,t){var u=this,i=u._state,r,e,o;return i===a&&!n||i===s&&!t?this:(r=new this.constructor(l),e=u._result,i?(o=arguments[i-1],f(function(){ft(i,r,o,e)})):p(u,r,n,t),r)},"catch":function(n){return this.then(null,n)}},at}.call(this)}t.Init=i})(t=n.PromiseImpl||(n.PromiseImpl={}))}(t=n._Internal||(n._Internal={})),function(n){function t(){var n=window.navigator.userAgent,t=n.indexOf("Edge/");return t>=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t<this.m_actions.length;t++)this.processOneAction(this.m_actions[t]);return this.m_statements},t.prototype.processForDebugStatementInfo=function(t){var o,c,i,u,f,e,r,s,h;for(this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions),o=5,this.m_statements=[],c="",i=-1,u=0;u<this.m_actions.length;u++)if(this.processOneAction(this.m_actions[u]),t==u&&(i=this.m_statements.length-1),i>=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s<i;s++)r.push(this.m_statements[s]);for(r.push("// >>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h<e;h++)r.push(this.m_statements[h]);return e<this.m_statements.length&&r.push("..."),{statement:this.m_statements[i],surroundingStatements:r}},t.prototype.processOneAction=function(n){var t=n.actionInfo;switch(t.ActionType){case 1:this.processInstantiateAction(n);break;case 3:this.processMethodAction(n);break;case 2:this.processQueryAction(n);break;case 7:this.processQueryAsJsonAction(n);break;case 6:this.processRecursiveQueryAction(n);break;case 4:this.processSetPropertyAction(n);break;case 5:this.processTraceAction(n);break;case 8:this.processEnsureUnchangedAction(n);break;case 9:this.processUpdateAction(n);break}},t.prototype.processInstantiateAction=function(n){var i=n.actionInfo.ObjectPathId,u=this.m_referencedObjectPaths[i],r=this.getObjVarName(i),t;this.m_declaredObjectPathMap[i]?(t="// Instantiate {"+r+"}",t=this.appendDisposeCommentIfRelevant(t,n),this.m_statements.push(t)):(t="var "+r+"="+this.buildObjectPathExpressionWithParent(u)+";",t=this.appendDisposeCommentIfRelevant(t,n),this.m_statements.push(t),this.m_declaredObjectPathMap[i]=r)},t.prototype.processMethodAction=function(t){var r=t.actionInfo.Name,i;r==="_KeepReference"&&(r="track");i=this.getObjVarName(t.actionInfo.ObjectPathId)+"."+n.Utility._toCamelLowerCase(r)+"("+this.buildArgumentsExpression(t.actionInfo.ArgumentInfo)+");";i=this.appendDisposeCommentIfRelevant(i,t);this.m_statements.push(i)},t.prototype.processQueryAction=function(n){var i=this.buildQueryExpression(n),t=this.getObjVarName(n.actionInfo.ObjectPathId)+".load("+i+");";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.processQueryAsJsonAction=function(n){var i=this.buildQueryExpression(n),t=this.getObjVarName(n.actionInfo.ObjectPathId)+".retrieve("+i+");";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.processRecursiveQueryAction=function(n){var i="",t;n.actionInfo.RecursiveQueryInfo&&(i=JSON.stringify(n.actionInfo.RecursiveQueryInfo));t=this.getObjVarName(n.actionInfo.ObjectPathId)+".loadRecursive("+i+");";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.processSetPropertyAction=function(t){var i=this.getObjVarName(t.actionInfo.ObjectPathId)+"."+n.Utility._toCamelLowerCase(t.actionInfo.Name)+"="+this.buildArgumentsExpression(t.actionInfo.ArgumentInfo)+";";i=this.appendDisposeCommentIfRelevant(i,t);this.m_statements.push(i)},t.prototype.processTraceAction=function(n){var t="context.trace();";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.processEnsureUnchangedAction=function(n){var t=this.getObjVarName(n.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(n.actionInfo.ObjectState)+");";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.processUpdateAction=function(n){var t=this.getObjVarName(n.actionInfo.ObjectPathId)+".update("+JSON.stringify(n.actionInfo.ObjectState)+");";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.appendDisposeCommentIfRelevant=function(n,t){var u=this,i,r;return this.m_showDispose&&(i=t.actionInfo.L,i&&i.length>0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i<n.Arguments.length;i++)i>0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;if(f)switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n.pendingBatchInProgress="PendingBatchInProgress",n.notInsideBatch="NotInsideBatch",n.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.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.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.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.",n.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()".',n.Timeout="The operation has timed out.",n.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.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.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.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n.PendingBatchInProgress="There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",n.NotInsideBatch="Operations may not be invoked outside of a batch method.",n.CannotUpdateReadOnlyProperty="The property '{0}' is read-only and it cannot be updated.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t<i.length-1;t+=2)r[i[t]]=i[t+1];return r},t.getResponseStatusCode=function(n){return t.getResponseStatusCodeFromSafeArray(n.value.data)},t.getResponseStatusCodeFromSafeArray=function(n){return n[0]},t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession=5012,t.OfficeJsErrorCode_ooeActivityLimitReached=5102,t.OfficeJsErrorCode_ooeNoCapability=7e3,t}();n.RichApiMessageUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.checkArgumentNull=function(i,r){if(t.isNullOrUndefined(i))throw n._Internal.RuntimeError._createInvalidArgError(r);},t.isNullOrUndefined=function(n){return n===null?!0:typeof n=="undefined"?!0:!1},t.isUndefined=function(n){return typeof n=="undefined"?!0:!1},t.isNullOrEmptyString=function(n){return n===null?!0:typeof n=="undefined"?!0:n.length==0?!0:!1},t.isPlainJsonObject=function(n){return t.isNullOrUndefined(n)?!1:typeof n!="object"?!1:Object.getPrototypeOf(n)===Object.getPrototypeOf({})},t.trim=function(n){return n.replace(new RegExp("^\\s+|\\s+$","g"),"")},t.caseInsensitiveCompareString=function(n,i){return t.isNullOrUndefined(n)?t.isNullOrUndefined(i):t.isNullOrUndefined(i)?!1:n.toUpperCase()==i.toUpperCase()},t.adjustToDateTime=function(i){var r,u;if(t.isNullOrUndefined(i))return null;if(typeof i=="string")return new Date(i);if(Array.isArray(i)){for(r=i,u=0;u<r.length;u++)r[u]=t.adjustToDateTime(r[u]);return r}throw n._Internal.RuntimeError._createInvalidArgError("date");},t.isReadonlyRestRequest=function(n){return t.caseInsensitiveCompareString(n,"GET")},t.setMethodArguments=function(n,i,r){if(t.isNullOrUndefined(r))return null;var u=[],f=[],e=t.collectObjectPathInfos(n,r,u,f);return(i.Arguments=r,e)?(i.ReferencedObjectPathIds=f,u):null},t.collectObjectPathInfos=function(i,r,u,f){for(var o,h,c,s=!1,e=0;e<r.length;e++)r[e]instanceof n.ClientObject?(o=r[e],t.validateContext(i,o),r[e]=o._objectPath.objectPathInfo.Id,f.push(o._objectPath.objectPathInfo.Id),u.push(o._objectPath),s=!0):Array.isArray(r[e])?(h=[],c=t.collectObjectPathInfos(i,r[e],u,h),c?(f.push(h),s=!0):f.push(0)):f.push(0);return s},t.fixObjectPathIfNecessary=function(n,t){n&&n._objectPath&&t&&n._objectPath.updateUsingObjectData(t)},t.tryGetObjectIdFromLoadOrRetrieveResult=function(i){var r=i[n.Constants.id];return t.isNullOrUndefined(r)&&(r=i[n.Constants.idLowerCase]),t.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),r},t.validateObjectPath=function(i){for(var r=i._objectPath;r;){if(!r.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:t._getResourceString(n.ResourceStrings.invalidObjectPath,t.getObjectPathExpression(r)),debugInfo:{errorLocation:t.getObjectPathExpression(r)}});r=r.parentObjectPath}},t.validateReferencedObjectPaths=function(i){var u,r;if(i)for(u=0;u<i.length;u++)for(r=i[u];r;){if(!r.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:t._getResourceString(n.ResourceStrings.invalidObjectPath,t.getObjectPathExpression(r))});r=r.parentObjectPath}},t.validateContext=function(i,r){if(r&&r.context!==i)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidRequestContext,message:t._getResourceString(n.ResourceStrings.invalidRequestContext)});},t.log=function(n){t._logEnabled&&typeof console!="undefined"&&console.log&&console.log(n)},t.load=function(n,t){return n.context.load(n,t),n},t.loadAndSync=function(n,t){return n.context.load(n,t),n.context.sync().then(function(){return n})},t.retrieve=function(i,r){var u=n._internalConfig.alwaysPolyfillClientObjectRetrieveMethod,f,e,o;return u||(u=!t.isSetSupported("RichApiRuntime","1.1")),f=new n.RetrieveResultImpl(i,u),e=n.ClientRequestContext._parseQueryOption(r),o=u?n.ActionFactory.createQueryAction(i.context,i,e):n.ActionFactory.createQueryAsJsonAction(i.context,i,e),i.context._pendingRequest.addActionResultHandler(o,f),f},t.retrieveAndSync=function(n,i){var r=t.retrieve(n,i);return n.context.sync().then(function(){return r})},t.isSetSupported=function(n,t){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported(n,t):!0},t._parseSelectExpand=function(n){function e(n){var t=n.toLowerCase(),i,r;return t==="items"||t==="items/"?"*":(i=6,r=t.substr(0,i)==="items/"||t.substr(0,i)==="items.",r&&(n=n.substr(i)),n.replace(new RegExp("[/.]items[/.]","gi"),"/"))}var f=[],u,r,i;if(!t.isNullOrEmptyString(n))for(u=n.split(","),r=0;r<u.length;r++)i=u[r],i=e(i.trim()),i.length>0&&f.push(i);return f},t.toJson=function(n,i,r,u){var o={},e,f;for(e in i)f=i[e],typeof f!="undefined"&&(o[e]=f);for(e in r)f=r[e],typeof f!="undefined"&&(o[e]=f[t.fieldName_isCollection]&&typeof f[t.fieldName_m__items]!="undefined"?f.toJSON().items:f.toJSON());return u&&(o.items=u.map(function(n){return n.toJSON()})),o},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r<i.length)return i[r];else throw n._Internal.RuntimeError._createInvalidArgError("format");})},t.throwIfNotLoaded=function(n,i,r,u){if(!u&&t.isUndefined(i)&&n.charCodeAt(0)!=t.s_underscoreCharCode)throw t.createPropertyNotLoadedException(r,n);},t.createPropertyNotLoadedException=function(i,r){return new n._Internal.RuntimeError({code:n.ErrorCodes.propertyNotLoaded,message:t._getResourceString(n.ResourceStrings.propertyNotLoaded,r),debugInfo:i?{errorLocation:i+"."+r}:undefined})},t.createCannotUpdateReadOnlyPropertyException=function(i,r){return new n._Internal.RuntimeError({code:n.ErrorCodes.cannotUpdateReadOnlyProperty,message:t._getResourceString(n.ResourceStrings.cannotUpdateReadOnlyProperty,r),debugInfo:i?{errorLocation:i+"."+r}:undefined})},t.throwIfApiNotSupported=function(i,r,u,f){if(t._doApiNotSupportedCheck&&!t.isSetSupported(r,u)){var e=t._getResourceString(n.ResourceStrings.apiNotFoundDetails,[i,r+" "+u,f]);throw new n._Internal.RuntimeError({code:n.ErrorCodes.apiNotFound,message:e,debugInfo:{errorLocation:i}});}},t.getObjectPathExpression=function(n){for(var i="";n;){switch(n.objectPathInfo.ObjectPathType){case 1:i=i;break;case 2:i="new()"+(i.length>0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u<r.length-1;u+=2)t.isUndefined(i[r[u+1]])||n[r[u]]._handleResult(i[r[u+1]])},t.normalizeName=function(n){return n.substr(0,1).toLowerCase()+n.substr(1)},t._isLocalDocumentUrl=function(n){return t._getLocalDocumentUrlPrefixLength(n)>0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t<i.length;t++)if(r===i[t])return i[t].length;else if(r.substr(0,i[t].length+1)===i[t]+"/")return i[t].length+1;return 0},t._validateLocalDocumentRequest=function(i){var f=t._getLocalDocumentUrlPrefixLength(i.url),r,u;if(f<=0)throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});return r=i.url.substr(f),u=r.toLowerCase(),u==="_api"?r="":u.substr(0,5)==="_api/"&&(r=r.substr(5)),{method:i.method,url:r,headers:i.headers,body:i.body}},t._buildRequestMessageSafeArray=function(i){var r=0,f,s,e,u,o,h;if(t.isReadonlyRestRequest(i.method)||(r=1),i.url.substr(0,n.Constants.processQuery.length).toLowerCase()===n.Constants.processQuery.toLowerCase()&&(f=i.url.indexOf("?"),f>0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u<e.length;u++)if(o=e[u].split("="),o[0].toLowerCase()===n.Constants.flags){h=parseInt(o[1]);r=h;r=r&1;break}return n.RichApiMessageUtility.buildRequestMessageSafeArray("",r,i.method,i.url,i.headers,i.body)},t._parseHttpResponseHeaders=function(n){var s={},h,o,r,i,u,f,e;if(!t.isNullOrEmptyString(n))for(h=new RegExp("\r?\n"),o=n.split(h),r=0;r<o.length;r++)i=o[r],i!=null&&(u=i.indexOf(":"),u>0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i<n.length&&n.charCodeAt(i)>=65&&n.charCodeAt(i)<=90;)i++;return i<n.length?n.substr(0,i).toLowerCase()+n.substr(i):n.toLowerCase()},t.definePropertyThrowUnloadedException=function(n,i,r){Object.defineProperty(n,r,{configurable:!0,enumerable:!0,get:function(){throw t.createPropertyNotLoadedException(i,r);},set:function(){throw t.createCannotUpdateReadOnlyPropertyException(i,r);}})},t.defineReadOnlyPropertyWithValue=function(n,i,r){Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){return r},set:function(){throw t.createCannotUpdateReadOnlyPropertyException(null,i);}})},t.processRetrieveResult=function(i,r,u,f){var c,a,v,l,e,o,h,w,s;if(!t.isNullOrUndefined(r))if(f){if(c=r[n.Constants.itemsLowerCase],Array.isArray(c)){for(a=[],e=0;e<c.length;e++)v=f(c[e],e),l={},l[n.Constants.proxy]=v,v._handleRetrieveResult(c[e],l),a.push(l);t.defineReadOnlyPropertyWithValue(u,n.Constants.itemsLowerCase,a)}}else{var y=i[n.Constants.scalarPropertyNames],p=i[n.Constants.navigationPropertyNames],b=i[n.Constants.className];if(y)for(e=0;e<y.length;e++)o=y[e],h=r[o],t.isUndefined(h)?t.definePropertyThrowUnloadedException(u,b,o):t.defineReadOnlyPropertyWithValue(u,o,h);if(p)for(e=0;e<p.length;e++)o=p[e],h=r[o],t.isUndefined(h)?t.definePropertyThrowUnloadedException(u,b,o):(w=i[o],s={},w._handleRetrieveResult(h,s),s[n.Constants.proxy]=w,Array.isArray(s[n.Constants.itemsLowerCase])&&(s=s[n.Constants.itemsLowerCase]),t.defineReadOnlyPropertyWithValue(u,o,s))}},t.fieldName_m__items="m__items",t.fieldName_isCollection="_isCollection",t._logEnabled=!1,t._synchronousCleanup=!1,t._doApiNotSupportedCheck=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var h="OfficeCore",c="AgaveVisualApi",l=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,a=OfficeExtension.ObjectPathFactory.createMethodObjectPath,v=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,i=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,y=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,p=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,w=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,t=OfficeExtension.ActionFactory.createMethodAction,b=OfficeExtension.ActionFactory.createEnsureUnchangedAction,k=OfficeExtension.ActionFactory.createSetPropertyAction,r=OfficeExtension.Utility.isNullOrUndefined,d=OfficeExtension.Utility.isUndefined,g=OfficeExtension.Utility.throwIfNotLoaded,nt=OfficeExtension.Utility.throwIfApiNotSupported,tt=OfficeExtension.Utility.load,it=OfficeExtension.Utility.loadAndSync,rt=OfficeExtension.Utility.retrieve,ut=OfficeExtension.Utility.retrieveAndSync,u=OfficeExtension.Utility.toJson,f=OfficeExtension.Utility.fixObjectPathIfNecessary,e=OfficeExtension.Utility._addActionResultHandler,ft=OfficeExtension.Utility._handleNavigationPropertyResults,et=OfficeExtension.Utility.adjustToDateTime,ot="BiShim",o=function(o){function s(){return o!==null&&o.apply(this,arguments)||this}return __extends(s,o),Object.defineProperty(s.prototype,"_className",{get:function(){return"BiShim"},enumerable:!0,configurable:!0}),s.prototype.initialize=function(n){t(this.context,this,"Initialize",0,[n],!1)},s.prototype.uninitialize=function(){t(this.context,this,"Uninitialize",0,[],!1)},s.prototype.getData=function(){var i=t(this.context,this,"getData",1,[],!1),n=new OfficeExtension.ClientResult;return e(this,i,n),n},s.prototype._handleResult=function(n){if(o.prototype._handleResult.call(this,n),!r(n)){var t=n;f(this,t)}},s.newObject=function(t){return new n.BiShim(t,i(t,"Microsoft.AgaveVisual.BiShim",!1,!1))},s.prototype.toJSON=function(){return u(this,{},{})},s}(OfficeExtension.ClientObject),s;n.BiShim=o,function(n){n.generalException="GeneralException"}(s=n.ErrorCodes||(n.ErrorCodes={}))}(OfficeCore||(OfficeCore={})),function(n){var a="OfficeCore",v="AuthenticationApi",y=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,p=OfficeExtension.ObjectPathFactory.createMethodObjectPath,w=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,i=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,b=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,k=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,d=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,r=OfficeExtension.ActionFactory.createMethodAction,g=OfficeExtension.ActionFactory.createEnsureUnchangedAction,nt=OfficeExtension.ActionFactory.createSetPropertyAction,u=OfficeExtension.Utility.isNullOrUndefined,tt=OfficeExtension.Utility.isUndefined,it=OfficeExtension.Utility.throwIfNotLoaded,rt=OfficeExtension.Utility.throwIfApiNotSupported,ut=OfficeExtension.Utility.load,ft=OfficeExtension.Utility.retrieve,f=OfficeExtension.Utility.toJson,e=OfficeExtension.Utility.fixObjectPathIfNecessary,o=OfficeExtension.Utility._addActionResultHandler,et=OfficeExtension.Utility._handleNavigationPropertyResults,ot=OfficeExtension.Utility.adjustToDateTime,s=OfficeExtension.Utility.processRetrieveResult,h,c,t,l;(function(n){n.organizationAccount="OrganizationAccount";n.microsoftAccount="MicrosoftAccount"})(h=n.IdentityType||(n.IdentityType={}));c="AuthenticationService";t=function(t){function h(){return t!==null&&t.apply(this,arguments)||this}return __extends(h,t),Object.defineProperty(h.prototype,"_className",{get:function(){return"AuthenticationService"},enumerable:!0,configurable:!0}),h.prototype.getAccessToken=function(n){var i=r(this.context,this,"GetAccessToken",1,[n],!1),t=new OfficeExtension.ClientResult;return o(this,i,t),t},h.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!u(n)){var i=n;e(this,i)}},h.prototype._handleRetrieveResult=function(n,i){t.prototype._handleRetrieveResult.call(this,n,i);s(this,n,i)},h.newObject=function(t){return new n.AuthenticationService(t,i(t,"Microsoft.Authentication.AuthenticationService",!1,!1))},h.prototype.toJSON=function(){return f(this,{},{})},h}(OfficeExtension.ClientObject);n.AuthenticationService=t,function(n){n.generalException="GeneralException"}(l=n.ErrorCodes||(n.ErrorCodes={}))}(OfficeCore||(OfficeCore={})),function(n){var y="OfficeCore",p="ExperimentApi",w=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,i=OfficeExtension.ObjectPathFactory.createMethodObjectPath,b=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,o=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,k=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,d=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,g=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,t=OfficeExtension.ActionFactory.createMethodAction,nt=OfficeExtension.ActionFactory.createSetPropertyAction,r=OfficeExtension.Utility.isNullOrUndefined,s=OfficeExtension.Utility.isUndefined,h=OfficeExtension.Utility.throwIfNotLoaded,tt=OfficeExtension.Utility.throwIfApiNotSupported,c=OfficeExtension.Utility.load,u=OfficeExtension.Utility.fixObjectPathIfNecessary,f=OfficeExtension.Utility._addActionResultHandler,it=OfficeExtension.Utility._handleNavigationPropertyResults,rt=OfficeExtension.Utility.adjustToDateTime,l=function(e){function s(){return e!==null&&e.apply(this,arguments)||this}return __extends(s,e),Object.defineProperty(s.prototype,"_className",{get:function(){return"FlightingService"},enumerable:!0,configurable:!0}),s.prototype.getClientSessionId=function(){var i=t(this.context,this,"GetClientSessionId",1,[]),n=new OfficeExtension.ClientResult;return f(this,i,n),n},s.prototype.getDeferredFlights=function(){var i=t(this.context,this,"GetDeferredFlights",1,[]),n=new OfficeExtension.ClientResult;return f(this,i,n),n},s.prototype.getFeature=function(t,r,u,f){return new n.ABType(this.context,i(this.context,this,"GetFeature",1,[t,r,u,f],!1,!1,null))},s.prototype.getFeatureGate=function(t,r){return new n.ABType(this.context,i(this.context,this,"GetFeatureGate",1,[t,r],!1,!1,null))},s.prototype.resetOverride=function(n){t(this.context,this,"ResetOverride",0,[n])},s.prototype.setOverride=function(n,i,r){t(this.context,this,"SetOverride",0,[n,i,r])},s.prototype._handleResult=function(n){if(e.prototype._handleResult.call(this,n),!r(n)){var t=n;u(this,t)}},s.newObject=function(t){return new n.FlightingService(t,o(t,"Microsoft.Experiment.FlightingService",!1))},s.prototype.toJSON=function(){return{}},s}(OfficeExtension.ClientObject),e,a,v;n.FlightingService=l;e=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_className",{get:function(){return"ABType"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return h("value",this.m_value,"ABType",this._isNull),this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!r(t)){var i=t;u(this,i);s(i.Value)||(this.m_value=i.Value)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{value:this.m_value}},t}(OfficeExtension.ClientObject);n.ABType=e,function(n){n.boolean="Boolean";n.integer="Integer";n.string="String"}(a=n.FeatureType||(n.FeatureType={})),function(n){n.generalException="GeneralException"}(v=n.ExperimentErrorCodes||(n.ExperimentErrorCodes={}))}(OfficeCore||(OfficeCore={})),function(n){var t=function(t){function i(n){return t.call(this,n)||this}return __extends(i,t),Object.defineProperty(i.prototype,"authentication",{get:function(){return this.m_authentication||(this.m_authentication=n.AuthenticationService.newObject(this)),this.m_authentication},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"flighting",{get:function(){return this.flightingService},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"telemetry",{get:function(){return this.m_telemetry||(this.m_telemetry=n.TelemetryService.newObject(this)),this.m_telemetry},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"flightingService",{get:function(){return this.m_flightingService||(this.m_flightingService=n.FlightingService.newObject(this)),this.m_flightingService},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bi",{get:function(){return this.m_biShim||(this.m_biShim=n.BiShim.newObject(this)),this.m_biShim},enumerable:!0,configurable:!0}),i}(OfficeExtension.ClientRequestContext);n.RequestContext=t}(OfficeCore||(OfficeCore={})),function(n){var o="OfficeCore",s="TelemetryApi",h=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,c=OfficeExtension.ObjectPathFactory.createMethodObjectPath,l=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,t=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,a=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,v=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,y=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,i=OfficeExtension.ActionFactory.createMethodAction,p=OfficeExtension.ActionFactory.createSetPropertyAction,r=OfficeExtension.Utility.isNullOrUndefined,w=OfficeExtension.Utility.isUndefined,b=OfficeExtension.Utility.throwIfNotLoaded,k=OfficeExtension.Utility.throwIfApiNotSupported,d=OfficeExtension.Utility.load,u=OfficeExtension.Utility.fixObjectPathIfNecessary,g=OfficeExtension.Utility._addActionResultHandler,nt=OfficeExtension.Utility._handleNavigationPropertyResults,tt=OfficeExtension.Utility.adjustToDateTime,it="TelemetryService",f=function(f){function e(){return f!==null&&f.apply(this,arguments)||this}return __extends(e,f),Object.defineProperty(e.prototype,"_className",{get:function(){return"TelemetryService"},enumerable:!0,configurable:!0}),e.prototype.sendTelemetryEvent=function(n,t,r,u,f){i(this.context,this,"SendTelemetryEvent",1,[n,t,r,u,f],!1)},e.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var t=n;u(this,t)}},e.newObject=function(i){return new n.TelemetryService(i,t(i,"Microsoft.Telemetry.TelemetryService",!1,!1))},e.prototype.toJSON=function(){return{}},e}(OfficeExtension.ClientObject),e;n.TelemetryService=f,function(n){n.generalException="GeneralException"}(e=n.TelemetryErrorCodes||(n.TelemetryErrorCodes={}))}(OfficeCore||(OfficeCore={})),function(n){var ft="Office",et="OfficeSharedApi",e=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,s=OfficeExtension.ObjectPathFactory.createMethodObjectPath,k=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,ot=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,st=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,ht=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,d=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,u=OfficeExtension.ActionFactory.createMethodAction,g=OfficeExtension.ActionFactory.createEnsureUnchangedAction,h=OfficeExtension.ActionFactory.createSetPropertyAction,f=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,ct=OfficeExtension.Utility.throwIfApiNotSupported,c=OfficeExtension.Utility.load,l=OfficeExtension.Utility.loadAndSync,a=OfficeExtension.Utility.retrieve,v=OfficeExtension.Utility.retrieveAndSync,y=OfficeExtension.Utility.toJson,p=OfficeExtension.Utility.fixObjectPathIfNecessary,o=OfficeExtension.Utility._addActionResultHandler,nt=OfficeExtension.Utility._handleNavigationPropertyResults,tt=OfficeExtension.Utility.adjustToDateTime,r="Comment",it=function(w){function b(){return w!==null&&w.apply(this,arguments)||this}return __extends(b,w),Object.defineProperty(b.prototype,"_className",{get:function(){return"Comment"},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"parent",{get:function(){return this._P||(this._P=new n.Comment(this.context,e(this.context,this,"Parent",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"parentOrNullObject",{get:function(){return this._Pa||(this._Pa=new n.Comment(this.context,e(this.context,this,"ParentOrNullObject",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"replies",{get:function(){return this._R||(this._R=new n.CommentCollection(this.context,e(this.context,this,"Replies",!0,!1,!1))),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"author",{get:function(){return i("author",this._A,r,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"created",{get:function(){return i("created",this._C,r,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"id",{get:function(){return i("id",this._I,r,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"level",{get:function(){return i("level",this._L,r,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"mentions",{get:function(){return i("mentions",this._M,r,this._isNull),this._M},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"resolved",{get:function(){return i("resolved",this._Re,r,this._isNull),this._Re},set:function(n){this._Re=n;h(this.context,this,"Resolved",n)},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"text",{get:function(){return i("text",this._T,r,this._isNull),this._T},set:function(n){this._T=n;h(this.context,this,"Text",n)},enumerable:!0,configurable:!0}),b.prototype.set=function(n,t){this._recursivelySet(n,t,["text","resolved"],[],["parent","parentOrNullObject","replies"])},b.prototype.delete=function(){u(this.context,this,"Delete",0,[],!1)},b.prototype.getParentOrSelf=function(){return new n.Comment(this.context,s(this.context,this,"GetParentOrSelf",1,[],!1,!1,null,!1))},b.prototype.getRichText=function(n){var i=u(this.context,this,"GetRichText",1,[n],!1),t=new OfficeExtension.ClientResult;return o(this,i,t),t},b.prototype.reply=function(t,i){return new n.Comment(this.context,s(this.context,this,"Reply",0,[t,i],!1,!1,null,!1))},b.prototype.setRichText=function(n,t){var r=u(this.context,this,"SetRichText",0,[n,t],!1),i=new OfficeExtension.ClientResult;return o(this,r,i),i},b.prototype._handleResult=function(n){if(w.prototype._handleResult.call(this,n),!f(n)){var i=n;p(this,i);t(i.Author)||(this._A=i.Author);t(i.Created)||(this._C=tt(i.Created));t(i.Id)||(this._I=i.Id);t(i.Level)||(this._L=i.Level);t(i.Mentions)||(this._M=i.Mentions);t(i.Resolved)||(this._Re=i.Resolved);t(i.Text)||(this._T=i.Text);nt(this,i,["parent","Parent","parentOrNullObject","ParentOrNullObject","replies","Replies"])}},b.prototype.load=function(n){return c(this,n)},b.prototype.loadAndSync=function(n){return l(this,n)},b.prototype.retrieve=function(n){return a(this,n)},b.prototype.retrieveAndSync=function(n){return v(this,n)},b.prototype._handleIdResult=function(n){(w.prototype._handleIdResult.call(this,n),f(n))||t(n.Id)||(this._I=n.Id)},b.prototype.toJSON=function(){return y(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})},b.prototype.ensureUnchanged=function(n){g(this.context,this,n);return},b}(OfficeExtension.ClientObject),w,b,rt,ut;n.Comment=it;w="CommentCollection";b=function(t){function r(){return t!==null&&t.apply(this,arguments)||this}return __extends(r,t),Object.defineProperty(r.prototype,"_className",{get:function(){return"CommentCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"items",{get:function(){return i("items",this.m__items,w,this._isNull),this.m__items},enumerable:!0,configurable:!0}),r.prototype.getCount=function(){var t=u(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return o(this,t,n),n},r.prototype.getItem=function(t){return new n.Comment(this.context,k(this.context,this,[t]))},r.prototype._handleResult=function(i){var u,e,r,o;if((t.prototype._handleResult.call(this,i),!f(i))&&(u=i,p(this,u),!f(u[OfficeExtension.Constants.items])))for(this.m__items=[],e=u[OfficeExtension.Constants.items],r=0;r<e.length;r++)o=new n.Comment(this.context,d(!0,this.context,this,e[r],r)),o._handleResult(e[r]),this.m__items.push(o)},r.prototype.load=function(n){return c(this,n)},r.prototype.loadAndSync=function(n){return l(this,n)},r.prototype.retrieve=function(n){return a(this,n)},r.prototype.retrieveAndSync=function(n){return v(this,n)},r.prototype.toJSON=function(){return y(this,{},{},this.m__items)},r}(OfficeExtension.ClientObject);n.CommentCollection=b,function(n){n.plain="Plain";n.markdown="Markdown";n.delta="Delta"}(rt=n.CommentTextFormat||(n.CommentTextFormat={})),function(n){n.generalException="GeneralException"}(ut=n.ErrorCodes||(n.ErrorCodes={}))}(OfficeCore||(OfficeCore={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var pu="OneNote",wu="OneNoteApi",e=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,f=OfficeExtension.ObjectPathFactory.createMethodObjectPath,l=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,bu=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,ku=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,du=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,a=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,r=OfficeExtension.ActionFactory.createMethodAction,v=OfficeExtension.ActionFactory.createSetPropertyAction,u=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,gu=OfficeExtension.Utility.throwIfApiNotSupported,o=OfficeExtension.Utility.load,s=OfficeExtension.Utility.fixObjectPathIfNecessary,h=OfficeExtension.Utility._addActionResultHandler,c=OfficeExtension.Utility._handleNavigationPropertyResults,nf=OfficeExtension.Utility.adjustToDateTime,br="Application",kr=function(l){function a(){l.apply(this,arguments)}return __extends(a,l),Object.defineProperty(a.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"notebooks",{get:function(){return this._N||(this._N=new n.NotebookCollection(this.context,e(this.context,this,"Notebooks",!0,!1,!1))),this._N},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_platform",{get:function(){return i("_platform",this.__p,br,this._isNull),this.__p},enumerable:!0,configurable:!0}),a.prototype.getActiveNotebook=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebook",1,[],!1,!1,null,!1))},a.prototype.getActiveNotebookOrNull=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebookOrNull",1,[],!1,!1,null,!1))},a.prototype.getActiveOutline=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutline",1,[],!1,!1,null,!1))},a.prototype.getActiveOutlineOrNull=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutlineOrNull",1,[],!1,!1,null,!1))},a.prototype.getActivePage=function(){return new n.Page(this.context,f(this.context,this,"GetActivePage",1,[],!1,!1,null,!1))},a.prototype.getActivePageOrNull=function(){return new n.Page(this.context,f(this.context,this,"GetActivePageOrNull",1,[],!1,!1,null,!1))},a.prototype.getActiveParagraph=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraph",1,[],!1,!1,null,!1))},a.prototype.getActiveParagraphOrNull=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraphOrNull",1,[],!1,!1,null,!1))},a.prototype.getActiveSection=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSection",1,[],!1,!1,null,!1))},a.prototype.getActiveSectionOrNull=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSectionOrNull",1,[],!1,!1,null,!1))},a.prototype.getSelectedPages=function(){return new n.PageCollection(this.context,f(this.context,this,"GetSelectedPages",1,[],!0,!1,null,!1))},a.prototype.getWindowSize=function(){var t=r(this.context,this,"GetWindowSize",0,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype.insertHtmlAtCurrentPosition=function(n){r(this.context,this,"InsertHtmlAtCurrentPosition",0,[n],!1)},a.prototype.navigateToPage=function(n){r(this.context,this,"NavigateToPage",1,[n],!1)},a.prototype.navigateToPageWithClientUrl=function(t){return new n.Page(this.context,f(this.context,this,"NavigateToPageWithClientUrl",1,[t],!1,!1,null,!1))},a.prototype._ClientLog=function(n,t,i,u){r(this.context,this,"_ClientLog",1,[n,t,i,u],!1)},a.prototype._EnableControl=function(n,t){r(this.context,this,"_EnableControl",0,[n,t],!1)},a.prototype._EnterFullScreen=function(){r(this.context,this,"_EnterFullScreen",0,[],!1)},a.prototype._ExitFullScreen=function(){r(this.context,this,"_ExitFullScreen",0,[],!1)},a.prototype._FocusCanvas=function(){r(this.context,this,"_FocusCanvas",0,[],!1)},a.prototype._GetAccountInfo=function(){var t=r(this.context,this,"_GetAccountInfo",1,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype._GetAccountInfoByType=function(n){var i=r(this.context,this,"_GetAccountInfoByType",1,[n],!1),t=new OfficeExtension.ClientResult;return h(this,i,t),t},a.prototype._GetControlVisibility=function(n){var i=r(this.context,this,"_GetControlVisibility",1,[n],!1),t=new OfficeExtension.ClientResult;return h(this,i,t),t},a.prototype._GetLoggingInfo=function(){var t=r(this.context,this,"_GetLoggingInfo",1,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype._GetObjectByReferenceId=function(n){var i=r(this.context,this,"_GetObjectByReferenceId",1,[n],!1),t=new OfficeExtension.ClientResult;return h(this,i,t),t},a.prototype._GetObjectTypeNameByReferenceId=function(n){var i=r(this.context,this,"_GetObjectTypeNameByReferenceId",1,[n],!1),t=new OfficeExtension.ClientResult;return h(this,i,t),t},a.prototype._GetServiceTokenByUrl=function(n){var i=r(this.context,this,"_GetServiceTokenByUrl",1,[n],!1),t=new OfficeExtension.ClientResult;return h(this,i,t),t},a.prototype._GetServiceTokens=function(n){var i=r(this.context,this,"_GetServiceTokens",1,[n],!1),t=new OfficeExtension.ClientResult;return h(this,i,t),t},a.prototype._GetServiceTokensExt=function(n,t){var u=r(this.context,this,"_GetServiceTokensExt",1,[n,t],!1),i=new OfficeExtension.ClientResult;return h(this,u,i),i},a.prototype._GetServiceUrl=function(n){var i=r(this.context,this,"_GetServiceUrl",1,[n],!1),t=new OfficeExtension.ClientResult;return h(this,i,t),t},a.prototype._IsControlEnabled=function(n){var i=r(this.context,this,"_IsControlEnabled",1,[n],!1),t=new OfficeExtension.ClientResult;return h(this,i,t),t},a.prototype._RemoveAllReferences=function(){r(this.context,this,"_RemoveAllReferences",1,[],!1)},a.prototype._RemoveReference=function(n){r(this.context,this,"_RemoveReference",1,[n],!1)},a.prototype._SendDataToLearningTools=function(n,t){var u=r(this.context,this,"_SendDataToLearningTools",0,[n,t],!1),i=new OfficeExtension.ClientResult;return h(this,u,i),i},a.prototype._SetControlVisibility=function(n,t){r(this.context,this,"_SetControlVisibility",0,[n,t],!1)},a.prototype._handleResult=function(n){if(l.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i._platform)||(this.__p=i._platform);c(this,i,["notebooks","Notebooks"])}},a.prototype.load=function(n){return o(this,n),this},a.prototype.toJSON=function(){return{}},a}(OfficeExtension.ClientObject),gt,fi,ni,ei,ft,oi,ti,si,et,hi,w,ci,ot,li,ii,ai,ri,vi,st,yi,tt,pi,ht,wi,b,bi,ct,ki,it,di,lt,gi,k,nr,at,tr,y,ir,vt,rr,d,ur,yt,fr,ui,er,pt,or,wt,sr,bt,hr,rt,cr,p,lr,g,ar,ut,vr,kt,yr,nt,pr,dt,wr,dr,gr,nu,tu,iu,ru,uu,fu,eu,ou,su,hu,cu,lu,au,vu,yu;n.Application=kr;gt="InkAnalysis";fi=function(f){function h(){f.apply(this,arguments)}return __extends(h,f),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkAnalysis"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"page",{get:function(){return this._P||(this._P=new n.Page(this.context,e(this.context,this,"Page",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"paragraphs",{get:function(){return this._Pa||(this._Pa=new n.InkAnalysisParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"id",{get:function(){return i("id",this._I,gt,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,gt,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Id)||(this._I=i.Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["page","Page","paragraphs","Paragraphs"])}},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{id:this._I}},h}(OfficeExtension.ClientObject);n.InkAnalysis=fi;ni="InkAnalysisParagraph";ei=function(f){function h(){f.apply(this,arguments)}return __extends(h,f),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkAnalysisParagraph"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"inkAnalysis",{get:function(){return this._In||(this._In=new n.InkAnalysis(this.context,e(this.context,this,"InkAnalysis",!1,!1,!1))),this._In},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"lines",{get:function(){return this._L||(this._L=new n.InkAnalysisLineCollection(this.context,e(this.context,this,"Lines",!0,!1,!1))),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"id",{get:function(){return i("id",this._I,ni,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ni,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Id)||(this._I=i.Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["inkAnalysis","InkAnalysis","lines","Lines"])}},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{id:this._I}},h}(OfficeExtension.ClientObject);n.InkAnalysisParagraph=ei;ft="InkAnalysisParagraphCollection";oi=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkAnalysisParagraphCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,ft,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,ft,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ft,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkAnalysisParagraph(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkAnalysisParagraph(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.InkAnalysisParagraph(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.InkAnalysisParagraphCollection=oi;ti="InkAnalysisLine";si=function(f){function h(){f.apply(this,arguments)}return __extends(h,f),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkAnalysisLine"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"paragraph",{get:function(){return this._P||(this._P=new n.InkAnalysisParagraph(this.context,e(this.context,this,"Paragraph",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"words",{get:function(){return this._W||(this._W=new n.InkAnalysisWordCollection(this.context,e(this.context,this,"Words",!0,!1,!1))),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"id",{get:function(){return i("id",this._I,ti,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ti,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Id)||(this._I=i.Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["paragraph","Paragraph","words","Words"])}},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{id:this._I}},h}(OfficeExtension.ClientObject);n.InkAnalysisLine=si;et="InkAnalysisLineCollection";hi=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkAnalysisLineCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,et,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,et,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,et,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkAnalysisLine(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkAnalysisLine(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.InkAnalysisLine(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.InkAnalysisLineCollection=hi;w="InkAnalysisWord";ci=function(f){function h(){f.apply(this,arguments)}return __extends(h,f),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkAnalysisWord"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"line",{get:function(){return this._Li||(this._Li=new n.InkAnalysisLine(this.context,e(this.context,this,"Line",!1,!1,!1))),this._Li},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"id",{get:function(){return i("id",this._I,w,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"languageId",{get:function(){return i("languageId",this._L,w,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"strokePointers",{get:function(){return i("strokePointers",this._S,w,this._isNull),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"wordAlternates",{get:function(){return i("wordAlternates",this._W,w,this._isNull),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,w,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Id)||(this._I=i.Id);t(i.LanguageId)||(this._L=i.LanguageId);t(i.StrokePointers)||(this._S=i.StrokePointers);t(i.WordAlternates)||(this._W=i.WordAlternates);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["line","Line"])}},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{id:this._I,languageId:this._L,strokePointers:this._S,wordAlternates:this._W}},h}(OfficeExtension.ClientObject);n.InkAnalysisWord=ci;ot="InkAnalysisWordCollection";li=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkAnalysisWordCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,ot,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,ot,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ot,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkAnalysisWord(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkAnalysisWord(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.InkAnalysisWord(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.InkAnalysisWordCollection=li;ii="FloatingInk";ai=function(f){function h(){f.apply(this,arguments)}return __extends(h,f),Object.defineProperty(h.prototype,"_className",{get:function(){return"FloatingInk"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"inkStrokes",{get:function(){return this._In||(this._In=new n.InkStrokeCollection(this.context,e(this.context,this,"InkStrokes",!0,!1,!1))),this._In},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"pageContent",{get:function(){return this._P||(this._P=new n.PageContent(this.context,e(this.context,this,"PageContent",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"id",{get:function(){return i("id",this._I,ii,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ii,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Id)||(this._I=i.Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["inkStrokes","InkStrokes","pageContent","PageContent"])}},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{id:this._I}},h}(OfficeExtension.ClientObject);n.FloatingInk=ai;ri="InkStroke";vi=function(f){function h(){f.apply(this,arguments)}return __extends(h,f),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkStroke"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"floatingInk",{get:function(){return this._F||(this._F=new n.FloatingInk(this.context,e(this.context,this,"FloatingInk",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"id",{get:function(){return i("id",this._I,ri,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ri,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Id)||(this._I=i.Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["floatingInk","FloatingInk"])}},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{id:this._I}},h}(OfficeExtension.ClientObject);n.InkStroke=vi;st="InkStrokeCollection";yi=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkStrokeCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,st,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,st,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,st,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkStroke(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkStroke(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.InkStroke(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.InkStrokeCollection=yi;tt="InkWord";pi=function(f){function h(){f.apply(this,arguments)}return __extends(h,f),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkWord"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"paragraph",{get:function(){return this._P||(this._P=new n.Paragraph(this.context,e(this.context,this,"Paragraph",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"id",{get:function(){return i("id",this._I,tt,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"languageId",{get:function(){return i("languageId",this._L,tt,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"wordAlternates",{get:function(){return i("wordAlternates",this._W,tt,this._isNull),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,tt,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Id)||(this._I=i.Id);t(i.LanguageId)||(this._L=i.LanguageId);t(i.WordAlternates)||(this._W=i.WordAlternates);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["paragraph","Paragraph"])}},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{id:this._I,languageId:this._L,wordAlternates:this._W}},h}(OfficeExtension.ClientObject);n.InkWord=pi;ht="InkWordCollection";wi=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkWordCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,ht,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,ht,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ht,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkWord(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkWord(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.InkWord(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.InkWordCollection=wi;b="Notebook";bi=function(l){function a(){l.apply(this,arguments)}return __extends(a,l),Object.defineProperty(a.prototype,"_className",{get:function(){return"Notebook"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"sectionGroups",{get:function(){return this._S||(this._S=new n.SectionGroupCollection(this.context,e(this.context,this,"SectionGroups",!0,!1,!1))),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"sections",{get:function(){return this._Se||(this._Se=new n.SectionCollection(this.context,e(this.context,this,"Sections",!0,!1,!1))),this._Se},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"baseUrl",{get:function(){return i("baseUrl",this._B,b,this._isNull),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"clientUrl",{get:function(){return i("clientUrl",this._C,b,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"id",{get:function(){return i("id",this._I,b,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"name",{get:function(){return i("name",this._N,b,this._isNull),this._N},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,b,this._isNull),this.__R},enumerable:!0,configurable:!0}),a.prototype.addSection=function(t){return new n.Section(this.context,f(this.context,this,"AddSection",0,[t],!1,!0,null,!1))},a.prototype.addSectionGroup=function(t){return new n.SectionGroup(this.context,f(this.context,this,"AddSectionGroup",0,[t],!1,!0,null,!1))},a.prototype.getRestApiId=function(){var t=r(this.context,this,"GetRestApiId",1,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},a.prototype._Sync=function(){r(this.context,this,"_Sync",0,[],!1)},a.prototype._handleResult=function(n){if(l.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.BaseUrl)||(this._B=i.BaseUrl);t(i.ClientUrl)||(this._C=i.ClientUrl);t(i.Id)||(this._I=i.Id);t(i.Name)||(this._N=i.Name);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["sectionGroups","SectionGroups","sections","Sections"])}},a.prototype.load=function(n){return o(this,n),this},a.prototype._handleIdResult=function(n){(l.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},a.prototype.track=function(){return this.context.trackedObjects.add(this),this},a.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},a.prototype.toJSON=function(){return{baseUrl:this._B,clientUrl:this._C,id:this._I,name:this._N}},a}(OfficeExtension.ClientObject);n.Notebook=bi;ct="NotebookCollection";ki=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"NotebookCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,ct,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,ct,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ct,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getByName=function(t){return new n.NotebookCollection(this.context,f(this.context,this,"GetByName",1,[t],!0,!1,null,!1))},h.prototype.getItem=function(t){return new n.Notebook(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.Notebook(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.Notebook(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.NotebookCollection=ki;it="SectionGroup";di=function(l){function a(){l.apply(this,arguments)}return __extends(a,l),Object.defineProperty(a.prototype,"_className",{get:function(){return"SectionGroup"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"notebook",{get:function(){return this._No||(this._No=new n.Notebook(this.context,e(this.context,this,"Notebook",!1,!1,!1))),this._No},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"parentSectionGroup",{get:function(){return this._P||(this._P=new n.SectionGroup(this.context,e(this.context,this,"ParentSectionGroup",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"parentSectionGroupOrNull",{get:function(){return this._Pa||(this._Pa=new n.SectionGroup(this.context,e(this.context,this,"ParentSectionGroupOrNull",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"sectionGroups",{get:function(){return this._S||(this._S=new n.SectionGroupCollection(this.context,e(this.context,this,"SectionGroups",!0,!1,!1))),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"sections",{get:function(){return this._Se||(this._Se=new n.SectionCollection(this.context,e(this.context,this,"Sections",!0,!1,!1))),this._Se},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"clientUrl",{get:function(){return i("clientUrl",this._C,it,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"id",{get:function(){return i("id",this._I,it,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"name",{get:function(){return i("name",this._N,it,this._isNull),this._N},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,it,this._isNull),this.__R},enumerable:!0,configurable:!0}),a.prototype.addSection=function(t){return new n.Section(this.context,f(this.context,this,"AddSection",0,[t],!1,!0,null,!1))},a.prototype.addSectionGroup=function(t){return new n.SectionGroup(this.context,f(this.context,this,"AddSectionGroup",0,[t],!1,!0,null,!1))},a.prototype.getRestApiId=function(){var t=r(this.context,this,"GetRestApiId",1,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},a.prototype._handleResult=function(n){if(l.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.ClientUrl)||(this._C=i.ClientUrl);t(i.Id)||(this._I=i.Id);t(i.Name)||(this._N=i.Name);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["notebook","Notebook","parentSectionGroup","ParentSectionGroup","parentSectionGroupOrNull","ParentSectionGroupOrNull","sectionGroups","SectionGroups","sections","Sections"])}},a.prototype.load=function(n){return o(this,n),this},a.prototype._handleIdResult=function(n){(l.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},a.prototype.track=function(){return this.context.trackedObjects.add(this),this},a.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},a.prototype.toJSON=function(){return{clientUrl:this._C,id:this._I,name:this._N}},a}(OfficeExtension.ClientObject);n.SectionGroup=di;lt="SectionGroupCollection";gi=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"SectionGroupCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,lt,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,lt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,lt,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getByName=function(t){return new n.SectionGroupCollection(this.context,f(this.context,this,"GetByName",1,[t],!0,!1,null,!1))},h.prototype.getItem=function(t){return new n.SectionGroup(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.SectionGroup(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.SectionGroup(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.SectionGroupCollection=gi;k="Section";nr=function(l){function a(){l.apply(this,arguments)}return __extends(a,l),Object.defineProperty(a.prototype,"_className",{get:function(){return"Section"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"notebook",{get:function(){return this._No||(this._No=new n.Notebook(this.context,e(this.context,this,"Notebook",!1,!1,!1))),this._No},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"pages",{get:function(){return this._P||(this._P=new n.PageCollection(this.context,e(this.context,this,"Pages",!0,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"parentSectionGroup",{get:function(){return this._Pa||(this._Pa=new n.SectionGroup(this.context,e(this.context,this,"ParentSectionGroup",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"parentSectionGroupOrNull",{get:function(){return this._Par||(this._Par=new n.SectionGroup(this.context,e(this.context,this,"ParentSectionGroupOrNull",!1,!1,!1))),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"clientUrl",{get:function(){return i("clientUrl",this._C,k,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"id",{get:function(){return i("id",this._I,k,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"name",{get:function(){return i("name",this._N,k,this._isNull),this._N},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"webUrl",{get:function(){return i("webUrl",this._W,k,this._isNull),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,k,this._isNull),this.__R},enumerable:!0,configurable:!0}),a.prototype.addPage=function(t){return new n.Page(this.context,f(this.context,this,"AddPage",0,[t],!1,!0,null,!1))},a.prototype.copyToNotebook=function(t){return new n.Section(this.context,f(this.context,this,"CopyToNotebook",0,[t],!1,!0,null,!1))},a.prototype.copyToSectionGroup=function(t){return new n.Section(this.context,f(this.context,this,"CopyToSectionGroup",0,[t],!1,!0,null,!1))},a.prototype.getRestApiId=function(){var t=r(this.context,this,"GetRestApiId",1,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype.insertSectionAsSibling=function(t,i){return new n.Section(this.context,f(this.context,this,"InsertSectionAsSibling",0,[t,i],!1,!0,null,!1))},a.prototype._GetGeoInfo=function(){var t=r(this.context,this,"_GetGeoInfo",1,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype._GetGeoInfoAsync=function(){var t=r(this.context,this,"_GetGeoInfoAsync",1,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},a.prototype._handleResult=function(n){if(l.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.ClientUrl)||(this._C=i.ClientUrl);t(i.Id)||(this._I=i.Id);t(i.Name)||(this._N=i.Name);t(i.WebUrl)||(this._W=i.WebUrl);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["notebook","Notebook","pages","Pages","parentSectionGroup","ParentSectionGroup","parentSectionGroupOrNull","ParentSectionGroupOrNull"])}},a.prototype.load=function(n){return o(this,n),this},a.prototype._handleIdResult=function(n){(l.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},a.prototype.track=function(){return this.context.trackedObjects.add(this),this},a.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},a.prototype.toJSON=function(){return{clientUrl:this._C,id:this._I,name:this._N,webUrl:this._W}},a}(OfficeExtension.ClientObject);n.Section=nr;at="SectionCollection";tr=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"SectionCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,at,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,at,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,at,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getByName=function(t){return new n.SectionCollection(this.context,f(this.context,this,"GetByName",1,[t],!0,!1,null,!1))},h.prototype.getItem=function(t){return new n.Section(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.Section(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.Section(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.SectionCollection=tr;y="Page";ir=function(l){function a(){l.apply(this,arguments)}return __extends(a,l),Object.defineProperty(a.prototype,"_className",{get:function(){return"Page"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"contents",{get:function(){return this._Co||(this._Co=new n.PageContentCollection(this.context,e(this.context,this,"Contents",!0,!1,!1))),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"inkAnalysisOrNull",{get:function(){return this._In||(this._In=new n.InkAnalysis(this.context,e(this.context,this,"InkAnalysisOrNull",!1,!1,!1))),this._In},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"parentSection",{get:function(){return this._Pa||(this._Pa=new n.Section(this.context,e(this.context,this,"ParentSection",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"classNotebookPageSource",{get:function(){return i("classNotebookPageSource",this._C,y,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"clientUrl",{get:function(){return i("clientUrl",this._Cl,y,this._isNull),this._Cl},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"id",{get:function(){return i("id",this._I,y,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"pageLevel",{get:function(){return i("pageLevel",this._P,y,this._isNull),this._P},set:function(n){this._P=n;v(this.context,this,"PageLevel",n)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"title",{get:function(){return i("title",this._T,y,this._isNull),this._T},set:function(n){this._T=n;v(this.context,this,"Title",n)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"webUrl",{get:function(){return i("webUrl",this._W,y,this._isNull),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,y,this._isNull),this.__R},enumerable:!0,configurable:!0}),a.prototype.set=function(n,t){this._recursivelySet(n,t,["title","pageLevel"],[],["contents","inkAnalysisOrNull","parentSection","contents","inkAnalysisOrNull","parentSection"])},a.prototype.addOutline=function(t,i,r){return new n.Outline(this.context,f(this.context,this,"AddOutline",0,[t,i,r],!1,!0,null,!1))},a.prototype.copyToSection=function(t){return new n.Page(this.context,f(this.context,this,"CopyToSection",0,[t],!1,!0,null,!1))},a.prototype.copyToSectionAndSetClassNotebookPageSource=function(t){return new n.Page(this.context,f(this.context,this,"CopyToSectionAndSetClassNotebookPageSource",0,[t],!1,!0,null,!1))},a.prototype.getRestApiId=function(){var t=r(this.context,this,"GetRestApiId",1,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype.hasTitleContent=function(){var t=r(this.context,this,"HasTitleContent",1,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype.insertPageAsSibling=function(t,i){return new n.Page(this.context,f(this.context,this,"InsertPageAsSibling",0,[t,i],!1,!0,null,!1))},a.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},a.prototype._Sync=function(){r(this.context,this,"_Sync",0,[],!1)},a.prototype._handleResult=function(n){if(l.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.ClassNotebookPageSource)||(this._C=i.ClassNotebookPageSource);t(i.ClientUrl)||(this._Cl=i.ClientUrl);t(i.Id)||(this._I=i.Id);t(i.PageLevel)||(this._P=i.PageLevel);t(i.Title)||(this._T=i.Title);t(i.WebUrl)||(this._W=i.WebUrl);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["contents","Contents","inkAnalysisOrNull","InkAnalysisOrNull","parentSection","ParentSection"])}},a.prototype.load=function(n){return o(this,n),this},a.prototype._handleIdResult=function(n){(l.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},a.prototype.track=function(){return this.context.trackedObjects.add(this),this},a.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},a.prototype.toJSON=function(){return{classNotebookPageSource:this._C,clientUrl:this._Cl,id:this._I,pageLevel:this._P,title:this._T,webUrl:this._W}},a}(OfficeExtension.ClientObject);n.Page=ir;vt="PageCollection";rr=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"PageCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,vt,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,vt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,vt,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getByTitle=function(t){return new n.PageCollection(this.context,f(this.context,this,"GetByTitle",1,[t],!0,!1,null,!1))},h.prototype.getItem=function(t){return new n.Page(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.Page(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.Page(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.PageCollection=rr;d="PageContent";ur=function(f){function h(){f.apply(this,arguments)}return __extends(h,f),Object.defineProperty(h.prototype,"_className",{get:function(){return"PageContent"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"image",{get:function(){return this._Im||(this._Im=new n.Image(this.context,e(this.context,this,"Image",!1,!1,!1))),this._Im},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"ink",{get:function(){return this._In||(this._In=new n.FloatingInk(this.context,e(this.context,this,"Ink",!1,!1,!1))),this._In},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"outline",{get:function(){return this._O||(this._O=new n.Outline(this.context,e(this.context,this,"Outline",!1,!1,!1))),this._O},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"parentPage",{get:function(){return this._P||(this._P=new n.Page(this.context,e(this.context,this,"ParentPage",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"id",{get:function(){return i("id",this._I,d,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"left",{get:function(){return i("left",this._L,d,this._isNull),this._L},set:function(n){this._L=n;v(this.context,this,"Left",n)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"top",{get:function(){return i("top",this._T,d,this._isNull),this._T},set:function(n){this._T=n;v(this.context,this,"Top",n)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"type",{get:function(){return i("type",this._Ty,d,this._isNull),this._Ty},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,d,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.set=function(n,t){this._recursivelySet(n,t,["left","top"],[],["image","ink","outline","parentPage","image","ink","outline","parentPage"])},h.prototype.delete=function(){r(this.context,this,"Delete",0,[],!1)},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Id)||(this._I=i.Id);t(i.Left)||(this._L=i.Left);t(i.Top)||(this._T=i.Top);t(i.Type)||(this._Ty=i.Type);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["image","Image","ink","Ink","outline","Outline","parentPage","ParentPage"])}},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{id:this._I,left:this._L,top:this._T,type:this._Ty}},h}(OfficeExtension.ClientObject);n.PageContent=ur;yt="PageContentCollection";fr=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"PageContentCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,yt,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,yt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,yt,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.PageContent(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.PageContent(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.PageContent(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.PageContentCollection=fr;ui="Outline";er=function(l){function a(){l.apply(this,arguments)}return __extends(a,l),Object.defineProperty(a.prototype,"_className",{get:function(){return"Outline"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"pageContent",{get:function(){return this._P||(this._P=new n.PageContent(this.context,e(this.context,this,"PageContent",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"paragraphs",{get:function(){return this._Pa||(this._Pa=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"id",{get:function(){return i("id",this._I,ui,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ui,this._isNull),this.__R},enumerable:!0,configurable:!0}),a.prototype.appendHtml=function(n){r(this.context,this,"AppendHtml",0,[n],!1)},a.prototype.appendImage=function(t,i,r){return new n.Image(this.context,f(this.context,this,"AppendImage",0,[t,i,r],!1,!0,null,!1))},a.prototype.appendRichText=function(t){return new n.RichText(this.context,f(this.context,this,"AppendRichText",0,[t],!1,!0,null,!1))},a.prototype.appendTable=function(t,i,r){return new n.Table(this.context,f(this.context,this,"AppendTable",0,[t,i,r],!1,!0,null,!1))},a.prototype.isTitle=function(){var t=r(this.context,this,"IsTitle",0,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},a.prototype._handleResult=function(n){if(l.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Id)||(this._I=i.Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["pageContent","PageContent","paragraphs","Paragraphs"])}},a.prototype.load=function(n){return o(this,n),this},a.prototype._handleIdResult=function(n){(l.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},a.prototype.track=function(){return this.context.trackedObjects.add(this),this},a.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},a.prototype.toJSON=function(){return{id:this._I}},a}(OfficeExtension.ClientObject);n.Outline=er;pt="Paragraph";or=function(l){function a(){l.apply(this,arguments)}return __extends(a,l),Object.defineProperty(a.prototype,"_className",{get:function(){return"Paragraph"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"image",{get:function(){return this._Im||(this._Im=new n.Image(this.context,e(this.context,this,"Image",!1,!1,!1))),this._Im},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"inkWords",{get:function(){return this._In||(this._In=new n.InkWordCollection(this.context,e(this.context,this,"InkWords",!0,!1,!1))),this._In},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"outline",{get:function(){return this._O||(this._O=new n.Outline(this.context,e(this.context,this,"Outline",!1,!1,!1))),this._O},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"paragraphs",{get:function(){return this._P||(this._P=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"parentParagraph",{get:function(){return this._Pa||(this._Pa=new n.Paragraph(this.context,e(this.context,this,"ParentParagraph",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"parentParagraphOrNull",{get:function(){return this._Par||(this._Par=new n.Paragraph(this.context,e(this.context,this,"ParentParagraphOrNull",!1,!1,!1))),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"parentTableCell",{get:function(){return this._Pare||(this._Pare=new n.TableCell(this.context,e(this.context,this,"ParentTableCell",!1,!1,!1))),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"parentTableCellOrNull",{get:function(){return this._Paren||(this._Paren=new n.TableCell(this.context,e(this.context,this,"ParentTableCellOrNull",!1,!1,!1))),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"richText",{get:function(){return this._R||(this._R=new n.RichText(this.context,e(this.context,this,"RichText",!1,!1,!1))),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"table",{get:function(){return this._T||(this._T=new n.Table(this.context,e(this.context,this,"Table",!1,!1,!1))),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"id",{get:function(){return i("id",this._I,pt,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"type",{get:function(){return i("type",this._Ty,pt,this._isNull),this._Ty},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,pt,this._isNull),this.__R},enumerable:!0,configurable:!0}),a.prototype.addNoteTag=function(t,i){return new n.NoteTag(this.context,f(this.context,this,"AddNoteTag",0,[t,i],!1,!0,null,!1))},a.prototype.delete=function(){r(this.context,this,"Delete",0,[],!1)},a.prototype.getParagraphInfo=function(){var t=r(this.context,this,"GetParagraphInfo",0,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},a.prototype.insertHtmlAsSibling=function(n,t){r(this.context,this,"InsertHtmlAsSibling",0,[n,t],!1)},a.prototype.insertImageAsSibling=function(t,i,r,u){return new n.Image(this.context,f(this.context,this,"InsertImageAsSibling",0,[t,i,r,u],!1,!0,null,!1))},a.prototype.insertRichTextAsSibling=function(t,i){return new n.RichText(this.context,f(this.context,this,"InsertRichTextAsSibling",0,[t,i],!1,!0,null,!1))},a.prototype.insertTableAsSibling=function(t,i,r,u){return new n.Table(this.context,f(this.context,this,"InsertTableAsSibling",0,[t,i,r,u],!1,!0,null,!1))},a.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},a.prototype._handleResult=function(n){if(l.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Id)||(this._I=i.Id);t(i.Type)||(this._Ty=i.Type);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["image","Image","inkWords","InkWords","outline","Outline","paragraphs","Paragraphs","parentParagraph","ParentParagraph","parentParagraphOrNull","ParentParagraphOrNull","parentTableCell","ParentTableCell","parentTableCellOrNull","ParentTableCellOrNull","richText","RichText","table","Table"])}},a.prototype.load=function(n){return o(this,n),this},a.prototype._handleIdResult=function(n){(l.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},a.prototype.track=function(){return this.context.trackedObjects.add(this),this},a.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},a.prototype.toJSON=function(){return{id:this._I,type:this._Ty}},a}(OfficeExtension.ClientObject);n.Paragraph=or;wt="ParagraphCollection";sr=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"ParagraphCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,wt,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,wt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,wt,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.Paragraph(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.Paragraph(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.Paragraph(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.ParagraphCollection=sr;bt="NoteTag";hr=function(n){function f(){n.apply(this,arguments)}return __extends(f,n),Object.defineProperty(f.prototype,"_className",{get:function(){return"NoteTag"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"id",{get:function(){return i("id",this._I,bt,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"status",{get:function(){return i("status",this._S,bt,this._isNull),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"type",{get:function(){return i("type",this._T,bt,this._isNull),this._T},enumerable:!0,configurable:!0}),f.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},f.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!u(i)){var r=i;s(this,r);t(r.Id)||(this._I=r.Id);t(r.Status)||(this._S=r.Status);t(r.Type)||(this._T=r.Type)}},f.prototype.load=function(n){return o(this,n),this},f.prototype._handleIdResult=function(i){(n.prototype._handleIdResult.call(this,i),u(i))||t(i.Id)||(this._I=i.Id)},f.prototype.track=function(){return this.context.trackedObjects.add(this),this},f.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},f.prototype.toJSON=function(){return{id:this._I,status:this._S,type:this._T}},f}(OfficeExtension.ClientObject);n.NoteTag=hr;rt="RichText";cr=function(f){function l(){f.apply(this,arguments)}return __extends(l,f),Object.defineProperty(l.prototype,"_className",{get:function(){return"RichText"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"paragraph",{get:function(){return this._P||(this._P=new n.Paragraph(this.context,e(this.context,this,"Paragraph",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this._I,rt,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"languageId",{get:function(){return i("languageId",this._L,rt,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"text",{get:function(){return i("text",this._T,rt,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,rt,this._isNull),this.__R},enumerable:!0,configurable:!0}),l.prototype.getHtml=function(){var t=r(this.context,this,"GetHtml",1,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},l.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},l.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Id)||(this._I=i.Id);t(i.LanguageId)||(this._L=i.LanguageId);t(i.Text)||(this._T=i.Text);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["paragraph","Paragraph"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{id:this._I,languageId:this._L,text:this._T}},l}(OfficeExtension.ClientObject);n.RichText=cr;p="Image";lr=function(f){function l(){f.apply(this,arguments)}return __extends(l,f),Object.defineProperty(l.prototype,"_className",{get:function(){return"Image"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"pageContent",{get:function(){return this._P||(this._P=new n.PageContent(this.context,e(this.context,this,"PageContent",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"paragraph",{get:function(){return this._Pa||(this._Pa=new n.Paragraph(this.context,e(this.context,this,"Paragraph",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"description",{get:function(){return i("description",this._D,p,this._isNull),this._D},set:function(n){this._D=n;v(this.context,this,"Description",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"height",{get:function(){return i("height",this._H,p,this._isNull),this._H},set:function(n){this._H=n;v(this.context,this,"Height",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hyperlink",{get:function(){return i("hyperlink",this._Hy,p,this._isNull),this._Hy},set:function(n){this._Hy=n;v(this.context,this,"Hyperlink",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this._I,p,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"ocrData",{get:function(){return i("ocrData",this._O,p,this._isNull),this._O},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"width",{get:function(){return i("width",this._W,p,this._isNull),this._W},set:function(n){this._W=n;v(this.context,this,"Width",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,p,this._isNull),this.__R},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["description","height","hyperlink","width"],[],["pageContent","paragraph","pageContent","paragraph"])},l.prototype.getBase64Image=function(){var t=r(this.context,this,"GetBase64Image",1,[],!1),n=new OfficeExtension.ClientResult;return h(this,t,n),n},l.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},l.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.Description)||(this._D=i.Description);t(i.Height)||(this._H=i.Height);t(i.Hyperlink)||(this._Hy=i.Hyperlink);t(i.Id)||(this._I=i.Id);t(i.OcrData)||(this._O=i.OcrData);t(i.Width)||(this._W=i.Width);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["pageContent","PageContent","paragraph","Paragraph"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{description:this._D,height:this._H,hyperlink:this._Hy,id:this._I,ocrData:this._O,width:this._W}},l}(OfficeExtension.ClientObject);n.Image=lr;g="Table";ar=function(h){function l(){h.apply(this,arguments)}return __extends(l,h),Object.defineProperty(l.prototype,"_className",{get:function(){return"Table"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"paragraph",{get:function(){return this._P||(this._P=new n.Paragraph(this.context,e(this.context,this,"Paragraph",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rows",{get:function(){return this._Ro||(this._Ro=new n.TableRowCollection(this.context,e(this.context,this,"Rows",!0,!1,!1))),this._Ro},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"borderVisible",{get:function(){return i("borderVisible",this._B,g,this._isNull),this._B},set:function(n){this._B=n;v(this.context,this,"BorderVisible",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnCount",{get:function(){return i("columnCount",this._C,g,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this._I,g,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowCount",{get:function(){return i("rowCount",this._R,g,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,g,this._isNull),this.__R},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["borderVisible"],[],["paragraph","rows","paragraph","rows"])},l.prototype.appendColumn=function(n){r(this.context,this,"AppendColumn",0,[n],!1)},l.prototype.appendRow=function(t){return new n.TableRow(this.context,f(this.context,this,"AppendRow",0,[t],!1,!0,null,!1))},l.prototype.clear=function(){r(this.context,this,"Clear",0,[],!1)},l.prototype.getCell=function(t,i){return new n.TableCell(this.context,f(this.context,this,"GetCell",1,[t,i],!1,!1,null,!1))},l.prototype.insertColumn=function(n,t){r(this.context,this,"InsertColumn",0,[n,t],!1)},l.prototype.insertRow=function(t,i){return new n.TableRow(this.context,f(this.context,this,"InsertRow",0,[t,i],!1,!0,null,!1))},l.prototype.setShadingColor=function(n){r(this.context,this,"SetShadingColor",0,[n],!1)},l.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},l.prototype._handleResult=function(n){if(h.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.BorderVisible)||(this._B=i.BorderVisible);t(i.ColumnCount)||(this._C=i.ColumnCount);t(i.Id)||(this._I=i.Id);t(i.RowCount)||(this._R=i.RowCount);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["paragraph","Paragraph","rows","Rows"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(h.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{borderVisible:this._B,columnCount:this._C,id:this._I,rowCount:this._R}},l}(OfficeExtension.ClientObject);n.Table=ar;ut="TableRow";vr=function(h){function l(){h.apply(this,arguments)}return __extends(l,h),Object.defineProperty(l.prototype,"_className",{get:function(){return"TableRow"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"cells",{get:function(){return this._Ce||(this._Ce=new n.TableCellCollection(this.context,e(this.context,this,"Cells",!0,!1,!1))),this._Ce},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentTable",{get:function(){return this._P||(this._P=new n.Table(this.context,e(this.context,this,"ParentTable",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"cellCount",{get:function(){return i("cellCount",this._C,ut,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this._I,ut,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowIndex",{get:function(){return i("rowIndex",this._R,ut,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ut,this._isNull),this.__R},enumerable:!0,configurable:!0}),l.prototype.clear=function(){r(this.context,this,"Clear",0,[],!1)},l.prototype.insertRowAsSibling=function(t,i){return new n.TableRow(this.context,f(this.context,this,"InsertRowAsSibling",0,[t,i],!1,!0,null,!1))},l.prototype.setShadingColor=function(n){r(this.context,this,"SetShadingColor",0,[n],!1)},l.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},l.prototype._handleResult=function(n){if(h.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.CellCount)||(this._C=i.CellCount);t(i.Id)||(this._I=i.Id);t(i.RowIndex)||(this._R=i.RowIndex);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["cells","Cells","parentTable","ParentTable"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(h.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{cellCount:this._C,id:this._I,rowIndex:this._R}},l}(OfficeExtension.ClientObject);n.TableRow=vr;kt="TableRowCollection";yr=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"TableRowCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,kt,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,kt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,kt,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.TableRow(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.TableRow(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.TableRow(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.TableRowCollection=yr;nt="TableCell";pr=function(h){function l(){h.apply(this,arguments)}return __extends(l,h),Object.defineProperty(l.prototype,"_className",{get:function(){return"TableCell"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"paragraphs",{get:function(){return this._P||(this._P=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentRow",{get:function(){return this._Pa||(this._Pa=new n.TableRow(this.context,e(this.context,this,"ParentRow",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"cellIndex",{get:function(){return i("cellIndex",this._C,nt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this._I,nt,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowIndex",{get:function(){return i("rowIndex",this._R,nt,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"shadingColor",{get:function(){return i("shadingColor",this._S,nt,this._isNull),this._S},set:function(n){this._S=n;v(this.context,this,"ShadingColor",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,nt,this._isNull),this.__R},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["shadingColor"],[],["paragraphs","parentRow","paragraphs","parentRow"])},l.prototype.appendHtml=function(n){r(this.context,this,"AppendHtml",0,[n],!1)},l.prototype.appendImage=function(t,i,r){return new n.Image(this.context,f(this.context,this,"AppendImage",0,[t,i,r],!1,!0,null,!1))},l.prototype.appendRichText=function(t){return new n.RichText(this.context,f(this.context,this,"AppendRichText",0,[t],!1,!0,null,!1))},l.prototype.appendTable=function(t,i,r){return new n.Table(this.context,f(this.context,this,"AppendTable",0,[t,i,r],!1,!0,null,!1))},l.prototype.clear=function(){r(this.context,this,"Clear",0,[],!1)},l.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},l.prototype._handleResult=function(n){if(h.prototype._handleResult.call(this,n),!u(n)){var i=n;s(this,i);t(i.CellIndex)||(this._C=i.CellIndex);t(i.Id)||(this._I=i.Id);t(i.RowIndex)||(this._R=i.RowIndex);t(i.ShadingColor)||(this._S=i.ShadingColor);t(i._ReferenceId)||(this.__R=i._ReferenceId);c(this,i,["paragraphs","Paragraphs","parentRow","ParentRow"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(h.prototype._handleIdResult.call(this,n),u(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{cellIndex:this._C,id:this._I,rowIndex:this._R,shadingColor:this._S}},l}(OfficeExtension.ClientObject);n.TableCell=pr;dt="TableCellCollection";wr=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"TableCellCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,dt,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this._C,dt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,dt,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.TableCell(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.TableCell(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null,!1))},h.prototype._KeepReference=function(){r(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,o,f,h;if((e.prototype._handleResult.call(this,i),!u(i))&&(r=i,s(this,r),t(r.Count)||(this._C=r.Count),t(r._ReferenceId)||(this.__R=r._ReferenceId),!u(r[OfficeExtension.Constants.items])))for(this.m__items=[],o=r[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.TableCell(this.context,a(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),u(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this._C}},h}(OfficeExtension.ClientObject);n.TableCellCollection=wr,function(n){n.before="Before";n.after="After"}(dr=n.InsertLocation||(n.InsertLocation={})),function(n){n.other="Other";n.web="Web";n.uwp="UWP";n.win32="Win32";n.mac="Mac";n.ios="IOS"}(gr=n.Platform||(n.Platform={})),function(n){n.left="Left";n.centered="Centered";n.right="Right";n.justified="Justified"}(nu=n.Alignment||(n.Alignment={})),function(n){n.notSelected="NotSelected";n.partialSelected="PartialSelected";n.selected="Selected"}(tu=n.Selected||(n.Selected={})),function(n){n.outline="Outline";n.image="Image";n.ink="Ink";n.other="Other"}(iu=n.PageContentType||(n.PageContentType={})),function(n){n.richText="RichText";n.image="Image";n.table="Table";n.ink="Ink";n.other="Other"}(ru=n.ParagraphType||(n.ParagraphType={})),function(n){n.unknown="Unknown";n.toDo="ToDo";n.important="Important";n.question="Question";n.contact="Contact";n.address="Address";n.phoneNumber="PhoneNumber";n.website="Website";n.idea="Idea";n.critical="Critical";n.toDoPriority1="ToDoPriority1";n.toDoPriority2="ToDoPriority2"}(uu=n.NoteTagType||(n.NoteTagType={})),function(n){n.unknown="Unknown";n.normal="Normal";n.completed="Completed";n.disabled="Disabled";n.outlookTask="OutlookTask";n.taskNotSyncedYet="TaskNotSyncedYet";n.taskRemoved="TaskRemoved"}(fu=n.NoteTagStatus||(n.NoteTagStatus={})),function(n){n.form="Form";n.entity="Entity";n.graph="Graph";n.oneService="OneService"}(eu=n.ServiceId||(n.ServiceId={})),function(n){n.selection="Selection";n.activeProfile="ActiveProfile";n.liveId="LiveId";n.orgId="OrgId";n.adal="ADAL";n.notebook="Notebook"}(ou=n.IdentityFilter||(n.IdentityFilter={})),function(n){n.none="None";n.number="Number";n.bullet="Bullet"}(su=n.ListType||(n.ListType={})),function(n){n.other="Other";n.liveId="LiveId";n.orgId="OrgId";n.adal="ADAL"}(hu=n.AccountType||(n.AccountType={})),function(n){n.trace="Trace";n.data="Data";n.exception="Exception";n.warning="Warning"}(cu=n.LogLevel||(n.LogLevel={})),function(n){n.defaultFlag="DefaultFlag";n.criticalFlag="CriticalFlag";n.measureFlag="MeasureFlag"}(lu=n.EventFlag||(n.EventFlag={})),function(n){n.none="None";n.arabic="Arabic";n.ucroman="UCRoman";n.lcroman="LCRoman";n.ucletter="UCLetter";n.lcletter="LCLetter";n.ordinal="Ordinal";n.cardtext="Cardtext";n.ordtext="Ordtext";n.hex="Hex";n.chiManSty="ChiManSty";n.dbNum1="DbNum1";n.dbNum2="DbNum2";n.aiueo="Aiueo";n.iroha="Iroha";n.dbChar="DbChar";n.sbChar="SbChar";n.dbNum3="DbNum3";n.dbNum4="DbNum4";n.circlenum="Circlenum";n.darabic="DArabic";n.daiueo="DAiueo";n.diroha="DIroha";n.arabicLZ="ArabicLZ";n.bullet="Bullet";n.ganada="Ganada";n.chosung="Chosung";n.gb1="GB1";n.gb2="GB2";n.gb3="GB3";n.gb4="GB4";n.zodiac1="Zodiac1";n.zodiac2="Zodiac2";n.zodiac3="Zodiac3";n.tpeDbNum1="TpeDbNum1";n.tpeDbNum2="TpeDbNum2";n.tpeDbNum3="TpeDbNum3";n.tpeDbNum4="TpeDbNum4";n.chnDbNum1="ChnDbNum1";n.chnDbNum2="ChnDbNum2";n.chnDbNum3="ChnDbNum3";n.chnDbNum4="ChnDbNum4";n.korDbNum1="KorDbNum1";n.korDbNum2="KorDbNum2";n.korDbNum3="KorDbNum3";n.korDbNum4="KorDbNum4";n.hebrew1="Hebrew1";n.arabic1="Arabic1";n.hebrew2="Hebrew2";n.arabic2="Arabic2";n.hindi1="Hindi1";n.hindi2="Hindi2";n.hindi3="Hindi3";n.thai1="Thai1";n.thai2="Thai2";n.numInDash="NumInDash";n.lcrus="LCRus";n.ucrus="UCRus";n.lcgreek="LCGreek";n.ucgreek="UCGreek";n.lim="Lim";n.custom="Custom"}(au=n.NumberType||(n.NumberType={})),function(n){n.preinstallClassNotebook="PreinstallClassNotebook";n.distributePageId="DistributePageId";n.distributeSection="DistributeSection";n.reviewStudentWork="ReviewStudentWork";n.openTabForCreateClassNotebook="OpenTabForCreateClassNotebook";n.openTabForManageStudent="OpenTabForManageStudent";n.openTabForManageTeacher="OpenTabForManageTeacher";n.openTabForGetNotebookLink="OpenTabForGetNotebookLink";n.openTabForTeacherTraining="OpenTabForTeacherTraining";n.openTabForAddinGuide="OpenTabForAddinGuide";n.openTabForEducationBlog="OpenTabForEducationBlog";n.openTabForEducatorCommunity="OpenTabForEducatorCommunity";n.openTabToSendFeedback="OpenTabToSendFeedback";n.openTabForViewKnowledgeBase="OpenTabForViewKnowledgeBase";n.openTabForSuggestingFeature="OpenTabForSuggestingFeature";n.createAssignment="CreateAssignment";n.connections="Connections";n.mapClassNotebooks="MapClassNotebooks";n.mapStudents="MapStudents";n.manageClasses="ManageClasses"}(vu=n.ControlId||(n.ControlId={})),function(n){n.generalException="GeneralException"}(yu=n.ErrorCodes||(n.ErrorCodes={}))}(OneNote||(OneNote={})),function(n){function i(t,i){return OfficeExtension.ClientRequestContext._runBatch("OneNote.run",arguments,function(){return new n.RequestContext})}var t=function(t){function i(i){t.call(this,i);this.m_onenote=new n.Application(this,OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this));this._rootObject=this.m_onenote}return __extends(i,t),Object.defineProperty(i.prototype,"application",{get:function(){return this.m_onenote},enumerable:!0,configurable:!0}),i}(OfficeExtension.ClientRequestContext);n.RequestContext=t;n.run=i}(OneNote||(OneNote={}));OfficeExtension.Utility._doApiNotSupportedCheck=!0