/* Outlook specific API library */
/* Version: 15.0.4927.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.
*/

/*!
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.
*/
Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");Microsoft.Office.WebExtension.MailboxEnums.EntityType={MeetingSuggestion:"meetingSuggestion",TaskSuggestion:"taskSuggestion",Address:"address",EmailAddress:"emailAddress",Url:"url",PhoneNumber:"phoneNumber",Contact:"contact",FlightReservations:"flightReservations",ParcelDeliveries:"parcelDeliveries"};Microsoft.Office.WebExtension.MailboxEnums.ItemType={Message:"message",Appointment:"appointment"};Microsoft.Office.WebExtension.MailboxEnums.ResponseType={None:"none",Organizer:"organizer",Tentative:"tentative",Accepted:"accepted",Declined:"declined"};Microsoft.Office.WebExtension.MailboxEnums.RecipientType={Other:"other",DistributionList:"distributionList",User:"user",ExternalUser:"externalUser"};Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={File:"file",Item:"item",Cloud:"cloud"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ProgressIndicator:"progressIndicator",InformationalMessage:"informationalMessage",ErrorMessage:"errorMessage"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={Office365:"office365",OutlookCom:"outlookCom",Enterprise:"enterprise"};Microsoft.Office.WebExtension.MailboxEnums.RestVersion={v1_0:"v1.0",v2_0:"v2.0",Beta:"beta"};Type.registerNamespace("OSF.DDA");var OSF=window.OSF||{};OSF.DDA=OSF.DDA||{};window.OSF.DDA.OutlookAppOm=OSF.DDA.OutlookAppOm=function(d,e,c){this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);this.$$d_displayContactCardAsync=Function.createDelegate(this,this.displayContactCardAsync);this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);this.$$d__getItem$p$0=Function.createDelegate(this,this._getItem$p$0);this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);window.OSF.DDA.OutlookAppOm._instance$p=this;this._officeAppContext$p$0=d;this._appReadyCallback$p$0=c;var a=this,b=function(){if(c)if(!d.get_isDialog())a.invokeHostMethod(1,null,a.$$d__getInitialDataResponseHandler$p$0);else window.setTimeout(a.$$d__callAppReadyCallback$p$0,0)};if(this._areStringsLoaded$p$0())b();else this._loadLocalizedScript$p$0(b)};window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i=function(a){if(!a)throw Error.create(window._u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i=function(a,d,c,b){if(a<d||a>c)throw Error.argumentOutOfRange(b);};window.OSF.DDA.OutlookAppOm._getHtmlBody$p=function(a){var b="";if("htmlBody"in a){window.OSF.DDA.OutlookAppOm._throwOnInvalidHtmlBody$p(a.htmlBody);b=a.htmlBody}return b};window.OSF.DDA.OutlookAppOm._getAttachments$p=function(b){var a=[];if("attachments"in b){a=b.attachments;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentsArray$p(a)}return a};window.OSF.DDA.OutlookAppOm._getOptionsAndCallback$p=function(b){var a=[];if("options"in b)a[0]=b.options;if("callback"in b)a[a.length]=b.callback;return a};window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p=function(b){var c=new Array(0);if(Array.isInstanceOfType(b))for(var a=0;a<b.length;a++)if(Object.isInstanceOfType(b[a])){var d=b[a];window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachment$p(d);c[a]=window.OSF.DDA.OutlookAppOm._createAttachmentData$p(d)}else throw Error.argument("attachments");return c};window.OSF.DDA.OutlookAppOm._throwOnInvalidHtmlBody$p=function(a){if(!String.isInstanceOfType(a))throw Error.argument("htmlBody");if($h.ScriptHelpers.isNullOrUndefined(a))throw Error.argument("htmlBody");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(a.length,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"htmlBody")};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentsArray$p=function(a){if(!Array.isInstanceOfType(a))throw Error.argument("attachments");};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachment$p=function(a){if(!Object.isInstanceOfType(a))throw Error.argument("attachments");if(!("type"in a)||!("name"in a))throw Error.argument("attachments");if(!("url"in a||"itemId"in a))throw Error.argument("attachments");};window.OSF.DDA.OutlookAppOm._createAttachmentData$p=function(a){var c=null;if(a.type==="file"){var e=a.url,b=a.name;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentUrlOrName$p(e,b);c=window.OSF.DDA.OutlookAppOm._createFileAttachmentData$p(e,b)}else if(a.type==="item"){var d=window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost(a.itemId),b=a.name;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentItemIdOrName$p(d,b);c=window.OSF.DDA.OutlookAppOm._createItemAttachmentData$p(d,b)}else throw Error.argument("attachments");return c};window.OSF.DDA.OutlookAppOm._createFileAttachmentData$p=function(b,a){return["file",a,b]};window.OSF.DDA.OutlookAppOm._createItemAttachmentData$p=function(a,b){return["item",b,a]};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentUrlOrName$p=function(a,b){if(!String.isInstanceOfType(a)||!String.isInstanceOfType(b))throw Error.argument("attachments");if(a.length>2048)throw Error.argumentOutOfRange("attachments",a.length,window._u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(b)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentItemIdOrName$p=function(a,b){if(!String.isInstanceOfType(a)||!String.isInstanceOfType(b))throw Error.argument("attachments");if(a.length>200)throw Error.argumentOutOfRange("attachments",a.length,window._u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(b)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p=function(a){if(a.length>255)throw Error.argumentOutOfRange("attachments",a.length,window._u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p=function(a){if(!a)throw Error.argumentNull("restVersion");if(a!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0&&a!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v2_0&&a!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.Beta)throw Error.argument("restVersion");};window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost=function(a){return window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0&&window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0.get__isRestIdSupported$i$0()?window.OSF.DDA.OutlookAppOm._instance$p.convertToRestId(a,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0):window.OSF.DDA.OutlookAppOm._instance$p.convertToEwsId(a,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0)};window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p=function(c,b,a){if(Object.getType(c)!==b)throw Error.argumentType(a);};window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p=function(a,e,d,b){if($h.ScriptHelpers.isNullOrUndefined(a))return;window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(a,String,b);var c=a;window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(c.length,e,d,b)};window.OSF.DDA.OutlookAppOm._convertToOutlookParameters$p=function(d,a){var b=null;switch(d){case 1:case 2:case 12:case 3:case 14:case 18:case 26:case 32:case 41:case 34:break;case 4:var c=window.JSON.stringify(a.customProperties);b=[c];break;case 5:b=[a.body];break;case 8:case 9:b=[a.itemId];break;case 7:b=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.requiredAttendees),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.optionalAttendees),a.start,a.end,a.location,window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.resources),a.subject,a.body];break;case 44:b=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.toRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.ccRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.bccRecipients),a.subject,a.htmlBody,a.attachments];break;case 43:b=[a.ewsIdOrEmail];break;case 40:b=[a.extensionId,a.consentState];break;case 11:case 10:b=[a.htmlBody];break;case 31:case 30:b=[a.htmlBody,a.attachments];break;case 23:case 13:case 38:case 29:b=[a.data,a.coercionType];break;case 37:case 28:b=[a.coercionType];break;case 17:b=[a.subject];break;case 15:b=[a.recipientField];break;case 22:case 21:b=[a.recipientField,window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p(a.recipientArray)];break;case 19:b=[a.itemId,a.name];break;case 16:b=[a.uri,a.name];break;case 20:b=[a.attachmentIndex];break;case 25:b=[a.TimeProperty,a.time];break;case 24:b=[a.TimeProperty];break;case 27:b=[a.location];break;case 33:case 35:b=[a.key,a.type,a.persistent,a.message,a.icon];break;case 36:b=[a.key];break;default:Sys.Debug.fail("Unexpected method dispid")}return b};window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(a){return a?a.join(";"):null};window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p=function(a){if(!a)return null;for(var c=new Array(a.length),b=0;b<a.length;b++)c[b]=[a[b].address,a[b].name];return c};window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p=function(f,d){if($h.ScriptHelpers.isNullOrUndefined(f))return null;window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(f,Array,d);var b=f,c=null,e=false;window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(b.length,0,window.OSF.DDA.OutlookAppOm._maxRecipients$p,String.format("{0}.length",d));for(var a=0;a<b.length;a++)if($h.EmailAddressDetails.isInstanceOfType(b[a])){e=true;break}if(e)c=[];for(var a=0;a<b.length;a++)if(e){c[a]=$h.EmailAddressDetails.isInstanceOfType(b[a])?b[a].emailAddress:b[a];window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(c[a],String,String.format("{0}[{1}]",d,a))}else window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(b[a],String,String.format("{0}[{1}]",d,a));return c};OSF.DDA.OutlookAppOm.prototype={_initialData$p$0:null,_item$p$0:null,_userProfile$p$0:null,_diagnostics$p$0:null,_officeAppContext$p$0:null,_appReadyCallback$p$0:null,_clientEndPoint$p$0:null,get_clientEndPoint:function(){if(!this._clientEndPoint$p$0)this._clientEndPoint$p$0=window.OSF._OfficeAppFactory.getClientEndPoint();return this._clientEndPoint$p$0},set_clientEndPoint:function(a){this._clientEndPoint$p$0=a;return a},get_initialData:function(){return this._initialData$p$0},get__appName$i$0:function(){return this._officeAppContext$p$0.get_appName()},initialize:function(a){var b="itemType";this._initialData$p$0=new $h.InitialData(a);if(1===a[b])this._item$p$0=new $h.Message(this._initialData$p$0);else if(3===a[b])this._item$p$0=new $h.MeetingRequest(this._initialData$p$0);else if(2===a[b])this._item$p$0=new $h.Appointment(this._initialData$p$0);else if(4===a[b])this._item$p$0=new $h.MessageCompose(this._initialData$p$0);else if(5===a[b])this._item$p$0=new $h.AppointmentCompose(this._initialData$p$0);else Sys.Debug.trace("Unexpected item type was received from the host.");this._userProfile$p$0=new $h.UserProfile(this._initialData$p$0);this._diagnostics$p$0=new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0.get_appName());this._initializeMethods$p$0();$h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d__getItem$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);if(window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64)if(this._initialData$p$0.get__overrideWindowOpen$i$0())window.open=this.$$d_windowOpenOverrideHandler},windowOpenOverrideHandler:function(a){this.invokeHostMethod(403,{launchUrl:a},null)},makeEwsRequestAsync:function(c){for(var e=[],b=1;b<arguments.length;++b)e[b-1]=arguments[b];if($h.ScriptHelpers.isNullOrUndefined(c))throw Error.argumentNull("data");if(c.length>window.OSF.DDA.OutlookAppOm._maxEwsRequestSize$p)throw Error.argument("data",window._u.ExtensibilityStrings.l_EwsRequestOversized_Text);this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");var d=$h.CommonParameters.parse(e,true,true),a=new $h.EwsRequest(d._asyncContext$p$0),f=this;a.onreadystatechange=function(){4===a.get__requestState$i$1()&&d._callback$p$0(a._asyncResult$p$0)};a.send(c)},recordDataPoint:function(a){if($h.ScriptHelpers.isNullOrUndefined(a))throw Error.argumentNull("data");this.invokeHostMethod(402,a,null)},recordTrace:function(a){if($h.ScriptHelpers.isNullOrUndefined(a))throw Error.argumentNull("data");this.invokeHostMethod(401,a,null)},trackCtq:function(a){if($h.ScriptHelpers.isNullOrUndefined(a))throw Error.argumentNull("data");this.invokeHostMethod(400,a,null)},convertToLocalClientTime:function(d){var a=new Date(d.getTime()),b=a.getTimezoneOffset()*-1;if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){a.setUTCMinutes(a.getUTCMinutes()-b);b=this._findOffset$p$0(a);a.setUTCMinutes(a.getUTCMinutes()+b)}var c=this._dateToDictionary$i$0(a);c.timezoneOffset=b;return c},convertToUtcClientTime:function(c){var a=this._dictionaryToDate$i$0(c);if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){var b=this._findOffset$p$0(a);a.setUTCMinutes(a.getUTCMinutes()-b);b=!c.timezoneOffset?a.getTimezoneOffset()*-1:c.timezoneOffset;a.setUTCMinutes(a.getUTCMinutes()+b)}return a},convertToRestId:function(a,b){if(!a)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(b);return a.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_")},convertToEwsId:function(a,b){if(!a)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(b);return a.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+")},getUserIdentityTokenAsync:function(){for(var c=[],a=0;a<arguments.length;++a)c[a]=arguments[a];this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync");var b=$h.CommonParameters.parse(c,true,true);this._invokeGetTokenMethodAsync$p$0(2,"GetUserIdentityToken",b._callback$p$0,b._asyncContext$p$0)},getCallbackTokenAsync:function(){for(var c=[],a=0;a<arguments.length;++a)c[a]=arguments[a];this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync");var b=$h.CommonParameters.parse(c,true,true);this._invokeGetTokenMethodAsync$p$0(12,"GetCallbackToken",b._callback$p$0,b._asyncContext$p$0)},displayMessageForm:function(a){if($h.ScriptHelpers.isNullOrUndefined(a))throw Error.argumentNull("itemId");this.invokeHostMethod(8,{itemId:window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost(a)},null)},displayAppointmentForm:function(a){if($h.ScriptHelpers.isNullOrUndefined(a))throw Error.argumentNull("itemId");this.invokeHostMethod(9,{itemId:window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost(a)},null)},RegisterConsentAsync:function(a){if(a!==2&&a!==1&&a)throw Error.argumentOutOfRange("consentState");var b={};b.consentState=a.toString();b.extensionId=this.GetExtensionId();this.invokeHostMethod(40,b,null)},CloseApp:function(){this.invokeHostMethod(42,null,null)},GetIsRead:function(){return this._initialData$p$0.get__isRead$i$0()},GetEndNodeUrl:function(){return this._initialData$p$0.get__endNodeUrl$i$0()},GetConsentMetadata:function(){return this._initialData$p$0.get__consentMetadata$i$0()},GetEntryPointUrl:function(){return this._initialData$p$0.get__entryPointUrl$i$0()},GetMarketplaceContentMarket:function(){return this._initialData$p$0.get__marketplaceContentMarket$i$0()},GetMarketplaceAssetId:function(){return this._initialData$p$0.get__marketplaceAssetId$i$0()},GetExtensionId:function(){return this._initialData$p$0.get__extensionId$i$0()},createAsyncResult:function(h,g,c,f,e){var b={},a=null;b[window.OSF.DDA.AsyncResultEnum.Properties.Value]=h;b[window.OSF.DDA.AsyncResultEnum.Properties.Context]=f;if(0!==g){a={};var d=$h.OutlookErrorManager.getErrorArgs(c);a[window.OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=d.name;a[window.OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=!e?d.message:e;a[window.OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=c}return new window.OSF.DDA.AsyncResult(b,a)},_throwOnMethodCallForInsufficientPermission$i$0:function(a,b){if(this._initialData$p$0._permissionLevel$p$0<a)throw Error.create(String.format(window._u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text,b));},_displayReplyForm$i$0:function(a){this._displayReplyFormHelper$p$0(a,false)},_displayReplyAllForm$i$0:function(a){this._displayReplyFormHelper$p$0(a,true)},_displayReplyFormHelper$p$0:function(a,b){if(String.isInstanceOfType(a))this._doDisplayReplyForm$p$0(a,b);else if(Object.isInstanceOfType(a)&&Object.getTypeName(a)==="Object")this._doDisplayReplyFormWithAttachments$p$0(a,b);else throw Error.argumentType();},_doDisplayReplyForm$p$0:function(a,b){!$h.ScriptHelpers.isNullOrUndefined(a)&&window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(a.length,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"htmlBody");this.invokeHostMethod(b?11:10,{htmlBody:a},null)},_doDisplayReplyFormWithAttachments$p$0:function(a,d){var e=window.OSF.DDA.OutlookAppOm._getHtmlBody$p(a),c=window.OSF.DDA.OutlookAppOm._getAttachments$p(a),b=$h.CommonParameters.parse(window.OSF.DDA.OutlookAppOm._getOptionsAndCallback$p(a),false),f=this;this._standardInvokeHostMethod$i$0(d?31:30,{htmlBody:e,attachments:window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p(c)},function(a){return a},b._asyncContext$p$0,b._callback$p$0)},_standardInvokeHostMethod$i$0:function(e,f,d,a,c){var b=this;this.invokeHostMethod(e,f,function(i,g){if(c){var f=null;if(Object.isInstanceOfType(g)){var e=g;if("error"in e||"data"in e||"errorCode"in e)if(!e.error){var h=d?d(e.data):e.data;f=b.createAsyncResult(h,0,0,a,null)}else{var j=e.errorCode;f=b.createAsyncResult(null,1,j,a,null)}}if(!f&&i)f=b.createAsyncResult(null,1,9002,a,null);c(f)}})},invokeHostMethod:function(b,d,a){if(64===this._officeAppContext$p$0.get_appName()){var c={ApiParams:d};c.MethodData={ControlId:window.OSF._OfficeAppFactory.getId(),DispatchId:b};if(b===1)this.get_clientEndPoint().invoke("GetInitialData",a,c);else this.get_clientEndPoint().invoke("ExecuteMethod",a,c)}else if(!this._isOwaOnlyMethod$p$0(b)){var e=window.OSF.DDA.OutlookAppOm._convertToOutlookParameters$p(b,d),f=this;window.OSF.ClientHostController.execute(b,e,function(g,f){if(a){var c=g.toArray(),d=window.JSON.parse(c[0]);if(Object.isInstanceOfType(d)){var b=d;if(c.length>1&&c[1]){b.error=true;b.errorCode=c[1]}else b.error=false;a(f,b)}else if(Number.isInstanceOfType(d)){var e={};e.error=true;e.errorCode=d;a(f,e)}else throw Error.notImplemented("Return data type from host must be Dictionary or int");}})}else a&&a(-2,null)},_dictionaryToDate$i$0:function(a){var b=new Date(a.year,a.month,a.date,a.hours,a.minutes,a.seconds,!a.milliseconds?0:a.milliseconds);if(window.isNaN(b.getTime()))throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);return b},_dateToDictionary$i$0:function(b){var a={};a.month=b.getMonth();a.date=b.getDate();a.year=b.getFullYear();a.hours=b.getHours();a.minutes=b.getMinutes();a.seconds=b.getSeconds();a.milliseconds=b.getMilliseconds();return a},_isOwaOnlyMethod$p$0:function(a){switch(a){case 402:case 401:case 400:case 403:return true;default:return false}},_displayNewAppointmentFormApi$p$0:function(a){var d=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(a.requiredAttendees,"requiredAttendees"),c=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(a.optionalAttendees,"optionalAttendees");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(a.location,0,window.OSF.DDA.OutlookAppOm._maxLocationLength$p,"location");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(a.body,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"body");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(a.subject,0,window.OSF.DDA.OutlookAppOm._maxSubjectLength$p,"subject");if(!$h.ScriptHelpers.isNullOrUndefined(a.start)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(a.start,Date,"start");var f=a.start;a.start=f.getTime();if(!$h.ScriptHelpers.isNullOrUndefined(a.end)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(a.end,Date,"end");var e=a.end;if(e<f)throw Error.argumentOutOfRange("end",e,window._u.ExtensibilityStrings.l_InvalidEventDates_Text);a.end=e.getTime()}}var b=null;if(d||c){b={};var g=a;for(var h in g){var i={key:h,value:g[h]};b[i.key]=i.value}if(d)b.requiredAttendees=d;if(c)b.optionalAttendees=c}this.invokeHostMethod(7,b||a,null)},displayNewMessageFormApi:function(a){var b={};if(a){var e=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(a.toRecipients,"toRecipients"),d=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(a.ccRecipients,"ccRecipients"),c=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(a.bccRecipients,"bccRecipients");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(a.htmlBody,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"htmlBody");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(a.subject,0,window.OSF.DDA.OutlookAppOm._maxSubjectLength$p,"subject");var f=window.OSF.DDA.OutlookAppOm._getAttachments$p(a),g=a;for(var h in g){var i={key:h,value:g[h]};b[i.key]=i.value}if(e)b.toRecipients=e;if(d)b.ccRecipients=d;if(c)b.bccRecipients=c;if(f)b.attachments=window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p(f)}this.invokeHostMethod(44,b||a,null)},displayContactCardAsync:function(d,e){if($h.ScriptHelpers.isNullOrUndefined(d))throw Error.argumentNull("ewsIdOrEmail");var c=null,a=null;if(e){var b=$h.CommonParameters.parse([e],false);c=b._asyncContext$p$0;a=b._callback$p$0}this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail:d.trim()},null,c,a)},_initializeMethods$p$0:function(){var a=this;if($h.Item.isInstanceOfType(this._item$p$0)){a.displayNewAppointmentForm=this.$$d__displayNewAppointmentFormApi$p$0;a.displayNewMessageForm=this.$$d_displayNewMessageFormApi;a.displayContactCardAsync=this.$$d_displayContactCardAsync}},_getInitialDataResponseHandler$p$0:function(a,b){if(a)return;this.initialize(b);this.displayName="mailbox";window.setTimeout(this.$$d__callAppReadyCallback$p$0,0)},_callAppReadyCallback$p$0:function(){this._appReadyCallback$p$0()},_invokeGetTokenMethodAsync$p$0:function(d,e,c,a){if($h.ScriptHelpers.isNullOrUndefined(c))throw Error.argumentNull("callback");var b=this;this.invokeHostMethod(d,null,function(f,g){var e;if(f)e=b.createAsyncResult(null,1,9017,a,String.format(window._u.ExtensibilityStrings.l_InternalProtocolError_Text,f));else{var d=g;if(d.wasSuccessful)e=b.createAsyncResult(d.token,0,0,a,null);else e=b.createAsyncResult(null,1,d.errorCode,a,d.errorMessage)}c(e)})},_getItem$p$0:function(){return this._item$p$0},_getUserProfile$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0);return this._userProfile$p$0},_getDiagnostics$p$0:function(){return this._diagnostics$p$0},_getEwsUrl$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0);return this._initialData$p$0.get__ewsUrl$i$0()},_findOffset$p$0:function(d){for(var c=this._initialData$p$0.get__timeZoneOffsets$i$0(),b=0;b<c.length;b++){var a=c[b],e=window.parseInt(a.start),f=window.parseInt(a.end);if(d.getTime()-e>=0&&d.getTime()-f<0)return window.parseInt(a.offset)}throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);},_areStringsLoaded$p$0:function(){var a=false;try{a=!$h.ScriptHelpers.isNullOrUndefined(window._u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(b){}return a},_loadLocalizedScript$p$0:function(i){for(var g=null,l="",m=document.getElementsByTagName("script"),h=m.length-1;h>=0;h--){var b=null,j=m[h].attributes;if(j){var k=j.getNamedItem("src");if(k)b=k.value;if(b){var o=false;b=b.toLowerCase();var e=b.indexOf("office_strings.js");if(e<0){e=b.indexOf("office_strings.debug.js");o=true}if(e>0&&e<b.length){g=b.replace(o?"office_strings.debug.js":"office_strings.js","outlook_strings.js");var c=b.substring(0,e),d=c.lastIndexOf("/",c.length-2);if(d===-1)d=c.lastIndexOf("\\",c.length-2);if(d!==-1&&c.length>d+1)l=c.substring(0,d+1);break}}}}if(g){var p=document.getElementsByTagName("head")[0],a=null,r=this,f=function(){if(i&&(!a.readyState||a.readyState&&(a.readyState==="loaded"||a.readyState==="complete"))){a.onload=null;a.onreadystatechange=null;i()}},n=this,q=function(){if(!n._areStringsLoaded$p$0()){var b=l+"en-us/outlook_strings.js";a.onload=null;a.onreadystatechange=null;a=n._createScriptElement$p$0(b);a.onload=f;a.onreadystatechange=f;p.appendChild(a)}};a=this._createScriptElement$p$0(g);a.onload=f;a.onreadystatechange=f;window.setTimeout(q,2e3);p.appendChild(a)}},_createScriptElement$p$0:function(b){var a=document.createElement("script");a.type="text/javascript";a.src=b;return a}};window.OSF.DDA.Settings=OSF.DDA.Settings=function(a){this._rawData$p$0=a};window.OSF.DDA.Settings._convertFromRawSettings$p=function(a){if(!a)return{};if(window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===8){var b=a.SettingsKey;if(b)return window.OSF.DDA.SettingsManager.deserializeSettings(b)}return a};OSF.DDA.Settings.prototype={_rawData$p$0:null,_settingsData$p$0:null,get__data$p$0:function(){if(!this._settingsData$p$0){this._settingsData$p$0=window.OSF.DDA.Settings._convertFromRawSettings$p(this._rawData$p$0);this._rawData$p$0=null}return this._settingsData$p$0},"get":function(a){return this.get__data$p$0()[a]},"set":function(b,a){this.get__data$p$0()[b]=a},remove:function(a){delete this.get__data$p$0()[a]},saveAsync:function(){for(var c=[],b=0;b<arguments.length;++b)c[b]=arguments[b];var a=$h.CommonParameters.parse(c,false);if(window.JSON.stringify(window.OSF.DDA.SettingsManager.serializeSettings(this.get__data$p$0())).length>32768){var d=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,a._asyncContext$p$0,""),e=this;window.setTimeout(function(){a._callback$p$0(d)},0);return}if(window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64)this._saveSettingsForOwa$p$0(a._callback$p$0,a._asyncContext$p$0);else this._saveSettingsForOutlook$p$0(a._callback$p$0,a._asyncContext$p$0)},_saveSettingsForOutlook$p$0:function(d,c){var a=null;try{var f=window.OSF.DDA.SettingsManager.serializeSettings(this.get__data$p$0()),g=window.JSON.stringify(f),e={SettingsKey:g};window.OSF.DDA.RichClientSettingsManager.write(e)}catch(h){a=h}if(d){var b;if(a)b=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,c,a.message);else b=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,0,0,c,null);d(b)}},_saveSettingsForOwa$p$0:function(b,a){var c=window.OSF.DDA.SettingsManager.serializeSettings(this.get__data$p$0()),d=this;window.OSF.DDA.OutlookAppOm._instance$p.invokeHostMethod(404,[c],function(e,f){if(b){var c;if(e)c=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9017,a,String.format(window._u.ExtensibilityStrings.l_InternalProtocolError_Text,e));else{var d=f;if(!d.error)c=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,0,0,a,null);else c=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,a,d.errorMessage)}b(c)}})}};Type.registerNamespace("$h");var $h=window.$h||{};Type.registerNamespace("Office.cast");var Office=window.Office||{};Office.cast=Office.cast||{};$h.Appointment=function(a){this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);$h.Appointment.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)};$h.Appointment.prototype={getEntities:function(){return this._data$p$0._getEntities$i$0()},getEntitiesByType:function(a){return this._data$p$0._getEntitiesByType$i$0(a)},getRegExMatches:function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()},getFilteredEntitiesByName:function(a){return this._data$p$0._getFilteredEntitiesByName$i$0(a)},getRegExMatchesByName:function(a){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(a)},displayReplyForm:function(a){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(a)},displayReplyAllForm:function(a){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(a)},getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getStart$p$2:function(){return this._data$p$0.get__start$i$0()},_getEnd$p$2:function(){return this._data$p$0.get__end$i$0()},_getLocation$p$2:function(){return this._data$p$0.get__location$i$0()},_getOptionalAttendees$p$2:function(){return this._data$p$0.get__cc$i$0()},_getRequiredAttendees$p$2:function(){return this._data$p$0.get__to$i$0()},_getResources$p$2:function(){return this._data$p$0.get__resources$i$0()},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getOrganizer$p$2:function(){return this._data$p$0.get__organizer$i$0()}};$h.AppointmentCompose=function(a){this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);$h.AppointmentCompose.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)};$h.AppointmentCompose.prototype={_requiredAttendees$p$2:null,_optionalAttendees$p$2:null,_start$p$2:null,_end$p$2:null,_location$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getRequiredAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._requiredAttendees$p$2)this._requiredAttendees$p$2=new $h.ComposeRecipient(0,"requiredAttendees");return this._requiredAttendees$p$2},_getOptionalAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._optionalAttendees$p$2)this._optionalAttendees$p$2=new $h.ComposeRecipient(1,"optionalAttendees");return this._optionalAttendees$p$2},_getStart$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._start$p$2)this._start$p$2=new $h.ComposeTime(1);return this._start$p$2},_getEnd$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._end$p$2)this._end$p$2=new $h.ComposeTime(2);return this._end$p$2},_getLocation$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._location$p$2)this._location$p$2=new $h.ComposeLocation;return this._location$p$2}};$h.AttachmentConstants=function(){};$h.AttachmentDetails=function(a){this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);this._data$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)};$h.AttachmentDetails.prototype={_data$p$0:null,_getId$p$0:function(){return this._data$p$0.id},_getName$p$0:function(){return this._data$p$0.name},_getContentType$p$0:function(){return this._data$p$0.contentType},_getSize$p$0:function(){return this._data$p$0.size},_getAttachmentType$p$0:function(){var a=this._data$p$0.attachmentType;return a<$h.AttachmentDetails._attachmentTypeMap$p.length?$h.AttachmentDetails._attachmentTypeMap$p[a]:window.Microsoft.Office.WebExtension.MailboxEnums.AttachmentType.File},_getIsInline$p$0:function(){return this._data$p$0.isInline}};$h.Body=function(){};$h.Body._tryMapToHostCoercionType$i=function(b,a){a.val=undefined;if(b===window.Microsoft.Office.WebExtension.CoercionType.Html)a.val=3;else if(b===window.Microsoft.Office.WebExtension.CoercionType.Text)a.val=0;else return false;return true};$h.Body.prototype={getAsync:function(g){for(var f=[],a=1;a<arguments.length;++a)f[a-1]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync");var c=$h.CommonParameters.parse(f,true),b,d,e;if(!(e=$h.Body._tryMapToHostCoercionType$i(g,d={val:b}),b=d.val,e))throw Error.argument("coercionType");var h={coercionType:b};window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(37,h,null,c._asyncContext$p$0,c._callback$p$0)}};$h.ComposeBody=function(){$h.ComposeBody.initializeBase(this)};$h.ComposeBody._createParameterDictionaryToHost$i=function(f,a){var c={data:f};if(a._options$p$0&&!$h.ScriptHelpers.isNull(a._options$p$0.coercionType)){var b,d,e;if(!(e=$h.Body._tryMapToHostCoercionType$i(a._options$p$0.coercionType,d={val:b}),b=d.val,e)){a._callback$p$0&&a._callback$p$0(window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,1e3,a._asyncContext$p$0,null));return null}c.coercionType=b}else c.coercionType=0;return c};$h.ComposeBody.prototype={getTypeAsync:function(){for(var c=[],a=0;a<arguments.length;++a)c[a]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync");var b=$h.CommonParameters.parse(c,true);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(14,null,null,b._asyncContext$p$0,b._callback$p$0)},setSelectedDataAsync:function(b){for(var e=[],a=1;a<arguments.length;++a)e[a-1]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync");var c=$h.CommonParameters.parse(e,false);if(!String.isInstanceOfType(b))throw Error.argumentType("data",Object.getType(b),String);window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(b.length,0,1e6,"data");var d=$h.ComposeBody._createParameterDictionaryToHost$i(b,c);if(!d)return;window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(13,d,null,c._asyncContext$p$0,c._callback$p$0)},prependAsync:function(b){for(var e=[],a=1;a<arguments.length;++a)e[a-1]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync");var c=$h.CommonParameters.parse(e,false);if(!String.isInstanceOfType(b))throw Error.argumentType("data",Object.getType(b),String);window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(b.length,0,1e6,"data");var d=$h.ComposeBody._createParameterDictionaryToHost$i(b,c);if(!d)return;window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(23,d,null,c._asyncContext$p$0,c._callback$p$0)},setAsync:function(b){for(var e=[],a=1;a<arguments.length;++a)e[a-1]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync");var c=$h.CommonParameters.parse(e,false);if(!String.isInstanceOfType(b))throw Error.argumentType("data",Object.getType(b),String);window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(b.length,0,1e6,"data");var d=$h.ComposeBody._createParameterDictionaryToHost$i(b,c);if(!d)return;window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(38,d,null,c._asyncContext$p$0,c._callback$p$0)}};$h.ComposeItem=function(a){this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1);this.$$d__getSubject$p$1=Function.createDelegate(this,this._getSubject$p$1);$h.ComposeItem.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1);$h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1)};$h.ComposeItem.prototype={_subject$p$1:null,_body$p$1:null,addFileAttachmentAsync:function(c,b){for(var e=[],a=2;a<arguments.length;++a)e[a-2]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync");if(!$h.ScriptHelpers.isNonEmptyString(c))throw Error.argument("uri");if(!$h.ScriptHelpers.isNonEmptyString(b))throw Error.argument("attachmentName");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(c.length,0,2048,"uri");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(b.length,0,255,"attachmentName");var d=$h.CommonParameters.parse(e,false),f={uri:c,name:b,__timeout__:6e5};window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(16,f,null,d._asyncContext$p$0,d._callback$p$0)},addItemAttachmentAsync:function(c,b){for(var e=[],a=2;a<arguments.length;++a)e[a-2]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync");if(!$h.ScriptHelpers.isNonEmptyString(c))throw Error.argument("itemId");if(!$h.ScriptHelpers.isNonEmptyString(b))throw Error.argument("attachmentName");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(c.length,0,200,"itemId");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(b.length,0,255,"attachmentName");var d=$h.CommonParameters.parse(e,false),f={itemId:window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost(c),name:b,__timeout__:6e5};window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(19,f,null,d._asyncContext$p$0,d._callback$p$0)},removeAttachmentAsync:function(b){for(var d=[],a=1;a<arguments.length;++a)d[a-1]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync");if(!$h.ScriptHelpers.isNonEmptyString(b))throw Error.argument("attachmentId");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(b.length,0,200,"attachmentId");var c=$h.CommonParameters.parse(d,false);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex:b},null,c._asyncContext$p$0,c._callback$p$0)},getSelectedDataAsync:function(c){for(var g=[],a=1;a<arguments.length;++a)g[a-1]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync");var d=$h.CommonParameters.parse(g,true),b,e,f;if(c!==window.Microsoft.Office.WebExtension.CoercionType.Html&&c!==window.Microsoft.Office.WebExtension.CoercionType.Text||!(f=$h.Body._tryMapToHostCoercionType$i(c,e={val:b}),b=e.val,f))throw Error.argument("coercionType");var h={coercionType:b};window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(28,h,null,d._asyncContext$p$0,d._callback$p$0)},setSelectedDataAsync:function(b){for(var e=[],a=1;a<arguments.length;++a)e[a-1]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync");var c=$h.CommonParameters.parse(e,false);if(!String.isInstanceOfType(b))throw Error.argumentType("data",Object.getType(b),String);window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(b.length,0,1e6,"data");var d=$h.ComposeBody._createParameterDictionaryToHost$i(b,c);if(!d)return;window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(29,d,null,c._asyncContext$p$0,c._callback$p$0)},close:function(){window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null)},_getBody$p$1:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._body$p$1)this._body$p$1=new $h.ComposeBody;return this._body$p$1},_getSubject$p$1:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._subject$p$1)this._subject$p$1=new $h.ComposeSubject;return this._subject$p$1},saveAsync:function(){for(var c=[],a=0;a<arguments.length;++a)c[a]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync");var b=$h.CommonParameters.parse(c,false);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(32,null,null,b._asyncContext$p$0,b._callback$p$0)}};$h.ComposeRecipient=function(b,a){this._type$p$0=b;this._propertyName$p$0=a};$h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p=function(b,a){if(!b&&!a)throw Error.argument("recipients");if(b&&b.length>255)throw Error.argumentOutOfRange("recipients",b.length,window._u.ExtensibilityStrings.l_DisplayNameTooLong_Text);if(a&&a.length>571)throw Error.argumentOutOfRange("recipients",a.length,window._u.ExtensibilityStrings.l_EmailAddressTooLong_Text);};$h.ComposeRecipient._getAsyncFormatter$p=function(d){for(var c=d,b=[],a=0;a<c.length;a++){var e=new $h.EmailAddressDetails(c[a]);b[a]=e}return b};$h.ComposeRecipient._createEmailDictionaryForHost$p=function(a,b){return{address:a,name:b}};$h.ComposeRecipient.prototype={_propertyName$p$0:null,_type$p$0:0,getAsync:function(){for(var c=[],a=0;a<arguments.length;++a)c[a]=arguments[a];var b=$h.CommonParameters.parse(c,true);window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0+".getAsync");window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(15,{recipientField:this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,b._asyncContext$p$0,b._callback$p$0)},setAsync:function(c){for(var b=[],a=1;a<arguments.length;++a)b[a-1]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".setAsync");this.setAddHelper(c,b,true)},addAsync:function(c){for(var b=[],a=1;a<arguments.length;++a)b[a-1]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".addAsync");this.setAddHelper(c,b,false)},setAddHelper:function(b,j,i){window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(b.length,0,100,"recipients");var g=$h.CommonParameters.parse(j,false),c=[];if(Array.isInstanceOfType(b))for(var a=0;a<b.length;a++)if(String.isInstanceOfType(b[a])){$h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(b[a],b[a]);c[a]=$h.ComposeRecipient._createEmailDictionaryForHost$p(b[a],b[a])}else if($h.EmailAddressDetails.isInstanceOfType(b[a])){var d=b[a];$h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(d.displayName,d.emailAddress);c[a]=$h.ComposeRecipient._createEmailDictionaryForHost$p(d.emailAddress,d.displayName)}else if(Object.isInstanceOfType(b[a])){var h=b[a],e=h.emailAddress,f=h.displayName;$h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(f,e);c[a]=$h.ComposeRecipient._createEmailDictionaryForHost$p(e,f)}else throw Error.argument("recipients");else throw Error.argument("recipients");var k=this;window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(i?21:22,{recipientField:this._type$p$0,recipientArray:c},function(a){return a},g._asyncContext$p$0,g._callback$p$0)}};$h.ComposeRecipient.RecipientField=function(){};$h.ComposeRecipient.RecipientField.prototype={to:0,cc:1,bcc:2,requiredAttendees:0,optionalAttendees:1};$h.ComposeRecipient.RecipientField.registerEnum("$h.ComposeRecipient.RecipientField",false);$h.ComposeLocation=function(){};$h.ComposeLocation.prototype={getAsync:function(){for(var c=[],a=0;a<arguments.length;++a)c[a]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync");var b=$h.CommonParameters.parse(c,true);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(26,null,null,b._asyncContext$p$0,b._callback$p$0)},setAsync:function(c){for(var d=[],a=1;a<arguments.length;++a)d[a-1]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync");var b=$h.CommonParameters.parse(d,false);window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(c.length,0,255,"location");window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(27,{location:c},null,b._asyncContext$p$0,b._callback$p$0)}};$h.ComposeSubject=function(){};$h.ComposeSubject.prototype={getAsync:function(){for(var c=[],a=0;a<arguments.length;++a)c[a]=arguments[a];var b=$h.CommonParameters.parse(c,true);window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync");window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(18,null,null,b._asyncContext$p$0,b._callback$p$0)},setAsync:function(b){for(var d=[],a=1;a<arguments.length;++a)d[a-1]=arguments[a];var c=$h.CommonParameters.parse(d,false);window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync");if(!String.isInstanceOfType(b))throw Error.argument("data");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(b.length,0,255,"data");window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(17,{subject:b},null,c._asyncContext$p$0,c._callback$p$0)}};$h.ComposeTime=function(a){this.$$d__ticksToDateFormatter$p$0=Function.createDelegate(this,this._ticksToDateFormatter$p$0);this._timeType$p$0=a};$h.ComposeTime.prototype={_timeType$p$0:0,getAsync:function(){for(var c=[],a=0;a<arguments.length;++a)c[a]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0()+".getAsync");var b=$h.CommonParameters.parse(c,true);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty:this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,b._asyncContext$p$0,b._callback$p$0)},setAsync:function(a){for(var d=[],b=1;b<arguments.length;++b)d[b-1]=arguments[b];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0()+".setAsync");if(!Date.isInstanceOfType(a))throw Error.argumentType("dateTime",Object.getType(a),Date);if(window.isNaN(a.getTime()))throw Error.argument("dateTime");if(a.getTime()<-864e13||a.getTime()>864e13)throw Error.argumentOutOfRange("dateTime");var c=$h.CommonParameters.parse(d,false);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(25,{TimeProperty:this._timeType$p$0,time:a.getTime()},null,c._asyncContext$p$0,c._callback$p$0)},_ticksToDateFormatter$p$0:function(a){var b=a;return new Date(b)},_getPropertyName$p$0:function(){return this._timeType$p$0===1?"start":"end"}};$h.ComposeTime.TimeType=function(){};$h.ComposeTime.TimeType.prototype={start:1,end:2};$h.ComposeTime.TimeType.registerEnum("$h.ComposeTime.TimeType",false);$h.Contact=function(a){this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);this._data$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)};$h.Contact.prototype={_data$p$0:null,_phoneNumbers$p$0:null,_getPersonName$p$0:function(){return this._data$p$0.PersonName},_getBusinessName$p$0:function(){return this._data$p$0.BusinessName},_getAddresses$p$0:function(){return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")},_getEmailAddresses$p$0:function(){return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")},_getUrls$p$0:function(){return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0){var a=this;this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(a){return new $h.PhoneNumber(a)})}return this._phoneNumbers$p$0},_getContactString$p$0:function(){return this._data$p$0.ContactString}};$h.CustomProperties=function(a){if($h.ScriptHelpers.isNullOrUndefined(a))throw Error.argumentNull("data");if(Array.isInstanceOfType(a)){var b=a;if(b.length>0)this._data$p$0=b[0];else throw Error.argument("data");}else this._data$p$0=a};$h.CustomProperties.prototype={_data$p$0:null,"get":function(f){var b=this._data$p$0[f];if(typeof b==="string"){var a=b;if(a.length>6&&a.startsWith("Date(")&&a.endsWith(")")){var e=a.substring(5,a.length-1),d=window.parseInt(e);if(!window.isNaN(d)){var c=new Date(d);if(c)b=c}}}return b},"set":function(b,a){if(window.OSF.OUtil.isDate(a))a="Date("+a.getTime()+")";this._data$p$0[b]=a},remove:function(a){delete this._data$p$0[a]},saveAsync:function(){for(var c=[],a=0;a<arguments.length;++a)c[a]=arguments[a];var d=2500;if(window.JSON.stringify(this._data$p$0).length>d)throw Error.argument();var b=$h.CommonParameters.parse(c,false,true),e=new $h.SaveDictionaryRequest(b._callback$p$0,b._asyncContext$p$0);e._sendRequest$i$0(4,"SaveCustomProperties",{customProperties:this._data$p$0})}};$h.Diagnostics=function(b,a){this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);this._data$p$0=b;this._appName$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);64===this._appName$p$0&&$h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)};$h.Diagnostics.prototype={_data$p$0:null,_appName$p$0:0,_getHostName$p$0:function(){return 8===this._appName$p$0?"Outlook":64===this._appName$p$0?"OutlookWebApp":null},_getHostVersion$p$0:function(){return this._data$p$0.get__hostVersion$i$0()},_getOwaView$p$0:function(){return this._data$p$0.get__owaView$i$0()}};$h.EmailAddressDetails=function(a){this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);this._data$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);$h.ScriptHelpers.dictionaryContainsKey(a,"appointmentResponse")&&$h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);$h.ScriptHelpers.dictionaryContainsKey(a,"recipientType")&&$h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)};$h.EmailAddressDetails._createFromEmailUserDictionary$i=function(b){var a={},d=b.Name,c=b.UserId;a.name=d||$h.EmailAddressDetails._emptyString$p;a.address=c||$h.EmailAddressDetails._emptyString$p;return new $h.EmailAddressDetails(a)};$h.EmailAddressDetails.prototype={_data$p$0:null,toJSON:function(){var a={};a.emailAddress=this._getEmailAddress$p$0();a.displayName=this._getDisplayName$p$0();if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse"))a.appointmentResponse=this._getAppointmentResponse$p$0();if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType"))a.recipientType=this._getRecipientType$p$0();return a},_getEmailAddress$p$0:function(){return this._data$p$0.address},_getDisplayName$p$0:function(){return this._data$p$0.name},_getAppointmentResponse$p$0:function(){var a=this._data$p$0.appointmentResponse;return a<$h.EmailAddressDetails._responseTypeMap$p.length?$h.EmailAddressDetails._responseTypeMap$p[a]:window.Microsoft.Office.WebExtension.MailboxEnums.ResponseType.None},_getRecipientType$p$0:function(){var a=this._data$p$0.recipientType;return a<$h.EmailAddressDetails._recipientTypeMap$p.length?$h.EmailAddressDetails._recipientTypeMap$p[a]:window.Microsoft.Office.WebExtension.MailboxEnums.RecipientType.Other}};$h.Entities=function(d,a,c,b){this.$$d__createMeetingSuggestion$p$0=Function.createDelegate(this,this._createMeetingSuggestion$p$0);this.$$d__getParcelDeliveries$p$0=Function.createDelegate(this,this._getParcelDeliveries$p$0);this.$$d__getFlightReservations$p$0=Function.createDelegate(this,this._getFlightReservations$p$0);this.$$d__getContacts$p$0=Function.createDelegate(this,this._getContacts$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getMeetingSuggestions$p$0=Function.createDelegate(this,this._getMeetingSuggestions$p$0);this.$$d__getTaskSuggestions$p$0=Function.createDelegate(this,this._getTaskSuggestions$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this._data$p$0=d||{};this._filteredData$p$0=a||{};this._dateTimeSent$p$0=c;$h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0);this._permissionLevel$p$0=b};$h.Entities._getExtractedObjects$i=function(m,k,l,f,i,h){var b=null,a=k[l];if(!a)return new Array(0);if(i)a=$h.Entities._removeDuplicate$p(Object,a,$h.Entities._entityDictionaryEquals$p,h);b=new Array(a.length);for(var g=0,e=a,j=e.length,c=0;c<j;++c){var d=e[c];if(f)b[g++]=f(d);else b[g++]=d}return b};$h.Entities._getExtractedStringProperty$i=function(c,d,b){var a=c[d];if(!a)return new Array(0);if(b)a=$h.Entities._removeDuplicate$p(String,a,$h.Entities._stringEquals$p,null);return a};$h.Entities._createContact$p=function(a){return new $h.Contact(a)};$h.Entities._createTaskSuggestion$p=function(a){return new $h.TaskSuggestion(a)};$h.Entities._createPhoneNumber$p=function(a){return new $h.PhoneNumber(a)};$h.Entities._entityDictionaryEquals$p=function(a,b,c){return a===b?true:!a||!b?false:a[c]===b[c]?true:false};$h.Entities._stringEquals$p=function(a,b){return a===b};$h.Entities._removeDuplicate$p=function(g,b,f,e){for(var a=b.length-1;a>=0;a--){for(var d=false,c=a-1;c>=0;c--)if(f(b[a],b[c],e)){d=true;break}d&&Array.removeAt(b,a)}return b};$h.Entities.prototype={_dateTimeSent$p$0:null,_data$p$0:null,_filteredData$p$0:null,_filteredEntitiesCache$p$0:null,_permissionLevel$p$0:0,_taskSuggestions$p$0:null,_meetingSuggestions$p$0:null,_phoneNumbers$p$0:null,_contacts$p$0:null,_addresses$p$0:null,_emailAddresses$p$0:null,_urls$p$0:null,_flightReservations$p$0:null,_parcelDeliveries$p$0:null,_getByType$i$0:function(a){return a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion?this._getMeetingSuggestions$p$0():a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion?this._getTaskSuggestions$p$0():a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address?this._getAddresses$p$0():a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber?this._getPhoneNumbers$p$0():a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress?this._getEmailAddresses$p$0():a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url?this._getUrls$p$0():a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact?this._getContacts$p$0():a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.FlightReservations?this._getFlightReservations$p$0():a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.ParcelDeliveries?this._getParcelDeliveries$p$0():null},_getFilteredEntitiesByName$i$0:function(a){if(!this._filteredEntitiesCache$p$0)this._filteredEntitiesCache$p$0={};if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,a)){for(var e=false,c=0;c<$h.Entities._allEntityKeys$p.length;c++){var d=$h.Entities._allEntityKeys$p[c],b=this._filteredData$p$0[d];if(!b)continue;if($h.ScriptHelpers.dictionaryContainsKey(b,a)){switch(d){case"EmailAddresses":case"Urls":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedStringProperty$i(b,a);break;case"Addresses":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedStringProperty$i(b,a,true);break;case"PhoneNumbers":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedObjects$i($h.PhoneNumber,b,a,$h.Entities._createPhoneNumber$p,false,null);break;case"TaskSuggestions":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,b,a,$h.Entities._createTaskSuggestion$p,true,"TaskString");break;case"MeetingSuggestions":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,b,a,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString");break;case"Contacts":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedObjects$i($h.Contact,b,a,$h.Entities._createContact$p,true,"ContactString")}e=true;break}}if(!e)this._filteredEntitiesCache$p$0[a]=null}return this._filteredEntitiesCache$p$0[a]},_createMeetingSuggestion$p$0:function(a){return new $h.MeetingSuggestion(a,this._dateTimeSent$p$0)},_getAddresses$p$0:function(){if(!this._addresses$p$0)this._addresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true);return this._addresses$p$0},_getEmailAddresses$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._emailAddresses$p$0)this._emailAddresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false);return this._emailAddresses$p$0},_getUrls$p$0:function(){if(!this._urls$p$0)this._urls$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false);return this._urls$p$0},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0)this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p);return this._phoneNumbers$p$0},_getTaskSuggestions$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._taskSuggestions$p$0)this._taskSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString");return this._taskSuggestions$p$0},_getMeetingSuggestions$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._meetingSuggestions$p$0)this._meetingSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString");return this._meetingSuggestions$p$0},_getContacts$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._contacts$p$0)this._contacts$p$0=$h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString");return this._contacts$p$0},_getParcelDeliveries$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._parcelDeliveries$p$0)this._parcelDeliveries$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null);return this._parcelDeliveries$p$0},_getFlightReservations$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._flightReservations$p$0)this._flightReservations$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null);return this._flightReservations$p$0}};$h.ReplyConstants=function(){};$h.AsyncConstants=function(){};window.Office.cast.item=Office.cast.item=function(){};window.Office.cast.item.toItemRead=function(a){if($h.Item.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toItemCompose=function(a){if($h.ComposeItem.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toMessage=function(a){return window.Office.cast.item.toMessageRead(a)};window.Office.cast.item.toMessageRead=function(a){if($h.Message.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toMessageCompose=function(a){if($h.MessageCompose.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toMeetingRequest=function(a){if($h.MeetingRequest.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toAppointment=function(a){return window.Office.cast.item.toAppointmentRead(a)};window.Office.cast.item.toAppointmentRead=function(a){if($h.Appointment.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toAppointmentCompose=function(a){if($h.AppointmentCompose.isInstanceOfType(a))return a;throw Error.argumentType();};$h.Item=function(a){this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1);this.$$d__getAttachments$p$1=Function.createDelegate(this,this._getAttachments$p$1);this.$$d__getItemClass$p$1=Function.createDelegate(this,this._getItemClass$p$1);this.$$d__getItemId$p$1=Function.createDelegate(this,this._getItemId$p$1);this.$$d__getDateTimeModified$p$1=Function.createDelegate(this,this._getDateTimeModified$p$1);this.$$d__getDateTimeCreated$p$1=Function.createDelegate(this,this._getDateTimeCreated$p$1);$h.Item.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1);$h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1);$h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1);$h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1);$h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1);$h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1)};$h.Item.prototype={_body$p$1:null,_getItemId$p$1:function(){return this._data$p$0.get__itemId$i$0()},_getItemClass$p$1:function(){return this._data$p$0.get__itemClass$i$0()},_getDateTimeCreated$p$1:function(){return this._data$p$0.get__dateTimeCreated$i$0()},_getDateTimeModified$p$1:function(){return this._data$p$0.get__dateTimeModified$i$0()},_getAttachments$p$1:function(){return this._data$p$0.get__attachments$i$0()},_getBody$p$1:function(){if(!this._body$p$1)this._body$p$1=new $h.Body;return this._body$p$1}};$h.ItemBase=function(a){this.$$d__createCustomProperties$i$0=Function.createDelegate(this,this._createCustomProperties$i$0);this.$$d__getNotificationMessages$p$0=Function.createDelegate(this,this._getNotificationMessages$p$0);this.$$d_getItemType=Function.createDelegate(this,this.getItemType);this._data$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType);$h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0)};$h.ItemBase.prototype={_data$p$0:null,_notificationMessages$p$0:null,get_data:function(){return this._data$p$0},loadCustomPropertiesAsync:function(){for(var c=[],a=0;a<arguments.length;++a)c[a]=arguments[a];var b=$h.CommonParameters.parse(c,true,true),d=new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",b._callback$p$0,b._asyncContext$p$0);d._sendRequest$i$0(3,"LoadCustomProperties",{})},_createCustomProperties$i$0:function(a){return new $h.CustomProperties(a)},_getNotificationMessages$p$0:function(){if(!this._notificationMessages$p$0)this._notificationMessages$p$0=new $h.NotificationMessages;return this._notificationMessages$p$0}};$h.MeetingRequest=function(a){this.$$d__getRequiredAttendees$p$3=Function.createDelegate(this,this._getRequiredAttendees$p$3);this.$$d__getOptionalAttendees$p$3=Function.createDelegate(this,this._getOptionalAttendees$p$3);this.$$d__getLocation$p$3=Function.createDelegate(this,this._getLocation$p$3);this.$$d__getEnd$p$3=Function.createDelegate(this,this._getEnd$p$3);this.$$d__getStart$p$3=Function.createDelegate(this,this._getStart$p$3);$h.MeetingRequest.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3);$h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3);$h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3);$h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3);$h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3)};$h.MeetingRequest.prototype={_getStart$p$3:function(){return this._data$p$0.get__start$i$0()},_getEnd$p$3:function(){return this._data$p$0.get__end$i$0()},_getLocation$p$3:function(){return this._data$p$0.get__location$i$0()},_getOptionalAttendees$p$3:function(){return this._data$p$0.get__cc$i$0()},_getRequiredAttendees$p$3:function(){return this._data$p$0.get__to$i$0()}};$h.MeetingSuggestion=function(b,a){this.$$d__getEndTime$p$0=Function.createDelegate(this,this._getEndTime$p$0);this.$$d__getStartTime$p$0=Function.createDelegate(this,this._getStartTime$p$0);this.$$d__getSubject$p$0=Function.createDelegate(this,this._getSubject$p$0);this.$$d__getLocation$p$0=Function.createDelegate(this,this._getLocation$p$0);this.$$d__getAttendees$p$0=Function.createDelegate(this,this._getAttendees$p$0);this.$$d__getMeetingString$p$0=Function.createDelegate(this,this._getMeetingString$p$0);this._data$p$0=b;this._dateTimeSent$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0)};$h.MeetingSuggestion.prototype={_dateTimeSent$p$0:null,_data$p$0:null,_attendees$p$0:null,_getMeetingString$p$0:function(){return this._data$p$0.MeetingString},_getLocation$p$0:function(){return this._data$p$0.Location},_getSubject$p$0:function(){return this._data$p$0.Subject},_getStartTime$p$0:function(){var a=this._createDateTimeFromParameter$p$0("StartTime"),b=$h.MeetingSuggestionTimeDecoder.resolve(a,this._dateTimeSent$p$0);return b.getTime()!==a.getTime()?window.OSF.DDA.OutlookAppOm._instance$p.convertToUtcClientTime(window.OSF.DDA.OutlookAppOm._instance$p._dateToDictionary$i$0(b)):a},_getEndTime$p$0:function(){var a=this._createDateTimeFromParameter$p$0("EndTime"),b=$h.MeetingSuggestionTimeDecoder.resolve(a,this._dateTimeSent$p$0);return b.getTime()!==a.getTime()?window.OSF.DDA.OutlookAppOm._instance$p.convertToUtcClientTime(window.OSF.DDA.OutlookAppOm._instance$p._dateToDictionary$i$0(b)):a},_createDateTimeFromParameter$p$0:function(b){var a=this._data$p$0[b];return!a?null:new Date(a)},_getAttendees$p$0:function(){if(!this._attendees$p$0){var a=this;this._attendees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(a){return $h.EmailAddressDetails._createFromEmailUserDictionary$i(a)})}return this._attendees$p$0}};$h.MeetingSuggestionTimeDecoder=function(){};$h.MeetingSuggestionTimeDecoder.resolve=function(e,c){if(!c)return e;try{var f,a,b,d=new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0),g,h,i;if(!(i=$h.MeetingSuggestionTimeDecoder._decode$p(e,g={val:b},h={val:f}),b=g.val,f=h.val,i))return e;else{if($h._preciseDate.isInstanceOfType(b))a=$h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(d,b);else if($h._relativeDate.isInstanceOfType(b))a=$h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(d,b);else a=d;if(window.isNaN(a.getTime()))return c;a.setMilliseconds(a.getMilliseconds()+f);return a}}catch(j){return c}};$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i=function(a){return null===a||a===undefined};$h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p=function(b,c){var e=c._year$i$1,d=!c._month$i$1?b.getMonth():c._month$i$1-1,f=c._day$i$1;if(!f)return b;var a;if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(e)){a=new Date(b.getFullYear(),d,f);if(a.getTime()<b.getTime())a=new Date(b.getFullYear()+1,d,f)}else a=new Date(e<50?2e3+e:1900+e,d,f);return a.getMonth()!==d?b:a};$h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p=function(b,c){var a;switch(c._unit$i$1){case 0:a=new Date(b.getFullYear(),b.getMonth(),b.getDate());a.setDate(a.getDate()+c._offset$i$1);return a;case 5:return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(b,c._offset$i$1,c._tag$i$1);case 2:var d=1;switch(c._modifier$i$1){case 1:break;case 2:d=16;break;default:if(!c._offset$i$1)d=b.getDate()}a=new Date(b.getFullYear(),b.getMonth(),d);a.setMonth(a.getMonth()+c._offset$i$1);a.getTime()<b.getTime()&&a.setDate(a.getDate()+b.getDate()-1);return a;case 1:a=new Date(b.getFullYear(),b.getMonth(),b.getDate());a.setDate(b.getDate()+7*c._offset$i$1);if(c._modifier$i$1===1||!c._modifier$i$1){a.setDate(a.getDate()+1-a.getDay());return a.getTime()<b.getTime()?b:a}else if(c._modifier$i$1===2){a.setDate(a.getDate()+5-a.getDay());return a}break;case 4:return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(b,c);case 3:if(c._offset$i$1>0)return new Date(b.getFullYear()+c._offset$i$1,0,1)}return b};$h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(a,c,e){if(c>-5&&c<5){var d,b;d=(e+6)%7+1;b=7*c+(d-a.getDay());a.setDate(a.getDate()+b);return a}else{var b=(e-a.getDay())%7;if(b<0)b+=7;a.setDate(a.getDate()+b);return a}};$h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(d,c){var f,a,b;f=d;if(c._tag$i$1<=0||c._tag$i$1>12||c._offset$i$1<=0||c._offset$i$1>5)return d;var g=(12+c._tag$i$1-f.getMonth()-1)%12;a=new Date(f.getFullYear(),f.getMonth()+g,1);if(c._modifier$i$1===1)if(c._offset$i$1===1&&a.getDay()!==6&&a.getDay())return a;else{b=new Date(a.getFullYear(),a.getMonth(),a.getDate());b.setDate(b.getDate()+(7+(1-a.getDay()))%7);a.getDay()!==6&&a.getDay()&&a.getDay()!==1&&b.setDate(b.getDate()-7);b.setDate(b.getDate()+7*(c._offset$i$1-1));return b.getMonth()+1!==c._tag$i$1?d:b}else{b=new Date(a.getFullYear(),a.getMonth(),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(a.getMonth(),a.getFullYear()));var e=1-b.getDay();if(e>0)e=e-7;b.setDate(b.getDate()+e);b.setDate(b.getDate()+7*(1-c._offset$i$1));return b.getMonth()+1!==c._tag$i$1?a.getDay()!==6&&a.getDay()?a:d:b}};$h.MeetingSuggestionTimeDecoder._decode$p=function(b,c,d){var f=32767;c.val=null;d.val=0;if(!b)return false;d.val=$h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(b);var e=b.getTime()-d.val,a=(e-$h.MeetingSuggestionTimeDecoder._baseDate$p.getTime())/864e5;if(a<0)return false;else if(a>=262144)return false;else{var g=a>>15;a=a&f;switch(g){case 0:return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(a,c);case 1:return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(a,c);default:return false}}};$h.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(b,e){var h=7,d=15,j=31,i=127,f=null,c=0,g=0;e.val=null;var a=b>>12&h;if((a&4)===4){f=b>>5&i;if((a&2)===2){if((a&1)===1)return false;c=b>>1&d}}else{if((a&2)===2)c=b>>8&d;if((a&1)===1)g=b>>3&j}e.val=new $h._preciseDate(g,c,f);return true};$h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(a,b){var g=15,d=63,f=7,c=3,j=a&g;a>>=4;var h=$h.MeetingSuggestionTimeDecoder._fromComplement$p(a&d,6);a>>=6;var i=a&f;a>>=3;var e=a&c;try{b.val=new $h._relativeDate(e,h,i,j);return true}catch(k){b.val=null;return false}};$h.MeetingSuggestionTimeDecoder._fromComplement$p=function(a,c){var b=1<<c-1,d=(1<<c)-1;return(a&b)===b?-((a^d)+1):a};$h.MeetingSuggestionTimeDecoder._daysInMonth$p=function(a,b){return 32-new Date(b,a,32).getDate()};$h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p=function(b){var a=0;a+=b.getUTCHours()*3600;a+=b.getUTCMinutes()*60;a+=b.getUTCSeconds();a*=1e3;a+=b.getUTCMilliseconds();return a};$h._extractedDate=function(){};$h._preciseDate=function(c,a,b){$h._preciseDate.initializeBase(this);if(c<0||c>31)throw Error.argumentOutOfRange("day");if(a<0||a>12)throw Error.argumentOutOfRange("month");this._day$i$1=c;this._month$i$1=a;if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(b)){if(!a&&c)throw Error.argument("Invalid arguments");if(b<0||b>2099)throw Error.argumentOutOfRange("year");this._year$i$1=b%100}else if(!this._month$i$1&&!this._day$i$1)throw Error.argument("Invalid datetime");};$h._preciseDate.prototype={_day$i$1:0,_month$i$1:0,_year$i$1:null};$h._relativeDate=function(d,a,c,b){$h._relativeDate.initializeBase(this);if(a<-32||a>31)throw Error.argumentOutOfRange("offset");if(b<0||b>15)throw Error.argumentOutOfRange("tag");if(!c&&a<0)throw Error.argument("unit & offset do not form a valid date");this._modifier$i$1=d;this._offset$i$1=a;this._unit$i$1=c;this._tag$i$1=b};$h._relativeDate.prototype={_modifier$i$1:0,_offset$i$1:0,_unit$i$1:0,_tag$i$1:0};$h.Message=function(a){this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2);this.$$d__getInternetMessageId$p$2=Function.createDelegate(this,this._getInternetMessageId$p$2);this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2);this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2);this.$$d__getFrom$p$2=Function.createDelegate(this,this._getFrom$p$2);this.$$d__getSender$p$2=Function.createDelegate(this,this._getSender$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);$h.Message.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2)};$h.Message.prototype={getEntities:function(){return this._data$p$0._getEntities$i$0()},getEntitiesByType:function(a){return this._data$p$0._getEntitiesByType$i$0(a)},getFilteredEntitiesByName:function(a){return this._data$p$0._getFilteredEntitiesByName$i$0(a)},getRegExMatches:function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()},getRegExMatchesByName:function(a){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(a)},displayReplyForm:function(a){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(a)},displayReplyAllForm:function(a){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(a)},getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Message},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getSender$p$2:function(){return this._data$p$0.get__sender$i$0()},_getFrom$p$2:function(){return this._data$p$0.get__from$i$0()},_getTo$p$2:function(){return this._data$p$0.get__to$i$0()},_getCc$p$2:function(){return this._data$p$0.get__cc$i$0()},_getInternetMessageId$p$2:function(){return this._data$p$0.get__internetMessageId$i$0()},_getConversationId$p$2:function(){return this._data$p$0.get__conversationId$i$0()}};$h.MessageCompose=function(a){this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2);this.$$d__getBcc$p$2=Function.createDelegate(this,this._getBcc$p$2);this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2);this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2);$h.MessageCompose.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2)};$h.MessageCompose.prototype={_to$p$2:null,_cc$p$2:null,_bcc$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Message},_getTo$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._to$p$2)this._to$p$2=new $h.ComposeRecipient(0,"to");return this._to$p$2},_getCc$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._cc$p$2)this._cc$p$2=new $h.ComposeRecipient(1,"cc");return this._cc$p$2},_getBcc$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._bcc$p$2)this._bcc$p$2=new $h.ComposeRecipient(2,"bcc");return this._bcc$p$2},_getConversationId$p$2:function(){return this._data$p$0.get__conversationId$i$0()}};$h.NotificationMessages=function(){};$h.NotificationMessages._mapToHostItemNotificationMessageType$p=function(c){var b,a;b=c.type;if(b===window.Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType.ProgressIndicator)a=1;else if(b===window.Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType.InformationalMessage)a=0;else if(b===window.Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType.ErrorMessage)a=2;else throw Error.argument("type");c.type=a};$h.NotificationMessages._validateKey$p=function(a){if(!$h.ScriptHelpers.isNonEmptyString(a))throw Error.argument("key");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(a.length,0,32,"key")};$h.NotificationMessages._validateDictionary$p=function(a){if(!$h.ScriptHelpers.isNonEmptyString(a.type))throw Error.argument("type");if(a.type===window.Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType.InformationalMessage){if(!$h.ScriptHelpers.isNonEmptyString(a.icon))throw Error.argument("icon");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(a.icon.length,0,32,"icon");if($h.ScriptHelpers.isUndefined(a.persistent))throw Error.argument("persistent");if(!Boolean.isInstanceOfType(a.persistent))throw Error.argumentType("persistent",Object.getType(a.persistent),Boolean);}else{if(!$h.ScriptHelpers.isUndefined(a.icon))throw Error.argument("icon");if(!$h.ScriptHelpers.isUndefined(a.persistent))throw Error.argument("persistent");}if(!$h.ScriptHelpers.isNonEmptyString(a.message))throw Error.argument("message");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(a.message.length,0,150,"message")};$h.NotificationMessages.prototype={addAsync:function(f,d){for(var e=[],b=2;b<arguments.length;++b)e[b-2]=arguments[b];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync");var c=$h.CommonParameters.parse(e,false);$h.NotificationMessages._validateKey$p(f);$h.NotificationMessages._validateDictionary$p(d);var a={};a=$h.ScriptHelpers.deepClone(d);a.key=f;$h.NotificationMessages._mapToHostItemNotificationMessageType$p(a);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(33,a,null,c._asyncContext$p$0,c._callback$p$0)},getAllAsync:function(){for(var c=[],a=0;a<arguments.length;++a)c[a]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync");var b=$h.CommonParameters.parse(c,true);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(34,null,null,b._asyncContext$p$0,b._callback$p$0)},replaceAsync:function(f,d){for(var e=[],b=2;b<arguments.length;++b)e[b-2]=arguments[b];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync");var c=$h.CommonParameters.parse(e,false);$h.NotificationMessages._validateKey$p(f);$h.NotificationMessages._validateDictionary$p(d);var a={};a=$h.ScriptHelpers.deepClone(d);a.key=f;$h.NotificationMessages._mapToHostItemNotificationMessageType$p(a);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(35,a,null,c._asyncContext$p$0,c._callback$p$0)},removeAsync:function(d){for(var c=[],a=1;a<arguments.length;++a)c[a-1]=arguments[a];window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync");var b=$h.CommonParameters.parse(c,false);$h.NotificationMessages._validateKey$p(d);var e={key:d};window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(36,e,null,b._asyncContext$p$0,b._callback$p$0)}};$h.OutlookErrorManager=function(){};$h.OutlookErrorManager.getErrorArgs=function(a){!$h.OutlookErrorManager._isInitialized$p&&$h.OutlookErrorManager._initialize$p();return window.OSF.DDA.ErrorCodeManager.getErrorArgs(a)};$h.OutlookErrorManager._initialize$p=function(){$h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window._u.ExtensibilityStrings.l_AttachmentExceededSize_Text);$h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window._u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text);$h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window._u.ExtensibilityStrings.l_InternalFormatError_Text);$h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window._u.ExtensibilityStrings.l_InvalidAttachmentId_Text);$h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window._u.ExtensibilityStrings.l_InvalidAttachmentPath_Text);$h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window._u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text);$h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window._u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text);$h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window._u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text);$h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window._u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text);$h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window._u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text);$h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window._u.ExtensibilityStrings.l_InvalidEndTime_Text);$h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window._u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text);$h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window._u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text,500));$h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window._u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text);$h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window._u.ExtensibilityStrings.l_CursorPositionChanged_Text);$h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window._u.ExtensibilityStrings.l_InvalidSelection_Text);$h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted","");$h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError","");$h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError","");$h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError","");$h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window._u.ExtensibilityStrings.l_SaveError_Text);$h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window._u.ExtensibilityStrings.l_MessageInDifferentStoreError_Text);$h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window._u.ExtensibilityStrings.l_DuplicateNotificationKey_Text);$h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window._u.ExtensibilityStrings.l_NotificationKeyNotFound_Text);$h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window._u.ExtensibilityStrings.l_NumberOfNotificationsExceeded_Text);$h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window._u.ExtensibilityStrings.l_PersistedNotificationArrayReadError_Text);$h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window._u.ExtensibilityStrings.l_PersistedNotificationArraySaveError_Text);$h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window._u.ExtensibilityStrings.l_CannotPersistPropertyInUnsavedDraftError_Text);$h.OutlookErrorManager._isInitialized$p=true};$h.OutlookErrorManager._addErrorMessage$p=function(b,c,a){window.OSF.DDA.ErrorCodeManager.addErrorMessage(b,{name:c,message:a})};$h.OutlookErrorManager.OutlookErrorCodes=function(){};$h.OutlookErrorManager.OsfDdaErrorCodes=function(){};$h.PhoneNumber=function(a){this.$$d__getPhoneType$p$0=Function.createDelegate(this,this._getPhoneType$p$0);this.$$d__getOriginalPhoneString$p$0=Function.createDelegate(this,this._getOriginalPhoneString$p$0);this.$$d__getPhoneString$p$0=Function.createDelegate(this,this._getPhoneString$p$0);this._data$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0)};$h.PhoneNumber.prototype={_data$p$0:null,_getPhoneString$p$0:function(){return this._data$p$0.PhoneString},_getOriginalPhoneString$p$0:function(){return this._data$p$0.OriginalPhoneString},_getPhoneType$p$0:function(){return this._data$p$0.Type}};$h.TaskSuggestion=function(a){this.$$d__getAssignees$p$0=Function.createDelegate(this,this._getAssignees$p$0);this.$$d__getTaskString$p$0=Function.createDelegate(this,this._getTaskString$p$0);this._data$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0)};$h.TaskSuggestion.prototype={_data$p$0:null,_assignees$p$0:null,_getTaskString$p$0:function(){return this._data$p$0.TaskString},_getAssignees$p$0:function(){if(!this._assignees$p$0){var a=this;this._assignees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(a){return $h.EmailAddressDetails._createFromEmailUserDictionary$i(a)})}return this._assignees$p$0}};$h.UserProfile=function(a){this.$$d__getUserProfileType$p$0=Function.createDelegate(this,this._getUserProfileType$p$0);this.$$d__getTimeZone$p$0=Function.createDelegate(this,this._getTimeZone$p$0);this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);this._data$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getUserProfileType$p$0)};$h.UserProfile.prototype={_data$p$0:null,_getUserProfileType$p$0:function(){return this._data$p$0.get__userProfileType$i$0()},_getDisplayName$p$0:function(){return this._data$p$0.get__userDisplayName$i$0()},_getEmailAddress$p$0:function(){return this._data$p$0.get__userEmailAddress$i$0()},_getTimeZone$p$0:function(){return this._data$p$0.get__userTimeZone$i$0()}};$h.OutlookDispid=function(){};$h.OutlookDispid.prototype={owaOnlyMethod:0,getInitialData:1,getUserIdentityToken:2,loadCustomProperties:3,saveCustomProperties:4,ewsRequest:5,displayNewAppointmentForm:7,displayMessageForm:8,displayAppointmentForm:9,displayReplyForm:10,displayReplyAllForm:11,getCallbackToken:12,bodySetSelectedDataAsync:13,getBodyTypeAsync:14,getRecipientsAsync:15,addFileAttachmentAsync:16,setSubjectAsync:17,getSubjectAsync:18,addItemAttachmentAsync:19,removeAttachmentAsync:20,setRecipientsAsync:21,addRecipientsAsync:22,bodyPrependAsync:23,getTimeAsync:24,setTimeAsync:25,getLocationAsync:26,setLocationAsync:27,getSelectedDataAsync:28,setSelectedDataAsync:29,displayReplyFormWithAttachments:30,displayReplyAllFormWithAttachments:31,saveAsync:32,addNotficationMessageAsync:33,getAllNotficationMessagesAsync:34,replaceNotficationMessageAsync:35,removeNotficationMessageAsync:36,getBodyAsync:37,setBodyAsync:38,appCommands1:39,registerConsentAsync:40,close:41,closeApp:42,displayContactCardAsync:43,displayNewMessageForm:44,appCommands2:94,trackCtq:400,recordTrace:401,recordDataPoint:402,windowOpenOverrideHandler:403,saveSettingsRequest:404};$h.OutlookDispid.registerEnum("$h.OutlookDispid",false);$h.RequestState=function(){};$h.RequestState.prototype={unsent:0,opened:1,headersReceived:2,loading:3,done:4};$h.RequestState.registerEnum("$h.RequestState",false);$h.CommonParameters=function(c,b,a){this._options$p$0=c;this._callback$p$0=b;this._asyncContext$p$0=a};$h.CommonParameters.parse=function(a,i,j){var d,g,h;if(j&&(h=$h.CommonParameters._tryParseLegacy$p(a,g={val:d}),d=g.val,h))return d;var e=a.length,b=null,c=null,f=null;if(e===1)if(Function.isInstanceOfType(a[0]))c=a[0];else if(Object.isInstanceOfType(a[0]))b=a[0];else throw Error.argumentType();else if(e===2){if(!Object.isInstanceOfType(a[0]))throw Error.argument("options");if(!Function.isInstanceOfType(a[1]))throw Error.argument("callback");b=a[0];c=a[1]}else if(e)throw Error.parameterCount(window._u.ExtensibilityStrings.l_ParametersNotAsExpected_Text);if(i&&!c)throw Error.argumentNull("callback");if(b&&!$h.ScriptHelpers.isNullOrUndefined(b.asyncContext))f=b.asyncContext;return new $h.CommonParameters(b,c,f)};$h.CommonParameters._tryParseLegacy$p=function(a,c){c.val=null;var b=a.length,e=null,d=null;if(!b||b>2)return false;if(!Function.isInstanceOfType(a[0]))return false;e=a[0];if(b>1)d=a[1];c.val=new $h.CommonParameters(null,e,d);return true};$h.CommonParameters.prototype={_options$p$0:null,_callback$p$0:null,_asyncContext$p$0:null,get_options:function(){return this._options$p$0},get_callback:function(){return this._callback$p$0},get_asyncContext:function(){return this._asyncContext$p$0}};$h.EwsRequest=function(a){$h.EwsRequest.initializeBase(this,[a])};$h.EwsRequest.prototype={readyState:1,status:0,statusText:null,onreadystatechange:null,responseText:null,get__statusCode$i$1:function(){return this.status},set__statusCode$i$1:function(a){this.status=a;return a},get__statusDescription$i$1:function(){return this.statusText},set__statusDescription$i$1:function(a){this.statusText=a;return a},get__requestState$i$1:function(){return this.readyState},set__requestState$i$1:function(a){this.readyState=a;return a},get_hasOnReadyStateChangeCallback:function(){return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)},get__response$i$1:function(){return this.responseText},set__response$i$1:function(a){this.responseText=a;return a},send:function(a){this._checkSendConditions$i$1();$h.ScriptHelpers.isNullOrUndefined(a)&&this._throwInvalidStateException$i$1();this._sendRequest$i$0(5,"EwsRequest",{body:a})},_callOnReadyStateChangeCallback$i$1:function(){!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)&&this.onreadystatechange()},_parseExtraResponseData$i$1:function(){},executeExtraFailedResponseSteps:function(){}};$h.InitialData=function(a){this._data$p$0=a;this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()};$h.InitialData._defineReadOnlyProperty$i=function(d,b,c){var a={"get":c,configurable:false};Object.defineProperty(d,b,a)};$h.InitialData.prototype={_toRecipients$p$0:null,_ccRecipients$p$0:null,_attachments$p$0:null,_resources$p$0:null,_entities$p$0:null,_data$p$0:null,_permissionLevel$p$0:0,get__isRestIdSupported$i$0:function(){return this._data$p$0.isRestIdSupported},get__itemId$i$0:function(){return this._data$p$0.id},get__itemClass$i$0:function(){return this._data$p$0.itemClass},get__dateTimeCreated$i$0:function(){return new Date(this._data$p$0.dateTimeCreated)},get__dateTimeModified$i$0:function(){return new Date(this._data$p$0.dateTimeModified)},get__dateTimeSent$i$0:function(){return new Date(this._data$p$0.dateTimeSent)},get__subject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.subject},get__normalizedSubject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.normalizedSubject},get__internetMessageId$i$0:function(){return this._data$p$0.internetMessageId},get__conversationId$i$0:function(){return this._data$p$0.conversationId},get__sender$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var a=this._data$p$0.sender;return $h.ScriptHelpers.isNullOrUndefined(a)?null:new $h.EmailAddressDetails(a)},get__from$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var a=this._data$p$0.from;return $h.ScriptHelpers.isNullOrUndefined(a)?null:new $h.EmailAddressDetails(a)},get__to$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();if(null===this._toRecipients$p$0)this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to");return this._toRecipients$p$0},get__cc$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();if(null===this._ccRecipients$p$0)this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc");return this._ccRecipients$p$0},get__attachments$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();if(null===this._attachments$p$0)this._attachments$p$0=this._createAttachmentDetails$p$0();return this._attachments$p$0},get__ewsUrl$i$0:function(){return this._data$p$0.ewsUrl},get__marketplaceAssetId$i$0:function(){return this._data$p$0.marketplaceAssetId},get__extensionId$i$0:function(){return this._data$p$0.extensionId},get__marketplaceContentMarket$i$0:function(){return this._data$p$0.marketplaceContentMarket},get__consentMetadata$i$0:function(){return this._data$p$0.consentMetadata},get__isRead$i$0:function(){return this._data$p$0.isRead},get__endNodeUrl$i$0:function(){return this._data$p$0.endNodeUrl},get__entryPointUrl$i$0:function(){return this._data$p$0.entryPointUrl},get__start$i$0:function(){return new Date(this._data$p$0.start)},get__end$i$0:function(){return new Date(this._data$p$0.end)},get__location$i$0:function(){return this._data$p$0.location},get__userProfileType$i$0:function(){return this._data$p$0.userProfileType},get__resources$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();if(null===this._resources$p$0)this._resources$p$0=this._createEmailAddressDetails$p$0("resources");return this._resources$p$0},get__organizer$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var a=this._data$p$0.organizer;return $h.ScriptHelpers.isNullOrUndefined(a)?null:new $h.EmailAddressDetails(a)},get__userDisplayName$i$0:function(){return this._data$p$0.userDisplayName},get__userEmailAddress$i$0:function(){return this._data$p$0.userEmailAddress},get__userTimeZone$i$0:function(){return this._data$p$0.userTimeZone},get__timeZoneOffsets$i$0:function(){return this._data$p$0.timeZoneOffsets},get__hostVersion$i$0:function(){return this._data$p$0.hostVersion},get__owaView$i$0:function(){return this._data$p$0.owaView},get__overrideWindowOpen$i$0:function(){return this._data$p$0.overrideWindowOpen},_getEntities$i$0:function(){if(!this._entities$p$0)this._entities$p$0=new $h.Entities(this._data$p$0.entities,this._data$p$0.filteredEntities,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0);return this._entities$p$0},_getEntitiesByType$i$0:function(a){var b=this._getEntities$i$0();return b._getByType$i$0(a)},_getFilteredEntitiesByName$i$0:function(b){var a=this._getEntities$i$0();return a._getFilteredEntitiesByName$i$0(b)},_getRegExMatches$i$0:function(){return!this._data$p$0.regExMatches?null:this._data$p$0.regExMatches},_getRegExMatchesByName$i$0:function(b){var a=this._getRegExMatches$i$0();return!a||!a[b]?null:a[b]},_throwOnRestrictedPermissionLevel$i$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)},_createEmailAddressDetails$p$0:function(d){var b=this._data$p$0[d];if($h.ScriptHelpers.isNullOrUndefined(b))return[];for(var c=[],a=0;a<b.length;a++)if(!$h.ScriptHelpers.isNullOrUndefined(b[a]))c[a]=new $h.EmailAddressDetails(b[a]);return c},_createAttachmentDetails$p$0:function(){var b=this._data$p$0.attachments;if($h.ScriptHelpers.isNullOrUndefined(b))return[];for(var c=[],a=0;a<b.length;a++)if(!$h.ScriptHelpers.isNullOrUndefined(b[a]))c[a]=new $h.AttachmentDetails(b[a]);return c},_calculatePermissionLevel$p$0:function(){var d=1,b=2,c=3,a=this._data$p$0.permissionLevel;if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0))return 0;switch(a){case d:return 1;case c:return 2;case b:return 3;default:return 0}}};$h._loadDictionaryRequest=function(a,b,d,c){$h._loadDictionaryRequest.initializeBase(this,[c]);this._createResultObject$p$1=a;this._dictionaryName$p$1=b;this._callback$p$1=d};$h._loadDictionaryRequest.prototype={_dictionaryName$p$1:null,_createResultObject$p$1:null,_callback$p$1:null,handleResponse:function(a){if(a.wasSuccessful){var c=a[this._dictionaryName$p$1],b=window.JSON.parse(c);this.createAsyncResult(this._createResultObject$p$1(b),0,0,null)}else this.createAsyncResult(null,1,9020,a.errorMessage);this._callback$p$1(this._asyncResult$p$0)}};$h.ProxyRequestBase=function(a){$h.ProxyRequestBase.initializeBase(this,[a])};$h.ProxyRequestBase.prototype={handleResponse:function(a){if(!a.wasProxySuccessful){this.set__statusCode$i$1(500);this.set__statusDescription$i$1("Error");var b=a.errorMessage;this.set__response$i$1(b);this.createAsyncResult(null,1,9020,b)}else{this.set__statusCode$i$1(a.statusCode);this.set__statusDescription$i$1(a.statusDescription);this.set__response$i$1(a.body);this.createAsyncResult(this.get__response$i$1(),0,0,null)}this._parseExtraResponseData$i$1(a);this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1()},_throwInvalidStateException$i$1:function(){throw Error.create("DOMException",{code:11,message:"INVALID_STATE_ERR"});},_cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1:function(){var a=this;this._changeReadyState$i$1(2,function(){a._changeReadyState$i$1(3,function(){a._changeReadyState$i$1(4,null)})})},_changeReadyState$i$1:function(c,a){this.set__requestState$i$1(c);var b=this;window.setTimeout(function(){try{b._callOnReadyStateChangeCallback$i$1()}finally{!$h.ScriptHelpers.isNullOrUndefined(a)&&a()}},0)},_checkSendConditions$i$1:function(){this.get__requestState$i$1()!==1&&this._throwInvalidStateException$i$1();this._isSent$p$0&&this._throwInvalidStateException$i$1()}};$h.RequestBase=function(a){this._userContext$p$0=a};$h.RequestBase.prototype={_isSent$p$0:false,_asyncResult$p$0:null,_userContext$p$0:null,get_asyncResult:function(){return this._asyncResult$p$0},_sendRequest$i$0:function(c,d,b){this._isSent$p$0=true;var a=this;window.OSF.DDA.OutlookAppOm._instance$p.invokeHostMethod(c,b,function(b,c){if(b)a.createAsyncResult(null,1,9017,String.format(window._u.ExtensibilityStrings.l_InternalProtocolError_Text,b));else a.handleResponse(c)})},createAsyncResult:function(d,c,a,b){this._asyncResult$p$0=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(d,c,a,this._userContext$p$0,b)}};$h.SaveDictionaryRequest=function(a,b){$h.SaveDictionaryRequest.initializeBase(this,[b]);if(!$h.ScriptHelpers.isNullOrUndefined(a))this._callback$p$1=a};$h.SaveDictionaryRequest.prototype={_callback$p$1:null,handleResponse:function(a){if(a.wasSuccessful)this.createAsyncResult(null,0,0,null);else this.createAsyncResult(null,1,9020,a.errorMessage);!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1)&&this._callback$p$1(this._asyncResult$p$0)}};$h.ScriptHelpers=function(){};$h.ScriptHelpers.isNull=function(a){return null===a};$h.ScriptHelpers.isNullOrUndefined=function(a){return $h.ScriptHelpers.isNull(a)||$h.ScriptHelpers.isUndefined(a)};$h.ScriptHelpers.isUndefined=function(a){return a===undefined};$h.ScriptHelpers.dictionaryContainsKey=function(a,b){return Object.isInstanceOfType(a)?b in a:false};$h.ScriptHelpers.isNonEmptyString=function(a){return!a?false:String.isInstanceOfType(a)};$h.ScriptHelpers.deepClone=function(a){return window.JSON.parse(window.JSON.stringify(a))};window.OSF.DDA.OutlookAppOm.registerClass("OSF.DDA.OutlookAppOm");window.OSF.DDA.Settings.registerClass("OSF.DDA.Settings");$h.ItemBase.registerClass("$h.ItemBase");$h.Item.registerClass("$h.Item",$h.ItemBase);$h.Appointment.registerClass("$h.Appointment",$h.Item);$h.ComposeItem.registerClass("$h.ComposeItem",$h.ItemBase);$h.AppointmentCompose.registerClass("$h.AppointmentCompose",$h.ComposeItem);$h.AttachmentConstants.registerClass("$h.AttachmentConstants");$h.AttachmentDetails.registerClass("$h.AttachmentDetails");$h.Body.registerClass("$h.Body");$h.ComposeBody.registerClass("$h.ComposeBody",$h.Body);$h.ComposeRecipient.registerClass("$h.ComposeRecipient");$h.ComposeLocation.registerClass("$h.ComposeLocation");$h.ComposeSubject.registerClass("$h.ComposeSubject");$h.ComposeTime.registerClass("$h.ComposeTime");$h.Contact.registerClass("$h.Contact");$h.CustomProperties.registerClass("$h.CustomProperties");$h.Diagnostics.registerClass("$h.Diagnostics");$h.EmailAddressDetails.registerClass("$h.EmailAddressDetails");$h.Entities.registerClass("$h.Entities");$h.ReplyConstants.registerClass("$h.ReplyConstants");$h.AsyncConstants.registerClass("$h.AsyncConstants");window.Office.cast.item.registerClass("Office.cast.item");$h.Message.registerClass("$h.Message",$h.Item);$h.MeetingRequest.registerClass("$h.MeetingRequest",$h.Message);$h.MeetingSuggestion.registerClass("$h.MeetingSuggestion");$h.MeetingSuggestionTimeDecoder.registerClass("$h.MeetingSuggestionTimeDecoder");$h._extractedDate.registerClass("$h._extractedDate");$h._preciseDate.registerClass("$h._preciseDate",$h._extractedDate);$h._relativeDate.registerClass("$h._relativeDate",$h._extractedDate);$h.MessageCompose.registerClass("$h.MessageCompose",$h.ComposeItem);$h.NotificationMessages.registerClass("$h.NotificationMessages");$h.OutlookErrorManager.registerClass("$h.OutlookErrorManager");$h.OutlookErrorManager.OutlookErrorCodes.registerClass("$h.OutlookErrorManager.OutlookErrorCodes");$h.OutlookErrorManager.OsfDdaErrorCodes.registerClass("$h.OutlookErrorManager.OsfDdaErrorCodes");$h.PhoneNumber.registerClass("$h.PhoneNumber");$h.TaskSuggestion.registerClass("$h.TaskSuggestion");$h.UserProfile.registerClass("$h.UserProfile");$h.CommonParameters.registerClass("$h.CommonParameters");$h.RequestBase.registerClass("$h.RequestBase");$h.ProxyRequestBase.registerClass("$h.ProxyRequestBase",$h.RequestBase);$h.EwsRequest.registerClass("$h.EwsRequest",$h.ProxyRequestBase);$h.InitialData.registerClass("$h.InitialData");$h._loadDictionaryRequest.registerClass("$h._loadDictionaryRequest",$h.RequestBase);$h.SaveDictionaryRequest.registerClass("$h.SaveDictionaryRequest",$h.RequestBase);$h.ScriptHelpers.registerClass("$h.ScriptHelpers");window.OSF.DDA.OutlookAppOm.asyncMethodTimeoutKeyName="__timeout__";window.OSF.DDA.OutlookAppOm.ewsIdOrEmailParamName="ewsIdOrEmail";window.OSF.DDA.OutlookAppOm._maxRecipients$p=100;window.OSF.DDA.OutlookAppOm._maxSubjectLength$p=255;window.OSF.DDA.OutlookAppOm.maxBodyLength=32768;window.OSF.DDA.OutlookAppOm._maxLocationLength$p=255;window.OSF.DDA.OutlookAppOm._maxEwsRequestSize$p=1e6;window.OSF.DDA.OutlookAppOm.executeMethodName="ExecuteMethod";window.OSF.DDA.OutlookAppOm.getInitialDataMethodName="GetInitialData";window.OSF.DDA.OutlookAppOm.itemIdParameterName="itemId";window.OSF.DDA.OutlookAppOm.restVersionParameterName="restVersion";window.OSF.DDA.OutlookAppOm._instance$p=null;$h.AttachmentConstants.maxAttachmentNameLength=255;$h.AttachmentConstants.maxUrlLength=2048;$h.AttachmentConstants.maxItemIdLength=200;$h.AttachmentConstants.maxRemoveIdLength=200;$h.AttachmentConstants.attachmentParameterName="attachments";$h.AttachmentConstants.attachmentTypeParameterName="type";$h.AttachmentConstants.attachmentUrlParameterName="url";$h.AttachmentConstants.attachmentItemIdParameterName="itemId";$h.AttachmentConstants.attachmentNameParameterName="name";$h.AttachmentConstants.attachmentTypeFileName="file";$h.AttachmentConstants.attachmentTypeItemName="item";$h.AttachmentDetails._attachmentTypeMap$p=[window.Microsoft.Office.WebExtension.MailboxEnums.AttachmentType.File,window.Microsoft.Office.WebExtension.MailboxEnums.AttachmentType.Item,window.Microsoft.Office.WebExtension.MailboxEnums.AttachmentType.Cloud];$h.Body.coercionTypeParameterName="coercionType";$h.ComposeRecipient.displayNameLengthLimit=255;$h.ComposeRecipient.maxSmtpLength=571;$h.ComposeRecipient.recipientsLimit=100;$h.ComposeRecipient.totalRecipientsLimit=500;$h.ComposeRecipient.addressParameterName="address";$h.ComposeRecipient.nameParameterName="name";$h.ComposeLocation.locationKey="location";$h.ComposeLocation.maximumLocationLength=255;$h.ComposeSubject.maximumSubjectLength=255;$h.ComposeTime.timeTypeName="TimeProperty";$h.ComposeTime.timeDataName="time";$h.Diagnostics.outlookAppName="Outlook";$h.Diagnostics.outlookWebAppName="OutlookWebApp";$h.EmailAddressDetails._emptyString$p="";$h.EmailAddressDetails._responseTypeMap$p=[window.Microsoft.Office.WebExtension.MailboxEnums.ResponseType.None,window.Microsoft.Office.WebExtension.MailboxEnums.ResponseType.Organizer,window.Microsoft.Office.WebExtension.MailboxEnums.ResponseType.Tentative,window.Microsoft.Office.WebExtension.MailboxEnums.ResponseType.Accepted,window.Microsoft.Office.WebExtension.MailboxEnums.ResponseType.Declined];$h.EmailAddressDetails._recipientTypeMap$p=[window.Microsoft.Office.WebExtension.MailboxEnums.RecipientType.Other,window.Microsoft.Office.WebExtension.MailboxEnums.RecipientType.DistributionList,window.Microsoft.Office.WebExtension.MailboxEnums.RecipientType.User,window.Microsoft.Office.WebExtension.MailboxEnums.RecipientType.ExternalUser];$h.Entities._allEntityKeys$p=["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"];$h.ReplyConstants.htmlBodyKeyName="htmlBody";$h.AsyncConstants.optionsKeyName="options";$h.AsyncConstants.callbackKeyName="callback";$h.AsyncConstants.asyncResultKeyName="asyncResult";$h.MeetingSuggestionTimeDecoder._baseDate$p=new Date("0001-01-01T00:00:00Z");$h.NotificationMessages.maximumKeyLength=32;$h.NotificationMessages.maximumIconLength=32;$h.NotificationMessages.maximumMessageLength=150;$h.NotificationMessages.notificationsKeyParameterName="key";$h.NotificationMessages.notificationsTypeParameterName="type";$h.NotificationMessages.notificationsIconParameterName="icon";$h.NotificationMessages.notificationsMessageParameterName="message";$h.NotificationMessages.notificationsPersistentParameterName="persistent";$h.OutlookErrorManager.errorNameKey="name";$h.OutlookErrorManager.errorMessageKey="message";$h.OutlookErrorManager._isInitialized$p=false;$h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded=9e3;$h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded=9001;$h.OutlookErrorManager.OutlookErrorCodes.internalFormatError=9002;$h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId=9003;$h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath=9004;$h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade=9005;$h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes=9006;$h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure=9007;$h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist=9008;$h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure=9009;$h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime=9010;$h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure=9011;$h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded=9012;$h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided=9013;$h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged=9014;$h.OutlookErrorManager.OutlookErrorCodes.invalidSelection=9016;$h.OutlookErrorManager.OutlookErrorCodes.accessRestricted=9017;$h.OutlookErrorManager.OutlookErrorCodes.genericTokenError=9018;$h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError=9019;$h.OutlookErrorManager.OutlookErrorCodes.genericResponseError=9020;$h.OutlookErrorManager.OutlookErrorCodes.saveError=9021;$h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError=9022;$h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey=9023;$h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound=9024;$h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded=9025;$h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError=9026;$h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError=9027;$h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError=9028;$h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat=2006;$h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported=1e3;$h.CommonParameters.asyncContextKeyName="asyncContext";$h.InitialData.userProfileTypeKey="userProfileType";$h.ScriptHelpers.emptyString="";OSF.ClientMode={ReadWrite:0,ReadOnly:1};OSF.DDA.RichInitializationReason={1:Microsoft.Office.WebExtension.InitializationReason.Inserted,2:Microsoft.Office.WebExtension.InitializationReason.DocumentOpened};Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed"};OSF.DDA.RichClientSettingsManager={read:function(e,d){var b=[],f=[];e&&e();window.external.GetContext().GetSettings().Read(b,f);d&&d();for(var c={},a=0;a<b.length;a++)c[b[a]]=f[a];return c},write:function(a,g,c,b){var e=[],d=[];for(var f in a){e.push(f);d.push(a[f])}c&&c();window.external.GetContext().GetSettings().Write(e,d);b&&b()}};OSF.DDA.DispIdHost.getRichClientDelegateMethods=function(e){var a={};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync;a[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync;a[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync;a[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.MessageParent;function b(a){return function(b){var d,c;try{c=a(b.hostCallArgs,b.onCalling,b.onReceiving);d=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}catch(e){d=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;c={name:Strings.OfficeOM.L_InternalError,message:e}}if(b.onComplete)b.onComplete(d,c)}}function d(c,b,a){return OSF.DDA.RichClientSettingsManager.read(b,a)}function c(a,c,b){return OSF.DDA.RichClientSettingsManager.write(a[OSF.DDA.SettingsManager.SerializedSettings],a[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],c,b)}switch(e){case OSF.DDA.AsyncMethodNames.RefreshAsync.id:a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=b(d);break;case OSF.DDA.AsyncMethodNames.SaveAsync.id:a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=b(c)}return a};OSF.DDA.DispIdHost.getClientDelegateMethods=function(b){var a={};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync;a[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync;a[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync;a[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.MessageParent;if(OSF.DDA.AsyncMethodNames.RefreshAsync&&b==OSF.DDA.AsyncMethodNames.RefreshAsync.id){var d=function(c,b,a){return OSF.DDA.ClientSettingsManager.read(b,a)};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(d)}if(OSF.DDA.AsyncMethodNames.SaveAsync&&b==OSF.DDA.AsyncMethodNames.SaveAsync.id){var c=function(a,c,b){return OSF.DDA.ClientSettingsManager.write(a[OSF.DDA.SettingsManager.SerializedSettings],a[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],c,b)};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(c)}return a};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.CustomXmlParts=function(){this._eventDispatches=[];var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddDataPartAsync,a.GetDataPartByIdAsync,a.GetDataPartsByNameSpaceAsync])};OSF.DDA.CustomXmlPart=function(f,b,g){OSF.OUtil.defineEnumerableProperties(this,{builtIn:{value:g},id:{value:b},namespaceManager:{value:new OSF.DDA.CustomXmlPrefixMappings(b)}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[c.DeleteDataPartAsync,c.GetPartNodesAsync,c.GetPartXmlAsync]);var e=f._eventDispatches,a=e[b];if(!a){var d=Microsoft.Office.WebExtension.EventType;a=new OSF.EventDispatch([d.DataNodeDeleted,d.DataNodeInserted,d.DataNodeReplaced]);e[b]=a}OSF.DDA.DispIdHost.addEventSupport(this,a)};OSF.DDA.CustomXmlPrefixMappings=function(b){var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddDataPartNamespaceAsync,a.GetDataPartNamespaceAsync,a.GetDataPartPrefixAsync],b)};OSF.DDA.CustomXmlNode=function(d,c,e,b){OSF.OUtil.defineEnumerableProperties(this,{baseName:{value:b},namespaceUri:{value:e},nodeType:{value:c}});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.GetRelativeNodesAsync,a.GetNodeValueAsync,a.GetNodeXmlAsync,a.SetNodeValueAsync,a.SetNodeXmlAsync,a.GetNodeTextAsync,a.SetNodeTextAsync],d)};OSF.DDA.NodeInsertedEventArgs=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeInserted},newNode:{value:b},inUndoRedo:{value:a}})};OSF.DDA.NodeReplacedEventArgs=function(c,b,a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeReplaced},oldNode:{value:c},newNode:{value:b},inUndoRedo:{value:a}})};OSF.DDA.NodeDeletedEventArgs=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeDeleted},oldNode:{value:c},oldNextSibling:{value:a},inUndoRedo:{value:b}})};var OSFRichclient;(function(b){var a=function(){function a(){}a.prototype.execute=function(c,b,a){window.external.Execute(c,b,a)};a.prototype.registerEvent=function(d,b,c,a){window.external.RegisterEvent(d,b,c,a)};a.prototype.unregisterEvent=function(c,b,a){window.external.UnregisterEvent(c,b,a)};return a}();b.RichClientHostController=a})(OSFRichclient||(OSFRichclient={}));OSF.ClientHostController=new OSFRichclient.RichClientHostController;var OfficeExt;(function(a){(function(b){var e=function(){function d(){var a=this;this._pseudoDocument=null;this._eventDispatch=null;this._processAppCommandInvocation=function(b){var c=a._verifyManifestCallback(b.callbackName);if(c.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){a._invokeAppCommandCompletedMethod(b.appCommandId,c.errorCode,"");return}var d=a._constructEventObjectForCallback(b);if(d)window.setTimeout(function(){c.callback(d)},0);else a._invokeAppCommandCompletedMethod(b.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}d.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string"]}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=a.AppCommand.AppCommandInvokedEventArgs};d.prototype.initializeAndChangeOnce=function(a){b.registerDdaFacade();this._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);var c=function(b){if(a)if(b.status=="succeeded")a(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);else a(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch);this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,c)};d.prototype._verifyManifestCallback=function(e){var d={callback:null,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback};e=e.trim();try{for(var a=e.split("."),b=window,c=0;c<a.length-1;c++)if(b[a[c]]&&typeof b[a[c]]=="object")b=b[a[c]];else return d;var f=b[a[a.length-1]];if(typeof f!="function")return d}catch(g){return d}return{callback:f,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}};d.prototype._invokeAppCommandCompletedMethod=function(a,b,c){this._pseudoDocument.appCommandInvocationCompletedAsync(a,b,c)};d.prototype._constructEventObjectForCallback=function(b){var e=this,a=new c;try{var d=JSON.parse(b.eventObjStr);this._translateEventObjectInternal(d,a);Object.defineProperty(a,"completed",{value:function(){var c=JSON.stringify(a);e._invokeAppCommandCompletedMethod(b.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,c)},enumerable:true})}catch(f){a=null}return a};d.prototype._translateEventObjectInternal=function(d,c){for(var a in d){if(!d.hasOwnProperty(a))continue;var b=d[a];if(typeof b=="object"&&b!=null){OSF.OUtil.defineEnumerableProperty(c,a,{value:{}});this._translateEventObjectInternal(b,c[a])}else Object.defineProperty(c,a,{value:b,enumerable:true,writable:true})}};d.prototype._constructObjectByTemplate=function(c,g){var b={};if(!c||!g)return b;for(var a in c)if(c.hasOwnProperty(a)){b[a]=null;if(g[a]!=null){var e=c[a],f=g[a],d=typeof f;if(typeof e=="object"&&e!=null)b[a]=this._constructObjectByTemplate(e,f);else if(d=="number"||d=="string"||d=="boolean")b[a]=f}}return b};d.instance=function(){if(d._instance==null)d._instance=new d;return d._instance};d._instance=null;return d}();b.AppCommandManager=e;var d=function(){function a(a,b,c){this.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked;this.appCommandId=a;this.callbackName=b;this.eventObjStr=c}a.create=function(c){return new a(c[b.AppCommandInvokedEventEnums.AppCommandId],c[b.AppCommandInvokedEventEnums.CallbackName],c[b.AppCommandInvokedEventEnums.EventObjStr])};return a}();b.AppCommandInvokedEventArgs=d;var c=function(){function a(){}return a}();b.AppCommandCallbackEventArgs=c;b.AppCommandInvokedEventEnums={AppCommandId:"appCommandId",CallbackName:"callbackName",EventObjStr:"eventObjStr"}})(a.AppCommand||(a.AppCommand={}));var b=a.AppCommand})(OfficeExt||(OfficeExt={}));OfficeExt.AppCommand.AppCommandManager.initializeOsfDda();var OfficeExt;(function(a){(function(c){function b(){if(OSF.DDA.SafeArray){var b=OSF.DDA.SafeArray.Delegate.ParameterMap;b.define({type:OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Status,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2}]});b.define({type:OSF.DDA.EventDispId.dispidAppCommandInvokedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,value:b.self}],isComplexType:true});b.define({type:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,fromHost:[{name:a.AppCommand.AppCommandInvokedEventEnums.AppCommandId,value:0},{name:a.AppCommand.AppCommandInvokedEventEnums.CallbackName,value:1},{name:a.AppCommand.AppCommandInvokedEventEnums.EventObjStr,value:2}],isComplexType:true})}}c.registerDdaFacade=b})(a.AppCommand||(a.AppCommand={}));var b=a.AppCommand})(OfficeExt||(OfficeExt={}));var OfficeJsClient_OutlookWin32;(function(a){function c(){var a=OfficeExt.AppCommand.AppCommandManager.instance();a.initializeAndChangeOnce()}function b(){OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap))}a.prepareRightBeforeWebExtensionInitialize=b;a.prepareRightAfterWebExtensionInitialize=c})(OfficeJsClient_OutlookWin32||(OfficeJsClient_OutlookWin32={}));OSF.OUtil.setNamespace("SafeArray",OSF.DDA);OSF.DDA.SafeArray.Response={Status:0,Payload:1};OSF.DDA.SafeArray.UniqueArguments={Offset:"offset",Run:"run",BindingSpecificData:"bindingSpecificData",MergedCellGuid:"{66e7831f-81b2-42e2-823c-89e872d541b3}"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.SafeArray);OSF.DDA.SafeArray.Delegate.SpecialProcessor=function(){function b(a){var b;try{var h=a.ubound(1),d=a.ubound(2);a=a.toArray();if(h==1&&d==1)b=[a];else{b=[];for(var f=0;f<h;f++){for(var c=[],e=0;e<d;e++){var g=a[f*d+e];g!=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid&&c.push(g)}c.length>0&&b.push(c)}}}catch(i){}return b}var c=[OSF.DDA.PropertyDescriptors.FileProperties,OSF.DDA.PropertyDescriptors.FileSliceProperties,OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,OSF.DDA.PropertyDescriptors.BindingProperties,OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,OSF.DDA.SafeArray.UniqueArguments.Offset,OSF.DDA.SafeArray.UniqueArguments.Run,OSF.DDA.PropertyDescriptors.Subset,OSF.DDA.PropertyDescriptors.DataPartProperties,OSF.DDA.PropertyDescriptors.DataNodeProperties,OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,OSF.DDA.EventDescriptors.DataNodeInsertedEvent,OSF.DDA.EventDescriptors.DataNodeReplacedEvent,OSF.DDA.EventDescriptors.DataNodeDeletedEvent,OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,OSF.DDA.EventDescriptors.ActiveViewChangedEvent,OSF.DDA.EventDescriptors.AppCommandInvokedEvent,OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode,Microsoft.Office.Internal.Parameters.OfficeTheme,Microsoft.Office.Internal.Parameters.DocumentTheme],a={};a[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,a=1;return{toHost:function(b){if(typeof b!="string"&&b[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=b[OSF.DDA.TableDataProperties.TableRows];d[a]=b[OSF.DDA.TableDataProperties.TableHeaders];b=d}return b},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=b(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=b(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=b(d[a])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,a);this.pack=function(c,d){var b;if(this.isDynamicType(c))b=a[c].toHost(d);else b=d;return b};this.unpack=function(c,d){var b;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c))try{b=d.toArray()}catch(e){b=d||{}}else if(this.isDynamicType(c))b=a[c].fromHost(d);else b=d;return b};this.dynamicTypes=a};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=function(){var e=new OSF.DDA.HostParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor),a,d=e.self;function f(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}function b(b){var a={},c=f(b.toHost);if(b.invertible)a.map=c;else if(b.canonical)a.toHost=a.fromHost=c;else{a.toHost=c;a.fromHost=f(b.fromHost)}e.setMapping(b.type,a)}a=OSF.DDA.FileProperties;b({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:a.Handle,value:0},{name:a.FileSize,value:1}]});b({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:a.SliceSize,value:1}]});a=OSF.DDA.FilePropertiesDescriptor;b({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:a.Url,value:0}]});a=OSF.DDA.BindingProperties;b({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:a.Id,value:0},{name:a.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}]});b({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:a.RowCount,value:0},{name:a.ColumnCount,value:1},{name:a.HasHeaders,value:2}]});a=OSF.DDA.SafeArray.UniqueArguments;b({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:a.Offset,value:0},{name:a.Run,value:1}],canonical:true});a=Microsoft.Office.WebExtension.Parameters;b({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:a.StartRow,value:0},{name:a.StartColumn,value:1}],canonical:true});b({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:a.RowCount,value:0},{name:a.ColumnCount,value:1}],canonical:true});a=OSF.DDA.DataPartProperties;b({type:OSF.DDA.PropertyDescriptors.DataPartProperties,fromHost:[{name:a.Id,value:0},{name:a.BuiltIn,value:1}]});a=OSF.DDA.DataNodeProperties;b({type:OSF.DDA.PropertyDescriptors.DataNodeProperties,fromHost:[{name:a.Handle,value:0},{name:a.BaseName,value:1},{name:a.NamespaceUri,value:2},{name:a.NodeType,value:3}]});b({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}]});b({type:OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,fromHost:[{name:Microsoft.Office.Internal.Parameters.DocumentTheme,value:d}]});b({type:OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,fromHost:[{name:Microsoft.Office.Internal.Parameters.OfficeTheme,value:d}]});b({type:OSF.DDA.EventDescriptors.ActiveViewChangedEvent,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ActiveView,value:0}]});a=OSF.DDA.DataNodeEventProperties;b({type:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,fromHost:[{name:a.InUndoRedo,value:0},{name:a.NewNode,value:1}]});b({type:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,fromHost:[{name:a.InUndoRedo,value:0},{name:a.OldNode,value:1},{name:a.NewNode,value:2}]});b({type:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,fromHost:[{name:a.InUndoRedo,value:0},{name:a.OldNode,value:1},{name:a.NextSiblingNode,value:2}]});b({type:a.OldNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:d}]});b({type:a.NewNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:d}]});b({type:a.NextSiblingNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:d}]});a=Microsoft.Office.WebExtension.AsyncResultStatus;b({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:a.Succeeded,value:0},{name:a.Failed,value:1}]});a=Microsoft.Office.WebExtension.CoercionType;b({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:a.Text,value:0},{name:a.Matrix,value:1},{name:a.Table,value:2},{name:a.Html,value:3},{name:a.Ooxml,value:4},{name:a.SlideRange,value:7},{name:a.Image,value:8}]});a=Microsoft.Office.WebExtension.GoToType;b({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:a.Binding,value:0},{name:a.NamedItem,value:1},{name:a.Slide,value:2},{name:a.Index,value:3}]});a=Microsoft.Office.WebExtension.FileType;a&&b({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:a.Text,value:0},{name:a.Compressed,value:5},{name:a.Pdf,value:6}]});a=Microsoft.Office.WebExtension.BindingType;a&&b({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:a.Text,value:0},{name:a.Matrix,value:1},{name:a.Table,value:2}],invertible:true});a=Microsoft.Office.WebExtension.ValueFormat;b({type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:a.Unformatted,value:0},{name:a.Formatted,value:1}]});a=Microsoft.Office.WebExtension.FilterType;b({type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:a.All,value:0},{name:a.OnlyVisible,value:1}]});a=Microsoft.Office.Internal.OfficeTheme;a&&b({type:Microsoft.Office.Internal.Parameters.OfficeTheme,fromHost:[{name:a.PrimaryFontColor,value:0},{name:a.PrimaryBackgroundColor,value:1},{name:a.SecondaryFontColor,value:2},{name:a.SecondaryBackgroundColor,value:3}]});a=Microsoft.Office.WebExtension.ActiveView;a&&b({type:Microsoft.Office.WebExtension.Parameters.ActiveView,fromHost:[{name:0,value:a.Read},{name:1,value:a.Edit}]});a=Microsoft.Office.Internal.DocumentTheme;a&&b({type:Microsoft.Office.Internal.Parameters.DocumentTheme,fromHost:[{name:a.PrimaryBackgroundColor,value:0},{name:a.PrimaryFontColor,value:1},{name:a.SecondaryBackgroundColor,value:2},{name:a.SecondaryFontColor,value:3},{name:a.Accent1,value:4},{name:a.Accent2,value:5},{name:a.Accent3,value:6},{name:a.Accent4,value:7},{name:a.Accent5,value:8},{name:a.Accent6,value:9},{name:a.Hyperlink,value:10},{name:a.FollowedHyperlink,value:11},{name:a.HeaderLatinFont,value:12},{name:a.HeaderEastAsianFont,value:13},{name:a.HeaderScriptFont,value:14},{name:a.HeaderLocalizedFont,value:15},{name:a.BodyLatinFont,value:16},{name:a.BodyEastAsianFont,value:17},{name:a.BodyScriptFont,value:18},{name:a.BodyLocalizedFont,value:19}]});a=Microsoft.Office.WebExtension.SelectionMode;b({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:a.Default,value:0},{name:a.Selected,value:1},{name:a.None,value:2}]});a=Microsoft.Office.WebExtension.Parameters;var c=OSF.DDA.MethodDispId;b({type:c.dispidNavigateToMethod,toHost:[{name:a.Id,value:0},{name:a.GoToType,value:1},{name:a.SelectionMode,value:2}]});b({type:c.dispidGetSelectedDataMethod,fromHost:[{name:a.Data,value:d}],toHost:[{name:a.CoercionType,value:0},{name:a.ValueFormat,value:1},{name:a.FilterType,value:2}]});b({type:c.dispidSetSelectedDataMethod,toHost:[{name:a.CoercionType,value:0},{name:a.Data,value:1},{name:a.ImageLeft,value:2},{name:a.ImageTop,value:3},{name:a.ImageWidth,value:4},{name:a.ImageHeight,value:5}]});b({type:c.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:d}]});b({type:c.dispidGetDocumentCopyMethod,toHost:[{name:a.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:d}]});b({type:c.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:d}]});b({type:c.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});b({type:c.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:d}],toHost:[{name:a.Id,value:0},{name:a.BindingType,value:1}]});b({type:c.dispidAddBindingFromPromptMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:d}],toHost:[{name:a.Id,value:0},{name:a.BindingType,value:1},{name:a.PromptText,value:2}]});b({type:c.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:d}],toHost:[{name:a.ItemName,value:0},{name:a.Id,value:1},{name:a.BindingType,value:2},{name:a.FailOnCollision,value:3}]});b({type:c.dispidReleaseBindingMethod,toHost:[{name:a.Id,value:0}]});b({type:c.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:d}],toHost:[{name:a.Id,value:0}]});b({type:c.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:d}]});b({type:c.dispidGetBindingDataMethod,fromHost:[{name:a.Data,value:d}],toHost:[{name:a.Id,value:0},{name:a.CoercionType,value:1},{name:a.ValueFormat,value:2},{name:a.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});b({type:c.dispidSetBindingDataMethod,toHost:[{name:a.Id,value:0},{name:a.CoercionType,value:1},{name:a.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});b({type:c.dispidAddRowsMethod,toHost:[{name:a.Id,value:0},{name:a.Data,value:1}]});b({type:c.dispidAddColumnsMethod,toHost:[{name:a.Id,value:0},{name:a.Data,value:1}]});b({type:c.dispidClearAllRowsMethod,toHost:[{name:a.Id,value:0}]});b({type:c.dispidClearFormatsMethod,toHost:[{name:a.Id,value:0}]});b({type:c.dispidSetTableOptionsMethod,toHost:[{name:a.Id,value:0},{name:a.TableOptions,value:1}]});b({type:c.dispidSetFormatsMethod,toHost:[{name:a.Id,value:0},{name:a.CellFormat,value:1}]});b({type:c.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:d}]});b({type:c.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});b({type:OSF.DDA.MethodDispId.dispidGetOfficeThemeMethod,fromHost:[{name:Microsoft.Office.Internal.Parameters.OfficeTheme,value:d}]});b({type:OSF.DDA.MethodDispId.dispidGetDocumentThemeMethod,fromHost:[{name:Microsoft.Office.Internal.Parameters.DocumentTheme,value:d}]});b({type:OSF.DDA.MethodDispId.dispidGetActiveViewMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ActiveView,value:d}]});b({type:c.dispidAddDataPartMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:d}],toHost:[{name:a.Xml,value:0}]});b({type:c.dispidGetDataPartByIdMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:d}],toHost:[{name:a.Id,value:0}]});b({type:c.dispidGetDataPartsByNamespaceMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataPartList,value:d}],toHost:[{name:a.Namespace,value:0}]});b({type:c.dispidGetDataPartXmlMethod,fromHost:[{name:a.Data,value:d}],toHost:[{name:a.Id,value:0}]});b({type:c.dispidGetDataPartNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:d}],toHost:[{name:a.Id,value:0},{name:a.XPath,value:1}]});b({type:c.dispidDeleteDataPartMethod,toHost:[{name:a.Id,value:0}]});b({type:c.dispidGetDataNodeValueMethod,fromHost:[{name:a.Data,value:d}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0}]});b({type:c.dispidGetDataNodeXmlMethod,fromHost:[{name:a.Data,value:d}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0}]});b({type:c.dispidGetDataNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:d}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:a.XPath,value:1}]});b({type:c.dispidSetDataNodeValueMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:a.Data,value:1}]});b({type:c.dispidSetDataNodeXmlMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:a.Xml,value:1}]});b({type:c.dispidAddDataNamespaceMethod,toHost:[{name:OSF.DDA.DataPartProperties.Id,value:0},{name:a.Prefix,value:1},{name:a.Namespace,value:2}]});b({type:c.dispidGetDataUriByPrefixMethod,fromHost:[{name:a.Data,value:d}],toHost:[{name:OSF.DDA.DataPartProperties.Id,value:0},{name:a.Prefix,value:1}]});b({type:c.dispidGetDataPrefixByUriMethod,fromHost:[{name:a.Data,value:d}],toHost:[{name:OSF.DDA.DataPartProperties.Id,value:0},{name:a.Namespace,value:1}]});b({type:c.dispidGetDataNodeTextMethod,fromHost:[{name:a.Data,value:d}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0}]});b({type:c.dispidSetDataNodeTextMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:0},{name:a.Text,value:1}]});b({type:c.dispidGetSelectedTaskMethod,fromHost:[{name:a.TaskId,value:d}]});b({type:c.dispidGetTaskMethod,fromHost:[{name:"taskName",value:0},{name:"wssTaskId",value:1},{name:"resourceNames",value:2}],toHost:[{name:a.TaskId,value:0}]});b({type:c.dispidGetTaskFieldMethod,fromHost:[{name:a.FieldValue,value:d}],toHost:[{name:a.TaskId,value:0},{name:a.FieldId,value:1},{name:a.GetRawValue,value:2}]});b({type:c.dispidGetWSSUrlMethod,fromHost:[{name:a.ServerUrl,value:0},{name:a.ListName,value:1}]});b({type:c.dispidGetSelectedResourceMethod,fromHost:[{name:a.ResourceId,value:d}]});b({type:c.dispidGetResourceFieldMethod,fromHost:[{name:a.FieldValue,value:d}],toHost:[{name:a.ResourceId,value:0},{name:a.FieldId,value:1},{name:a.GetRawValue,value:2}]});b({type:c.dispidGetProjectFieldMethod,fromHost:[{name:a.FieldValue,value:d}],toHost:[{name:a.FieldId,value:0},{name:a.GetRawValue,value:1}]});b({type:c.dispidGetSelectedViewMethod,fromHost:[{name:a.ViewType,value:0},{name:a.ViewName,value:1}]});c=OSF.DDA.EventDispId;b({type:c.dispidDocumentSelectionChangedEvent});b({type:c.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:d}]});b({type:c.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:d}]});b({type:c.dispidSettingsChangedEvent});b({type:c.dispidDocumentThemeChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,value:d}]});b({type:c.dispidOfficeThemeChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,value:d}]});b({type:c.dispidActiveViewChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.ActiveViewChangedEvent,value:d}]});b({type:c.dispidDataNodeAddedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,value:d}]});b({type:c.dispidDataNodeReplacedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,value:d}]});b({type:c.dispidDataNodeDeletedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,value:d}]});b({type:c.dispidTaskSelectionChangedEvent});b({type:c.dispidResourceSelectionChangedEvent});b({type:c.dispidViewSelectionChangedEvent});e.define=b;return e}();OSF.DDA.SafeArray.Delegate._onException=function(d,c){var a,b=d.number;if(b)switch(b){case-2146828218:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case-2146827850:default:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}if(c.onComplete)c.onComplete(a||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};OSF.DDA.SafeArray.Delegate.executeAsync=function(a){try{a.onCalling&&a.onCalling();function b(a){var c=a;if(OSF.OUtil.isArray(a))for(var f=c.length,d=0;d<f;d++)c[d]=b(c[d]);else if(OSF.OUtil.isDate(a))c=a.getVarDate();else if(typeof a==="object"&&!OSF.OUtil.isArray(a)){c=[];for(var e in a)if(!OSF.OUtil.isFunction(a[e]))c[e]=b(a[e])}return c}var c=+new Date;window.external.Execute(a.dispId,b(a.hostCallArgs),function(g){a.onReceiving&&a.onReceiving();var b=g.toArray(),f=b[OSF.DDA.SafeArray.Response.Status];if(a.onComplete){var d;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(b.length>2){d=[];for(var e=1;e<b.length;e++)d[e-1]=b[e]}else d=b[OSF.DDA.SafeArray.Response.Payload];else d=b[OSF.DDA.SafeArray.Response.Payload];a.onComplete(f,d)}if(OSF.AppTelemetry)OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs(+new Date-c),f)})}catch(d){OSF.DDA.SafeArray.Delegate._onException(d,a)}};OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function(c,a){var b=+new Date;return function(d){a.onReceiving&&a.onReceiving();var e=d.toArray?d.toArray()[OSF.DDA.SafeArray.Response.Status]:d;if(a.onComplete)a.onComplete(e);if(OSF.AppTelemetry)OSF.AppTelemetry.onRegisterDone(c,a.dispId,Math.abs(+new Date-b),e)}};OSF.DDA.SafeArray.Delegate.registerEventAsync=function(a){a.onCalling&&a.onCalling();var b=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);try{window.external.RegisterEvent(a.dispId,a.targetId,function(c,b){if(a.onEvent)a.onEvent(b);if(OSF.AppTelemetry)OSF.AppTelemetry.onEventDone(a.dispId)},b)}catch(c){OSF.DDA.SafeArray.Delegate._onException(c,a)}};OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function(a){a.onCalling&&a.onCalling();var b=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{window.external.UnregisterEvent(a.dispId,a.targetId,b)}catch(c){OSF.DDA.SafeArray.Delegate._onException(c,a)}};OSF.DDA.SafeArray.Delegate.MessageParent=function(a){try{a.onCalling&&a.onCalling();var d=+new Date,e=a.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent];window.external.MessageParent(e);a.onReceiving&&a.onReceiving();if(OSF.AppTelemetry)OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs(+new Date-d),result);return result}catch(f){var b,c=f.number;if(c)switch(c){case-2146828218:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case-2146827850:default:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}return b||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}}