text: /* PowerPointer web application specific API library */
  /* Version: 16.0.8916.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.
  */
  
  var __extends=this&&this.__extends||function(b,a){for(var c in a)if(a.hasOwnProperty(c))b[c]=a[c];function d(){this.constructor=b}b.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)},OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a<e;a++){var c=this._internalStorage.key(a);c.indexOf(d)===0&&b.push(c)}}catch(f){}return b};return a}();b.SafeStorage=a})(OfficeExt||(OfficeExt={}));OSF.XdmFieldName={ConversationUrl:"ConversationUrl",AppId:"AppId"};OSF.WindowNameItemKeys={BaseFrameName:"baseFrameName",HostInfo:"hostInfo",XdmInfo:"xdmInfo",SerializerVersion:"serializerVersion",AppContext:"appContext"};OSF.OUtil=function(){var h="focus",g="on",n="configurable",m="writable",f="enumerable",e="",i="undefined",d=false,b=true,j=2147483647,a=null,c=-1,t=c,y="&_xdm_Info=",w="&_serializer_version=",x="_xdm_",B="_serializer_version=",p="#",v="&",k="class",s={},A=3e4,o=a,r=a,l=(new Date).getTime();function z(){var a=j*Math.random();a^=l^(new Date).getMilliseconds()<<Math.floor(Math.random()*(31-10));return a.toString(16)}function q(){if(!o){try{var b=window.sessionStorage}catch(c){b=a}o=new OfficeExt.SafeStorage(b)}return o}function u(e){for(var c=[],b=[],f=e.length,a,d=0;d<f;d++){a=e[d];if(a.tabIndex)if(a.tabIndex>0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a=="string")for(var b=0;b<a.length;b+=4){for(var d=0,c=0;c<4&&b+c<a.length;c++)d=(d<<8)+a.charCodeAt(b+c);l^=d}else if(typeof a=="number")l^=a;else l^=j*Math.random();l&=j},extend:function(b,a){var c=function(){};c.prototype=a.prototype;b.prototype=new c;b.prototype.constructor=b;b.uber=a.prototype;if(a.prototype.constructor===Object.prototype.constructor)a.prototype.constructor=a},setNamespace:function(b,a){if(a&&b&&!a[b])a[b]={}},unsetNamespace:function(b,a){if(a&&b&&a[b])delete a[b]},serializeSettings:function(b){var d={};for(var c in b){var a=b[c];try{if(JSON)a=JSON.stringify(a,function(a,b){return OSF.OUtil.isDate(this[a])?OSF.DDA.SettingsManager.DateJSONPrefix+this[a].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:b});else a=Sys.Serialization.JavaScriptSerializer.serialize(a);d[c]=a}catch(e){}}return d},deserializeSettings:function(d){var f={};d=d||{};for(var e in d){var a=d[e];try{if(JSON)a=JSON.parse(a,function(d,a){var b;if(typeof a==="string"&&a&&a.length>6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(c)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,c)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,b);f[e]=a}catch(g){}}return f},loadScript:function(f,g,h){if(f&&g){var k=window.document,c=s[f];if(!c){var e=k.createElement("script");e.type="text/javascript";c={loaded:d,pendingCallbacks:[g],timer:a};s[f]=c;var i=function(){if(c.timer!=a){clearTimeout(c.timer);delete c.timer}c.loaded=b;for(var e=c.pendingCallbacks.length,d=0;d<e;d++){var f=c.pendingCallbacks.shift();f()}},j=function(){delete s[f];if(c.timer!=a){clearTimeout(c.timer);delete c.timer}for(var d=c.pendingCallbacks.length,b=0;b<d;b++){var e=c.pendingCallbacks.shift();e()}};if(e.readyState)e.onreadystatechange=function(){if(e.readyState=="loaded"||e.readyState=="complete"){e.onreadystatechange=a;i()}};else e.onload=i;e.onerror=j;h=h||A;c.timer=setTimeout(j,h);e.setAttribute("crossOrigin","anonymous");e.src=f;k.getElementsByTagName("head")[0].appendChild(e)}else if(c.loaded)g();else c.pendingCallbacks.push(g)}},loadCSS:function(c){if(c){var b=window.document,a=b.createElement("link");a.type="text/css";a.rel="stylesheet";a.href=c;b.getElementsByTagName("head")[0].appendChild(a)}},parseEnum:function(b,c){var a=c[b.trim()];if(typeof a==i){OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+b);throw OsfMsAjaxFactory.msAjaxError.argument("str")}return a},delayExecutionAndCache:function(){var a={calc:arguments[0]};return function(){if(a.calc){a.val=a.calc.apply(this,arguments);delete a.calc}return a.val}},getUniqueId:function(){t=t+1;return t.toString()},formatString:function(){var a=arguments,b=a[0];return b.replace(/{(\d+)}/gm,function(d,b){var c=parseInt(b,10)+1;return a[c]===undefined?"{"+b+"}":a[c]})},generateConversationId:function(){return [z(),z(),(new Date).getTime().toString()].join("_")},getFrameName:function(a){return x+a+this.generateConversationId()},addXdmInfoAsHash:function(b,a){return OSF.OUtil.addInfoAsHash(b,y,a,d)},addSerializerVersionAsHash:function(c,a){return OSF.OUtil.addInfoAsHash(c,w,a,b)},addInfoAsHash:function(b,g,c,i){b=b.trim()||e;var f=b.split(p),h=f.shift(),d=f.join(p),a;if(i)a=[g,encodeURIComponent(c),d].join(e);else a=[d,g,c].join(e);return [h,p,a].join(e)},parseHostInfoFromWindowName:function(a,b){return OSF.OUtil.parseInfoFromWindowName(a,b,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(b){var a=OSF.OUtil.parseXdmInfoWithGivenFragment(b,window.location.hash);if(!a)a=OSF.OUtil.parseXdmInfoFromWindowName(b,window.name);return a},parseXdmInfoFromWindowName:function(a,b){return OSF.OUtil.parseInfoFromWindowName(a,b,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(a,b){return OSF.OUtil.parseInfoWithGivenFragment(y,x,d,a,b)},parseSerializerVersion:function(b){var a=OSF.OUtil.parseSerializerVersionWithGivenFragment(b,window.location.hash);if(isNaN(a))a=OSF.OUtil.parseSerializerVersionFromWindowName(b,window.name);return a},parseSerializerVersionFromWindowName:function(a,b){return parseInt(OSF.OUtil.parseInfoFromWindowName(a,b,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(a,c){return parseInt(OSF.OUtil.parseInfoWithGivenFragment(w,B,b,a,c))},parseInfoFromWindowName:function(g,h,f){try{var b=JSON.parse(h),c=b!=a?b[f]:a,d=q();if(!g&&d&&b!=a){var e=b[OSF.WindowNameItemKeys.BaseFrameName]+f;if(c)d.setItem(e,c);else c=d.getItem(e)}return c}catch(i){return a}},parseInfoWithGivenFragment:function(m,j,k,i,l){var f=l.split(m),b=f.length>1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(v)>=0)b=b.split(v)[0];b=decodeURIComponent(b)}var d=q();if(!i&&d){var e=window.name.indexOf(j);if(e>c){var g=window.name.indexOf(";",e);if(g==c)g=window.name.length;var h=window.name.substring(e,g);if(b)d.setItem(h,b);else b=d.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==i)a=b.split("|");if(typeof a[1]==i)a=b.split("%7C");return a},getXdmFieldValue:function(f,d){var b=e,c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(f){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:d},{name:"expectedProperties",type:Object,mayBeNull:d},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var c in e){a=Function._validateParameter(f[c],e[c],c);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==i&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[f])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[f])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[m,f,n])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[m,f,n])},finalizeProperties:function(e,c){c=c||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f<i;f++){var h=g[f],a=Object.getOwnPropertyDescriptor(e,h);if(!a.get&&!a.set)a.writable=c.writable||d;a.configurable=c.configurable||d;a.enumerable=c.enumerable||b;Object.defineProperty(e,h,a)}return e},mapList:function(a,c){var b=[];if(a)for(var d in a)b.push(c(a[d]));return b},listContainsKey:function(c,e){for(var a in c)if(e==a)return b;return d},listContainsValue:function(a,c){for(var e in a)if(c==a[e])return b;return d},augmentList:function(a,b){var d=a.push?function(c,b){a.push(b)}:function(c,b){a[c]=b};for(var c in b)d(c,b[c])},redefineList:function(a,b){for(var d in a)delete a[d];for(var c in b)a[c]=b[c]},isArray:function(a){return Object.prototype.toString.apply(a)==="[object Array]"},isFunction:function(a){return Object.prototype.toString.apply(a)==="[object Function]"},isDate:function(a){return Object.prototype.toString.apply(a)==="[object Date]"},addEventListener:function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,d);else if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&a.attachEvent)a.attachEvent(g+b,c);else a[g+b]=c},removeEventListener:function(b,c,e){if(b.removeEventListener)b.removeEventListener(c,e,d);else if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&b.detachEvent)b.detachEvent(g+c,e);else b[g+c]=a},getCookieValue:function(b){var a=RegExp(b+"[^;]+").exec(document.cookie);return a.toString().replace(/^[^=]+./,e)},xhrGet:function(f,e,c){var a;try{a=new XMLHttpRequest;a.onreadystatechange=function(){if(a.readyState==4)if(a.status==200)e(a.responseText);else c(a.status)};a.open("GET",f,b);a.send()}catch(d){c(d)}},xhrGetFull:function(h,f,g,c){var a,e=f;try{a=new XMLHttpRequest;a.onreadystatechange=function(){if(a.readyState==4)if(a.status==200)g(a,e);else c(a.status)};a.open("GET",h,b);a.send()}catch(d){c(d)}},encodeBase64:function(c){if(!c)return c;var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m=[],b=[],i=0,k,h,j,d,f,g,a,n=c.length;do{k=c.charCodeAt(i++);h=c.charCodeAt(i++);j=c.charCodeAt(i++);a=0;d=k&255;f=k>>8;g=h&255;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63;if(!isNaN(h)){d=h>>8;f=j&255;g=j>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63}if(isNaN(h))b[a-1]=64;else if(isNaN(j)){b[a-2]=64;b[a-1]=64}for(var l=0;l<a;l++)m.push(o.charAt(b[l]))}while(i<n);return m.join(e)},getSessionStorage:function(){return q()},getLocalStorage:function(){if(!r){try{var b=window.localStorage}catch(c){b=a}r=new OfficeExt.SafeStorage(b)}return r},convertIntToCssHexColor:function(b){var a="#"+(Number(b)+16777216).toString(16).slice(-6);return a},attachClickHandler:function(a,b){a.onclick=function(){b()};a.ontouchend=function(a){b();a.preventDefault()}},getQueryStringParamValue:function(a,c){var f=Function._validateParams(arguments,[{name:"queryString",type:String,mayBeNull:d},{name:"paramName",type:String,mayBeNull:d}]);if(f){OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null.");return e}var b=new RegExp("[\\?&]"+c+"=([^&#]*)","i");if(!b.test(a)){OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found.");return e}return b.exec(a)[1]},isiOS:function(){return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?b:d},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(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;d<b.length;d++)e.push(b[d]);return e}else{var f=b.constructor();for(var c in b)if(b.hasOwnProperty(c))f[c]=b[c];return f}},createObject:function(b){var d=a;if(b){d={};for(var e=b.length,c=0;c<e;c++)d[b[c].name]=b[c].value}return d},addClass:function(a,b){if(!OSF.OUtil.hasClass(a,b)){var c=a.getAttribute(k);if(c)a.setAttribute(k,c+" "+b);else a.setAttribute(k,b)}},removeClass:function(b,c){if(OSF.OUtil.hasClass(b,c)){var a=b.getAttribute(k),d=new RegExp("(\\s|^)"+c+"(\\s|$)");a=a.replace(d,e);b.setAttribute(k,a)}},hasClass:function(c,b){var a=c.getAttribute(k);return a&&a.match(new RegExp("(\\s|^)"+b+"(\\s|$)"))},focusToFirstTabbable:function(e,j){var g,i=d,f,k=function(){i=b},l=function(d,a,b){if(a<0||a>d)return c;else if(a===0&&b)return c;else if(a===d-1&&!b)return c;if(b)return a-1;else return a+1};e=u(e);g=j?e.length-1:0;if(e.length===0)return a;while(!i&&g>=0&&g<e.length){f=e[g];window.focus();f.addEventListener(h,k);f.focus();f.removeEventListener(h,k);g=l(e.length,g,j);if(!i&&f===document.activeElement)i=b}if(i)return f;else return a},focusToNextTabbable:function(f,o,m){var k,e,i=d,g,l=function(){i=b},n=function(b,d){for(var a=0;a<b.length;a++)if(b[a]===d)return a;return c},j=function(d,a,b){if(a<0||a>d)return c;else if(a===0&&b)return c;else if(a===d-1&&!b)return c;if(b)return a-1;else return a+1};f=u(f);k=n(f,o);e=j(f.length,k,m);if(e<0)return a;while(!i&&e>=0&&e<f.length){g=f[e];g.addEventListener(h,l);g.focus();g.removeEventListener(h,l);e=j(f.length,e,m);if(!i&&g===document.activeElement)i=b}if(i)return g;else return a}}}();OSF.OUtil.Guid=function(){var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return {generateNewGuid:function(){for(var c="",d=(new Date).getTime(),b=0;b<32&&d>0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};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(y,u,p,n,r,v,q,t,x,j,w,l,k,m,h,g,f,e,i,c,d,s,o,b){var a=this;a._id=y;a._appName=u;a._appVersion=p;a._appUILocale=n;a._dataLocale=r;a._docUrl=v;a._clientMode=q;a._settings=t;a._reason=x;a._osfControlType=j;a._eToken=w;a._correlationId=l;a._appInstanceId=k;a._touchEnabled=m;a._commerceAllowed=h;a._appMinorVersion=g;a._requirementMatrix=f;a._hostCustomMessage=e;a._hostFullVersion=i;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=d;a._addinName=s;a._appDomains=o;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.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",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,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 a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,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:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13000,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:b.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:b.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:b.L_SSOConnectionLostError,message:b.L_SSOConnectionLostErrorMessage}}}}();var OfficeExt;(function(a){var b;(function(b){var a=1.1,z=function(){function a(){}return a}();b.RequirementVersion=z;var d=function(){function a(b){var a=this;a.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.minor>0&&a.minor>0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};a._getVersion=function(e){var a="version format incorrect",b=e.split("."),c=0,d=0;if(b.length<2&&isNaN(Number(e)))throw a;else{c=Number(b[0]);if(b.length>=2)d=Number(b[1]);if(isNaN(c)||isNaN(d))throw a}var f={minor:d,major:c};return f};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var x=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=x;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var k=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientDefaultSetRequirement=l;var h=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})}return b}(c);b.WordClientDefaultSetRequirement=h;var p=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a})}return b}(h);b.WordClientV1DefaultSetRequirement=p;var e=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var o=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=o;var u=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=u;var w=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})}return b}(c);b.WordWebDefaultSetRequirement=w;var n=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,settings:a})}return b}(c);b.PowerpointWebDefaultSetRequirement=n;var g=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebDefaultSetRequirement=g;var v=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.SwayWebDefaultSetRequirement=v;var r=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})}return b}(c);b.AccessWebDefaultSetRequirement=r;var t=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelIOSDefaultSetRequirement=t;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordIOSDefaultSetRequirement=i;var s=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return a}(i);b.WordIOSV1DefaultSetRequirement=s;var m=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointIOSDefaultSetRequirement=m;var q=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookIOSDefaultSetRequirement=q;var y=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new x);return a};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new k;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new p;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new l;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new u;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new o;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new t;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new v;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new s;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new m;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new q};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=y})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){function a(){var a=this;a.getDiagnostics=function(b){var a={host:this.getHost(),version:b||this.getDefaultVersion(),platform:this.getPlatform()};return a};a.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};a.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};a.hostInfo=OSF._OfficeAppFactory.getHostInfo();a.getHost=a.getHost.bind(a);a.getPlatform=a.getPlatform.bind(a);a.getDiagnostics=a.getDiagnostics.bind(a)}a.prototype.capitalizeFirstLetter=function(a){if(a)return a[0].toUpperCase()+a.slice(1).toLowerCase();return a};a.getInstance=function(){if(a.hostObj===undefined)a.hostObj=new a;return a.hostObj};a.prototype.getPlatform=function(){var a=this;if(a.hostInfo.hostPlatform){var b=a.hostInfo.hostPlatform.toLowerCase();if(a.platformRemappings[b])return a.platformRemappings[b]}return null};a.prototype.getHost=function(){var a=this;if(a.hostInfo.hostType){var b=a.hostInfo.hostType.toLowerCase();if(a.camelCaseMappings[b])return a.camelCaseMappings[b];b=a.capitalizeFirstLetter(a.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[b])return Microsoft.Office.WebExtension.HostType[b]}return null};a.prototype.getDefaultVersion=function(){if(this.getHost())return "16.0.0000.0000";return null};return a}();a.Host=b})(b=a.HostName||(a.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 b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,g,h,c,d){var f="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});h&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:h});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(b,"auth",{value:a.auth});a.application&&OSF.OUtil.defineEnumerableProperty(b,"application",{value:a.application});if(a.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}else{g&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:g});if(c){var i=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,i,{value:c})}d&&OSF.OUtil.defineEnumerableProperty(b,"officeTheme",{"get":function(){return d()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.length<d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments);for(var e=[],a=0;a<d;a++)e.push(g[a]);this.verifyArguments(c,e);var i={};for(a=0;a<d;a++){var f=c[a],h=e[a];if(f.verify){var k=f.verify(h,l,j);if(!k)throw b()}i[f.name]=h}return i},a.fillOptions=function(a,e,h,g){a=a||{};for(var d in f)if(!OSF.OUtil.listContainsKey(a,d)){var c=undefined,b=f[d];if(b.calculate&&e)c=b.calculate(e,h,g);if(!c&&b.defaultValue!==undefined)c=b.defaultValue;a[d]=c}return a};a.constructCallArgs=function(c,d,f,b){var a={};for(var i in c)a[i]=c[i];for(var h in d)a[h]=d[h];for(var j in e)a[j]=e[j](f,b);if(g)a=g(a,f,b);return a}};OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA);OSF.DDA.AsyncResultEnum.Properties={Context:"Context",Value:"Value",Status:"Status",Error:"Error"};Microsoft.Office.WebExtension.AsyncResultStatus={Succeeded:"succeeded",Failed:"failed"};OSF.DDA.AsyncResultEnum.ErrorCode={Success:0,Failed:1};OSF.DDA.AsyncResultEnum.ErrorProperties={Name:"Name",Message:"Message",Code:"Code"};OSF.DDA.AsyncMethodNames={};OSF.DDA.AsyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.AsyncMethodNames[a]=c}};OSF.DDA.AsyncMethodCall=function(d,e,i,f,g,j,k){var a="function",c=d.length,b=new OSF.DDA.ApiMethodCall(d,e,i,j,k);function h(h,j,l,k){if(h.length>c+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b<d;b++)c[a[b].name]=a[b].value}return c}a.define=function(c){var d={},e=b(c.toHost);if(c.invertible)d.map=e;else if(c.canonical)d.toHost=d.fromHost=e;else{d.toHost=e;d.fromHost=b(c.fromHost)}a.addMapping(c.type,d);c.isComplexType&&a.addComplexType(c.type)};for(var e in c)a.define(c[e]);return a};OSF.OUtil.setNamespace("DispIdHost",OSF.DDA);OSF.DDA.DispIdHost.Methods={InvokeMethod:"invokeMethod",AddEventHandler:"addEventHandler",RemoveEventHandler:"removeEventHandler",OpenDialog:"openDialog",CloseDialog:"closeDialog",MessageParent:"messageParent",SendMessage:"sendMessage"};OSF.DDA.DispIdHost.Delegates={ExecuteAsync:"executeAsync",RegisterEventAsync:"registerEventAsync",UnregisterEventAsync:"unregisterEventAsync",ParameterMap:"parameterMap",OpenDialog:"openDialog",CloseDialog:"closeDialog",MessageParent:"messageParent",SendMessage:"sendMessage"};OSF.DDA.DispIdHost.Facade=function(f,h){var b=false,d=null,g=this,c={},e=OSF.DDA.AsyncMethodNames,a=OSF.DDA.MethodDispId,n={GoToByIdAsync:a.dispidNavigateToMethod,GetSelectedDataAsync:a.dispidGetSelectedDataMethod,SetSelectedDataAsync:a.dispidSetSelectedDataMethod,GetDocumentCopyChunkAsync:a.dispidGetDocumentCopyChunkMethod,ReleaseDocumentCopyAsync:a.dispidReleaseDocumentCopyMethod,GetDocumentCopyAsync:a.dispidGetDocumentCopyMethod,AddFromSelectionAsync:a.dispidAddBindingFromSelectionMethod,AddFromPromptAsync:a.dispidAddBindingFromPromptMethod,AddFromNamedItemAsync:a.dispidAddBindingFromNamedItemMethod,GetAllAsync:a.dispidGetAllBindingsMethod,GetByIdAsync:a.dispidGetBindingMethod,ReleaseByIdAsync:a.dispidReleaseBindingMethod,GetDataAsync:a.dispidGetBindingDataMethod,SetDataAsync:a.dispidSetBindingDataMethod,AddRowsAsync:a.dispidAddRowsMethod,AddColumnsAsync:a.dispidAddColumnsMethod,DeleteAllDataValuesAsync:a.dispidClearAllRowsMethod,RefreshAsync:a.dispidLoadSettingsMethod,SaveAsync:a.dispidSaveSettingsMethod,GetActiveViewAsync:a.dispidGetActiveViewMethod,GetFilePropertiesAsync:a.dispidGetFilePropertiesMethod,GetOfficeThemeAsync:a.dispidGetOfficeThemeMethod,GetDocumentThemeAsync:a.dispidGetDocumentThemeMethod,ClearFormatsAsync:a.dispidClearFormatsMethod,SetTableOptionsAsync:a.dispidSetTableOptionsMethod,SetFormatsAsync:a.dispidSetFormatsMethod,GetAccessTokenAsync:a.dispidGetAccessTokenMethod,ExecuteRichApiRequestAsync:a.dispidExecuteRichApiRequestMethod,AppCommandInvocationCompletedAsync:a.dispidAppCommandInvocationCompletedMethod,CloseContainerAsync:a.dispidCloseContainerMethod,OpenBrowserWindow:a.dispidOpenBrowserWindow,CreateDocumentAsync:a.dispidCreateDocumentMethod,AddDataPartAsync:a.dispidAddDataPartMethod,GetDataPartByIdAsync:a.dispidGetDataPartByIdMethod,GetDataPartsByNameSpaceAsync:a.dispidGetDataPartsByNamespaceMethod,GetPartXmlAsync:a.dispidGetDataPartXmlMethod,GetPartNodesAsync:a.dispidGetDataPartNodesMethod,DeleteDataPartAsync:a.dispidDeleteDataPartMethod,GetNodeValueAsync:a.dispidGetDataNodeValueMethod,GetNodeXmlAsync:a.dispidGetDataNodeXmlMethod,GetRelativeNodesAsync:a.dispidGetDataNodesMethod,SetNodeValueAsync:a.dispidSetDataNodeValueMethod,SetNodeXmlAsync:a.dispidSetDataNodeXmlMethod,AddDataPartNamespaceAsync:a.dispidAddDataNamespaceMethod,GetDataPartNamespaceAsync:a.dispidGetDataUriByPrefixMethod,GetDataPartPrefixAsync:a.dispidGetDataPrefixByUriMethod,GetNodeTextAsync:a.dispidGetDataNodeTextMethod,SetNodeTextAsync:a.dispidSetDataNodeTextMethod,GetSelectedTask:a.dispidGetSelectedTaskMethod,GetTask:a.dispidGetTaskMethod,GetWSSUrl:a.dispidGetWSSUrlMethod,GetTaskField:a.dispidGetTaskFieldMethod,GetSelectedResource:a.dispidGetSelectedResourceMethod,GetResourceField:a.dispidGetResourceFieldMethod,GetProjectField:a.dispidGetProjectFieldMethod,GetSelectedView:a.dispidGetSelectedViewMethod,GetTaskByIndex:a.dispidGetTaskByIndexMethod,GetResourceByIndex:a.dispidGetResourceByIndexMethod,SetTaskField:a.dispidSetTaskFieldMethod,SetResourceField:a.dispidSetResourceFieldMethod,GetMaxTaskIndex:a.dispidGetMaxTaskIndexMethod,GetMaxResourceIndex:a.dispidGetMaxResourceIndexMethod,CreateTask:a.dispidCreateTaskMethod};for(var i in n)if(e[i])c[e[i].id]=n[i];e=OSF.DDA.SyncMethodNames;a=OSF.DDA.MethodDispId;var m={MessageParent:a.dispidMessageParentMethod,SendMessage:a.dispidSendMessageMethod};for(var i in m)if(e[i])c[e[i].id]=m[i];e=Microsoft.Office.WebExtension.EventType;a=OSF.DDA.EventDispId;var o={SettingsChanged:a.dispidSettingsChangedEvent,DocumentSelectionChanged:a.dispidDocumentSelectionChangedEvent,BindingSelectionChanged:a.dispidBindingSelectionChangedEvent,BindingDataChanged:a.dispidBindingDataChangedEvent,ActiveViewChanged:a.dispidActiveViewChangedEvent,OfficeThemeChanged:a.dispidOfficeThemeChangedEvent,DocumentThemeChanged:a.dispidDocumentThemeChangedEvent,AppCommandInvoked:a.dispidAppCommandInvokedEvent,DialogMessageReceived:a.dispidDialogMessageReceivedEvent,DialogParentMessageReceived:a.dispidDialogParentMessageReceivedEvent,ObjectDeleted:a.dispidObjectDeletedEvent,ObjectSelectionChanged:a.dispidObjectSelectionChangedEvent,ObjectDataChanged:a.dispidObjectDataChangedEvent,ContentControlAdded:a.dispidContentControlAddedEvent,RichApiMessage:a.dispidRichApiMessageEvent,ItemChanged:a.dispidOlkItemSelectedChangedEvent,RecipientsChanged:a.dispidOlkRecipientsChangedEvent,AppointmentTimeChanged:a.dispidOlkAppointmentTimeChangedEvent,TaskSelectionChanged:a.dispidTaskSelectionChangedEvent,ResourceSelectionChanged:a.dispidResourceSelectionChangedEvent,ViewSelectionChanged:a.dispidViewSelectionChangedEvent,DataNodeInserted:a.dispidDataNodeAddedEvent,DataNodeReplaced:a.dispidDataNodeReplacedEvent,DataNodeDeleted:a.dispidDataNodeDeletedEvent};for(var k in o)if(e[k])c[e[k]]=o[k];function l(a){return a==OSF.DDA.EventDispId.dispidObjectDeletedEvent||a==OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent||a==OSF.DDA.EventDispId.dispidObjectDataChangedEvent||a==OSF.DDA.EventDispId.dispidContentControlAddedEvent}function j(a,c,d,b){if(typeof a=="number"){if(!b)b=c.getCallArgs(d);OSF.DDA.issueAsyncResult(b,a,OSF.DDA.ErrorCodeManager.getErrorArgs(a))}else throw a}g[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function(t,m,n,q){var a;try{var i=t.id,l=OSF.DDA.AsyncMethodCalls[i];a=l.verifyAndExtractCall(m,n,q);var k=c[i],s=f(i),b=d;if(window.Excel&&window.Office.context.requirements.isSetSupported("RedirectV1Api"))window.Excel._RedirectV1APIs=true;if(window.Excel&&window.Excel._RedirectV1APIs&&(b=window.Excel._V1APIMap[i])){var e=OSF.OUtil.shallowCopy(a);delete e[Microsoft.Office.WebExtension.Parameters.AsyncContext];if(b.preprocess)e=b.preprocess(e);var o=new window.Excel.RequestContext,u=b.call(o,e);o.sync().then(function(){var c=u.value,d=c.status;delete c["status"];delete c["@odata.type"];if(b.postprocess)c=b.postprocess(c,e);if(d!=0)c=OSF.DDA.ErrorCodeManager.getErrorArgs(d);OSF.DDA.issueAsyncResult(a,d,c)})["catch"](function(){OSF.DDA.issueAsyncResult(a,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,d)})}else{var g;if(h.toHost)g=h.toHost(k,a);else g=a;var r=(new Date).getTime();s[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:k,hostCallArgs:g,onCalling:function(){},onReceiving:function(){},onComplete:function(c,d){var b;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(h.fromHost)b=h.fromHost(k,d);else b=d;else b=d;var e=l.processResponse(c,b,n,a);OSF.DDA.issueAsyncResult(a,c,e);OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(k,g,Math.abs((new Date).getTime()-r),c)}})}}catch(p){j(p,l,m,a)}};g[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function(p,d,n,s){var e,a,m,g=b;function k(b){if(b==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var f=!g?d.addEventHandler(a,m):d.addObjectEventHandler(a,e[Microsoft.Office.WebExtension.Parameters.Id],m);if(!f)b=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed}var c;if(b!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c=OSF.DDA.ErrorCodeManager.getErrorArgs(b);OSF.DDA.issueAsyncResult(e,b,c)}try{var q=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id];e=q.verifyAndExtractCall(p,n,d);a=e[Microsoft.Office.WebExtension.Parameters.EventType];m=e[Microsoft.Office.WebExtension.Parameters.Handler];if(s){k(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);return}var o=c[a];g=l(o);var i=g?e[Microsoft.Office.WebExtension.Parameters.Id]:n.id||"",u=g?d.getObjectEventHandlerCount(a,i):d.getEventHandlerCount(a);if(u==0){var t=f(a)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];t({eventType:a,dispId:o,targetId:i,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:k,onEvent:function(c){var b=h.fromHost(o,c);if(!g)d.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(a,n,b));else d.fireObjectEvent(i,OSF.DDA.OMFactory.manufactureEventArgs(a,i,b))}})}else k(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(r){j(r,q,p,e)}};g[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function(p,e,r){var g,a,m,h=b;function o(a){var b;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)b=OSF.DDA.ErrorCodeManager.getErrorArgs(a);OSF.DDA.issueAsyncResult(g,a,b)}try{var q=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];g=q.verifyAndExtractCall(p,r,e);a=g[Microsoft.Office.WebExtension.Parameters.EventType];m=g[Microsoft.Office.WebExtension.Parameters.Handler];var s=c[a];h=l(s);var k=h?g[Microsoft.Office.WebExtension.Parameters.Id]:r.id||"",n,i;if(m===d){i=h?e.clearObjectEventHandlers(a,k):e.clearEventHandlers(a);n=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}else{i=h?e.removeObjectEventHandler(a,k,m):e.removeEventHandler(a,m);n=i?OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist}var v=h?e.getObjectEventHandlerCount(a,k):e.getEventHandlerCount(a);if(i&&v==0){var u=f(a)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];u({eventType:a,dispId:s,targetId:k,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:o})}else o(n)}catch(t){j(t,q,p,g)}};g[OSF.DDA.DispIdHost.Methods.OpenDialog]=function(p,a,o){var i,n,e=Microsoft.Office.WebExtension.EventType.DialogMessageReceived,g=Microsoft.Office.WebExtension.EventType.DialogEventReceived;function k(b){var d;if(b!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)d=OSF.DDA.ErrorCodeManager.getErrorArgs(b);else{var c={};c[Microsoft.Office.WebExtension.Parameters.Id]=n;c[Microsoft.Office.WebExtension.Parameters.Data]=a;var d=l.processResponse(b,c,o,i);OSF.DialogShownStatus.hasDialogShown=true;a.clearEventHandlers(e);a.clearEventHandlers(g)}OSF.DDA.issueAsyncResult(i,b,d)}try{(e==undefined||g==undefined)&&k(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported);if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync==d){k(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);return}var l=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id];i=l.verifyAndExtractCall(p,o,a);var q=c[e],m=f(e),s=m[OSF.DDA.DispIdHost.Delegates.OpenDialog]!=undefined?m[OSF.DDA.DispIdHost.Delegates.OpenDialog]:m[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];n=JSON.stringify(i);if(!OSF.DialogShownStatus.hasDialogShown){a.clearQueuedEvent(e);a.clearQueuedEvent(g);a.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived)}s({eventType:e,dispId:q,targetId:n,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:k,onEvent:function(j){var i=h.fromHost(q,j),f=OSF.DDA.OMFactory.manufactureEventArgs(e,o,i);if(f.type==g){var d=OSF.DDA.ErrorCodeManager.getErrorArgs(f.error),c={};c[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;c[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=d.name||d;c[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=d.message||d;f.error=new OSF.DDA.Error(c[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],c[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],c[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}a.fireOrQueueEvent(f);if(i[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed){a.clearEventHandlers(e);a.clearEventHandlers(g);a.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived);OSF.DialogShownStatus.hasDialogShown=b}}})}catch(r){j(r,l,p,i)}};g[OSF.DDA.DispIdHost.Methods.CloseDialog]=function(h,o,e,q){var l,a,i,g=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;function n(a){g=a;OSF.DialogShownStatus.hasDialogShown=b}try{var k=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id];l=k.verifyAndExtractCall(h,q,e);a=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;i=Microsoft.Office.WebExtension.EventType.DialogEventReceived;e.clearEventHandlers(a);e.clearEventHandlers(i);var r=c[a],d=f(a),p=d[OSF.DDA.DispIdHost.Delegates.CloseDialog]!=undefined?d[OSF.DDA.DispIdHost.Delegates.CloseDialog]:d[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];p({eventType:a,dispId:r,targetId:o,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:n})}catch(m){j(m,k,h,l)}if(g!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,g)};g[OSF.DDA.DispIdHost.Methods.MessageParent]=function(a,i){var d={},b=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id],e=b.verifyAndExtractCall(a,i,d),g=f(OSF.DDA.SyncMethodNames.MessageParent.id),h=g[OSF.DDA.DispIdHost.Delegates.MessageParent],j=c[OSF.DDA.SyncMethodNames.MessageParent.id];return h({dispId:j,hostCallArgs:e,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})};g[OSF.DDA.DispIdHost.Methods.SendMessage]=function(a,k,i){var d={},b=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id],e=b.verifyAndExtractCall(a,i,d),g=f(OSF.DDA.SyncMethodNames.SendMessage.id),h=g[OSF.DDA.DispIdHost.Delegates.SendMessage],j=c[OSF.DDA.SyncMethodNames.SendMessage.id];return h({dispId:j,hostCallArgs:e,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})}};OSF.DDA.DispIdHost.addAsyncMethods=function(a,b,e){for(var f in b){var c=b[f],d=c.displayName;!a[d]&&OSF.OUtil.defineEnumerableProperty(a,d,{value:function(b){return function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod];c(b,arguments,a,e)}}(c)})}};OSF.DDA.DispIdHost.addEventSupport=function(a,b,e){var d=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName,c=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;!a[d]&&OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler];c(arguments,b,a,e)}});!a[c]&&OSF.OUtil.defineEnumerableProperty(a,c,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler];c(arguments,b,a)}})};OSF.ShowWindowDialogParameterKeys={Url:"url",Width:"width",Height:"height",DisplayInIframe:"displayInIframe",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels"};OSF.HostThemeButtonStyleKeys={ButtonBorderColor:"buttonBorderColor",ButtonBackgroundColor:"buttonBackgroundColor"};OSF.OmexPageParameterKeys={AppName:"client",AppVersion:"cv",AppUILocale:"ui",AppDomain:"appDomain",StoreLocator:"rs",AssetId:"assetid",NotificationType:"notificationType",AppCorrelationId:"corr",AuthType:"authType"};OSF.AuthType={Anonymous:0,MSA:1,OrgId:2,ADAL:3};OSF.OmexMessageKeys={MessageType:"messageType",MessageValue:"messageValue"};OSF.OmexRemoveAddinMessageKeys={RemoveAddinResultCode:"resultCode",RemoveAddinResultValue:"resultValue"};OSF.OmexRemoveAddinResultCode={Success:0,ClientError:400,ServerError:500,UnknownError:600};var OfficeExt;(function(a){var b;(function(a){var h="^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/";function d(a,b){return OSF.OUtil.parseInfoFromWindowName(a,b,OSF.WindowNameItemKeys.AppContext)}a.parseAppContextFromWindowName=d;function f(a){if(typeof JSON!=="undefined")try{return JSON.stringify(a)}catch(b){}return ""}a.serializeObjectToString=f;function i(){return (new RegExp(h)).test(OSF.getClientEndPoint()._targetUrl.toLowerCase())}a.isHostTrusted=i;function e(b,e){if(!b)return null;b=b.trim()||"";var f="?",k="_host_Info=",j="&_host_Info=",d="#",i=b.split(d),c=i.shift(),h=i.join(d),g=c.split(f),a;if(g.length>1)a=c+j+e;else if(g.length>0)a=c+f+k+e;if(h)return [a,d,h].join("");else return a}a.addHostInfoAsQueryParam=e;function g(b){if(!b)return null;var a=document.createElement("a");a.href=b;return a.protocol+"//"+a.host}a.getDomainForUrl=g;function c(){try{for(var c=["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3"],e=window.navigator.userAgent,a=0,f=c.length;a<f;a++)if(e.indexOf(c[a])>-1)return b();return false}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: "+d);return false}}a.shouldUseLocalStorageToPassMessage=c;function b(){try{var a=window.navigator.userAgent;return a.indexOf("MSIE ")>-1||a.indexOf("Trident/")>-1||a.indexOf("Edge/")>-1}catch(b){OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: "+b);return false}}a.isInternetExplorer=b})(b=a.WACUtils||(a.WACUtils={}))})(OfficeExt||(OfficeExt={}));var OfficeExt;(function(g){var c="\n",d=true,a=null,b="undefined",j=function(){function c(){}c.isInstanceOfType=function(f,e){if(typeof e===b||e===a)return false;if(e instanceof f)return d;var c=e.constructor;if(!c||typeof c!=="function"||!c.__typeName||c.__typeName==="Object")c=Object;return !!(c===f)||c.__typeName&&f.__typeName&&c.__typeName===f.__typeName};return c}();g.MsAjaxTypeHelper=j;var h=function(){var e="Parameter name: {0}";function d(){}d.create=function(c,b){var a=new Error(c);a.message=c;if(b)for(var d in b)a[d]=b[d];a.popStackFrame();return a};d.parameterCount=function(a){var c="Sys.ParameterCountException: "+(a?a:"Parameter count mismatch."),b=d.create(c,{name:"Sys.ParameterCountException"});b.popStackFrame();return b};d.argument=function(a,g){var b="Sys.ArgumentException: "+(g?g:"Value does not fall within the expected range.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentException",paramName:a});h.popStackFrame();return h};d.argumentNull=function(a,g){var b="Sys.ArgumentNullException: "+(g?g:"Value cannot be null.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentNullException",paramName:a});h.popStackFrame();return h};d.argumentOutOfRange=function(i,g,j){var h="Sys.ArgumentOutOfRangeException: "+(j?j:"Specified argument was out of the range of valid values.");if(i)h+=c+f.format(e,i);if(typeof g!==b&&g!==a)h+=c+f.format("Actual value was {0}.",g);var k=d.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:i,actualValue:g});k.popStackFrame();return k};d.argumentType=function(h,g,b,i){var a="Sys.ArgumentTypeException: ";if(i)a+=i;else if(g&&b)a+=f.format("Object of type '{0}' cannot be converted to type '{1}'.",g.getName?g.getName():g,b.getName?b.getName():b);else a+="Object cannot be converted to the required type.";if(h)a+=c+f.format(e,h);var j=d.create(a,{name:"Sys.ArgumentTypeException",paramName:h,actualType:g,expectedType:b});j.popStackFrame();return j};d.argumentUndefined=function(a,g){var b="Sys.ArgumentUndefinedException: "+(g?g:"Value cannot be undefined.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentUndefinedException",paramName:a});h.popStackFrame();return h};d.invalidOperation=function(a){var c="Sys.InvalidOperationException: "+(a?a:"Operation is not valid due to the current state of the object."),b=d.create(c,{name:"Sys.InvalidOperationException"});b.popStackFrame();return b};return d}();g.MsAjaxError=h;var f=function(){function a(){}a.format=function(c){for(var b=[],a=1;a<arguments.length;a++)b[a-1]=arguments[a];var d=c;return d.replace(/{(\d+)}/gm,function(d,a){var c=parseInt(a,10);return b[c]===undefined?"{"+a+"}":b[c]})};a.startsWith=function(b,a){return b.substr(0,a.length)===a};return a}();g.MsAjaxString=f;var i=function(){function a(){}a.trace=function(){};return a}();g.MsAjaxDebug=i;if(!OsfMsAjaxFactory.isMsAjaxLoaded()){var e=function(a,c,b){if(a.__typeName===undefined)a.__typeName=c;if(a.__class===undefined)a.__class=b};e(Function,"Function",d);e(Error,"Error",d);e(Object,"Object",d);e(String,"String",d);e(Boolean,"Boolean",d);e(Date,"Date",d);e(Number,"Number",d);e(RegExp,"RegExp",d);e(Array,"Array",d);if(!Function.createCallback)Function.createCallback=function(b,a){var c=Function._validateParams(arguments,[{name:"method",type:Function},{name:"context",mayBeNull:d}]);if(c)throw c;return function(){var e=arguments.length;if(e>0){for(var d=[],c=0;c<e;c++)d[c]=arguments[c];d[e]=a;return b.apply(this,d)}return b.call(this,a)}};if(!Function.createDelegate)Function.createDelegate=function(b,c){var a=Function._validateParams(arguments,[{name:"instance",mayBeNull:d},{name:"method",type:Function}]);if(a)throw a;return function(){return c.apply(b,arguments)}};if(!Function._validateParams)Function._validateParams=function(i,g,e){var c,f=g.length;e=e||typeof e===b;c=Function._validateParameterCount(i,g,e);if(c){c.popStackFrame();return c}for(var d=0,k=i.length;d<k;d++){var h=g[Math.min(d,f-1)],j=h.name;if(h.parameterArray)j+="["+(d-f+1)+"]";else if(!e&&d>=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(g<c){var i=c;for(b=0;b<c;b++){var j=f[b];if(j.optional||j.parameterArray)i--}if(g<i)e=d}else if(l&&g>c){e=d;for(b=0;b<c;b++)if(f[b].parameterArray){e=false;break}}if(e){var k=h.parameterCount();k.popStackFrame();return k}return a};if(!Function._validateParameter)Function._validateParameter=function(e,c,j){var d,i=c.type,n=!!c.integer,m=!!c.domElement,o=!!c.mayBeNull;d=Function._validateParameterType(e,i,n,m,o,j);if(d){d.popStackFrame();return d}var g=c.elementType,h=!!c.elementMayBeNull;if(i===Array&&typeof e!==b&&e!==a&&(g||!h))for(var l=!!c.elementInteger,k=!!c.elementDomElement,f=0;f<e.length;f++){var p=e[f];d=Function._validateParameterType(p,g,l,k,h,j+"["+f+"]");if(d){d.popStackFrame();return d}}return a};if(!Function._validateParameterType)Function._validateParameterType=function(d,e,j,i,h,f){var c,k;if(typeof d===b)if(h)return a;else{c=g.MsAjaxError.argumentUndefined(f);c.popStackFrame();return c}if(d===a)if(h)return a;else{c=g.MsAjaxError.argumentNull(f);c.popStackFrame();return c}if(e&&!g.MsAjaxTypeHelper.isInstanceOfType(e,d)){c=g.MsAjaxError.argumentType(f,typeof d,e);c.popStackFrame();return c}return a};if(!window.Type)window.Type=Function;if(!Type.registerNamespace)Type.registerNamespace=function(d){for(var c=d.split("."),b=window,a=0;a<c.length;a++){b[c[a]]=b[c[a]]||{};b=b[c[a]]}};if(!Type.prototype.registerClass)Type.prototype.registerClass=function(a){a={}};typeof Sys===b&&Type.registerNamespace("Sys");if(!Error.prototype.popStackFrame)Error.prototype.popStackFrame=function(){var d=this;if(arguments.length!==0)throw h.parameterCount();if(typeof d.stack===b||d.stack===a||typeof d.fileName===b||d.fileName===a||typeof d.lineNumber===b||d.lineNumber===a)return;var e=d.stack.split(c),g=e[0],j=d.fileName+":"+d.lineNumber;while(typeof g!==b&&g!==a&&g.indexOf(j)===-1){e.shift();g=e[0]}var i=e[1];if(typeof i===b||i===a)return;var f=i.match(/@(.*):(\d+)$/);if(typeof f===b||f===a)return;d.fileName=f[1];d.lineNumber=parseInt(f[2]);e.shift();d.stack=e.join(c)};OsfMsAjaxFactory.msAjaxError=h;OsfMsAjaxFactory.msAjaxString=f;OsfMsAjaxFactory.msAjaxDebug=i}})(OfficeExt||(OfficeExt={}));OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Common",Microsoft.Office);Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};OSF.SerializerVersion={MsAjax:0,Browser:1};var OfficeExt;(function(b){function a(){return false}b.appSpecificCheckOrigin=a})(OfficeExt||(OfficeExt={}));Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};Microsoft.Office.Common.InvokeResultCode={noError:0,errorInRequest:-1,errorHandlingRequest:-2,errorInResponse:-3,errorHandlingResponse:-4,errorHandlingRequestAccessDenied:-5,errorHandlingMethodCallTimedout:-6};Microsoft.Office.Common.MessageType={request:0,response:1};Microsoft.Office.Common.ActionType={invoke:0,registerEvent:1,unregisterEvent:2};Microsoft.Office.Common.ResponseType={forCalling:0,forEventing:1};Microsoft.Office.Common.MethodObject=function(c,b,a){this._method=c;this._invokeType=b;this._blockingOthers=a};Microsoft.Office.Common.MethodObject.prototype={getMethod:function(){return this._method},getInvokeType:function(){return this._invokeType},getBlockingFlag:function(){return this._blockingOthers}};Microsoft.Office.Common.EventMethodObject=function(b,a){this._registerMethodObject=b;this._unregisterMethodObject=a};Microsoft.Office.Common.EventMethodObject.prototype={getRegisterMethodObject:function(){return this._registerMethodObject},getUnregisterMethodObject:function(){return this._unregisterMethodObject}};Microsoft.Office.Common.ServiceEndPoint=function(c){var a=this,b=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:false}]);if(b)throw b;a._methodObjectList={};a._eventHandlerProxyList={};a._Id=c;a._conversations={};a._policyManager=null;a._appDomains={};a._onHandleRequestError=null};Microsoft.Office.Common.ServiceEndPoint.prototype={registerMethod:function(g,h,b,e){var c="invokeType",a=false,d=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:a},{name:"method",type:Function,mayBeNull:a},{name:c,type:Number,mayBeNull:a},{name:"blockingOthers",type:Boolean,mayBeNull:a}]);if(d)throw d;if(b!==Microsoft.Office.Common.InvokeType.async&&b!==Microsoft.Office.Common.InvokeType.sync)throw OsfMsAjaxFactory.msAjaxError.argument(c);var f=new Microsoft.Office.Common.MethodObject(h,b,e);this._methodObjectList[g]=f},unregisterMethod:function(b){var a=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:false}]);if(a)throw a;delete this._methodObjectList[b]},registerEvent:function(f,d,c){var a=false,b=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:a},{name:"registerMethod",type:Function,mayBeNull:a},{name:"unregisterMethod",type:Function,mayBeNull:a}]);if(b)throw b;var e=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(d,Microsoft.Office.Common.InvokeType.syncRegisterEvent,a),new Microsoft.Office.Common.MethodObject(c,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,a));this._methodObjectList[f]=e},registerEventEx:function(h,f,d,e,c){var a=false,b=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:a},{name:"registerMethod",type:Function,mayBeNull:a},{name:"registerMethodInvokeType",type:Number,mayBeNull:a},{name:"unregisterMethod",type:Function,mayBeNull:a},{name:"unregisterMethodInvokeType",type:Number,mayBeNull:a}]);if(b)throw b;var g=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(f,d,a),new Microsoft.Office.Common.MethodObject(e,c,a));this._methodObjectList[h]=g},unregisterEvent:function(b){var a=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:false}]);if(a)throw a;this.unregisterMethod(b)},registerConversation:function(c,g,b,f){var d="appDomains",a=true,e=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false},{name:"conversationUrl",type:String,mayBeNull:false,optional:a},{name:d,type:Object,mayBeNull:a,optional:a},{name:"serializerVersion",type:Number,mayBeNull:a,optional:a}]);if(e)throw e;if(b){if(!(b instanceof Array))throw OsfMsAjaxFactory.msAjaxError.argument(d);this._appDomains[c]=b}this._conversations[c]={url:g,serializerVersion:f}},unregisterConversation:function(b){var a=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false}]);if(a)throw a;delete this._conversations[b]},setPolicyManager:function(a){var b="policyManager",c=Function._validateParams(arguments,[{name:b,type:Object,mayBeNull:false}]);if(c)throw c;if(!a.checkPermission)throw OsfMsAjaxFactory.msAjaxError.argument(b);this._policyManager=a},getPolicyManager:function(){return this._policyManager},dispose:function(){var a=null,b=this;b._methodObjectList=a;b._eventHandlerProxyList=a;b._Id=a;b._conversations=a;b._policyManager=a;b._appDomains=a;b._onHandleRequestError=a}};Microsoft.Office.Common.ClientEndPoint=function(f,b,g,d){var c="targetWindow",a=this,e=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false},{name:c,mayBeNull:false},{name:"targetUrl",type:String,mayBeNull:false},{name:"serializerVersion",type:Number,mayBeNull:true,optional:true}]);if(e)throw e;try{if(!b.postMessage)throw OsfMsAjaxFactory.msAjaxError.argument(c)}catch(h){if(!Object.prototype.hasOwnProperty.call(b,"postMessage"))throw OsfMsAjaxFactory.msAjaxError.argument(c)}a._conversationId=f;a._targetWindow=b;a._targetUrl=g;a._callingIndex=0;a._callbackList={};a._eventHandlerList={};if(d!=null)a._serializerVersion=d;else a._serializerVersion=OSF.SerializerVersion.Browser};Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(h,d,b){var a=this,g=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"param",mayBeNull:true}]);if(g)throw g;var c=a._callingIndex++,k=new Date,e={callback:d,createdOn:k.getTime()};if(b&&typeof b==="object"&&typeof b.__timeout__==="number"){e.timeout=b.__timeout__;delete b.__timeout__}a._callbackList[c]=e;try{var i=new Microsoft.Office.Common.Request(h,Microsoft.Office.Common.ActionType.invoke,a._conversationId,c,b),j=Microsoft.Office.Common.MessagePackager.envelope(i,a._serializerVersion);a._targetWindow.postMessage(j,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(f){try{d!==null&&d(Microsoft.Office.Common.InvokeResultCode.errorInRequest,f)}finally{delete a._callbackList[c]}}},registerForEvent:function(d,g,c,i){var a=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:false},{name:"eventHandler",type:Function,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"data",mayBeNull:true,optional:true}]);if(f)throw f;var b=a._callingIndex++,k=new Date;a._callbackList[b]={callback:c,createdOn:k.getTime()};try{var h=new Microsoft.Office.Common.Request(d,Microsoft.Office.Common.ActionType.registerEvent,a._conversationId,b,i),j=Microsoft.Office.Common.MessagePackager.envelope(h,a._serializerVersion);a._targetWindow.postMessage(j,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer();a._eventHandlerList[d]=g}catch(e){try{c!==null&&c(Microsoft.Office.Common.InvokeResultCode.errorInRequest,e)}finally{delete a._callbackList[b]}}},unregisterForEvent:function(d,c,h){var a=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"data",mayBeNull:true,optional:true}]);if(f)throw f;var b=a._callingIndex++,j=new Date;a._callbackList[b]={callback:c,createdOn:j.getTime()};try{var g=new Microsoft.Office.Common.Request(d,Microsoft.Office.Common.ActionType.unregisterEvent,a._conversationId,b,h),i=Microsoft.Office.Common.MessagePackager.envelope(g,a._serializerVersion);a._targetWindow.postMessage(i,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(e){try{c!==null&&c(Microsoft.Office.Common.InvokeResultCode.errorInRequest,e)}finally{delete a._callbackList[b]}}finally{delete a._eventHandlerList[d]}}};Microsoft.Office.Common.XdmCommunicationManager=function(){var l="serviceEndPointId",c=true,k="channel is not ready.",f="conversationId",j="Unknown conversation Id.",b=false,a=null,o=[],n=a,g=a,q=10,i=b,h=a,w=2e3,p=65000,s=p,e={},d={},t=b;function x(b){for(var a in e)if(e[a]._conversations[b])return e[a];OsfMsAjaxFactory.msAjaxDebug.trace(j);throw OsfMsAjaxFactory.msAjaxError.argument(f)}function y(b){var a=d[b];!a&&OsfMsAjaxFactory.msAjaxDebug.trace(j);return a}function B(e,c){var b=e._methodObjectList[c._actionName];if(!b){OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+c._actionName);throw OsfMsAjaxFactory.msAjaxError.argument("messageObject")}var d=a;if(c._actionType===Microsoft.Office.Common.ActionType.invoke)d=b;else if(c._actionType===Microsoft.Office.Common.ActionType.registerEvent)d=b.getRegisterMethodObject();else d=b.getUnregisterMethodObject();return d}function E(a){o.push(a)}function D(){if(g!==a){if(!i)if(o.length>0){var b=o.shift();r(b)}else{clearInterval(g);g=a}}else OsfMsAjaxFactory.msAjaxDebug.trace(k)}function r(a){i=a.getInvokeBlockingFlag();a.invoke();n=(new Date).getTime()}function A(){if(h){var c,f=0,j=new Date,e;for(var i in d){c=d[i];for(var g in c._callbackList){var b=c._callbackList[g];e=b.timeout?b.timeout:s;if(e>=0&&Math.abs(j.getTime()-b.createdOn)>=e)try{b.callback&&b.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,a)}finally{delete c._callbackList[g]}else f++}}if(f===0){clearInterval(h);h=a}}else OsfMsAjaxFactory.msAjaxDebug.trace(k)}function z(){i=b}function C(a){if(window.addEventListener)window.addEventListener("message",a,b);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",a);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser")}}function F(e,f){var g=b;if(e===c)return c;if(!e||!f||!e.length||!f.length)return g;var d,a;d=document.createElement("a");a=document.createElement("a");d.href=e;a.href=f;g=v(d,a);delete d,a;return g}function m(a,g){var c=b;if(!g||!g.length||!a||!(a instanceof Array)||!a.length)return c;var f=document.createElement("a"),e=document.createElement("a");f.href=g;for(var d=0;d<a.length&&!c;d++)if(a[d].indexOf("://")!==-1){e.href=a[d];c=v(f,e)}delete f,e;return c}function v(a,b){return a.hostname==b.hostname&&a.protocol==b.protocol&&a.port==b.port}function G(e){var l="Access Denied";if(!OSF)return;if(e.data!=""){var d,f=OSF.SerializerVersion.Browser,I=e.data;try{d=Microsoft.Office.Common.MessagePackager.unenvelope(I,OSF.SerializerVersion.Browser);f=d._serializerVersion!=a?d._serializerVersion:f}catch(k){return}if(d._messageType===Microsoft.Office.Common.MessageType.request){var w=e.origin==a||e.origin=="null"?d._origin:e.origin;try{var h=x(d._conversationId),p=h._conversations[d._conversationId];f=p.serializerVersion!=a?p.serializerVersion:f;var t=[p.url].concat(h._appDomains[d._conversationId]);if(!m(t,e.origin))if(!OfficeExt.appSpecificCheckOrigin(t,e,d._origin,m))throw"Failed origin check";var v=h.getPolicyManager();if(v&&!v.checkPermission(d._conversationId,d._actionName,d._data))throw l;var L=B(h,d),H=new Microsoft.Office.Common.InvokeCompleteCallback(e.source,w,d._actionName,d._conversationId,d._correlationId,z,f),G=new Microsoft.Office.Common.Invoker(L,d._data,H,h._eventHandlerProxyList,d._conversationId,d._actionName,f),A=c;if(g==a)if((n==a||(new Date).getTime()-n>q)&&!i){r(G);A=b}else g=setInterval(D,q);A&&E(G)}catch(k){h&&h._onHandleRequestError&&h._onHandleRequestError(d,k);var C=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;if(k==l)C=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied;var K=new Microsoft.Office.Common.Response(d._actionName,d._conversationId,d._correlationId,C,Microsoft.Office.Common.ResponseType.forCalling,k),J=Microsoft.Office.Common.MessagePackager.envelope(K,f),u=b;try{u=!!(e.source&&e.source.postMessage)}catch(k){}u&&e.source.postMessage(J,w)}}else if(d._messageType===Microsoft.Office.Common.MessageType.response){var j=y(d._conversationId);if(!j)return;j._serializerVersion=f;if(!F(j._targetUrl,e.origin))throw"Failed orgin check";if(d._responseType===Microsoft.Office.Common.ResponseType.forCalling){var o=j._callbackList[d._correlationId];if(o)try{o.callback&&o.callback(d._errorCode,d._data)}finally{delete j._callbackList[d._correlationId]}}else{var s=j._eventHandlerList[d._actionName];s!==undefined&&s!==a&&s(d._data)}}else return}}function u(){if(!t){C(G);t=c}}return {connect:function(b,e,f,c){var a=d[b];if(!a){u();a=new Microsoft.Office.Common.ClientEndPoint(b,e,f,c);d[b]=a}return a},getClientEndPoint:function(c){var a=Function._validateParams(arguments,[{name:f,type:String,mayBeNull:b}]);if(a)throw a;return d[c]},createServiceEndPoint:function(a){u();var b=new Microsoft.Office.Common.ServiceEndPoint(a);e[a]=b;return b},getServiceEndPoint:function(c){var a=Function._validateParams(arguments,[{name:l,type:String,mayBeNull:b}]);if(a)throw a;return e[c]},deleteClientEndPoint:function(c){var a=Function._validateParams(arguments,[{name:f,type:String,mayBeNull:b}]);if(a)throw a;delete d[c]},deleteServiceEndPoint:function(c){var a=Function._validateParams(arguments,[{name:l,type:String,mayBeNull:b}]);if(a)throw a;delete e[c]},checkUrlWithAppDomains:function(a,b){return m(a,b)},_setMethodTimeout:function(a){var c=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:b}]);if(c)throw c;s=a<=0?p:a},_startMethodTimeoutTimer:function(){if(!h)h=setInterval(A,w)}}}();Microsoft.Office.Common.Message=function(g,h,e,f,c){var b=false,a=this,d=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:b},{name:"actionName",type:String,mayBeNull:b},{name:"conversationId",type:String,mayBeNull:b},{name:"correlationId",mayBeNull:b},{name:"data",mayBeNull:true,optional:true}]);if(d)throw d;a._messageType=g;a._actionName=h;a._conversationId=e;a._correlationId=f;a._origin=window.location.href;if(typeof c=="undefined")a._data=null;else a._data=c};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(c,d,a,b,e){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,c,a,b,e);this._actionType=d};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(d,a,b,e,c,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,d,a,b,f);this._errorCode=e;this._responseType=c};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(a){if(typeof a==="object")a._serializerVersion=OSF.SerializerVersion.Browser;return JSON.stringify(a)},unenvelope:function(a){return JSON.parse(a)}};Microsoft.Office.Common.ResponseSender=function(f,i,k,g,h,j,e){var c=false,a=this,d=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:c},{name:"requesterUrl",type:String,mayBeNull:c},{name:"actionName",type:String,mayBeNull:c},{name:"conversationId",type:String,mayBeNull:c},{name:"correlationId",mayBeNull:c},{name:"responsetype",type:Number,maybeNull:c},{name:"serializerVersion",type:Number,maybeNull:true,optional:true}]);if(d)throw d;a._requesterWindow=f;a._requesterUrl=i;a._actionName=k;a._conversationId=g;a._correlationId=h;a._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;a._responseType=j;var b=a;a._send=function(f){try{var d=new Microsoft.Office.Common.Response(b._actionName,b._conversationId,b._correlationId,b._invokeResultCode,b._responseType,f),c=Microsoft.Office.Common.MessagePackager.envelope(d,e);b._requesterWindow.postMessage(c,b._requesterUrl)}catch(a){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+a.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(a){this._invokeResultCode=a}};Microsoft.Office.Common.InvokeCompleteCallback=function(e,h,i,f,g,d,c){var b=this;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(b,e,h,i,f,g,Microsoft.Office.Common.ResponseType.forCalling,c);b._postCallbackHandler=d;var a=b;b._send=function(g,b){if(b!=undefined)a._invokeResultCode=b;try{var f=new Microsoft.Office.Common.Response(a._actionName,a._conversationId,a._correlationId,a._invokeResultCode,a._responseType,g),e=Microsoft.Office.Common.MessagePackager.envelope(f,c);a._requesterWindow.postMessage(e,a._requesterUrl);a._postCallbackHandler()}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+d.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(i,j,e,f,h,k,g){var c=true,b=false,a=this,d=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:b},{name:"paramValue",mayBeNull:c},{name:"invokeCompleteCallback",mayBeNull:b},{name:"eventHandlerProxyList",mayBeNull:c},{name:"conversationId",type:String,mayBeNull:b},{name:"eventName",type:String,mayBeNull:b},{name:"serializerVersion",type:Number,mayBeNull:c,optional:c}]);if(d)throw d;a._methodObject=i;a._param=j;a._invokeCompleteCallback=e;a._eventHandlerProxyList=f;a._conversationId=h;a._eventName=k;a._serializerVersion=g};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var a=this;try{var b;switch(a._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:a._methodObject.getMethod()(a._param,a._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:b=a._methodObject.getMethod()(a._param);a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var d=a._createEventHandlerProxyObject(a._invokeCompleteCallback);b=a._methodObject.getMethod()(d.getSend(),a._param);a._eventHandlerProxyList[a._conversationId+a._eventName]=d.getSend();a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var g=a._eventHandlerProxyList[a._conversationId+a._eventName];b=a._methodObject.getMethod()(g,a._param);delete a._eventHandlerProxyList[a._conversationId+a._eventName];a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var c=a._createEventHandlerProxyObject(a._invokeCompleteCallback);a._methodObject.getMethod()(c.getSend(),a._invokeCompleteCallback.getSend(),a._param);a._eventHandlerProxyList[a._callerId+a._eventName]=c.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var f=a._eventHandlerProxyList[a._callerId+a._eventName];a._methodObject.getMethod()(f,a._invokeCompleteCallback.getSend(),a._param);delete a._eventHandlerProxyList[a._callerId+a._eventName]}}catch(e){a._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);a._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(a){return new Microsoft.Office.Common.ResponseSender(a.getRequesterWindow(),a.getRequesterUrl(),a.getActionName(),a.getConversationId(),a.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var a=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],b={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,a,b)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var a={};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync;a[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync;a[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync;a[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog;a[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent;a[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage;a[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog;return a};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(a){if(!a.hostCallArgs)a.hostCallArgs={};a.hostCallArgs["DdaMethod"]={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:a.dispId};a.hostCallArgs["__timeout__"]=-1;a.onCalling&&a.onCalling();if(!OSF.getClientEndPoint())return;OSF.getClientEndPoint().invoke("executeMethod",function(d,c){a.onReceiving&&a.onReceiving();var b;if(d==Microsoft.Office.Common.InvokeResultCode.noError){OSF.DDA.WAC.Delegate.version=c["Version"];b=c["Error"]}else switch(d){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}a.onComplete&&a.onComplete(b,c)},a.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(c,a){var b=(new Date).getTime();return function(f,e){a.onReceiving&&a.onReceiving();var d;if(f!=Microsoft.Office.Common.InvokeResultCode.noError)switch(f){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:d=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:d=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else if(e)if(e["Error"])d=e["Error"];else d=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;else d=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;a.onComplete&&a.onComplete(d);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(c,a.dispId,Math.abs((new Date).getTime()-b),d)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(a){a.onCalling&&a.onCalling();if(!OSF.getClientEndPoint())return;OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(a.targetId,a.eventType),function(b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true,a),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:a.dispId,targetId:a.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(a){a.onCalling&&a.onCalling();if(!OSF.getClientEndPoint())return;OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(a.targetId,a.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false,a),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:a.dispId,targetId:a.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(a){if(OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash)return a+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash();else return a};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var b=document.querySelectorAll("a[data-officejs-navigate]"),a=0;a<b.length;a++)if(OSF.WebApp._isGoodUrl(b[a].href))b[a].href=OSF.WebApp.AddHostInfoAndXdmInfo(b[a].href);for(var d=document.querySelectorAll("form[data-officejs-navigate]"),a=0;a<d.length;a++){var c=d[a];if(OSF.WebApp._isGoodUrl(c.action))c.action=OSF.WebApp.AddHostInfoAndXdmInfo(c.action)}};OSF.WebApp._isGoodUrl=function(a){if(typeof a=="undefined")return false;a=a.trim();var d=a.indexOf(":"),b=d>0?a.substr(0,d):null,c=b!==null?b.toLowerCase()==="http"||b.toLowerCase()==="https":true;c=c&&a!="#"&&a!="/"&&a!=""&&a!=OSF._OfficeAppFactory.getWebAppState().webAppUrl;return c};OSF.InitializationHelper=function(e,b,g,f,c){var a=this;a._hostInfo=e;a._webAppState=b;a._context=g;a._settings=f;a._hostFacade=c;a._appContext={};a._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";a._initializeSettings=function(g,f){var d,b=g.get_settings(),c=OSF.OUtil.getSessionStorage();if(c){var a=c.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());if(a)b=JSON.parse(a);else{a=JSON.stringify(b);c.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),a)}}var e=OSF.DDA.SettingsManager.deserializeSettings(b);if(f)d=new OSF.DDA.RefreshableSettings(e);else d=new OSF.DDA.Settings(e);return d};var d=function(a){var b=window.open;a.open=function(e,d,c){var a=null;try{a=b(e,d,c)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+f)}if(!a){var g={strUrl:e,strWindowName:d,strWindowFeatures:c};OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,g)}return a}};d(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(b){var d="IsDialog",a=true,f=function(){var b=OSF.OUtil.parseXdmInfo(a);if(b){var c=b.split("|");return c[1]}return null},c=OSF.OUtil.getSessionStorage();if(c){if(!b)b=OSF.OUtil.parseHostInfoFromWindowName(a,OSF._OfficeAppFactory.getWindowName());if(b&&b.indexOf("isDialog")>-1){var e=f();e!=null&&c.setItem(e+d,"true");this._hostInfo.isDialog=a;return}this._hostInfo.isDialog=c.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,false)+d)!=null?a:false}};OSF.InitializationHelper.prototype.getAppContext=function(g,d){var a=this,f=a,c=function(i,a){var c;if(a._appName===OSF.AppName.ExcelWebApp){var e=a._settings;c={};for(var o in e){var k=e[o];c[k[0]]=k[1]}}else c=a._settings;if(i===0&&a._id!=undefined&&a._appName!=undefined&&a._appVersion!=undefined&&a._appUILocale!=undefined&&a._dataLocale!=undefined&&a._docUrl!=undefined&&a._clientMode!=undefined&&a._settings!=undefined&&a._reason!=undefined){f._appContext=a;var m=a._appInstanceId?a._appInstanceId:a._id,n=false,l=true,h=0;if(a._appMinorVersion!=undefined)h=a._appMinorVersion;var g=undefined;if(a._requirementMatrix!=undefined)g=a._requirementMatrix;a.eToken=a.eToken?a.eToken:"";var b=new OSF.OfficeAppContext(a._id,a._appName,a._appVersion,a._appUILocale,a._dataLocale,a._docUrl,a._clientMode,c,a._reason,a._osfControlType,a._eToken,a._correlationId,m,n,l,h,g,a._hostCustomMessage,a._hostFullVersion,a._clientWindowHeight,a._clientWindowWidth,a._addinName,a._appDomains,a._dialogRequirementMatrix);b._wacHostEnvironment=a._wacHostEnvironment||"0";b._isFromWacAutomation=!!a._isFromWacAutomation;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(b);d(b)}else{var j="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+i+", exception: "+a;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(j);throw j}};try{if(a._hostInfo.isDialog&&window.opener!=null){var e=OfficeExt.WACUtils.parseAppContextFromWindowName(false,OSF._OfficeAppFactory.getWindowName());c(0,e)}else a._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",c,a._webAppState.id)}catch(b){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+b+"]");throw b}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var d=null,b=false;try{var a=this,e=OSF.OUtil.parseXdmInfoWithGivenFragment(b,OSF._OfficeAppFactory.getWindowLocationHash());if(!e&&OSF._OfficeAppFactory.getWindowName)e=OSF.OUtil.parseXdmInfoFromWindowName(b,OSF._OfficeAppFactory.getWindowName());if(e){var c=OSF.OUtil.getInfoItems(e);if(c!=undefined&&c.length>=3){a._webAppState.conversationID=c[0];a._webAppState.id=c[1];a._webAppState.webAppUrl=c[2].indexOf(":")>=0?c[2]:decodeURIComponent(c[2])}}a._webAppState.wnd=window.opener!=d?window.opener:window.parent;var f=OSF.OUtil.parseSerializerVersionWithGivenFragment(b,OSF._OfficeAppFactory.getWindowLocationHash());if(isNaN(f)&&OSF._OfficeAppFactory.getWindowName)f=OSF.OUtil.parseSerializerVersionFromWindowName(b,OSF._OfficeAppFactory.getWindowName());a._webAppState.serializerVersion=f;if(this._hostInfo.isDialog&&window.opener!=d)return;a._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(a._webAppState.conversationID,a._webAppState.wnd,a._webAppState.webAppUrl,a._webAppState.serializerVersion);a._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(a._webAppState.id);var h=a._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;a._webAppState.serviceEndPoint.registerConversation(h,a._webAppState.webAppUrl);var i=function(e){var c="ContextActivationManager_notifyHost";switch(e){case OSF.AgaveHostAction.Select:a._webAppState.focused=true;break;case OSF.AgaveHostAction.UnSelect:a._webAppState.focused=b;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();var g=document.querySelectorAll(a._tabbableElements),f=OSF.OUtil.focusToFirstTabbable(g,b);if(!f){window.blur();a._webAppState.focused=b;a._webAppState.clientEndPoint.invoke(c,d,[a._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])}break;case OSF.AgaveHostAction.TabInShift:window.focus();var g=document.querySelectorAll(a._tabbableElements),f=OSF.OUtil.focusToFirstTabbable(g,true);if(!f){window.blur();a._webAppState.focused=b;a._webAppState.clientEndPoint.invoke(c,d,[a._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift])}break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+e+" notifyAgave is wrong.")}};a._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",i,Microsoft.Office.Common.InvokeType.async,b);a.addOrRemoveEventListenersForWindow(true)}catch(g){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+g+"]");throw g}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(i){var h="keypress",c=null,b="ContextActivationManager_notifyHost",a=this,f=function(){if(!a._webAppState.focused)a._webAppState.focused=true;a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.Select])},g=function(){if(!OSF)return;if(a._webAppState.focused)a._webAppState.focused=false;a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.UnSelect])},e=function(d){d.preventDefault=d.preventDefault||function(){d.returnValue=false};if(d.keyCode==117&&(d.ctrlKey||d.metaKey)){var f=OSF.AgaveHostAction.CtrlF6Exit;if(d.shiftKey)f=OSF.AgaveHostAction.CtrlF6ExitShift;a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,f])}else if(d.keyCode==9){d.preventDefault();var e=document.querySelectorAll(a._tabbableElements),g=OSF.OUtil.focusToNextTabbable(e,d.target||d.srcElement,d.shiftKey);if(!g)if(a._hostInfo.isDialog)OSF.OUtil.focusToFirstTabbable(e,d.shiftKey);else if(d.shiftKey)a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.TabExitShift]);else a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.TabExit])}else if(d.keyCode==27){d.preventDefault();a.dismissDialogNotification&&a.dismissDialogNotification();a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.EscExit])}else if(d.keyCode==113){d.preventDefault();a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.F2Exit])}},d=function(a){if(a.keyCode==117&&a.ctrlKey)if(a.preventDefault)a.preventDefault();else a.returnValue=false};if(i){OSF.OUtil.addEventListener(window,"focus",f);OSF.OUtil.addEventListener(window,"blur",g);OSF.OUtil.addEventListener(window,"keydown",e);OSF.OUtil.addEventListener(window,h,d)}else{OSF.OUtil.removeEventListener(window,"focus",f);OSF.OUtil.removeEventListener(window,"blur",g);OSF.OUtil.removeEventListener(window,"keydown",e);OSF.OUtil.removeEventListener(window,h,d)}};OSF.InitializationHelper.prototype.initWebDialog=function(a){if(a.get_isDialog()){if(OSF.DDA.UI.ChildUI){var b=window.opener!=null;a.ui=new OSF.DDA.UI.ChildUI(b);if(b)this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else if(OSF.DDA.UI.ParentUI){a.ui=new OSF.DDA.UI.ParentUI;OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(a.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync])}};OSF.InitializationHelper.prototype.initWebAuth=function(a){if(OSF.DDA.Auth){a.auth=new OSF.DDA.Auth;OSF.DDA.DispIdHost.addAsyncMethods(a.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync])}};OSF.getClientEndPoint=function(){var a=OSF._OfficeAppFactory.getInitializationHelper();return a._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var a=this;if(a._hostInfo.isDialog){window.focus();var c=document.querySelectorAll(a._tabbableElements),b=OSF.OUtil.focusToFirstTabbable(c,false);if(!b){window.blur();a._webAppState.focused=false;a._webAppState.clientEndPoint&&a._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[a._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])}}};OSF.CommonUI={HostButtonBorderColor:"#f5ba9d",HostButtonBackgroundColor:"#fcf0ed"};var OSFLog;(function(g){var e="ResponseTime",d="Message",c="SessionId",b="CorrelationId",a=true,f=function(){function b(a){this._table=a;this._fields={}}Object.defineProperty(b.prototype,"Fields",{"get":function(){return this._fields},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"Table",{"get":function(){return this._table},enumerable:a,configurable:a});b.prototype.SerializeFields=function(){};b.prototype.SetSerializedField=function(b,a){if(typeof a!=="undefined"&&a!==null)this._serializedFields[b]=a.toString()};b.prototype.SerializeRow=function(){var a=this;a._serializedFields={};a.SetSerializedField("Table",a._table);a.SerializeFields();return JSON.stringify(a._serializedFields)};return b}();g.BaseUsageData=f;var i=function(v){var u="IsFromWacAutomation",t="WacHostEnvironment",s="HostJSVersion",r="OfficeJSVersion",q="DocUrl",p="AppSizeHeight",o="AppSizeWidth",n="ClientId",m="HostVersion",l="Host",k="UserId",j="Browser",i="AssetId",h="AppURL",g="AppInstanceId",f="AppId";__extends(e,v);function e(){v.call(this,"AppActivated")}Object.defineProperty(e.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,i,{"get":function(){return this.Fields[i]},"set":function(a){this.Fields[i]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,j,{"get":function(){return this.Fields[j]},"set":function(a){this.Fields[j]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,k,{"get":function(){return this.Fields[k]},"set":function(a){this.Fields[k]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,l,{"get":function(){return this.Fields[l]},"set":function(a){this.Fields[l]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,m,{"get":function(){return this.Fields[m]},"set":function(a){this.Fields[m]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,n,{"get":function(){return this.Fields[n]},"set":function(a){this.Fields[n]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,o,{"get":function(){return this.Fields[o]},"set":function(a){this.Fields[o]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,p,{"get":function(){return this.Fields[p]},"set":function(a){this.Fields[p]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,q,{"get":function(){return this.Fields[q]},"set":function(a){this.Fields[q]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,r,{"get":function(){return this.Fields[r]},"set":function(a){this.Fields[r]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,s,{"get":function(){return this.Fields[s]},"set":function(a){this.Fields[s]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,t,{"get":function(){return this.Fields[t]},"set":function(a){this.Fields[t]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,u,{"get":function(){return this.Fields[u]},"set":function(a){this.Fields[u]=a},enumerable:a,configurable:a});e.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(f,a.AppId);a.SetSerializedField(g,a.AppInstanceId);a.SetSerializedField(h,a.AppURL);a.SetSerializedField(i,a.AssetId);a.SetSerializedField(j,a.Browser);a.SetSerializedField(k,a.UserId);a.SetSerializedField(l,a.Host);a.SetSerializedField(m,a.HostVersion);a.SetSerializedField(n,a.ClientId);a.SetSerializedField(o,a.AppSizeWidth);a.SetSerializedField(p,a.AppSizeHeight);a.SetSerializedField(d,a.Message);a.SetSerializedField(q,a.DocUrl);a.SetSerializedField(r,a.OfficeJSVersion);a.SetSerializedField(s,a.HostJSVersion);a.SetSerializedField(t,a.WacHostEnvironment);a.SetSerializedField(u,a.IsFromWacAutomation)};return e}(f);g.AppActivatedUsageData=i;var j=function(h){var f="StartTime",d="ScriptId";__extends(g,h);function g(){h.call(this,"ScriptLoad")}Object.defineProperty(g.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});g.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(d,a.ScriptId);a.SetSerializedField(f,a.StartTime);a.SetSerializedField(e,a.ResponseTime)};return g}(f);g.ScriptLoadUsageData=j;var k=function(j){var h="CloseMethod",g="OpenTime",f="AppSizeFinalHeight",e="AppSizeFinalWidth",d="FocusTime";__extends(i,j);function i(){j.call(this,"AppClosed")}Object.defineProperty(i.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});i.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(d,a.FocusTime);a.SetSerializedField(e,a.AppSizeFinalWidth);a.SetSerializedField(f,a.AppSizeFinalHeight);a.SetSerializedField(g,a.OpenTime);a.SetSerializedField(h,a.CloseMethod)};return i}(f);g.AppClosedUsageData=k;var l=function(j){var h="ErrorType",g="Parameters",f="APIID",d="APIType";__extends(i,j);function i(){j.call(this,"APIUsage")}Object.defineProperty(i.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});i.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(d,a.APIType);a.SetSerializedField(f,a.APIID);a.SetSerializedField(g,a.Parameters);a.SetSerializedField(e,a.ResponseTime);a.SetSerializedField(h,a.ErrorType)};return i}(f);g.APIUsageUsageData=l;var h=function(g){var e="SuccessCode";__extends(f,g);function f(){g.call(this,"AppInitialization")}Object.defineProperty(f.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});f.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(e,a.SuccessCode);a.SetSerializedField(d,a.Message)};return f}(f);g.AppInitializationUsageData=h})(OSFLog||(OSFLog={}));var Logger;(function(a){"use strict";(function(a){a[a["info"]=0]="info";a[a["warning"]=1]="warning";a[a["error"]=2]="error"})(a.TraceLevel||(a.TraceLevel={}));var f=a.TraceLevel;(function(a){a[a["none"]=0]="none";a[a["flush"]=1]="flush"})(a.SendFlag||(a.SendFlag={}));var g=a.SendFlag;function b(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}a.allowUploadingData=b;function e(a,c,d){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var b={traceLevel:a,message:c,flag:d,internalLog:true},e=JSON.stringify(b);OSF.Logger.ulsEndpoint.writeLog(e)}}a.sendLog=e;function c(){try{return new d}catch(a){return null}}var d=function(){function a(){var a=this,b=a;a.proxyFrame=null;a.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";a.buffer=[];a.proxyFrameReady=false;OSF.OUtil.addEventListener(window,"message",function(a){return b.tellProxyFrameReady(a)});setTimeout(function(){b.loadProxyFrame()},3e3)}a.prototype.writeLog=function(c){var b=this;if(b.proxyFrameReady===true)b.proxyFrame.contentWindow.postMessage(c,a.telemetryOrigin);else b.buffer.length<128&&b.buffer.push(c)};a.prototype.loadProxyFrame=function(){var a=this;if(a.proxyFrame==null){a.proxyFrame=document.createElement("iframe");a.proxyFrame.setAttribute("style","display:none");a.proxyFrame.setAttribute("src",a.telemetryEndPoint);document.head.appendChild(a.proxyFrame)}};a.prototype.tellProxyFrameReady=function(d){var b=this,g=b;if(d.data==="ProxyFrameReadyToLog"){b.proxyFrameReady=true;for(var c=0;c<b.buffer.length;c++)b.writeLog(b.buffer[c]);b.buffer.length=0;OSF.OUtil.removeEventListener(window,"message",function(a){return g.tellProxyFrameReady(a)})}else if(d.data==="ProxyFrameReadyToInit"){var e={appName:"Office APPs",sessionId:OSF.OUtil.Guid.generateNewGuid()},f=JSON.stringify(e);b.proxyFrame.contentWindow.postMessage(f,a.telemetryOrigin)}};a.telemetryOrigin="https://telemetryservice.firstpartyapps.oaspapps.com";return a}();if(!OSF.Logger)OSF.Logger=a;a.ulsEndpoint=c()})(Logger||(Logger={}));var OSFAriaLogger;(function(a){var b=function(){function a(){}a.prototype.getAriaCDNLocation=function(){return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"};a.getInstance=function(){if(a.AriaLoggerObj===undefined)a.AriaLoggerObj=new a;return a.AriaLoggerObj};a.prototype.isIUsageData=function(a){return a["Fields"]!==undefined};a.prototype.loadAriaScriptAndLog=function(c,a){var b=1e3;OSF.OUtil.loadScript(this.getAriaCDNLocation(),function(){try{if(!this.ALogger){var e="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439";this.ALogger=AWTLogManager.initialize(e)}var b=new AWTEventProperties;b.setName("Office.Extensibility.OfficeJS."+c);for(var d in a)d.toLowerCase()!=="table"&&b.setProperty(d,a[d]);var f=new Date;b.setProperty("Date",f.toISOString());this.ALogger.logEvent(b)}catch(g){}},b)};a.prototype.logData=function(a){if(this.isIUsageData(a))this.loadAriaScriptAndLog(a["Table"],a["Fields"]);else this.loadAriaScriptAndLog(a["Table"],a)};return a}();a.AriaLogger=b})(OSFAriaLogger||(OSFAriaLogger={}));var OSFAppTelemetry;(function(d){var b=null,e=true,c="";"use strict";var a,g=OSF.OUtil.Guid.generateNewGuid(),j=c,p=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");d.enableTelemetry=e;var z=function(){function a(){}return a}(),h=function(){function a(b,a){this.name=b;this.handler=a}return a}(),l=function(){function a(){this.clientIDKey="Office API client";this.logIdSetKey="Office App Log Id Set"}a.prototype.getClientId=function(){var b=this,a=b.getValue(b.clientIDKey);if(!a||a.length<=0||a.length>40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),i=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(a)}catch(b){}};a.prototype.LogRawData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function f(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function x(g){if(!OSF.Logger)return;if(a)return;a=new z;if(g.get_hostFullVersion())a.hostVersion=g.get_hostFullVersion();else a.hostVersion=g.get_appVersion();a.appId=g.get_id();a.host=g.get_appName();a.browser=window.navigator.userAgent;a.correlationId=f(g.get_correlationId());a.clientId=(new l).getClientId();a.appInstanceId=g.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,c).toLowerCase();a.message=g.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="16.0.8916.1000";if(g._wacHostEnvironment)a.wacHostEnvironment=g._wacHostEnvironment;if(g._isFromWacAutomation!==undefined&&g._isFromWacAutomation!==b)a.isFromWacAutomation=g._isFromWacAutomation.toString().toLowerCase();var j=g.get_docUrl();a.docUrl=p.test(j)?j:c;var i=location.href;if(i)i=i.split("?")[0].split("#")[0];a.appURL=i;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(g.get_eToken(),a);(function(){var l=new Date,c=b,i=0,k=false,f=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new h("focus",f));a.push(new h("blur",f));a.push(new h("focusout",f));a.push(new h("focusin",f));var j=function(){for(var f=0;f<a.length;f++)OSF.OUtil.removeEventListener(window,a[f].name,a[f].handler);a.length=0;if(!k){if(document.hasFocus()&&c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}d.onAppClosed(Math.abs((new Date).getTime()-l.getTime()),i);k=e}};a.push(new h("beforeunload",j));a.push(new h("unload",j));for(var g=0;g<a.length;g++)OSF.OUtil.addEventListener(window,a[g].name,a[g].handler);f()})();d.onAppActivated()}d.initialize=x;function q(){if(!a)return;(new l).enumerateLog(function(b,a){return (new i).LogRawData(a)},e);var c=new OSFLog.AppActivatedUsageData;c.SessionId=g;c.AppId=a.appId;c.AssetId=a.assetId;c.AppURL=a.appURL;c.UserId=a.userId;c.ClientId=a.clientId;c.Browser=a.browser;c.Host=a.host;c.HostVersion=a.hostVersion;c.CorrelationId=f(a.correlationId);c.AppSizeWidth=window.innerWidth;c.AppSizeHeight=window.innerHeight;c.AppInstanceId=a.appInstanceId;c.Message=a.message;c.DocUrl=a.docUrl;c.OfficeJSVersion=a.officeJSVersion;c.HostJSVersion=a.hostJSVersion;if(a.wacHostEnvironment)c.WacHostEnvironment=a.wacHostEnvironment;if(a.isFromWacAutomation!==undefined&&a.isFromWacAutomation!==b)c.IsFromWacAutomation=a.isFromWacAutomation;(new i).LogData(c);setTimeout(function(){if(!OSF.Logger)return;OSF.Logger.allowUploadingData()},100)}d.onAppActivated=q;function u(e,d,c,b){var a=new OSFLog.ScriptLoadUsageData;a.CorrelationId=f(b);a.SessionId=g;a.ScriptId=e;a.StartTime=d;a.ResponseTime=c;(new i).LogData(a)}d.onScriptDone=u;function y(h,k,d,c,e){if(!a)return;var b=new OSFLog.APIUsageUsageData;b.CorrelationId=f(j);b.SessionId=g;b.APIType=h;b.APIID=k;b.Parameters=d;b.ResponseTime=c;b.ErrorType=e;(new i).LogData(b)}d.onCallDone=y;function t(h,d,f,g){var a=b;if(d)if(typeof d=="number")a=String(d);else if(typeof d==="object")for(var e in d){if(a!==b)a+=",";else a=c;if(typeof d[e]=="number")a+=String(d[e])}else a=c;OSF.AppTelemetry.onCallDone("method",h,a,f,g)}d.onMethodDone=t;function r(b,a){OSF.AppTelemetry.onCallDone("property",-1,b,a)}d.onPropertyDone=r;function w(c,a){OSF.AppTelemetry.onCallDone("event",c,b,0,a)}d.onEventDone=w;function s(d,e,a,c){OSF.AppTelemetry.onCallDone(d?"registerevent":"unregisterevent",e,b,a,c)}d.onRegisterDone=s;function v(d,c){if(!a)return;var b=new OSFLog.AppClosedUsageData;b.CorrelationId=f(j);b.SessionId=g;b.FocusTime=c;b.OpenTime=d;b.AppSizeFinalWidth=window.innerWidth;b.AppSizeFinalHeight=window.innerHeight;(new l).saveLog(g,b.SerializeRow())}d.onAppClosed=v;function m(a){j=f(a)}d.setOsfControlAppCorrelationId=m;function k(b,c){var a=new OSFLog.AppInitializationUsageData;a.CorrelationId=f(j);a.SessionId=g;a.SuccessCode=b?1:0;a.Message=c;(new i).LogData(a)}d.doAppInitializationLogging=k;function n(a){k(false,a)}d.logAppCommonMessage=n;function o(a){k(e,a)}d.logAppException=o;OSF.AppTelemetry=d})(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.TableData=function(b,a){function c(a){if(a==null||a==undefined)return null;try{for(var b=OSF.DDA.DataCoercion.findArrayDimensionality(a,2);b<2;b++)a=[a];return a}catch(c){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return a},"set":function(b){a=c(b)}},rows:{"get":function(){return b},"set":function(a){b=a==null||OSF.OUtil.isArray(a)&&a.length==0?[]:c(a)}}});this.headers=a;this.rows=b};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var a=null;return {findArrayDimensionality:function(c){if(OSF.OUtil.isArray(c)){for(var b=0,a=0;a<c.length;a++)b=Math.max(b,OSF.DDA.DataCoercion.findArrayDimensionality(c[a]));return b+1}else return 0},getCoercionDefaultForBinding:function(a){switch(a){case Microsoft.Office.WebExtension.BindingType.Matrix:return Microsoft.Office.WebExtension.CoercionType.Matrix;case Microsoft.Office.WebExtension.BindingType.Table:return Microsoft.Office.WebExtension.CoercionType.Table;case Microsoft.Office.WebExtension.BindingType.Text:default:return Microsoft.Office.WebExtension.CoercionType.Text}},getBindingDefaultForCoercion:function(a){switch(a){case Microsoft.Office.WebExtension.CoercionType.Matrix:return Microsoft.Office.WebExtension.BindingType.Matrix;case Microsoft.Office.WebExtension.CoercionType.Table:return Microsoft.Office.WebExtension.BindingType.Table;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:return Microsoft.Office.WebExtension.BindingType.Text}},determineCoercionType:function(b){if(b==a||b==undefined)return a;var c=a,d=typeof b;if(b.rows!==undefined)c=Microsoft.Office.WebExtension.CoercionType.Table;else if(OSF.OUtil.isArray(b))c=Microsoft.Office.WebExtension.CoercionType.Matrix;else if(d=="string"||d=="number"||d=="boolean"||OSF.OUtil.isDate(b))c=Microsoft.Office.WebExtension.CoercionType.Text;else throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject;return c},coerceData:function(b,c,a){a=a||OSF.DDA.DataCoercion.determineCoercionType(b);if(a&&a!=c){OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin);b=OSF.DDA.DataCoercion._coerceDataFromTable(c,OSF.DDA.DataCoercion._coerceDataToTable(b,a));OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd)}return b},_matrixToText:function(a){if(a.length==1&&a[0].length==1)return ""+a[0][0];for(var b="",c=0;c<a.length;c++)b+=a[c].join("\t")+"\n";return b.substring(0,b.length-1)},_textToMatrix:function(c){for(var a=c.split("\n"),b=0;b<a.length;b++)a[b]=a[b].split("\t");return a},_tableToText:function(c){var b="";if(c.headers!=a)b=OSF.DDA.DataCoercion._matrixToText([c.headers])+"\n";var d=OSF.DDA.DataCoercion._matrixToText(c.rows);if(d=="")b=b.substring(0,b.length-1);return b+d},_tableToMatrix:function(b){var c=b.rows;b.headers!=a&&c.unshift(b.headers);return c},_coerceDataFromTable:function(d,c){var b;switch(d){case Microsoft.Office.WebExtension.CoercionType.Table:b=c;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:b=OSF.DDA.DataCoercion._tableToMatrix(c);break;case Microsoft.Office.WebExtension.CoercionType.SlideRange:b=a;if(OSF.DDA.OMFactory.manufactureSlideRange)b=OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(c));if(b==a)b=OSF.DDA.DataCoercion._tableToText(c);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:b=OSF.DDA.DataCoercion._tableToText(c)}return b},_coerceDataToTable:function(b,c){if(c==undefined)c=OSF.DDA.DataCoercion.determineCoercionType(b);var a;switch(c){case Microsoft.Office.WebExtension.CoercionType.Table:a=b;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:a=new Microsoft.Office.WebExtension.TableData(b);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:a=new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(b))}return a}}}();OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{SlideRange:"slideRange"});OSF.DDA.SlideProperties={Id:0,Title:1,Index:2};OSF.DDA.Slide=function(c,b,a){OSF.OUtil.defineEnumerableProperties(this,{id:{value:c},title:{value:b},index:{value:a}})};OSF.DDA.SlideRange=function(a){OSF.OUtil.defineEnumerableProperties(this,{slides:{value:a}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureSlideRange=function(h){var c=null,a=c;if(JSON)a=JSON.parse(h);else a=Sys.Serialization.JavaScriptSerializer.deserialize(h);if(a==c)return c;var e=0;for(var k in OSF.DDA.SlideProperties)if(OSF.DDA.SlideProperties.hasOwnProperty(k))e++;for(var f=[],d=true,b=0;b<a.length&&d;b++){d=false;if(a[b].length==e){var i=parseInt(a[b][OSF.DDA.SlideProperties.Id]),j=a[b][OSF.DDA.SlideProperties.Title],g=parseInt(a[b][OSF.DDA.SlideProperties.Index]);if(!isNaN(i)&&!isNaN(g)){d=true;f.push(new OSF.DDA.Slide(i,j,g))}}}if(!d)return c;return new OSF.DDA.SlideRange(f)};Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(b,a){this._id=b;OSF.OUtil.defineEnumerableProperty(this,"onFail",{"get":function(){return a},"set":function(c){var b=typeof c;if(b!="undefined"&&b!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,b);a=c}})};OSF.DDA.BindingPromise.prototype={_fetch:function(b){var a=this;if(a.binding)b&&b(a.binding);else if(!a._binding){var c=a;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(a._id,function(a){if(a.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded){OSF.OUtil.defineEnumerableProperty(c,"binding",{value:a.value});b&&b(c.binding)}else c.onFail&&c.onFail(a)})}return a},getDataAsync:function(){var a=arguments;this._fetch(function(b){b.getDataAsync.apply(b,a)});return this},setDataAsync:function(){var a=arguments;this._fetch(function(b){b.setDataAsync.apply(b,a)});return this},addHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.addHandlerAsync.apply(b,a)});return this},removeHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.removeHandlerAsync.apply(b,a)});return this}};OSF.DDA.BindingFacade=function(b){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:b});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddFromSelectionAsync,a.AddFromNamedItemAsync,a.GetAllAsync,a.GetByIdAsync,a.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{document:{value:a},id:{value:b}})};OSF.DDA.Binding=function(a,c){OSF.OUtil.defineEnumerableProperties(this,{document:{value:c},id:{value:a}});var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDataAsync,d.SetDataAsync]);var e=Microsoft.Office.WebExtension.EventType,b=c.bindings._eventDispatches;if(!b[a])b[a]=new OSF.EventDispatch([e.BindingSelectionChanged,e.BindingDataChanged]);var f=b[a];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return "UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(a,c){var d=a[OSF.DDA.BindingProperties.Id],g=a[OSF.DDA.BindingProperties.RowCount],f=a[OSF.DDA.BindingProperties.ColumnCount],h=a[OSF.DDA.BindingProperties.HasHeaders],b;switch(a[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:b=new OSF.DDA.TextBinding(d,c);break;case Microsoft.Office.WebExtension.BindingType.Matrix:b=new OSF.DDA.MatrixBinding(d,c,g,f);break;case Microsoft.Office.WebExtension.BindingType.Table:var i=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument},e;if(i()&&OSF.DDA.ExcelTableBinding)e=OSF.DDA.ExcelTableBinding;else e=OSF.DDA.TableBinding;b=new e(d,c,g,f,h);break;default:b=new OSF.DDA.UnknownBinding(d,c)}return b};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"});(function(){var d="number",c="object",b="string",a=null;function e(a){return OSF.DDA.OMFactory.manufactureBinding(a,Microsoft.Office.WebExtension.context.document)}function f(a){return a.id}function g(c,e,d){var b=c[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&b&&(b[OSF.DDA.TableDataProperties.TableRows]!=undefined||b[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))b=OSF.DDA.OMFactory.manufactureTableData(b);b=OSF.DDA.DataCoercion.coerceData(b,d[Microsoft.Office.WebExtension.Parameters.CoercionType]);return b==undefined?a:b}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return true}}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.BindingList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(d,b,a){var c=a[Microsoft.Office.WebExtension.Parameters.Id];delete b._eventDispatches[c]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(b,a){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(a.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[d],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&a[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&a[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn];delete a[Microsoft.Office.WebExtension.Parameters.RowCount];delete a[Microsoft.Office.WebExtension.Parameters.ColumnCount]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]||a[Microsoft.Office.WebExtension.Parameters.RowCount]||a[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:g});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b,c,d,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})})();OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(f,e,d,c,b){OSF.DDA.TableBinding.uber.constructor.call(this,f,e);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:d?d:0},columnCount:{value:c?c:0},hasHeaders:{value:b?b:false}});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddRowsAsync,a.AddColumnsAsync,a.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"});(function(){function a(a){return a.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]})})();OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.GetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:"ValueFormat"},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:"FilterType"},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:"ImageLeft"},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:"ImageTop"},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:"ImageWidth"},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:"ImageHeight"}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.BindingRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:"ItemName"},{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:"BindingType"},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:"PromptText"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:"SampleData"},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:"FailOnCollision"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:2},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:3},{name:Microsoft.Office.WebExtension.BindingType.Table,value:1}],invertible:true});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:"Name"},{name:OSF.DDA.BindingProperties.Type,value:"BindingType"},{name:OSF.DDA.BindingProperties.RowCount,value:"RowCount"},{name:OSF.DDA.BindingProperties.ColumnCount,value:"ColCount"},{name:OSF.DDA.BindingProperties.HasHeaders,value:"HasHeaders"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"});(function(){var c=false,b="boolean",a="number";function d(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:d});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",a,b]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[a,b],defaultValue:c}}],privateStateCallbacks:[]})})();OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(c){var b=this;b._eventHandlers={};b._objectEventHandlers={};b._queuedEventsArgs={};if(c!=null)for(var d=0;d<c.length;d++){var a=c[d],e=a=="objectDeleted"||a=="objectSelectionChanged"||a=="objectDataChanged"||a=="contentControlAdded";if(!e)b._eventHandlers[a]=[];else b._objectEventHandlers[a]={};b._queuedEventsArgs[a]=[]}};OSF.EventDispatch.prototype={getSupportedEvents:function(){var a=[];for(var b in this._eventHandlers)a.push(b);for(var b in this._objectEventHandlers)a.push(b);return a},supportsEvent:function(b){for(var a in this._eventHandlers)if(b==a)return true;for(var a in this._objectEventHandlers)if(b==a)return true;return false},hasEventHandler:function(c,d){var a=this._eventHandlers[c];if(a&&a.length>0)for(var b=0;b<a.length;b++)if(a[b]===d)return true;return false},hasObjectEventHandler:function(d,e,f){var c=this._objectEventHandlers[d];if(c!=null)for(var a=c[e],b=0;a!=null&&b<a.length;b++)if(a[b]===f)return true;return false},addEventHandler:function(b,a){if(typeof a!="function")return false;var c=this._eventHandlers[b];if(c&&!this.hasEventHandler(b,a)){c.push(a);return true}else return false},addObjectEventHandler:function(d,b,c){if(typeof c!="function")return false;var a=this._objectEventHandlers[d];if(a&&!this.hasObjectEventHandler(d,b,c)){if(a[b]==null)a[b]=[];a[b].push(c);return true}return false},addEventHandlerAndFireQueuedEvent:function(a,e){var d=this._eventHandlers[a],c=d.length==0,b=this.addEventHandler(a,e);c&&b&&this.fireQueuedEvent(a);return b},removeEventHandler:function(c,d){var a=this._eventHandlers[c];if(a&&a.length>0)for(var b=0;b<a.length;b++)if(a[b]===d){a.splice(b,1);return true}return false},removeObjectEventHandler:function(d,e,f){var c=this._objectEventHandlers[d];if(c!=null)for(var a=c[e],b=0;a!=null&&b<a.length;b++)if(a[b]===f){a.splice(b,1);return true}return false},clearEventHandlers:function(a){if(typeof this._eventHandlers[a]!="undefined"&&this._eventHandlers[a].length>0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){for(var d=this._eventHandlers[b],c=0;c<d.length;c++)d[c](a);return true}else return false},fireObjectEvent:function(f,a){if(a.type==undefined)return false;var b=a.type;if(b&&this._objectEventHandlers[b]){var e=this._objectEventHandlers[b],c=e[f];if(c!=null){for(var d=0;d<c.length;d++)c[d](a);return true}}return false},fireOrQueueEvent:function(c){var b=this,a=c.type;if(a&&b._eventHandlers[a]){var d=b._eventHandlers[a],e=b._queuedEventsArgs[a];if(d.length==0)e.push(c);else b.fireEvent(c);return true}else return false},fireQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._eventHandlers[a],c=this._queuedEventsArgs[a];if(b.length>0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(d,c,b){var h="hostPlatform",g="outlook",f="hostType",e=this,a;switch(d){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(e.manufactureBinding(b,c.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(e.manufactureBinding(b,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:a=new OSF.DDA.ObjectEventArgs(d,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:a=new OSF.DDA.RichApiMessageEventArgs(d,b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);c.initialize(a["initialData"]);(OSF._OfficeAppFactory.getHostInfo()[h]=="win32"||OSF._OfficeAppFactory.getHostInfo()[h]=="mac")&&c.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g)a=new OSF.DDA.OlkRecipientsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g)a=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{ActiveViewChangedEvent:"ActiveViewChangedEvent"});Microsoft.Office.WebExtension.ActiveView={Read:"read",Edit:"edit"};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ActiveViewChanged:"activeViewChanged"});OSF.DDA.AsyncMethodNames.addNames({GetActiveViewAsync:"getActiveViewAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetActiveViewAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(b){var a=b[Microsoft.Office.WebExtension.Parameters.ActiveView];return a==undefined?null:a}});OSF.DDA.ActiveViewChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ActiveViewChanged},activeView:{value:a.activeView}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetActiveViewMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ActiveView,value:Microsoft.Office.WebExtension.Parameters.Data}]});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.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.NavigationKeys={NavigationRequest:"DdaGoToByIdMethod",Id:"Id",GoToType:"GoToType",SelectionMode:"SelectionMode"};var OSF_DDA_Marshaling_GoToType;(function(a){var b="NamedItem";a[a["Binding"]=0]="Binding";a[a[b]=1]=b;a[a["Slide"]=2]="Slide";a[a["Index"]=3]="Index"})(OSF_DDA_Marshaling_GoToType||(OSF_DDA_Marshaling_GoToType={}));OSF.DDA.Marshaling.GoToType=OSF_DDA_Marshaling_GoToType;var OSF_DDA_Marshaling_SelectionMode;(function(a){var b="Selected";a[a["Default"]=0]="Default";a[a[b]=1]=b;a[a["None"]=2]="None"})(OSF_DDA_Marshaling_SelectionMode||(OSF_DDA_Marshaling_SelectionMode={}));OSF.DDA.Marshaling.SelectionMode=OSF_DDA_Marshaling_SelectionMode;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.Marshaling.NavigationKeys.NavigationRequest);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.NavigationKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:OSF.DDA.Marshaling.NavigationKeys.GoToType},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:OSF.DDA.Marshaling.NavigationKeys.SelectionMode}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:OSF.DDA.Marshaling.GoToType.Binding},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:OSF.DDA.Marshaling.GoToType.NamedItem},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:OSF.DDA.Marshaling.GoToType.Slide},{name:Microsoft.Office.WebExtension.GoToType.Index,value:OSF.DDA.Marshaling.GoToType.Index}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:OSF.DDA.Marshaling.SelectionMode.Default},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:OSF.DDA.Marshaling.SelectionMode.Selected},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:OSF.DDA.Marshaling.SelectionMode.None}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(e,c,b){OSF.OUtil.defineEnumerableProperties(this,{size:{value:c},sliceCount:{value:Math.ceil(c/b)}});var a={};a[OSF.DDA.FileProperties.Handle]=e;a[OSF.DDA.FileProperties.SliceSize]=b;var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDocumentCopyChunkAsync,d.ReleaseDocumentCopyAsync],a)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4*1024*1024}}],checkCallArgs:function(b){var a=b[Microsoft.Office.WebExtension.Parameters.SliceSize];if(a<=0||a>4*1024*1024)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return b},onSucceeded:function(a,c,b){return new OSF.DDA.File(a[OSF.DDA.FileProperties.Handle],a[OSF.DDA.FileProperties.FileSize],b[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(b,a){return a[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(a,d,c){var b=a[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(b<0||b>=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt((b*c[OSF.DDA.FileProperties.SliceSize]).toString());return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:a[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("File",OSF.DDA.Marshaling);var OSF_DDA_Marshaling_File_FilePropertiesKeys;(function(a){var b="FileSize";a[a["Handle"]=0]="Handle";a[a[b]=1]=b})(OSF_DDA_Marshaling_File_FilePropertiesKeys||(OSF_DDA_Marshaling_File_FilePropertiesKeys={}));OSF.DDA.Marshaling.File.FilePropertiesKeys=OSF_DDA_Marshaling_File_FilePropertiesKeys;var OSF_DDA_Marshaling_File_SlicePropertiesKeys;(function(a){var b="SliceSize";a[a["Data"]=0]="Data";a[a[b]=1]=b})(OSF_DDA_Marshaling_File_SlicePropertiesKeys||(OSF_DDA_Marshaling_File_SlicePropertiesKeys={}));OSF.DDA.Marshaling.File.SlicePropertiesKeys=OSF_DDA_Marshaling_File_SlicePropertiesKeys;var OSF_DDA_Marshaling_File_FileType;(function(a){var b="Compressed";a[a["Text"]=0]="Text";a[a[b]=1]=b;a[a["Pdf"]=2]="Pdf"})(OSF_DDA_Marshaling_File_FileType||(OSF_DDA_Marshaling_File_FileType={}));OSF.DDA.Marshaling.File.FileType=OSF_DDA_Marshaling_File_FileType;var OSF_DDA_Marshaling_File_ParameterKeys;(function(a){var d="SliceIndex",c="SliceSize",b="FileType";a[a[b]=0]=b;a[a[c]=1]=c;a[a["Handle"]=2]="Handle";a[a[d]=3]=d})(OSF_DDA_Marshaling_File_ParameterKeys||(OSF_DDA_Marshaling_File_ParameterKeys={}));OSF.DDA.Marshaling.File.ParameterKeys=OSF_DDA_Marshaling_File_ParameterKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle},{name:OSF.DDA.FileProperties.FileSize,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data},{name:OSF.DDA.FileProperties.SliceSize,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:OSF.DDA.Marshaling.File.FileType.Text},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:OSF.DDA.Marshaling.File.FileType.Compressed},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:OSF.DDA.Marshaling.File.FileType.Pdf}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:OSF.DDA.Marshaling.File.ParameterKeys.FileType},{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle},{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(a){OSF.OUtil.defineEnumerableProperties(this,{url:{value:a[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(a){return new Microsoft.Office.WebExtension.FileProperties(a)}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);var OSF_DDA_Marshaling_FilePropertiesKeys;(function(a){var b="Properties";a[a[b]=0]=b;a[a["Url"]=1]="Url"})(OSF_DDA_Marshaling_FilePropertiesKeys||(OSF_DDA_Marshaling_FilePropertiesKeys={}));OSF.DDA.Marshaling.FilePropertiesKeys=OSF_DDA_Marshaling_FilePropertiesKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:OSF.DDA.Marshaling.FilePropertiesKeys.Url}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.Marshaling.FilePropertiesKeys.Properties}]});OSF.DDA.AsyncMethodNames.addNames({GetOfficeThemeAsync:"getOfficeThemeAsync",GetDocumentThemeAsync:"getDocumentThemeAsync"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters,{DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DocumentThemeChangedEvent:"DocumentThemeChangedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent"});OSF.OUtil.setNamespace("Theming",OSF.DDA);OSF.DDA.Theming.OfficeThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor"};OSF.DDA.Theming.DocumentThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor",Accent1:"accent1",Accent2:"accent2",Accent3:"accent3",Accent4:"accent4",Accent5:"accent5",Accent6:"accent6",Hyperlink:"hyperlink",FollowedHyperlink:"followedHyperlink",HeaderLatinFont:"headerLatinFont",HeaderEastAsianFont:"headerEastAsianFont",HeaderScriptFont:"headerScriptFont",HeaderLocalizedFont:"headerLocalizedFont",BodyLatinFont:"bodyLatinFont",BodyEastAsianFont:"bodyEastAsianFont",BodyScriptFont:"bodyScriptFont",BodyLocalizedFont:"bodyLocalizedFont"};OSF.DDA.Theming.ConvertToDocumentTheme=function(f){var b=false,a=true;for(var d=[{name:"primaryFontColor",needToConvertToHex:a},{name:"primaryBackgroundColor",needToConvertToHex:a},{name:"secondaryFontColor",needToConvertToHex:a},{name:"secondaryBackgroundColor",needToConvertToHex:a},{name:"accent1",needToConvertToHex:a},{name:"accent2",needToConvertToHex:a},{name:"accent3",needToConvertToHex:a},{name:"accent4",needToConvertToHex:a},{name:"accent5",needToConvertToHex:a},{name:"accent6",needToConvertToHex:a},{name:"hyperlink",needToConvertToHex:a},{name:"followedHyperlink",needToConvertToHex:a},{name:"headerLatinFont",needToConvertToHex:b},{name:"headerEastAsianFont",needToConvertToHex:b},{name:"headerScriptFont",needToConvertToHex:b},{name:"headerLocalizedFont",needToConvertToHex:b},{name:"bodyLatinFont",needToConvertToHex:b},{name:"bodyEastAsianFont",needToConvertToHex:b},{name:"bodyScriptFont",needToConvertToHex:b},{name:"bodyLocalizedFont",needToConvertToHex:b}],e={},c=0;c<d.length;c++)if(d[c].needToConvertToHex)e[d[c].name]=OSF.OUtil.convertIntToCssHexColor(f[d[c].name]);else e[d[c].name]=f[d[c].name];return e};OSF.DDA.Theming.ConvertToOfficeTheme=function(a){var b={};for(var c in a)b[c]=OSF.OUtil.convertIntToCssHexColor(a[c]);return b};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:OSF.DDA.Theming.ConvertToDocumentTheme});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:OSF.DDA.Theming.ConvertToOfficeTheme});OSF.DDA.Theming.OfficeThemeChangedEventArgs=function(a){var b=OSF.DDA.Theming.ConvertToOfficeTheme(a);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.OfficeThemeChanged},officeTheme:{value:b}})};OSF.DDA.Theming.DocumentThemeChangedEventArgs=function(a){var b=OSF.DDA.Theming.ConvertToDocumentTheme(a);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentThemeChanged},documentTheme:{value:b}})};var OSF_DDA_Theming_InternalThemeHandler=function(){var h="secondaryBackgroundColor",g="secondaryFontColor",c="background-color",f="primaryBackgroundColor",b="color",e="primaryFontColor",a=null;function d(){var b=this;b._pseudoDocumentObject=a;b._previousDocumentThemeData=a;b._previousOfficeThemeData=a;b._officeCss=a;b._asyncCallsCompleted=a;b._onAsyncCallsCompleted=a}d.prototype.InitializeAndChangeOnce=function(c){var a=this;a._officeCss=a._getOfficeThemesCss();if(!a._officeCss){c&&c();return}a._onAsyncCallsCompleted=c;a._pseudoDocumentObject={};var b=a._pseudoDocumentObject;OSF.DDA.DispIdHost.addAsyncMethods(b,[OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync,OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync]);OSF.DDA.DispIdHost.addEventSupport(b,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.OfficeThemeChanged,Microsoft.Office.WebExtension.EventType.DocumentThemeChanged]));a._asyncCallsCompleted={};a._asyncCallsCompleted[OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync]=false;a._asyncCallsCompleted[OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync]=false;a._getAndProcessThemeData(b.getDocumentThemeAsync,Function.createDelegate(a,a._processDocumentThemeData),OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync);a._getAndProcessThemeData(b.getOfficeThemeAsync,Function.createDelegate(a,a._processOfficeThemeData),OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync)};d.prototype._getOfficeThemesCss=function(){function b(){for(var d="officethemes.css",c=0;c<document.styleSheets.length;c++){var b=document.styleSheets[c];if(!b.disabled&&b.href&&d==b.href.substring(b.href.length-d.length,b.href.length).toLowerCase())if(!b.cssRules&&!b.rules)return a;else return b}}try{return b()}catch(c){return a}};d.prototype._changeCss=function(a,f,e){for(var g=a.cssRules?a.cssRules.length:a.rules.length,b=0;b<g;b++){var d;if(a.cssRules)d=a.cssRules[b];else d=a.rules[b];var c=d.selectorText;if(c&&c.toLowerCase()==f.toLowerCase())if(a.cssRules){a.deleteRule(b);a.insertRule(c+e,b)}else{a.removeRule(b);a.addRule(c,e,b)}}};d.prototype._changeDocumentThemeData=function(u){var d="font-family",i="border-color",r="accent6",q="accent5",p="accent4",o="accent3",n="accent2",m="accent1",l=this;for(var k=[{name:e,cssSelector:".office-docTheme-primary-fontColor",cssProperty:b},{name:f,cssSelector:".office-docTheme-primary-bgColor",cssProperty:c},{name:g,cssSelector:".office-docTheme-secondary-fontColor",cssProperty:b},{name:h,cssSelector:".office-docTheme-secondary-bgColor",cssProperty:c},{name:m,cssSelector:".office-contentAccent1-color",cssProperty:b},{name:n,cssSelector:".office-contentAccent2-color",cssProperty:b},{name:o,cssSelector:".office-contentAccent3-color",cssProperty:b},{name:p,cssSelector:".office-contentAccent4-color",cssProperty:b},{name:q,cssSelector:".office-contentAccent5-color",cssProperty:b},{name:r,cssSelector:".office-contentAccent6-color",cssProperty:b},{name:m,cssSelector:".office-contentAccent1-bgColor",cssProperty:c},{name:n,cssSelector:".office-contentAccent2-bgColor",cssProperty:c},{name:o,cssSelector:".office-contentAccent3-bgColor",cssProperty:c},{name:p,cssSelector:".office-contentAccent4-bgColor",cssProperty:c},{name:q,cssSelector:".office-contentAccent5-bgColor",cssProperty:c},{name:r,cssSelector:".office-contentAccent6-bgColor",cssProperty:c},{name:m,cssSelector:".office-contentAccent1-borderColor",cssProperty:i},{name:n,cssSelector:".office-contentAccent2-borderColor",cssProperty:i},{name:o,cssSelector:".office-contentAccent3-borderColor",cssProperty:i},{name:p,cssSelector:".office-contentAccent4-borderColor",cssProperty:i},{name:q,cssSelector:".office-contentAccent5-borderColor",cssProperty:i},{name:r,cssSelector:".office-contentAccent6-borderColor",cssProperty:i},{name:"hyperlink",cssSelector:".office-a",cssProperty:b},{name:"followedHyperlink",cssSelector:".office-a:visited",cssProperty:b},{name:"headerLatinFont",cssSelector:".office-headerFont-latin",cssProperty:d},{name:"headerEastAsianFont",cssSelector:".office-headerFont-eastAsian",cssProperty:d},{name:"headerScriptFont",cssSelector:".office-headerFont-script",cssProperty:d},{name:"headerLocalizedFont",cssSelector:".office-headerFont-localized",cssProperty:d},{name:"bodyLatinFont",cssSelector:".office-bodyFont-latin",cssProperty:d},{name:"bodyEastAsianFont",cssSelector:".office-bodyFont-eastAsian",cssProperty:d},{name:"bodyScriptFont",cssSelector:".office-bodyFont-script",cssProperty:d},{name:"bodyLocalizedFont",cssSelector:".office-bodyFont-localized",cssProperty:d}],s=u.type=="documentThemeChanged"?u.documentTheme:u,j=0;j<k.length;j++)if(l._previousDocumentThemeData===a||l._previousDocumentThemeData[k[j].name]!=s[k[j].name])if(s[k[j].name]!=a&&s[k[j].name]!=""){var t=s[k[j].name];if(k[j].cssProperty===d)t='"'+t.replace(/"/g,'\\"')+'"';l._changeCss(l._officeCss,k[j].cssSelector,"{"+k[j].cssProperty+":"+t+";}")}else l._changeCss(l._officeCss,k[j].cssSelector,"{}");l._previousDocumentThemeData=s};d.prototype._changeOfficeThemeData=function(l){var j=this;for(var i=[{name:e,cssSelector:".office-officeTheme-primary-fontColor",cssProperty:b},{name:f,cssSelector:".office-officeTheme-primary-bgColor",cssProperty:c},{name:g,cssSelector:".office-officeTheme-secondary-fontColor",cssProperty:b},{name:h,cssSelector:".office-officeTheme-secondary-bgColor",cssProperty:c}],k=l.type=="officeThemeChanged"?l.officeTheme:l,d=0;d<i.length;d++)if(j._previousOfficeThemeData===a||j._previousOfficeThemeData[i[d].name]!=k[i[d].name])k[i[d].name]!==undefined&&j._changeCss(j._officeCss,i[d].cssSelector,"{"+i[d].cssProperty+":"+k[i[d].name]+";}");j._previousOfficeThemeData=k};d.prototype._getAndProcessThemeData=function(d,c,b){d(Function.createDelegate(this,function(e){var d=this;if(e.status=="succeeded"){var f=e.value;c(f)}if(d._areAllCallsCompleted(b)&&d._onAsyncCallsCompleted){d._onAsyncCallsCompleted();d._onAsyncCallsCompleted=a}}))};d.prototype._processOfficeThemeData=function(c){var b=this;b._changeOfficeThemeData(c);b._pseudoDocumentObject.addHandlerAsync(Microsoft.Office.WebExtension.EventType.OfficeThemeChanged,Function.createDelegate(b,b._changeOfficeThemeData),a)};d.prototype._processDocumentThemeData=function(c){var b=this;b._changeDocumentThemeData(c);b._pseudoDocumentObject.addHandlerAsync(Microsoft.Office.WebExtension.EventType.DocumentThemeChanged,Function.createDelegate(b,b._changeDocumentThemeData),a)};d.prototype._areAllCallsCompleted=function(b){var a;if(!(a=this._asyncCallsCompleted))return true;if(b&&a.hasOwnProperty(b))a[b]=true;for(var c in a){if(a.hasOwnProperty(c)&&a[c])continue;return false}return true};return d}();OSF.DDA.Theming.InternalThemeHandler=OSF_DDA_Theming_InternalThemeHandler;OSF.OUtil.setNamespace("Marshaling",OSF.DDA);var OSF_DDA_Marshaling_ThemingKeys;(function(a){var r="SecondaryBackground",q="SecondaryText",p="PrimaryBackground",o="PrimaryText",n="BackgroundColor",m="BdLocalized",l="BdScript",k="BdEastAsian",j="HdLocalized",i="HdScript",h="HdEastAsian",g="FollowedHyperlink",f="Hyperlink",e="Background2",d="Background1",c="OfficeTheme",b="DocumentTheme";a[a[b]=0]=b;a[a[c]=1]=c;a[a[d]=2]=d;a[a["Text1"]=3]="Text1";a[a[e]=4]=e;a[a["Text2"]=5]="Text2";a[a["Accent1"]=6]="Accent1";a[a["Accent2"]=7]="Accent2";a[a["Accent3"]=8]="Accent3";a[a["Accent4"]=9]="Accent4";a[a["Accent5"]=10]="Accent5";a[a["Accent6"]=11]="Accent6";a[a[f]=12]=f;a[a[g]=13]=g;a[a["HdLatin"]=14]="HdLatin";a[a[h]=15]=h;a[a[i]=16]=i;a[a[j]=17]=j;a[a["BdLatin"]=18]="BdLatin";a[a[k]=19]=k;a[a[l]=20]=l;a[a[m]=21]=m;a[a[n]=22]=n;a[a[o]=23]=o;a[a[p]=24]=p;a[a[q]=25]=q;a[a[r]=26]=r})(OSF_DDA_Marshaling_ThemingKeys||(OSF_DDA_Marshaling_ThemingKeys={}));OSF.DDA.Marshaling.ThemingKeys=OSF_DDA_Marshaling_ThemingKeys;var parameterMap=OSF.DDA.WAC.Delegate.ParameterMap,hostKeys=OSF.DDA.Marshaling.ThemingKeys;parameterMap.addComplexType(Microsoft.Office.WebExtension.Parameters.DocumentTheme);parameterMap.addComplexType(Microsoft.Office.WebExtension.Parameters.OfficeTheme);parameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentThemeMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.DocumentTheme,value:hostKeys.DocumentTheme}]});parameterMap.define({type:OSF.DDA.MethodDispId.dispidGetOfficeThemeMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.OfficeTheme,value:hostKeys.OfficeTheme}]});parameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentThemeChangedEvent,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.DocumentTheme,value:hostKeys.DocumentTheme}]});parameterMap.define({type:OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.OfficeTheme,value:hostKeys.OfficeTheme}]});var destKeys=OSF.DDA.Theming.DocumentThemeEnum;parameterMap.define({type:Microsoft.Office.WebExtension.Parameters.DocumentTheme,fromHost:[{name:destKeys.PrimaryBackgroundColor,value:hostKeys.Background1},{name:destKeys.PrimaryFontColor,value:hostKeys.Text1},{name:destKeys.SecondaryBackgroundColor,value:hostKeys.Background2},{name:destKeys.SecondaryFontColor,value:hostKeys.Text2},{name:destKeys.Accent1,value:hostKeys.Accent1},{name:destKeys.Accent2,value:hostKeys.Accent2},{name:destKeys.Accent3,value:hostKeys.Accent3},{name:destKeys.Accent4,value:hostKeys.Accent4},{name:destKeys.Accent5,value:hostKeys.Accent5},{name:destKeys.Accent6,value:hostKeys.Accent6},{name:destKeys.Hyperlink,value:hostKeys.Hyperlink},{name:destKeys.FollowedHyperlink,value:hostKeys.FollowedHyperlink},{name:destKeys.HeaderLatinFont,value:hostKeys.HdLatin},{name:destKeys.HeaderEastAsianFont,value:hostKeys.HdEastAsian},{name:destKeys.HeaderScriptFont,value:hostKeys.HdScript},{name:destKeys.HeaderLocalizedFont,value:hostKeys.HdLocalized},{name:destKeys.BodyLatinFont,value:hostKeys.BdLatin},{name:destKeys.BodyEastAsianFont,value:hostKeys.BdEastAsian},{name:destKeys.BodyScriptFont,value:hostKeys.BdScript},{name:destKeys.BodyLocalizedFont,value:hostKeys.BdLocalized}]});destKeys=OSF.DDA.Theming.OfficeThemeEnum;parameterMap.define({type:Microsoft.Office.WebExtension.Parameters.OfficeTheme,fromHost:[{name:destKeys.PrimaryFontColor,value:hostKeys.PrimaryText},{name:destKeys.PrimaryBackgroundColor,value:hostKeys.PrimaryBackground},{name:destKeys.SecondaryFontColor,value:hostKeys.SecondaryText},{name:destKeys.SecondaryBackgroundColor,value:hostKeys.SecondaryBackground}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(a){return OSF.OUtil.serializeSettings(a)},deserializeSettings:function(a){return OSF.OUtil.deserializeSettings(a)}};OSF.DDA.Settings=function(a){var b="name";a=a||{};var c=function(d){var b=OSF.OUtil.getSessionStorage();if(b){var a=OSF.DDA.SettingsManager.serializeSettings(d),c=JSON?JSON.stringify(a):Sys.Serialization.JavaScriptSerializer.serialize(a);b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),c)}};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;var c=a[e];return typeof c==="undefined"?null:c}},"set":{value:function(f,e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(d)throw d;a[f]=e;c(a)}},remove:{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;delete a[e];c(a)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],a)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(b,a){return a}}],onSucceeded:function(d,a,e){var f=d[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(f),g=e[OSF.DDA.SettingsManager.RefreshingSettings];for(var b in g)a.remove(b);for(var b in c)a.set(b,c[b]);return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});OSF.DDA.WAC.SettingsTranslator=function(){var b=0,a=1;return {read:function(f){var c={},d=f.Settings;for(var g in d){var e=d[g];c[e[b]]=e[a]}return c},write:function(d){var e=[];for(var f in d){var c=[];c[b]=f;c[a]=d[f];e.push(c)}return e}}}();OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings,{toHost:OSF.DDA.WAC.SettingsTranslator.write,fromHost:OSF.DDA.WAC.SettingsTranslator.read});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SettingsRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:"OverwriteIfStale"},{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}],invertible:true});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SettingsRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});var OfficeExt;(function(a){var b;(function(b){var e=function(){var g="object",f="string",d=null;function e(){var a=this,b=a;a._pseudoDocument=d;a._eventDispatch=d;a._processAppCommandInvocation=function(a){var c=b._verifyManifestCallback(a.callbackName);if(c.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){b._invokeAppCommandCompletedMethod(a.appCommandId,c.errorCode,"");return}var d=b._constructEventObjectForCallback(a);if(d)window.setTimeout(function(){c.callback(d)},0);else b._invokeAppCommandCompletedMethod(a.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}e.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:[f]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[f]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=a.AppCommand.AppCommandInvokedEventArgs};e.prototype.initializeAndChangeOnce=function(c){var a=this;b.registerDdaFacade();a._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(a._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);a._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);var d=function(a){if(c)if(a.status=="succeeded")c(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);else c(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};OSF.DDA.DispIdHost.addEventSupport(a._pseudoDocument,a._eventDispatch);a._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,a._processAppCommandInvocation,d)};e.prototype._verifyManifestCallback=function(h){var a="function",f={callback:d,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback};h=h.trim();try{for(var b=h.split("."),c=window,e=0;e<b.length-1;e++)if(c[b[e]]&&(typeof c[b[e]]==g||typeof c[b[e]]==a))c=c[b[e]];else return f;var i=c[b[b.length-1]];if(typeof i!=a)return f}catch(j){return f}return {callback:i,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}};e.prototype._invokeAppCommandCompletedMethod=function(a,b,c){this._pseudoDocument.appCommandInvocationCompletedAsync(a,b,c)};e.prototype._constructEventObjectForCallback=function(b){var f=this,a=new c;try{var e=JSON.parse(b.eventObjStr);this._translateEventObjectInternal(e,a);Object.defineProperty(a,"completed",{value:function(c){a.completedContext=c;var d=JSON.stringify(a);f._invokeAppCommandCompletedMethod(b.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,d)},enumerable:true})}catch(g){a=d}return a};e.prototype._translateEventObjectInternal=function(e,c){for(var a in e){if(!e.hasOwnProperty(a))continue;var b=e[a];if(typeof b==g&&b!=d){OSF.OUtil.defineEnumerableProperty(c,a,{value:{}});this._translateEventObjectInternal(b,c[a])}else Object.defineProperty(c,a,{value:b,enumerable:true,writable:true})}};e.prototype._constructObjectByTemplate=function(c,j){var b={};if(!c||!j)return b;for(var a in c)if(c.hasOwnProperty(a)){b[a]=d;if(j[a]!=d){var h=c[a],i=j[a],e=typeof i;if(typeof h==g&&h!=d)b[a]=this._constructObjectByTemplate(h,i);else if(e=="number"||e==f||e=="boolean")b[a]=i}}return b};e.instance=function(){if(e._instance==d)e._instance=new e;return e._instance};e._instance=d;return e}();b.AppCommandManager=e;var d=function(){function a(b,c,d){var a=this;a.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked;a.appCommandId=b;a.callbackName=c;a.eventObjStr=d}a.create=function(c){return new a(c[b.AppCommandInvokedEventEnums.AppCommandId],c[b.AppCommandInvokedEventEnums.CallbackName],c[b.AppCommandInvokedEventEnums.EventObjStr])};return a}();b.AppCommandInvokedEventArgs=d;var c=function(){function a(){}return a}();b.AppCommandCallbackEventArgs=c;b.AppCommandInvokedEventEnums={AppCommandId:"appCommandId",CallbackName:"callbackName",EventObjStr:"eventObjStr"}})(b=a.AppCommand||(a.AppCommand={}))})(OfficeExt||(OfficeExt={}));OfficeExt.AppCommand.AppCommandManager.initializeOsfDda();OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("AppCommand",OSF.DDA.Marshaling);var OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys;(function(a){var d="EventObjStr",c="CallbackName",b="AppCommandId";a[a[b]=0]=b;a[a[c]=1]=c;a[a[d]=2]=d})(OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys||(OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys={}));OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys=OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys;var OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys;(function(a){a[a["Id"]=0]="Id";a[a["Status"]=1]="Status";a[a["Data"]=2]="Data"})(OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys||(OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys={}));OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys=OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys;var OfficeExt;(function(a){var b;(function(c){function b(){if(OSF.DDA.WAC){var b=OSF.DDA.WAC.Delegate.ParameterMap;b.define({type:OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.Status,value:OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Status},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,value:OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Data}]});b.define({type:OSF.DDA.EventDispId.dispidAppCommandInvokedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,value:b.self}]});b.addComplexType(OSF.DDA.EventDescriptors.AppCommandInvokedEvent);b.define({type:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,fromHost:[{name:a.AppCommand.AppCommandInvokedEventEnums.AppCommandId,value:OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.AppCommandId},{name:a.AppCommand.AppCommandInvokedEventEnums.CallbackName,value:OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.CallbackName},{name:a.AppCommand.AppCommandInvokedEventEnums.EventObjStr,value:OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.EventObjStr}]})}}c.registerDdaFacade=b})(b=a.AppCommand||(a.AppCommand={}))})(OfficeExt||(OfficeExt={}));OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:a}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(a,b){OSF.OUtil.defineEnumerableProperties(this,{type:{value:a},object:{value:b}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DialogShownStatus={hasDialogShown:false,isWindowDialog:false};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var c=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),b=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];b(arguments,c,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(d){var b=OSF.DDA.SyncMethodNames.MessageParent.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return b(arguments,a)}});var c=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;!a[c]&&typeof OSF.DialogParentMessageEventDispatch!="undefined"&&OSF.DDA.DispIdHost.addEventSupport(a,OSF.DialogParentMessageEventDispatch,d);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(a){if(a[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}});else OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:a[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:true}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:false}}],privateStateCallbacks:[],onSucceeded:function(c){var g=c[Microsoft.Office.WebExtension.Parameters.Id],b=c[Microsoft.Office.WebExtension.Parameters.Data],a=new OSF.DialogHandler,d=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];c(arguments,g,b,a)}});var f=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(a,f,{value:function(){var d=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],c=d.verifyAndExtractCall(arguments,a,b),e=c[Microsoft.Office.WebExtension.Parameters.EventType],f=c[Microsoft.Office.WebExtension.Parameters.Handler];return b.addEventHandlerAndFireQueuedEvent(e,f)}});var e=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(a,e,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return c(arguments,b,a)}});return a},checkCallArgs:function(a){if(a[Microsoft.Office.WebExtension.Parameters.Width]<=0)a[Microsoft.Office.WebExtension.Parameters.Width]=1;if(!a[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&a[Microsoft.Office.WebExtension.Parameters.Width]>100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(!a[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"};var OfficeExt;(function(a){var b;(function(c){var a={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"};function d(c){switch(c){case a.Excel:case a.Word:case a.PowerPoint:case a.Outlook:return new b;default:return new b}return null}c.getDialogCssManager=d;var b=function(){var a=";";function b(){var f="height: 100px",b="font-size: 14px",a="font-family: Segoe UI,Arial,Verdana,sans-serif",e="margin: 20px 14px",d="width: 100%",c="position: absolute",g=this;g.overlayElementCSS=[c,"top: 0","left: 0",d,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];g.dialogNotificationPanelCSS=[d,"height: 190px",c,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];g.newWindowNotificationTextPanelCSS=[e,a,b,f,"line-height: 100px"];g.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];g.crossZoneNotificationTextPanelCSS=[e,a,b,f];g.dialogNotificationButtonPanelCSS="margin:0px 9px";g.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",b,a,"margin: 0px 5px","border-width: 1px","border-style: solid"]}b.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(a)};b.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(a)};b.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(a)};b.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(a)};b.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(a)};b.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS};b.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(a)};return b}();c.DefaultDialogCSSManager=b})(b=a.WacCommonUICssManager||(a.WacCommonUICssManager={}))})(OfficeExt||(OfficeExt={}));var OfficeExt;(function(a){var b;(function(b){var c;(function(k){var d="div",e="string",f="message",j="storage",g="keydown",c=false,b=null,i=b,r=b,m=b,h=b,L="osfDialogInternal:action=closeDialog",l=b,x=c,t=-1,K="messageParentKey",q=b,F="#ababab",D="#ffffff",O="#ccc",G="newWindowNotificaiton",U="crossZoneNotification",y="configureBrowserLink",u="dialogNotificationTextPanel",o=a.WACUtils.shouldUseLocalStorageToPassMessage(),n={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:b};function V(c){var a=c.input;if(a!=b)q={HostButtonBorderColor:a[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:a[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]};c.completed()}k.setHostThemeButtonStyle=V;function Q(a){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(c);a.completed()}k.removeEventListenersForDialog=Q;function W(k){try{if(OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification){M(k);return}x=c;var i=c,t=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,e=a.WacCommonUICssManager.getDialogCssManager(t.hostType),r=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);m=I(e);document.body.insertBefore(m,document.body.firstChild);h=T(e,r);h.id=G;var f=J(e),d=A(e,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),b=A(e,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);f.appendChild(d);f.appendChild(b);h.appendChild(f);document.body.insertBefore(h,document.body.firstChild);d.onclick=function(){M(k);!x&&p()};function j(){function a(a){s();H(a);l(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}n.onComplete=a;OSF.DDA.WAC.Delegate.unregisterEventAsync(n)}b.onclick=j;d.addEventListener(g,function(a){if(a.shiftKey&&a.keyCode==9){v(d);w(b);b.focus();a.preventDefault();a.stopPropagation()}},c);b.addEventListener(g,function(a){if(!a.shiftKey&&a.keyCode==9){v(b);w(d);d.focus();a.preventDefault();a.stopPropagation()}else if(a.keyCode==13){i=true;a.preventDefault();a.stopPropagation()}},c);b.addEventListener("keyup",function(a){if(a.keyCode==13&&i){i=c;j();a.preventDefault();a.stopPropagation()}},c);window.focus();function q(){d.focus()}n.onComplete=q;OSF.DDA.WAC.Delegate.registerEventAsync(n)}catch(o){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+o);l(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}k.handleNewWindowDialog=W;function Y(d){try{if(i!=b){var a=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;if(a)for(var c=0;c<a.length&&a[c].indexOf("://")!==-1;c++)i.postMessage(L,a[c]);i!=b&&!i.closed&&i.close();if(o)window.removeEventListener(j,z);else window.removeEventListener(f,B);window.clearInterval(t);i=b;d(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else d(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at close window dialog."+e);d(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}k.closeDialog=Y;function X(f){var c=f.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent];if(o)try{var e=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+K;window.localStorage.setItem(e,c)}catch(d){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during messageParent method:"+d)}else{var a=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;if(a)for(var b=0;b<a.length&&a[b].indexOf("://")!==-1;b++)window.opener.postMessage(c,a[b])}}k.messageParent=X;function Z(f){if(i!=b){var c=f.hostCallArgs,a=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;if(a)for(var d=0;d<a.length&&a[d].indexOf("://")!==-1;d++){if(typeof c!=e)c=JSON.stringify(c);i.postMessage(c,a[d])}}}k.sendMessage=Z;function S(){function a(c){if(c.source==window.opener)if(typeof c.data===e&&c.data.indexOf(L)>-1)window.close();else{var a=c.data,d=typeof a;if(a&&(d=="object"||d==e)){if(d==e)a=JSON.parse(a);var f=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,b,a);OSF.DialogParentMessageEventDispatch.fireEvent(f)}}}window.addEventListener(f,a)}k.registerMessageReceivedEvent=S;function P(a,b){r=a;l=b}k.setHandlerAndShowDialogCallback=P;function R(){try{h&&h.id==G&&l&&l(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+a)}p()}k.escDismissDialogNotification=R;function E(i,j){var e=c,d=a.WacCommonUICssManager.getDialogCssManager(j);m=I(d);document.body.insertBefore(m,document.body.firstChild);h=N(d,i);h.id=U;var f=J(d),b=A(d,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");f.appendChild(b);h.appendChild(f);document.body.insertBefore(h,document.body.firstChild);x=true;b.onclick=function(){p()};b.addEventListener(g,function(a){if(a.keyCode==9){document.getElementById(y).focus();a.preventDefault();a.stopPropagation()}else if(a.keyCode==13){e=true;a.preventDefault();a.stopPropagation()}},c);b.addEventListener("keyup",function(a){if(a.keyCode==13&&e){e=c;p();a.preventDefault();a.stopPropagation()}},c);document.getElementById(y).addEventListener(g,function(a){if(a.keyCode==9){b.focus();a.preventDefault();a.stopPropagation()}},c);window.focus();b.focus()}k.showCrossZoneNotification=E;function B(b){if(b.source==i)try{var a={};a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=b.data;r(a)}catch(c){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+c)}}function z(b){var d=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+K;if(b.key==d)try{var a={};a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=b.newValue;r(a)}catch(c){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+c)}}function M(g){var c=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,q=[c.hostType,c.hostPlatform,c.hostSpecificFileVersion,c.hostLocale,c.osfControlAppCorrelationId,"isDialog"],k=q.join("|"),e=OSF._OfficeAppFactory.getInitializationHelper()._appContext,d=g[OSF.ShowWindowDialogParameterKeys.Url];d=a.WACUtils.addHostInfoAsQueryParam(d,k);var h=JSON.parse(window.name);h[OSF.WindowNameItemKeys.HostInfo]=k;h[OSF.WindowNameItemKeys.AppContext]=e;var n=g[OSF.ShowWindowDialogParameterKeys.Width]*screen.width/100,m=g[OSF.ShowWindowDialogParameterKeys.Height]*screen.height/100,v=e._clientWindowWidth/2-n/2,w=e._clientWindowHeight/2-m/2,u="width="+n+", height="+m+", left="+v+", top="+w+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";i=window.open(d,a.WACUtils.serializeObjectToString(h),u);if(i==b){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");s();E(d,c.hostType);l(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}if(o)window.addEventListener(j,z);else window.addEventListener(f,B);function p(){try{if(i==b||i.closed){window.clearInterval(t);if(o)window.removeEventListener(j,z);else window.removeEventListener(f,B);var a={};a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;r(a)}}catch(c){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+c)}}t=window.setInterval(p,1e3);if(l!=b)l(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);else OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function A(d,e){var a=document.createElement("input");a.setAttribute("type","button");a.style.cssText=d.getDialogButtonCSS();a.style.borderColor=F;a.style.backgroundColor=D;a.setAttribute("value",e);var c=function(){w(a)},b=function(){v(a)};a.addEventListener("mouseover",c);a.addEventListener("focus",c);a.addEventListener("mouseout",b);a.addEventListener("focusout",b);return a}function w(a){if(q!=b){a.style.borderColor=q.HostButtonBorderColor;a.style.backgroundColor=q.HostButtonBackgroundColor}else if(OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor){a.style.borderColor=OSF.CommonUI.HostButtonBorderColor;a.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor}else a.style.backgroundColor=O}function v(a){a.style.borderColor=F;a.style.backgroundColor=D}function p(){function a(a){s();H(a)}n.onComplete=a;OSF.DDA.WAC.Delegate.unregisterEventAsync(n)}function s(){if(h!=b){document.body.removeChild(h);h=b}if(m!=b){document.body.removeChild(m);m=b}}function I(b){var a=document.createElement(d);a.style.cssText=b.getOverlayElementCSS();return a}function T(e,f){var b=document.createElement(d);b.style.cssText=e.getDialogNotificationPanelCSS();C(b);var a=document.createElement(d);a.style.cssText=e.getNewWindowNotificationTextPanelCSS();a.id=u;if(document.documentElement.getAttribute("dir")=="rtl")a.style.paddingRight="30px";else a.style.paddingLeft="30px";var c=document.createElement("span");c.style.cssText=e.getNewWindowNotificationTextSpanCSS();c.innerText=f;a.appendChild(c);b.appendChild(a);return b}function J(b){var a=document.createElement(d);a.style.cssText=b.getDialogNotificationButtonPanelCSS();if(document.documentElement.getAttribute("dir")=="rtl")a.style.cssFloat="left";else a.style.cssFloat="right";return a}function H(a){if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var b=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(b,c)}}function N(g,h){var e=document.createElement(d);e.style.cssText=g.getDialogNotificationPanelCSS();C(e);var c=document.createElement(d);c.style.cssText=g.getCrossZoneNotificationTextPanelCSS();c.id=u;var b=document.createElement("a");b.id=y;b.href="#";b.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink;b.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')");var f=document.createElement("span");if(Strings.OfficeOM.L_NewWindowCrossZone)f.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,b.outerHTML,a.WACUtils.getDomainForUrl(h));c.appendChild(f);e.appendChild(c);return e}function C(a){a.setAttribute("role","dialog");a.setAttribute("aria-describedby",u)}})(c=b.Dialog||(b.Dialog={}))})(b=a.AddinNativeAction||(a.AddinNativeAction={}))})(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(a){var e="https://",f="http://",c=JSON.parse(a.targetId),g=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true,a);function b(c){var b={Error:c};try{g(Microsoft.Office.Common.InvokeResultCode.noError,b)}catch(a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+a)}}if(OSF.DialogShownStatus.hasDialogShown){b(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}var d=c[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase();if(d==null||!(d.substr(0,e.length)===e)){if(d.substr(0,f.length)===f)b(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS);else b(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}if(!c[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]){OSF.DialogShownStatus.isWindowDialog=true;OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},b);OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(c)}else{OSF.DialogShownStatus.isWindowDialog=false;OSF.DDA.WAC.Delegate.registerEventAsync(a)}};OSF.DDA.WAC.Delegate.messageParent=function(a){if(window.opener!=null)OfficeExt.AddinNativeAction.Dialog.messageParent(a);else OSF.DDA.WAC.Delegate.executeAsync(a)};OSF.DDA.WAC.Delegate.sendMessage=function(a){if(OSF.DialogShownStatus.hasDialogShown)if(OSF.DialogShownStatus.isWindowDialog)OfficeExt.AddinNativeAction.Dialog.sendMessage(a);else OSF.DDA.WAC.Delegate.executeAsync(a)};OSF.DDA.WAC.Delegate.closeDialog=function(a){var c=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false,a);function b(d){var b={Error:d};try{c(Microsoft.Office.Common.InvokeResultCode.noError,b)}catch(a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+a)}}if(!OSF.DialogShownStatus.hasDialogShown)b(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed);else if(OSF.DialogShownStatus.isWindowDialog){a.onCalling&&a.onCalling();OfficeExt.AddinNativeAction.Dialog.closeDialog(b)}else OSF.DDA.WAC.Delegate.unregisterEventAsync(a)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};var OfficeExt;(function(a){var b;(function(b){var c;(function(d){var e=function(){function a(){}return a}();function b(g,i){var a="undefined",f=function(){return typeof Html2canvas!==a&&typeof Html2canvas.html2canvas!==a},c=function(){return typeof window.Promise!==a||typeof OfficeExtension!==a&&typeof OfficeExtension.Promise!==a};if(f()&&c()){g();return}var b=new ScriptLoading.LoadScriptHelper,d=b.getOfficeJsBasePath(),e={html2canvasJs:"Html2canvas.js",promiseJs:"es6-promise.js"},h=function(){if(f()&&c())g();else i()};if(!c())b.loadScript(d+e.promiseJs,null,function(){b.loadScript(d+e.html2canvasJs,null,h)});else b.loadScript(d+e.html2canvasJs,null,h)}function c(c){if(!a.WACUtils.isHostTrusted||!a.WACUtils.isHostTrusted())c.completed();else{var d=function(){c.completed()},f=function(b){var a="image/png";try{c.result=b.toDataURL(a).replace(a,"image/octet-stream")}catch(d){}c.completed()},e=function(){try{Html2canvas.html2canvas(document.body,{onrendered:f})}catch(a){d()}};b(e,d)}}d.generateLatestSnapshot=c})(c=b.Snapshot||(b.Snapshot={}))})(b=a.AddinNativeAction||(a.AddinNativeAction={}))})(OfficeExt||(OfficeExt={}));OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync:"getAccessTokenAsync"});OSF.DDA.Auth=function(){};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAccessTokenAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:{types:["string"],defaultValue:""}}],onSucceeded:function(a){var b=a[Microsoft.Office.WebExtension.Parameters.Data];return b}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("SingleSignOn",OSF.DDA.Marshaling);OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys={ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge"};OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys={AccessToken:"accessToken"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAccessTokenMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AuthChallenge}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys.AccessToken}]});var OSFPPTWAC;(function(b){var a=function(){function a(b,c){var a=this;OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.ActiveViewChanged,Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]));OSF.DDA.PowerPointDocument.uber.constructor.call(a,b,c);OSF.DDA.DispIdHost.addAsyncMethods(a,[OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,OSF.DDA.AsyncMethodNames.GoToByIdAsync,OSF.DDA.AsyncMethodNames.GetActiveViewAsync,OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]);OSF.OUtil.finalizeProperties(a)}return a}();b.PowerPointDocument=a})(OSFPPTWAC||(OSFPPTWAC={}));OSF.DDA.PowerPointDocument=OSFPPTWAC.PowerPointDocument;OSF.OUtil.extend(OSF.DDA.PowerPointDocument,OSF.DDA.Document);OSF.OUtil.redefineList(Microsoft.Office.WebExtension.GoToType,{Slide:"slide",Index:"index"});OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(a,b){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);a.doc=new OSF.DDA.PowerPointDocument(a,this._initializeSettings(a,true));b()};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(a){OSF.WebApp._UpdateLinksForHostAndXdmInfo();var e=new OSF.DDA.License(a.get_eToken());this.initWebDialog(a);this.initWebAuth(a);OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(a,a.doc,e));var b;OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap));b=function(b,d){if(b==0&&d!=true&&OSF.getClientEndPoint())OSF.getClientEndPoint().registerForEvent("activationCompleted",function(){var b=a.get_reason();Microsoft.Office.WebExtension.initialize(b)},null,{controlId:OSF._OfficeAppFactory.getId(),eventDispId:OSF.DDA.EventDispId.dispidActivationStatusChangedEvent,targetId:""});else{var c=a.get_reason();Microsoft.Office.WebExtension.initialize(c)}};if(OSF.getClientEndPoint())OSF.getClientEndPoint().invoke("getActivationCompletedStatus",b,this._webAppState.id);else if(a.get_isDialog()){var f=a.get_reason();Microsoft.Office.WebExtension.initialize(f);return}var d=new OSF.DDA.Theming.InternalThemeHandler;d.InitializeAndChangeOnce();var c=OfficeExt.AppCommand.AppCommandManager.instance();c.initializeAndChangeOnce()}