text: /* Office JavaScript OM library */
  /* Version: 15.0.4431.1000 */
  /*
  	Copyright (c) Microsoft Corporation.  All rights reserved.
  */
  
  (function(h){var j="object",e="number",i="function",m="data",o="asyncContext",n="Office",p="Microsoft",l="callback",g="",k="name",f="undefined",d=true,c=null,b=false,a=a||{};a.OUtil=function(){var i="on",m="configurable",j="writable",e="enumerable",p=-1,r="&_xdm_Info=",q="_xdm_",n="#",o={},t=3e4;function s(){return Math.floor(100000001*Math.random()).toString()}return {extend:function(b,a){var c=function(){};c.prototype=a.prototype;b.prototype=new c;b.prototype.constructor=b;b.uber=a.prototype;if(a.prototype.constructor===Object.prototype.constructor)a.prototype.constructor=a},setNamespace:function(b,a){if(a&&b&&!a[b])a[b]={}},unsetNamespace:function(b,a){if(a&&b&&a[b])delete a[b]},loadScript:function(f,g,i){if(f&&g){var l=h.document,a=o[f];if(!a){var e=l.createElement("script");e.type="text/javascript";a={loaded:b,pendingCallbacks:[g],timer:c};o[f]=a;var j=function(){if(a.timer!=c){clearTimeout(a.timer);delete a.timer}a.loaded=d;for(var e=a.pendingCallbacks.length,b=0;b<e;b++){var f=a.pendingCallbacks.shift();f()}},k=function(){delete o[f];if(a.timer!=c){clearTimeout(a.timer);delete a.timer}for(var d=a.pendingCallbacks.length,b=0;b<d;b++){var e=a.pendingCallbacks.shift();e()}};if(e.readyState)e.onreadystatechange=function(){if(e.readyState=="loaded"||e.readyState=="complete"){e.onreadystatechange=c;j()}};else e.onload=j;e.onerror=k;i=i||t;a.timer=setTimeout(k,i);e.src=f;l.getElementsByTagName("head")[0].appendChild(e)}else if(a.loaded)g();else a.pendingCallbacks.push(g)}},loadCSS:function(c){if(c){var b=h.document,a=b.createElement("link");a.type="text/css";a.rel="stylesheet";a.href=c;b.getElementsByTagName("head")[0].appendChild(a)}},parseEnum:function(b,c){var a=c[b.trim()];if(typeof a==f){Sys.Debug.trace("invalid enumeration string:"+b);throw Error.argument("str")}return a},delayExecutionAndCache:function(){var a={calc:arguments[0]};return function(){if(a.calc){a.val=a.calc.apply(this,arguments);delete a.calc}return a.val}},getUniqueId:function(){p=p+1;return p.toString()},formatString:function(){var a=arguments,b=a[0];return b.replace(/{(\d+)}/gm,function(d,b){var c=parseInt(b,10)+1;return a[c]===undefined?"{"+b+"}":a[c]})},generateConversationId:function(){return [s(),s(),(new Date).getTime().toString()].join("_")},getFrameNameAndConversationId:function(b,c){var a=q+b+this.generateConversationId();c.setAttribute(k,a);return this.generateConversationId()},addXdmInfoAsHash:function(a,d){a=a.trim()||g;var b=a.split(n),c=b.shift(),e=b.join(n);return [c,n,e,r,d].join(g)},parseXdmInfo:function(){var g=h.location.hash,d=g.split(r),a=d.length>1?d[d.length-1]:c;if(h.sessionStorage){var b=h.name.indexOf(q);if(b>-1){var e=h.name.indexOf(";",b);if(e==-1)e=h.name.length;var f=h.name.substring(b,e);if(a)h.sessionStorage.setItem(f,a);else a=h.sessionStorage.getItem(f)}}return a},getConversationId:function(){var b=h.location.search,a=c;if(b){var d=b.indexOf("&");a=d>0?b.substring(1,d):b.substr(1);if(a&&a.charAt(a.length-1)==="="){a=a.substring(0,a.length-1);if(a)a=decodeURIComponent(a)}}return a},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:b},{name:"expectedProperties",type:Object,mayBeNull:b},{name:l,type:Function,mayBeNull:d}]);if(a)throw a;for(var c in e){a=Function._validateParameter(f[c],e[c],c);if(a)throw a}},writeProfilerMark:function(a){if(h.msWriteProfilerMark){h.msWriteProfilerMark(a);typeof Sys!==f&&Sys&&Sys.Debug&&Sys.Debug.trace(a)}},defineNondefaultProperty:function(e,f,a,b){a=a||{};for(var g in b){var c=b[g];if(a[c]==undefined)a[c]=d}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(d,b,e){b=b||{};for(var c in b)a.OUtil.defineNondefaultProperty(d,c,b[c],e);return d},defineEnumerableProperty:function(d,c,b){return a.OUtil.defineNondefaultProperty(d,c,b,[e])},defineEnumerableProperties:function(c,b){return a.OUtil.defineNondefaultProperties(c,b,[e])},defineMutableProperty:function(d,c,b){return a.OUtil.defineNondefaultProperty(d,c,b,[j,e,m])},defineMutableProperties:function(c,b){return a.OUtil.defineNondefaultProperties(c,b,[j,e,m])},finalizeProperties:function(e,c){c=c||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f<i;f++){var h=g[f],a=Object.getOwnPropertyDescriptor(e,h);if(!a.get&&!a.set)a.writable=c.writable||b;a.configurable=c.configurable||b;a.enumerable=c.enumerable||d;Object.defineProperty(e,h,a)}return e},mapList:function(a,c){var b=[];if(a)for(var d in a)b.push(c(a[d]));return b},listContainsKey:function(c,e){for(var a in c)if(e==a)return d;return b},listContainsValue:function(a,c){for(var e in a)if(c==a[e])return d;return b},augmentList:function(a,b){var d=a.push?function(c,b){a.push(b)}:function(c,b){a[c]=b};for(var c in b)d(c,b[c])},redefineList:function(a,c){for(var b in a)delete a[b];for(var b in c)a[b]=c[b]},isArray:function(a){return Object.prototype.toString.apply(a)==="[object Array]"},isFunction:function(a){return Object.prototype.toString.apply(a)==="[object Function]"},isDate:function(a){return Object.prototype.toString.apply(a)==="[object Date]"},addEventListener:function(a,c,d){if(a.attachEvent)a.attachEvent(i+c,d);else if(a.addEventListener)a.addEventListener(c,d,b);else a[i+c]=d},removeEventListener:function(a,d,e){if(a.detachEvent)a.detachEvent(i+d,e);else if(a.removeEventListener)a.removeEventListener(d,e,b);else a[i+d]=c},encodeBase64:function(c){var k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=[],a=[],b=0,f,d,e,j=c.length;do{f=c[b++];d=c[b++];e=c[b++];a[0]=f>>2;a[1]=(f&3)<<4|d>>4;a[2]=(d&15)<<2|e>>6;a[3]=e&63;if(isNaN(d))a[2]=a[3]=64;else if(isNaN(e))a[3]=64;for(var h=0;h<4;h++)i.push(k.charAt(a[h]))}while(b<j);return i.join(g)}}}();h.OSF=a;a.OUtil.setNamespace("OSF",h);a.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};a.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};a.AgaveHostAction={Select:0,UnSelect:1};a.SharedConstants={NotificationConversationIdSuffix:"_ntf"};a.OfficeAppContext=function(l,h,d,c,f,i,e,g,k,b,j){var a=this;a._id=l;a._appName=h;a._appVersion=d;a._appUILocale=c;a._dataLocale=f;a._docUrl=i;a._clientMode=e;a._settings=g;a._reason=k;a._osfControlType=b;a._eToken=j;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken}};a.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128};a.OsfControlType={DocumentLevel:0,ContainerLevel:1};a.ClientMode={ReadOnly:0,ReadWrite:1};a.OUtil.setNamespace(p,h);a.OUtil.setNamespace(n,Microsoft);a.OUtil.setNamespace("Client",Microsoft.Office);a.OUtil.setNamespace("WebExtension",Microsoft.Office);a.NamespaceManager=function(){var e,c=b;return {enableShortcut:function(){if(!c){if(h.Office)e=h.Office;else a.OUtil.setNamespace(n,h);h.Office=Microsoft.Office.WebExtension;c=d}},disableShortcut:function(){if(c){if(e)h.Office=e;else a.OUtil.unsetNamespace(n,h);c=b}}}}();a.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.BindingType={Text:"text",Matrix:"matrix",Table:"table"};Microsoft.Office.WebExtension.EventType={DocumentSelectionChanged:"documentSelectionChanged",BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"};Microsoft.Office.WebExtension.AsyncResultStatus={Succeeded:"succeeded",Failed:"failed"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:l,AsyncContext:o,Data:m,Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue"};Microsoft.Office.WebExtension.DefaultParameterValues={};a.OUtil.setNamespace("DDA",a);a.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};a.OUtil.setNamespace("DispIdHost",a.DDA);a.DDA.DispIdHost.Methods={InvokeMethod:"invokeMethod",AddEventHandler:"addEventHandler",RemoveEventHandler:"removeEventHandler"};a.DDA.DispIdHost.Delegates={ExecuteAsync:"executeAsync",RegisterEventAsync:"registerEventAsync",UnregisterEventAsync:"unregisterEventAsync",ParameterMap:"parameterMap"};a.OUtil.setNamespace("AsyncResultEnum",a.DDA);a.DDA.AsyncResultEnum.Properties={Context:"Context",Value:"Value",Status:"Status",Error:"Error"};a.DDA.AsyncResultEnum.ErrorProperties={Name:"Name",Message:"Message",Code:"Code"};a.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus",FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties",Subset:"subset",BindingProperties:"BindingProperties",TableDataProperties:"TableDataProperties",DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"};a.DDA.EventDescriptors={BindingSelectionChangedEvent:"BindingSelectionChangedEvent",DataNodeInsertedEvent:"DataNodeInsertedEvent",DataNodeReplacedEvent:"DataNodeReplacedEvent",DataNodeDeletedEvent:"DataNodeDeletedEvent"};a.DDA.ListDescriptors={BindingList:"BindingList",DataPartList:"DataPartList",DataNodeList:"DataNodeList"};a.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};a.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType,RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"};a.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};a.DDA.DataPartProperties={Id:Microsoft.Office.WebExtension.Parameters.Id,BuiltIn:"DataPartBuiltIn"};a.DDA.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};a.DDA.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};a.DDA.AsyncResultEnum.ErrorCode={Success:0,Failed:1};a.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged)return b+"_"+a;else return a};a.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(b){return a[b]||a[this.errorCodes.ooeInternalError]},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeNoCapability:7e3}}}();a.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidMethodMax:141,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117};a.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58};var s=function(){var p="bindings",n="document",s="getXmlAsync",r="getNodesAsync",q="getByIdAsync",m="boolean",l="string";a.EventDispatch=function(a){this._eventHandlers={};for(var c in a){var b=a[c];this._eventHandlers[b]=[]}};a.EventDispatch.prototype={getSupportedEvents:function(){var a=[];for(var b in this._eventHandlers)a.push(b);return a},supportsEvent:function(e){var a=b;for(var c in this._eventHandlers)if(e==c){a=d;break}return a},hasEventHandler:function(c,e){var a=this._eventHandlers[c];if(a&&a.length>0)for(var f in a)if(a[f]===e)return d;return b},addEventHandler:function(c,a){if(typeof a!=i)return b;var e=this._eventHandlers[c];if(e&&!this.hasEventHandler(c,a)){e.push(a);return d}else return b},removeEventHandler:function(e,f){var a=this._eventHandlers[e];if(a&&a.length>0)for(var c=0;c<a.length;c++)if(a[c]===f){a.splice(c,1);return d}return b},clearEventHandlers:function(a){this._eventHandlers[a]=[]},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},fireEvent:function(a){if(a.type==undefined)return b;var c=a.type;if(c&&this._eventHandlers[c]){var e=this._eventHandlers[c];for(var f in e)e[f](a);return d}else return b}};a.DDA.DataCoercion=function(){return {findArrayDimensionality:function(d){if(a.OUtil.isArray(d)){for(var c=0,b=0;b<d.length;b++)c=Math.max(c,a.DDA.DataCoercion.findArrayDimensionality(d[b]));return c+1}else return 0},getCoercionDefaultForBinding:function(a){switch(a){case Microsoft.Office.WebExtension.BindingType.Matrix:return Microsoft.Office.WebExtension.CoercionType.Matrix;case Microsoft.Office.WebExtension.BindingType.Table:return Microsoft.Office.WebExtension.CoercionType.Table;case Microsoft.Office.WebExtension.BindingType.Text:default:return Microsoft.Office.WebExtension.CoercionType.Text}},getBindingDefaultForCoercion:function(a){switch(a){case Microsoft.Office.WebExtension.CoercionType.Matrix:return Microsoft.Office.WebExtension.BindingType.Matrix;case Microsoft.Office.WebExtension.CoercionType.Table:return Microsoft.Office.WebExtension.BindingType.Table;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:return Microsoft.Office.WebExtension.BindingType.Text}},determineCoercionType:function(b){if(b==c||b==undefined)return c;var d=c,f=typeof b;if(b.rows!==undefined)d=Microsoft.Office.WebExtension.CoercionType.Table;else if(a.OUtil.isArray(b))d=Microsoft.Office.WebExtension.CoercionType.Matrix;else if(f==l||f==e||f==m||a.OUtil.isDate(b))d=Microsoft.Office.WebExtension.CoercionType.Text;else throw a.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject;return d},coerceData:function(c,d,b){b=b||a.DDA.DataCoercion.determineCoercionType(c);if(b&&b!=d){a.OUtil.writeProfilerMark(a.InternalPerfMarker.DataCoercionBegin);c=a.DDA.DataCoercion._coerceDataFromTable(d,a.DDA.DataCoercion._coerceDataToTable(c,b));a.OUtil.writeProfilerMark(a.InternalPerfMarker.DataCoercionEnd)}return c},_matrixToText:function(a){if(a.length==1&&a[0].length==1)return g+a[0][0];for(var b=g,c=0;c<a.length;c++)b+=a[c].join("\t")+"\n";return b.substring(0,b.length-1)},_textToMatrix:function(c){for(var a=c.split("\n"),b=0;b<a.length;b++)a[b]=a[b].split("\t");return a},_tableToText:function(d){var b=g;if(d.headers!=c)b=a.DDA.DataCoercion._matrixToText([d.headers])+"\n";var e=a.DDA.DataCoercion._matrixToText(d.rows);if(e==g)b=b.substring(0,b.length-1);return b+e},_tableToMatrix:function(a){var b=a.rows;a.headers!=c&&b.unshift(a.headers);return b},_coerceDataFromTable:function(d,c){var b;switch(d){case Microsoft.Office.WebExtension.CoercionType.Table:b=c;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:b=a.DDA.DataCoercion._tableToMatrix(c);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:b=a.DDA.DataCoercion._tableToText(c)}return b},_coerceDataToTable:function(c,d){if(d==undefined)d=a.DDA.DataCoercion.determineCoercionType(c);var b;switch(d){case Microsoft.Office.WebExtension.CoercionType.Table:b=c;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:b=new Microsoft.Office.WebExtension.TableData(c);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:b=new Microsoft.Office.WebExtension.TableData(a.DDA.DataCoercion._textToMatrix(c))}return b}}}();a.DDA.issueAsyncResult=function(e,g,b){var f=e[Microsoft.Office.WebExtension.Parameters.Callback];if(f){var d={};d[a.DDA.AsyncResultEnum.Properties.Context]=e[Microsoft.Office.WebExtension.Parameters.AsyncContext];var c;if(g==a.DDA.ErrorCodeManager.errorCodes.ooeSuccess)d[a.DDA.AsyncResultEnum.Properties.Value]=b;else{c={};b=b||a.DDA.ErrorCodeManager.getErrorArgs(a.DDA.ErrorCodeManager.errorCodes.ooeInternalError);c[a.DDA.AsyncResultEnum.ErrorProperties.Code]=g||a.DDA.ErrorCodeManager.errorCodes.ooeInternalError;c[a.DDA.AsyncResultEnum.ErrorProperties.Name]=b.name||b;c[a.DDA.AsyncResultEnum.ErrorProperties.Message]=b.message||b}f(new a.DDA.AsyncResult(d,c))}};a.DDA.generateBindingId=function(){return "UnnamedBinding_"+a.OUtil.getUniqueId()+"_"+(new Date).getTime()};a.DDA.SettingsManager={SerializedSettings:"serializedSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(c){var e={};for(var d in c){var b=c[d];try{if(JSON)b=JSON.stringify(b,function(b,c){return a.OUtil.isDate(this[b])?a.DDA.SettingsManager.DateJSONPrefix+this[b].getTime()+a.DDA.SettingsManager.DataJSONSuffix:c});else b=Sys.Serialization.JavaScriptSerializer.serialize(b);e[d]=b}catch(f){}}return e},deserializeSettings:function(c){var f={};c=c||{};for(var e in c){var b=c[e];try{if(JSON)b=JSON.parse(b,function(d,b){var c;if(typeof b===l&&b&&b.length>6&&b.slice(0,5)===a.DDA.SettingsManager.DateJSONPrefix&&b.slice(-1)===a.DDA.SettingsManager.DataJSONSuffix){c=new Date(parseInt(b.slice(5,-1)));if(c)return c}return b});else b=Sys.Serialization.JavaScriptSerializer.deserialize(b,d);f[e]=b}catch(g){}}return f}};a.DDA.OMFactory={manufactureBinding:function(b,d){var e=b[a.DDA.BindingProperties.Id],g=b[a.DDA.BindingProperties.RowCount],f=b[a.DDA.BindingProperties.ColumnCount],h=b[a.DDA.BindingProperties.HasHeaders],c;switch(b[a.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:c=new a.DDA.TextBinding(e,d);break;case Microsoft.Office.WebExtension.BindingType.Matrix:c=new a.DDA.MatrixBinding(e,d,g,f);break;case Microsoft.Office.WebExtension.BindingType.Table:c=new a.DDA.TableBinding(e,d,g,f,h);break;default:c=new a.DDA.UnknownBinding(e,d)}return c},manufactureTableData:function(b){return new Microsoft.Office.WebExtension.TableData(b[a.DDA.TableDataProperties.TableRows],b[a.DDA.TableDataProperties.TableHeaders])},manufactureDataNode:function(b){if(b)return new a.DDA.CustomXmlNode(b[a.DDA.DataNodeProperties.Handle],b[a.DDA.DataNodeProperties.NodeType],b[a.DDA.DataNodeProperties.NamespaceUri],b[a.DDA.DataNodeProperties.BaseName])},manufactureDataPart:function(b,c){return new a.DDA.CustomXmlPart(c,b[a.DDA.DataPartProperties.Id],b[a.DDA.DataPartProperties.BuiltIn])},manufactureEventArgs:function(f,d,b){var e=this,c;switch(f){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:c=new a.DDA.DocumentSelectionChangedEventArgs(d);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:c=new a.DDA.BindingSelectionChangedEventArgs(e.manufactureBinding(b,d.document),b[a.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:c=new a.DDA.BindingDataChangedEventArgs(e.manufactureBinding(b,d.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:c=new a.DDA.SettingsChangedEventArgs(d);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:c=new a.DDA.NodeInsertedEventArgs(e.manufactureDataNode(b[a.DDA.DataNodeEventProperties.NewNode]),b[a.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:c=new a.DDA.NodeReplacedEventArgs(e.manufactureDataNode(b[a.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[a.DDA.DataNodeEventProperties.NewNode]),b[a.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:c=new a.DDA.NodeDeletedEventArgs(e.manufactureDataNode(b[a.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[a.DDA.DataNodeEventProperties.NextSiblingNode]),b[a.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:c=new a.DDA.TaskSelectionChangedEventArgs(d);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:c=new a.DDA.ResourceSelectionChangedEventArgs(d);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:c=new a.DDA.ViewSelectionChangedEventArgs(d);break;default:throw Error.argument(Microsoft.Office.WebExtension.Parameters.EventType,a.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,f))}return c}};a.DDA.ListType=function(){var b={};b[a.DDA.ListDescriptors.BindingList]=a.DDA.PropertyDescriptors.BindingProperties;b[a.DDA.ListDescriptors.DataPartList]=a.DDA.PropertyDescriptors.DataPartProperties;b[a.DDA.ListDescriptors.DataNodeList]=a.DDA.PropertyDescriptors.DataNodeProperties;return {isListType:function(c){return a.OUtil.listContainsKey(b,c)},getDescriptor:function(a){return b[a]}}}();a.DDA.AsyncMethodCall=function(d,e,h,m,n,k,q){var b=d.length,c=a.OUtil.delayExecutionAndCache(function(){return a.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,q)});function g(e,h){for(var g in e){var b=e[g],d=h[g];if(b["enum"])switch(typeof d){case l:if(a.OUtil.listContainsValue(b["enum"],d))break;case f:throw a.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;break;default:throw c()}if(b["types"])if(!a.OUtil.listContainsValue(b["types"],typeof d))throw c()}}function o(h,m,k){if(h.length<b)throw Error.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments);for(var e=[],a=0;a<b;a++)e.push(h[a]);g(d,e);var j={};for(a=0;a<b;a++){var f=d[a],i=e[a];if(f.verify){var l=f.verify(i,m,k);if(!l)throw c()}j[f.name]=i}return j}function p(m,o,q,p){if(m.length>b+2)throw Error.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var c,d,n=m.length-1;n>=b;n--){var l=m[n];switch(typeof l){case j:if(c)throw Error.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else c=l;break;case i:if(d)throw Error.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else d=l;break;default:throw Error.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}c=c||{};for(var k in e)if(!a.OUtil.listContainsKey(c,k)){var h=undefined,f=e[k];if(f.calculate&&o)h=f.calculate(o,q,p);if(!h&&f.defaultValue!=undefined)h=f.defaultValue;c[k]=h}if(d)if(c[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else c[Microsoft.Office.WebExtension.Parameters.Callback]=d;g(e,c);return c}this.verifyAndExtractCall=function(e,c,b){var d=o(e,c,b),f=p(e,d,c,b),a={};for(var i in d)a[i]=d[i];for(var g in f)a[g]=f[g];for(var j in h)a[j]=h[j](c,b);if(k)a=k(a,c,b);return a};this.processResponse=function(d,c,f,e){var b;if(d==a.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(m)b=m(c,f,e);else b=c;else if(n)b=n(d,c);else b=a.DDA.ErrorCodeManager.getErrorArgs(d);return b};this.getCallArgs=function(f){for(var a,c,e=f.length-1;e>=b;e--){var d=f[e];switch(typeof d){case j:a=d;break;case i:c=d}}a=a||{};if(c)a[Microsoft.Office.WebExtension.Parameters.Callback]=c;return a}};a.DDA.AsyncMethodNames=function(c){var d={};for(var b in c){var e={};a.OUtil.defineEnumerableProperties(e,{id:{value:b},displayName:{value:c[b]}});d[b]=e}return d}({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync",GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync",AddFromSelectionAsync:"addFromSelectionAsync",AddFromPromptAsync:"addFromPromptAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:q,ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync",AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync",RefreshAsync:"refreshAsync",SaveAsync:"saveAsync",AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync",AddDataPartAsync:"addAsync",GetDataPartByIdAsync:q,GetDataPartsByNameSpaceAsync:"getByNamespaceAsync",DeleteDataPartAsync:"deleteAsync",GetPartNodesAsync:r,GetPartXmlAsync:s,AddDataPartNamespaceAsync:"addNamespaceAsync",GetDataPartNamespaceAsync:"getNamespaceAsync",GetDataPartPrefixAsync:"getPrefixAsync",GetRelativeNodesAsync:r,GetNodeValueAsync:"getNodeValueAsync",GetNodeXmlAsync:s,SetNodeValueAsync:"setNodeValueAsync",SetNodeXmlAsync:"setXmlAsync",GetSelectedTask:"getSelectedTaskAsync",GetTask:"getTaskAsync",GetWSSUrl:"getWSSUrlAsync",GetTaskField:"getTaskFieldAsync",GetSelectedResource:"getSelectedResourceAsync",GetResourceField:"getResourceFieldAsync",GetProjectField:"getProjectFieldAsync",GetSelectedView:"getSelectedViewAsync"});a.DDA.AsyncMethodCallFactory=function(){function b(a){var d=c;if(a){d={};for(var e=a.length,b=0;b<e;b++)d[a[b].name]=a[b].value}return d}return {manufacture:function(c){var e=c.supportedOptions?b(c.supportedOptions):[],d=c.privateStateCallbacks?b(c.privateStateCallbacks):[];return new a.DDA.AsyncMethodCall(c.requiredArguments||[],e,d,c.onSucceeded,c.onFailed,c.checkCallArgs,c.method.displayName)}}}();a.DDA.AsyncMethodCalls=function(){var q={};function f(b){q[b.method.id]=a.DDA.AsyncMethodCallFactory.manufacture(b)}function h(d,f,e){var b=d[Microsoft.Office.WebExtension.Parameters.Data];if(b&&(b[a.DDA.TableDataProperties.TableRows]!=undefined||b[a.DDA.TableDataProperties.TableHeaders]!=undefined))b=a.DDA.OMFactory.manufactureTableData(b);b=a.DDA.DataCoercion.coerceData(b,e[Microsoft.Office.WebExtension.Parameters.CoercionType]);return b==undefined?c:b}function k(b){return a.DDA.OMFactory.manufactureBinding(b,Microsoft.Office.WebExtension.context.document)}function o(b){return a.DDA.OMFactory.manufactureDataPart(b,Microsoft.Office.WebExtension.context.document.customXmlParts)}function r(b){return a.DDA.OMFactory.manufactureDataNode(b)}function g(a){return a.id}function p(b,a){return a}function n(b,a){return a}f({method:a.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:h});f({method:a.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[l,j,e,m]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(b){return a.DDA.DataCoercion.determineCoercionType(b[Microsoft.Office.WebExtension.Parameters.Data])}}}],privateStateCallbacks:[]});f({method:a.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:[e],defaultValue:4*1024*1024}}],onSucceeded:function(b,d,c){return new a.DDA.File(b[a.DDA.FileProperties.Handle],b[a.DDA.FileProperties.FileSize],c[Microsoft.Office.WebExtension.Parameters.SliceSize])}});f({method:a.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:[e]}],privateStateCallbacks:[{name:a.DDA.FileProperties.Handle,value:function(c,b){return b[a.DDA.FileProperties.Handle]}},{name:a.DDA.FileProperties.SliceSize,value:function(c,b){return b[a.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(b,e,d){var c=b[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(c<0||c>=e.sliceCount)throw a.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;b[a.DDA.FileSliceOffset]=parseInt(c*d[a.DDA.FileProperties.SliceSize]);return b},onSucceeded:function(b,e,d){var c={};a.OUtil.defineEnumerableProperties(c,{data:{value:b[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:d[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:b[a.DDA.FileProperties.SliceSize]}});return c}});f({method:a.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:a.DDA.FileProperties.Handle,value:function(c,b){return b[a.DDA.FileProperties.Handle]}}]});f({method:a.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[l],calculate:a.DDA.generateBindingId}}],privateStateCallbacks:[],onSucceeded:k});f({method:a.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[l],calculate:a.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:[l],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}}],privateStateCallbacks:[],onSucceeded:k});f({method:a.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[l]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[l],calculate:a.DDA.generateBindingId}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return d}}],onSucceeded:k});f({method:a.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(b){return a.OUtil.mapList(b[a.DDA.ListDescriptors.BindingList],k)}});f({method:a.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[l]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:k});f({method:a.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[l]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(d,b,a){var c=a[Microsoft.Office.WebExtension.Parameters.Id];delete b._eventDispatches[c]}});f({method:a.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(c,b){return a.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[e],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[e],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[e],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[e],defaultValue:0}}],checkCallArgs:function(b,c){if(b[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&b[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&b[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&b[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0){delete b[Microsoft.Office.WebExtension.Parameters.StartRow];delete b[Microsoft.Office.WebExtension.Parameters.StartColumn];delete b[Microsoft.Office.WebExtension.Parameters.RowCount];delete b[Microsoft.Office.WebExtension.Parameters.ColumnCount]}if(b[Microsoft.Office.WebExtension.Parameters.CoercionType]!=a.DDA.DataCoercion.getCoercionDefaultForBinding(c.type)&&(b[Microsoft.Office.WebExtension.Parameters.StartRow]||b[Microsoft.Office.WebExtension.Parameters.StartColumn]||b[Microsoft.Office.WebExtension.Parameters.RowCount]||b[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw a.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return b},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:g}],onSucceeded:h});f({method:a.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[l,j,e,m]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(b){return a.DDA.DataCoercion.determineCoercionType(b[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[e],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[e],defaultValue:0}}],checkCallArgs:function(b,c){if(b[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&b[Microsoft.Office.WebExtension.Parameters.StartColumn]==0){delete b[Microsoft.Office.WebExtension.Parameters.StartRow];delete b[Microsoft.Office.WebExtension.Parameters.StartColumn]}if(b[Microsoft.Office.WebExtension.Parameters.CoercionType]!=a.DDA.DataCoercion.getCoercionDefaultForBinding(c.type)&&(b[Microsoft.Office.WebExtension.Parameters.StartRow]||b[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw a.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return b},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:g}]});f({method:a.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[j]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:g}]});f({method:a.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[j]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:g}]});f({method:a.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:g}]});f({method:a.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(b){var c=b[a.DDA.SettingsManager.SerializedSettings],d=a.DDA.SettingsManager.deserializeSettings(c);return d}});f({method:a.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:[m],defaultValue:d}}],privateStateCallbacks:[{name:a.DDA.SettingsManager.SerializedSettings,value:function(c,b){return a.DDA.SettingsManager.serializeSettings(b)}}]});f({method:a.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:[i]}],supportedOptions:[],privateStateCallbacks:[]});f({method:a.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:[i],defaultValue:c}}],privateStateCallbacks:[]});f({method:a.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[l]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:o});f({method:a.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[l]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:o});f({method:a.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[l]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(b){return a.OUtil.mapList(b[a.DDA.ListDescriptors.DataPartList],o)}});f({method:a.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:a.DDA.DataPartProperties.Id,value:g}]});f({method:a.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[l]}],supportedOptions:[],privateStateCallbacks:[{name:a.DDA.DataPartProperties.Id,value:g}],onSucceeded:function(b){return a.OUtil.mapList(b[a.DDA.ListDescriptors.DataNodeList],r)}});f({method:a.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:a.DDA.DataPartProperties.Id,value:g}],onSucceeded:h});f({method:a.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[l]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[l]}],supportedOptions:[],privateStateCallbacks:[{name:a.DDA.DataPartProperties.Id,value:p}]});f({method:a.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[l]}],supportedOptions:[],privateStateCallbacks:[{name:a.DDA.DataPartProperties.Id,value:p}],onSucceeded:h});f({method:a.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[l]}],supportedOptions:[],privateStateCallbacks:[{name:a.DDA.DataPartProperties.Id,value:p}],onSucceeded:h});f({method:a.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[l]}],supportedOptions:[],privateStateCallbacks:[{name:a.DDA.DataNodeProperties.Handle,value:n}],onSucceeded:function(b){return a.OUtil.mapList(b[a.DDA.ListDescriptors.DataNodeList],r)}});f({method:a.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:a.DDA.DataNodeProperties.Handle,value:n}],onSucceeded:h});f({method:a.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:a.DDA.DataNodeProperties.Handle,value:n}],onSucceeded:h});f({method:a.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[l]}],supportedOptions:[],privateStateCallbacks:[{name:a.DDA.DataNodeProperties.Handle,value:n}]});f({method:a.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[l]}],supportedOptions:[],privateStateCallbacks:[{name:a.DDA.DataNodeProperties.Handle,value:n}]});f({method:a.DDA.AsyncMethodNames.GetSelectedTask,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskId]}});f({method:a.DDA.AsyncMethodNames.GetTask,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:[l]}]});f({method:a.DDA.AsyncMethodNames.GetTaskField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:[l]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[e]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[m],defaultValue:b}}]});f({method:a.DDA.AsyncMethodNames.GetResourceField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,types:[l]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[e]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[m],defaultValue:b}}]});f({method:a.DDA.AsyncMethodNames.GetProjectField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[e]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[m],defaultValue:b}}]});f({method:a.DDA.AsyncMethodNames.GetSelectedResource,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.ResourceId]}});f({method:a.DDA.AsyncMethodNames.GetWSSUrl});f({method:a.DDA.AsyncMethodNames.GetSelectedView});return q}();a.DDA.HostParameterMap=function(e,d){var b="fromHost",j=this,l="toHost",h=b,f="self",k={};k[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(b){if(b.rows!==undefined){var c={};c[a.DDA.TableDataProperties.TableRows]=b.rows;c[a.DDA.TableDataProperties.TableHeaders]=b.headers;b=c}return b},fromHost:function(a){return a}};function i(j,g){var n=j?{}:undefined;for(var f in j){var c=j[f],b;if(a.DDA.ListType.isListType(f)){b=[];for(var o in c)b.push(i(c[o],g))}else if(a.OUtil.listContainsKey(k,f))b=k[f][g](c);else if(g==h&&e.preserveNesting(f))b=i(c,g);else{var l=d[f];if(l){var m=l[g];if(m){b=m[c];if(b===undefined)b=c}}else b=c}n[f]=b}return n}function m(i,h){var c;for(var a in h){var b;if(e.isComplexType(a))b=m(i,d[a][l]);else b=i[a];if(b!=undefined){if(!c)c={};var g=h[a];if(g==f)g=a;c[g]=e.pack(a,b)}}return c}function g(m,l,j){if(!j)j={};for(var i in l){var n=l[i],b;if(n==f)b=m;else b=m[n];if(b===c||b===undefined)j[i]=undefined;else{b=e.unpack(i,b);var k;if(e.isComplexType(i)){k=d[i][h];if(e.preserveNesting(i))j[i]=g(b,k);else g(b,k,j)}else{if(a.DDA.ListType.isListType(i)){k={};var p=a.DDA.ListType.getDescriptor(i);k[p]=f;for(var o in b)b[o]=g(b[o],k)}j[i]=b}}}return j}function n(k,f,a){var e=d[k][a],c;if(a=="toHost"){var j=i(f,a);c=m(j,e)}else if(a==b){var h=g(f,e);c=i(h,a)}return c}if(!d)d={};j.setMapping=function(j,b){var a,c;if(b.map){a=b.map;c={};for(var e in a){var g=a[e];if(g==f)g=e;c[g]=e}}else{a=b.toHost;c=b.fromHost}var i=d[j]={};i[l]=a;i[h]=c};j.toHost=function(b,a){return n(b,a,l)};j.fromHost=function(a,b){return n(a,b,h)};j.self=f};a.DDA.SpecialProcessor=function(d,c){var b=this;b.isComplexType=function(b){return a.OUtil.listContainsValue(d,b)};b.isDynamicType=function(b){return a.OUtil.listContainsKey(c,b)};b.preserveNesting=function(c){var b=[a.DDA.PropertyDescriptors.Subset,a.DDA.DataNodeEventProperties.OldNode,a.DDA.DataNodeEventProperties.NewNode,a.DDA.DataNodeEventProperties.NextSiblingNode];return a.OUtil.listContainsValue(b,c)};b.pack=function(b,d){var a;if(this.isDynamicType(b))a=c[b].toHost(d);else a=d;return a};b.unpack=function(b,d){var a;if(this.isDynamicType(b))a=c[b].fromHost(d);else a=d;return a}};a.DDA.DispIdHost.Facade=function(k,j){var f={},h=a.DDA.AsyncMethodNames,i=a.DDA.MethodDispId;f[h.GetSelectedDataAsync.id]=i.dispidGetSelectedDataMethod;f[h.SetSelectedDataAsync.id]=i.dispidSetSelectedDataMethod;f[h.GetDocumentCopyChunkAsync.id]=i.dispidGetDocumentCopyChunkMethod;f[h.ReleaseDocumentCopyAsync.id]=i.dispidReleaseDocumentCopyMethod;f[h.GetDocumentCopyAsync.id]=i.dispidGetDocumentCopyMethod;f[h.AddFromSelectionAsync.id]=i.dispidAddBindingFromSelectionMethod;f[h.AddFromPromptAsync.id]=i.dispidAddBindingFromPromptMethod;f[h.AddFromNamedItemAsync.id]=i.dispidAddBindingFromNamedItemMethod;f[h.GetAllAsync.id]=i.dispidGetAllBindingsMethod;f[h.GetByIdAsync.id]=i.dispidGetBindingMethod;f[h.ReleaseByIdAsync.id]=i.dispidReleaseBindingMethod;f[h.GetDataAsync.id]=i.dispidGetBindingDataMethod;f[h.SetDataAsync.id]=i.dispidSetBindingDataMethod;f[h.AddRowsAsync.id]=i.dispidAddRowsMethod;f[h.AddColumnsAsync.id]=i.dispidAddColumnsMethod;f[h.DeleteAllDataValuesAsync.id]=i.dispidClearAllRowsMethod;f[h.RefreshAsync.id]=i.dispidLoadSettingsMethod;f[h.SaveAsync.id]=i.dispidSaveSettingsMethod;f[h.AddDataPartAsync.id]=i.dispidAddDataPartMethod;f[h.GetDataPartByIdAsync.id]=i.dispidGetDataPartByIdMethod;f[h.GetDataPartsByNameSpaceAsync.id]=i.dispidGetDataPartsByNamespaceMethod;f[h.GetPartXmlAsync.id]=i.dispidGetDataPartXmlMethod;f[h.GetPartNodesAsync.id]=i.dispidGetDataPartNodesMethod;f[h.DeleteDataPartAsync.id]=i.dispidDeleteDataPartMethod;f[h.GetNodeValueAsync.id]=i.dispidGetDataNodeValueMethod;f[h.GetNodeXmlAsync.id]=i.dispidGetDataNodeXmlMethod;f[h.GetRelativeNodesAsync.id]=i.dispidGetDataNodesMethod;f[h.SetNodeValueAsync.id]=i.dispidSetDataNodeValueMethod;f[h.SetNodeXmlAsync.id]=i.dispidSetDataNodeXmlMethod;f[h.AddDataPartNamespaceAsync.id]=i.dispidAddDataNamespaceMethod;f[h.GetDataPartNamespaceAsync.id]=i.dispidGetDataUriByPrefixMethod;f[h.GetDataPartPrefixAsync.id]=i.dispidGetDataPrefixByUriMethod;f[h.GetSelectedTask.id]=i.dispidGetSelectedTaskMethod;f[h.GetTask.id]=i.dispidGetTaskMethod;f[h.GetWSSUrl.id]=i.dispidGetWSSUrlMethod;f[h.GetTaskField.id]=i.dispidGetTaskFieldMethod;f[h.GetSelectedResource.id]=i.dispidGetSelectedResourceMethod;f[h.GetResourceField.id]=i.dispidGetResourceFieldMethod;f[h.GetProjectField.id]=i.dispidGetProjectFieldMethod;f[h.GetSelectedView.id]=i.dispidGetSelectedViewMethod;h=Microsoft.Office.WebExtension.EventType;i=a.DDA.EventDispId;f[h.SettingsChanged]=i.dispidSettingsChangedEvent;f[h.DocumentSelectionChanged]=i.dispidDocumentSelectionChangedEvent;f[h.BindingSelectionChanged]=i.dispidBindingSelectionChangedEvent;f[h.BindingDataChanged]=i.dispidBindingDataChangedEvent;f[h.TaskSelectionChanged]=i.dispidTaskSelectionChangedEvent;f[h.ResourceSelectionChanged]=i.dispidResourceSelectionChangedEvent;f[h.ViewSelectionChanged]=i.dispidViewSelectionChangedEvent;f[h.DataNodeInserted]=i.dispidDataNodeAddedEvent;f[h.DataNodeReplaced]=i.dispidDataNodeReplacedEvent;f[h.DataNodeDeleted]=i.dispidDataNodeDeletedEvent;function l(b,d,f,c){if(typeof b==e){if(!c)c=d.getCallArgs(f);a.DDA.issueAsyncResult(c,b,a.DDA.ErrorCodeManager.getErrorArgs(b))}else throw b}this[a.DDA.DispIdHost.Methods.InvokeMethod]=function(p,h,i,n){var b;try{var e=p.id,c=a.DDA.AsyncMethodCalls[e];b=c.verifyAndExtractCall(h,i,n);var g=f[e],o=k(e),d;if(j.toHost)d=j.toHost(g,b);else d=b;o[a.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:g,hostCallArgs:d,onCalling:function(){a.OUtil.writeProfilerMark(a.HostCallPerfMarker.IssueCall)},onReceiving:function(){a.OUtil.writeProfilerMark(a.HostCallPerfMarker.ReceiveResponse)},onComplete:function(f,e){var d;if(f==a.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(j.fromHost)d=j.fromHost(g,e);else d=e;else d=e;var h=c.processResponse(f,d,i,b);a.DDA.issueAsyncResult(b,f,h)}})}catch(m){l(m,c,h,b)}};this[a.DDA.DispIdHost.Methods.AddEventHandler]=function(i,d,e){var c,b,n;function h(e){if(e==a.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var g=d.addEventHandler(b,n);if(!g)e=a.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed}var f;if(e!=a.DDA.ErrorCodeManager.errorCodes.ooeSuccess)f=a.DDA.ErrorCodeManager.getErrorArgs(e);a.DDA.issueAsyncResult(c,e,f)}try{var m=a.DDA.AsyncMethodCalls[a.DDA.AsyncMethodNames.AddHandlerAsync.id];c=m.verifyAndExtractCall(i,e,d);b=c[Microsoft.Office.WebExtension.Parameters.EventType];n=c[Microsoft.Office.WebExtension.Parameters.Handler];if(d.getEventHandlerCount(b)==0){var o=f[b],q=k(b)[a.DDA.DispIdHost.Delegates.RegisterEventAsync];q({eventType:b,dispId:o,targetId:e.id||g,onCalling:function(){a.OUtil.writeProfilerMark(a.HostCallPerfMarker.IssueCall)},onReceiving:function(){a.OUtil.writeProfilerMark(a.HostCallPerfMarker.ReceiveResponse)},onComplete:h,onEvent:function(c){var f=j.fromHost(o,c);d.fireEvent(a.DDA.OMFactory.manufactureEventArgs(b,e,f))}})}else h(a.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(p){l(p,m,i,c)}};this[a.DDA.DispIdHost.Methods.RemoveEventHandler]=function(o,h,q){var i,e,j;function n(b){var c;if(b!=a.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c=a.DDA.ErrorCodeManager.getErrorArgs(a.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist);a.DDA.issueAsyncResult(i,b,c)}try{var p=a.DDA.AsyncMethodCalls[a.DDA.AsyncMethodNames.RemoveHandlerAsync.id];i=p.verifyAndExtractCall(o,q,h);e=i[Microsoft.Office.WebExtension.Parameters.EventType];j=i[Microsoft.Office.WebExtension.Parameters.Handler];var m;if(j==c){h.clearEventHandlers(e);m=d}else if(!h.hasEventHandler(e,j))m=b;else m=h.removeEventHandler(e,j);if(h.getEventHandlerCount(e)==0){var t=f[e],s=k(e)[a.DDA.DispIdHost.Delegates.UnregisterEventAsync];s({eventType:e,dispId:t,targetId:q.id||g,onCalling:function(){a.OUtil.writeProfilerMark(a.HostCallPerfMarker.IssueCall)},onReceiving:function(){a.OUtil.writeProfilerMark(a.HostCallPerfMarker.ReceiveResponse)},onComplete:n})}else n(m?a.DDA.ErrorCodeManager.errorCodes.ooeSuccess:Strings.OfficeOM.L_EventRegistrationError)}catch(r){l(r,p,o,i)}}};a.DDA.DispIdHost.addAsyncMethods=function(b,c,f){for(var g in c){var d=c[g],e=d.displayName;!b[e]&&a.OUtil.defineEnumerableProperty(b,e,{value:function(c){return function(){var d=a._OfficeAppFactory.getHostFacade()[a.DDA.DispIdHost.Methods.InvokeMethod];d(c,arguments,b,f)}}(d)})}};a.DDA.DispIdHost.addEventSupport=function(b,c){var e=a.DDA.AsyncMethodNames.AddHandlerAsync.displayName,d=a.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;!b[e]&&a.OUtil.defineEnumerableProperty(b,e,{value:function(){var d=a._OfficeAppFactory.getHostFacade()[a.DDA.DispIdHost.Methods.AddEventHandler];d(arguments,c,b)}});!b[d]&&a.OUtil.defineEnumerableProperty(b,d,{value:function(){var d=a._OfficeAppFactory.getHostFacade()[a.DDA.DispIdHost.Methods.RemoveEventHandler];d(arguments,c,b)}})};a.DDA.Context=function(d,e,f,c){var b=this;a.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:d.get_dataLocale()},displayLanguage:{value:d.get_appUILocale()}});e&&a.OUtil.defineEnumerableProperty(b,n,{value:e});f&&a.OUtil.defineEnumerableProperty(b,"license",{value:f});if(c){var g=c.displayName||"appOM";delete c.displayName;a.OUtil.defineEnumerableProperty(b,g,{value:c})}};a.DDA.OutlookContext=function(d,b,e,f){a.DDA.OutlookContext.uber.constructor.call(this,d,c,e,f);b&&a.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:b})};a.OUtil.extend(a.DDA.OutlookContext,a.DDA.Context);a.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var b;if(a&&a._OfficeAppFactory)b=a._OfficeAppFactory.getContext();return b}});Microsoft.Office.WebExtension.useShortNamespace=function(b){if(b)a.NamespaceManager.enableShortcut();else a.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(b,c){var d;if(b&&typeof b==l){var e=b.indexOf("#");if(e!=-1){var j=b.substring(0,e),h=b.substring(e+1);switch(j){case "binding":case p:if(h)d=new a.DDA.BindingPromise(h)}}}if(!d){if(c){var f=typeof c;if(f==i){var g={};g[Microsoft.Office.WebExtension.Parameters.Callback]=c;a.DDA.issueAsyncResult(g,a.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,a.DDA.ErrorCodeManager.getErrorArgs(a.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw a.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f)}}else{d.onFail=c;return d}};a.DDA.BindingPromise=function(c,b){this._id=c;a.OUtil.defineEnumerableProperty(this,"onFail",{"get":function(){return b},"set":function(d){var c=typeof d;if(c!=f&&c!=i)throw a.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,c);b=d}})};a.DDA.BindingPromise.prototype={_fetch:function(c){var b=this;if(b.binding)c&&c(b.binding);else if(!b._binding){var d=b;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(b._id,function(b){if(b.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded){a.OUtil.defineEnumerableProperty(d,"binding",{value:b.value});c&&c(d.binding)}else d.onFail&&d.onFail(b)})}return b},getDataAsync:function(){var a=arguments;this._fetch(function(b){b.getDataAsync.apply(b,a)});return this},setDataAsync:function(){var a=arguments;this._fetch(function(b){b.setDataAsync.apply(b,a)});return this},addHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.addHandlerAsync.apply(b,a)});return this},removeHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.removeHandlerAsync.apply(b,a)});return this}};a.DDA.License=function(b){a.OUtil.defineEnumerableProperty(this,"value",{value:b})};a.DDA.Settings=function(e){e=e||{};a.OUtil.defineEnumerableProperties(this,{"get":{value:function(g){var d=Function._validateParams(arguments,[{name:k,type:String,mayBeNull:b}]);if(d)throw d;var a=e[g];return typeof a===f?c:a}},"set":{value:function(f,c){var a=Function._validateParams(arguments,[{name:k,type:String,mayBeNull:b},{name:"value",mayBeNull:d}]);if(a)throw a;e[f]=c}},remove:{value:function(c){var a=Function._validateParams(arguments,[{name:k,type:String,mayBeNull:b}]);if(a)throw a;delete e[c]}}});a.DDA.DispIdHost.addAsyncMethods(this,[a.DDA.AsyncMethodNames.SaveAsync],e)};a.DDA.RefreshableSettings=function(b){a.DDA.RefreshableSettings.uber.constructor.call(this,b);a.DDA.DispIdHost.addAsyncMethods(this,[a.DDA.AsyncMethodNames.RefreshAsync],b);a.DDA.DispIdHost.addEventSupport(this,new a.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};a.OUtil.extend(a.DDA.RefreshableSettings,a.DDA.Settings);a.DDA.OutlookAppOm=function(){};a.DDA.Document=function(c,d){var b;switch(c.get_clientMode()){case a.ClientMode.ReadOnly:b=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case a.ClientMode.ReadWrite:b=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}d&&a.OUtil.defineEnumerableProperty(this,"settings",{value:d});a.OUtil.defineMutableProperties(this,{mode:{value:b},url:{value:c.get_docUrl()}})};a.DDA.JsomDocument=function(d,e,f){var b=this;a.DDA.JsomDocument.uber.constructor.call(b,d,f);a.OUtil.defineEnumerableProperty(b,p,{"get":function(){return e}});var c=a.DDA.AsyncMethodNames;a.DDA.DispIdHost.addAsyncMethods(b,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);a.DDA.DispIdHost.addEventSupport(b,new a.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};a.OUtil.extend(a.DDA.JsomDocument,a.DDA.Document);a.DDA.ExcelDocument=function(){throw a.OUtil.formatString(Strings.OfficeOM.L_NotImplemented,"ExcelDocument")};a.DDA.WordDocument=function(){throw a.OUtil.formatString(Strings.OfficeOM.L_NotImplemented,"WordDocument")};a.DDA.PowerPointDocument=function(){throw a.OUtil.formatString(Strings.OfficeOM.L_NotImplemented,"PowerPointDocument")};a.DDA.BindingFacade=function(c){this._eventDispatches=[];a.OUtil.defineEnumerableProperty(this,n,{value:c});var b=a.DDA.AsyncMethodNames;a.DDA.DispIdHost.addAsyncMethods(this,[b.AddFromSelectionAsync,b.AddFromNamedItemAsync,b.GetAllAsync,b.GetByIdAsync,b.ReleaseByIdAsync])};a.DDA.UnknownBinding=function(c,b){a.OUtil.defineEnumerableProperties(this,{document:{value:b},id:{value:c}})};a.DDA.Binding=function(b,d){a.OUtil.defineEnumerableProperties(this,{document:{value:d},id:{value:b}});var e=a.DDA.AsyncMethodNames;a.DDA.DispIdHost.addAsyncMethods(this,[e.GetDataAsync,e.SetDataAsync]);var f=Microsoft.Office.WebExtension.EventType,c=d.bindings._eventDispatches;if(!c[b])c[b]=new a.EventDispatch([f.BindingSelectionChanged,f.BindingDataChanged]);var g=c[b];a.DDA.DispIdHost.addEventSupport(this,g)};a.DDA.TextBinding=function(c,b){a.DDA.TextBinding.uber.constructor.call(this,c,b);a.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};a.OUtil.extend(a.DDA.TextBinding,a.DDA.Binding);a.DDA.MatrixBinding=function(e,d,c,b){a.DDA.MatrixBinding.uber.constructor.call(this,e,d);a.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:c?c:0},columnCount:{value:b?b:0}})};a.OUtil.extend(a.DDA.MatrixBinding,a.DDA.Binding);a.DDA.TableBinding=function(h,g,f,e,d){a.DDA.TableBinding.uber.constructor.call(this,h,g);a.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:f?f:0},columnCount:{value:e?e:0},hasHeaders:{value:d?d:b}});var c=a.DDA.AsyncMethodNames;a.DDA.DispIdHost.addAsyncMethods(this,[c.AddRowsAsync,c.AddColumnsAsync,c.DeleteAllDataValuesAsync])};a.OUtil.extend(a.DDA.TableBinding,a.DDA.Binding);Microsoft.Office.WebExtension.TableData=function(d,b){function e(b){if(b==c||b==undefined)return c;try{for(var d=a.DDA.DataCoercion.findArrayDimensionality(b,2);d<2;d++)b=[b];return b}catch(e){}}a.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return b},"set":function(a){b=e(a)}},rows:{"get":function(){return d},"set":function(a){d=e(a)}}});this.headers=b;this.rows=d};a.DDA.Error=function(d,b,c){a.OUtil.defineEnumerableProperties(this,{name:{value:d},message:{value:b},code:{value:c}})};a.DDA.AsyncResult=function(c,b){a.OUtil.defineEnumerableProperties(this,{value:{value:c[a.DDA.AsyncResultEnum.Properties.Value]},status:{value:b?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});c[a.DDA.AsyncResultEnum.Properties.Context]&&a.OUtil.defineEnumerableProperty(this,o,{value:c[a.DDA.AsyncResultEnum.Properties.Context]});b&&a.OUtil.defineEnumerableProperty(this,"error",{value:new a.DDA.Error(b[a.DDA.AsyncResultEnum.ErrorProperties.Name],b[a.DDA.AsyncResultEnum.ErrorProperties.Message],b[a.DDA.AsyncResultEnum.ErrorProperties.Code])})};a.DDA.DocumentSelectionChangedEventArgs=function(b){a.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:b}})};a.DDA.BindingSelectionChangedEventArgs=function(d,b){a.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:d}});for(var c in b)a.OUtil.defineEnumerableProperty(this,c,{value:b[c]})};a.DDA.BindingDataChangedEventArgs=function(b){a.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:b}})};a.DDA.SettingsChangedEventArgs=function(b){a.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:b}})};a.ConstantNames={OfficeJS:"office.js",OfficeDebugJS:"office.debug.js",DefaultLocale:"en-us",LocaleStringLoadingTimeout:2e3,OfficeStringJS:"office_strings.js"};a._OfficeAppFactory=function(){var o={"1-15":"excel-15.js","2-15":"word-15.js","4-15":"powerpoint-15.js","8-15":"outlook-15.js","16-15":"excelwebapp-15.js","64-15":"outlookwebapp-15.js","128-15":"project-15.js"},k,i,l,e={id:c,webAppUrl:c,conversationID:c,clientEndPoint:c,window:h.parent,focused:b},j=d,n=function(){var f=a.OUtil.parseXdmInfo();if(f!=c){var d=f.split("|");if(d!=undefined&&d.length==3){e.conversationID=d[0];e.id=d[1];e.webAppUrl=d[2];j=b}}},m=function(z,m){if(j){var l,c=h.external.GetContext(),i=c.GetAppType(),k=b;for(var r in a.AppName)if(a.AppName[r]==i){k=d;break}if(!k)throw"Unsupported client type "+i;var y=c.GetSolutionRef(),u=c.GetAppVersionMajor(),t=c.GetAppUILocale(),q=c.GetAppDataLocale(),v=c.GetDocUrl(),p=c.GetAppCapabilities(),w=c.GetActivationMode(),o=c.GetControlIntegrationLevel(),s=[],f;try{f=c.GetSolutionToken()}catch(x){}f=f?f.toString():g;l=new a.OfficeAppContext(y,i,u,t,q,v,p,s,w,o,f);m(l)}else{var n=function(e,b){var c;if(b._appName===a.AppName.ExcelWebApp){var d=b._settings;c={};for(var h in d){var f=d[h];c[f[0]]=f[1]}}else c=b._settings;if(e===0&&b._id!=undefined&&b._appName!=undefined&&b._appVersion!=undefined&&b._appUILocale!=undefined&&b._dataLocale!=undefined&&b._docUrl!=undefined&&b._clientMode!=undefined&&b._settings!=undefined&&b._reason!=undefined){var g=new a.OfficeAppContext(b._id,b._appName,b._appVersion,b._appUILocale,b._dataLocale,b._docUrl,b._clientMode,c,b._reason,b._osfControlType,b._eToken);m(g)}else throw"Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+e};e.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",n,e.id)}},p=function(){var g="ContextActivationManager_notifyHost";n();if(!j){e.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(e.conversationID,e.window,e.webAppUrl);e.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(e.id);var u=e.conversationID+a.SharedConstants.NotificationConversationIdSuffix;e.serviceEndPoint.registerConversation(u);var y=function(c){switch(c){case a.AgaveHostAction.Select:e.focused=d;h.focus();break;case a.AgaveHostAction.UnSelect:e.focused=b;break;default:Sys.Debug.trace("actionId "+c+" notifyAgave is wrong.")}};e.serviceEndPoint.registerMethod("Office_notifyAgave",y,Microsoft.Office.Common.InvokeType.async,b);h.onfocus=function(){if(!e.focused){e.focused=d;e.clientEndPoint.invoke(g,c,[e.id,a.AgaveHostAction.Select])}};h.onblur=function(){if(e.focused){e.focused=b;e.clientEndPoint.invoke(g,c,[e.id,a.AgaveHostAction.UnSelect])}}}for(var w=function(b,c){var d,a;b=b.toLowerCase();c=c.toLowerCase();a=b.indexOf(c);if(a>=0&&a===b.length-c.length&&(a===0||b.charAt(a-1)==="/"||b.charAt(a-1)==="\\"))d=b.substring(0,a);return d},s=document.getElementsByTagName("script")||[],x=s.length,t=[a.ConstantNames.OfficeJS,a.ConstantNames.OfficeDebugJS],v=t.length,r,p,q=0;!p&&q<x;q++)if(s[q].src)for(r=0;!p&&r<v;r++)p=w(s[q].src,t[r]);if(!p)throw a.OUtil.formatString("Office Web Extension script library file name should be {0} or {1}.",a.ConstantNames.OfficeJS,a.ConstantNames.OfficeDebugJS);m(e.window,function(c){var g="{0}{1}/{2}",n,u,t=100,q;function m(){if(Microsoft.Office.WebExtension.initialize!=undefined){var f=new a.DDA.License(c.get_eToken());if(c.get_appName()==a.AppName.OutlookWebApp||c.get_appName()==a.AppName.Outlook){k=new a.DDA.OutlookContext(c,i,f,u);Microsoft.Office.WebExtension.initialize()}else if(c.get_osfControlType()===a.OsfControlType.DocumentLevel||c.get_osfControlType()===a.OsfControlType.ContainerLevel){k=new a.DDA.Context(c,n,f);var b,d,e=c.get_reason();if(j){b=a.DDA.DispIdHost.getRichClientDelegateMethods;d=a.DDA.SafeArray.Delegate.ParameterMap;e=a.DDA.RichInitializationReason[e]}else{b=a.DDA.DispIdHost.getXLSDelegateMethods;d=a.DDA.XLS.Delegate.ParameterMap}l=new a.DDA.DispIdHost.Facade(b,d);Microsoft.Office.WebExtension.initialize(e)}else throw a.OUtil.formatString(Strings.OfficeOM.L_OsfControlTypeNotSupported);q!=undefined&&h.clearTimeout(q)}else if(t==0){clearTimeout(q);throw a.OUtil.formatString(Strings.OfficeOM.L_InitializeNotReady)}else{t--;q=h.setTimeout(m,100)}}var v=function(){var l=p+o[c.get_appName()+"-"+c.get_appVersion()],f=Strings.OfficeOM,g=a.DDA.ErrorCodeManager,k=g.errorCodes;g.addErrorMessage(k.ooeCoercionTypeNotSupported,{name:f.L_InvalidCoercion,message:f.L_CoercionTypeNotSupported});g.addErrorMessage(k.ooeGetSelectionNotMatchDataType,{name:f.L_DataReadError,message:f.L_GetSelectionNotSupported});g.addErrorMessage(k.ooeCoercionTypeNotMatchBinding,{name:f.L_InvalidCoercion,message:f.L_CoercionTypeNotMatchBinding});g.addErrorMessage(k.ooeInvalidGetRowColumnCounts,{name:f.L_DataReadError,message:f.L_InvalidGetRowColumnCounts});g.addErrorMessage(k.ooeSelectionNotSupportCoercionType,{name:f.L_DataReadError,message:f.L_SelectionNotSupportCoercionType});g.addErrorMessage(k.ooeInvalidGetStartRowColumn,{name:f.L_DataReadError,message:f.L_InvalidGetStartRowColumn});g.addErrorMessage(k.ooeNonUniformPartialGetNotSupported,{name:f.L_DataReadError,message:f.L_NonUniformPartialGetNotSupported});g.addErrorMessage(k.ooeGetDataIsTooLarge,{name:f.L_DataReadError,message:f.L_GetDataIsTooLarge});g.addErrorMessage(k.ooeFileTypeNotSupported,{name:f.L_DataReadError,message:f.L_FileTypeNotSupported});g.addErrorMessage(k.ooeUnsupportedDataObject,{name:f.L_DataWriteError,message:f.L_UnsupportedDataObject});g.addErrorMessage(k.ooeCannotWriteToSelection,{name:f.L_DataWriteError,message:f.L_CannotWriteToSelection});g.addErrorMessage(k.ooeDataNotMatchSelection,{name:f.L_DataWriteError,message:f.L_DataNotMatchSelection});g.addErrorMessage(k.ooeOverwriteWorksheetData,{name:f.L_DataWriteError,message:f.L_OverwriteWorksheetData});g.addErrorMessage(k.ooeDataNotMatchBindingSize,{name:f.L_DataWriteError,message:f.L_DataNotMatchBindingSize});g.addErrorMessage(k.ooeInvalidSetStartRowColumn,{name:f.L_DataWriteError,message:f.L_InvalidSetStartRowColumn});g.addErrorMessage(k.ooeInvalidDataFormat,{name:f.L_InvalidFormat,message:f.L_InvalidDataFormat});g.addErrorMessage(k.ooeDataNotMatchCoercionType,{name:f.L_InvalidDataObject,message:f.L_DataNotMatchCoercionType});g.addErrorMessage(k.ooeDataNotMatchBindingType,{name:f.L_InvalidDataObject,message:f.L_DataNotMatchBindingType});g.addErrorMessage(k.ooeSetDataIsTooLarge,{name:f.L_DataWriteError,message:f.L_SetDataIsTooLarge});g.addErrorMessage(k.ooeNonUniformPartialSetNotSupported,{name:f.L_DataWriteError,message:f.L_NonUniformPartialSetNotSupported});g.addErrorMessage(k.ooeSelectionCannotBound,{name:f.L_BindingCreationError,message:f.L_SelectionCannotBound});g.addErrorMessage(k.ooeBindingNotExist,{name:f.L_InvalidBindingError,message:f.L_BindingNotExist});g.addErrorMessage(k.ooeBindingToMultipleSelection,{name:f.L_BindingCreationError,message:f.L_BindingToMultipleSelection});g.addErrorMessage(k.ooeInvalidSelectionForBindingType,{name:f.L_BindingCreationError,message:f.L_InvalidSelectionForBindingType});g.addErrorMessage(k.ooeOperationNotSupportedOnThisBindingType,{name:f.L_InvalidBindingOperation,message:f.L_OperationNotSupportedOnThisBindingType});g.addErrorMessage(k.ooeNamedItemNotFound,{name:f.L_BindingCreationError,message:f.L_NamedItemNotFound});g.addErrorMessage(k.ooeMultipleNamedItemFound,{name:f.L_BindingCreationError,message:f.L_MultipleNamedItemFound});g.addErrorMessage(k.ooeInvalidNamedItemForBindingType,{name:f.L_BindingCreationError,message:f.L_InvalidNamedItemForBindingType});g.addErrorMessage(k.ooeUnknownBindingType,{name:f.L_InvalidBinding,message:f.L_UnknownBindingType});g.addErrorMessage(k.ooeSettingNameNotExist,{name:f.L_ReadSettingsError,message:f.L_SettingNameNotExist});g.addErrorMessage(k.ooeSettingsCannotSave,{name:f.L_SaveSettingsError,message:f.L_SettingsCannotSave});g.addErrorMessage(k.ooeSettingsAreStale,{name:f.L_SettingsStaleError,message:f.L_SettingsAreStale});g.addErrorMessage(k.ooeOperationNotSupported,{name:f.L_HostError,message:f.L_OperationNotSupported});g.addErrorMessage(k.ooeInternalError,{name:f.L_InternalError,message:f.L_InternalErrorDescription});g.addErrorMessage(k.ooeDocumentReadOnly,{name:f.L_PermissionDenied,message:f.L_DocumentReadOnly});g.addErrorMessage(k.ooeEventHandlerNotExist,{name:f.L_EventRegistrationError,message:f.L_EventHandlerNotExist});g.addErrorMessage(k.ooeInvalidApiCallInContext,{name:f.L_InvalidAPICall,message:f.L_InvalidApiCallInContext});g.addErrorMessage(k.ooeShuttingDown,{name:f.L_ShuttingDown,message:f.L_ShuttingDown});g.addErrorMessage(k.ooeUnsupportedEnumeration,{name:f.L_UnsupportedEnumeration,message:f.L_UnsupportedEnumerationMessage});g.addErrorMessage(k.ooeIndexOutOfRange,{name:f.L_IndexOutOfRange,message:f.L_IndexOutOfRange});g.addErrorMessage(k.ooeCustomXmlNodeNotFound,{name:f.L_InvalidNode,message:f.L_CustomXmlNodeNotFound});g.addErrorMessage(k.ooeCustomXmlError,{name:f.L_CustomXmlError,message:f.L_CustomXmlError});g.addErrorMessage(k.ooeNoCapability,{name:f.L_PermissionDenied,message:f.L_NoCapability});function q(e){var b;if(j)b=a.DDA.RichClientSettingsManager.read();else b=c.get_settings();var d=a.DDA.SettingsManager.deserializeSettings(b);if(e)i=new a.DDA.RefreshableSettings(d);else i=new a.DDA.Settings(d)}if(c.get_appName()==a.AppName.Excel){var v=function(){q(b);n=new a.DDA.ExcelDocument(c,i);m()};a.OUtil.loadScript(l,v)}else if(c.get_appName()==a.AppName.ExcelWebApp){var r=function(){q(d);n=new a.DDA.ExcelWebAppDocument(c,i);m()};a.OUtil.loadScript(l,r)}else if(c.get_appName()==a.AppName.Word){var x=function(){q(b);n=new a.DDA.WordDocument(c,i);m()};a.OUtil.loadScript(l,x)}else if(c.get_appName()==a.AppName.PowerPoint){var s=function(){q(b);n=new a.DDA.PowerPointDocument(c,i);m()};a.OUtil.loadScript(l,s)}else if(c.get_appName()==a.AppName.OutlookWebApp||c.get_appName()==a.AppName.Outlook){var t=function(){q(b);u=new a.DDA.OutlookAppOm(c,e.window,m)};a.OUtil.loadScript(l,t)}else if(c.get_appName()==a.AppName.Project){var w=function(){n=new a.DDA.ProjectDocument(c);m()};a.OUtil.loadScript(l,w)}else throw a.OUtil.formatString(f.L_AppNotExistInitializeNotCalled,c.get_appName());h.confirm=function(){throw a.OUtil.formatString(Strings.OfficeOM.L_NotSupported,"window.confirm")};h.alert=function(){throw a.OUtil.formatString(Strings.OfficeOM.L_NotSupported,"window.alert")};h.prompt=function(){throw a.OUtil.formatString(Strings.OfficeOM.L_NotSupported,"window.prompt")}},r=b,s=function(){if(typeof Strings==f||typeof Strings.OfficeOM==f)if(!r){r=d;var e=a.OUtil.formatString(g,p,a.ConstantNames.DefaultLocale,a.ConstantNames.OfficeStringJS);a.OUtil.loadScript(e,s)}else throw a.OUtil.formatString("Neither the locale, {0} , provided by the host app nor the fallback locale {1} are supported.",c.get_appUILocale().toLowerCase(),a.ConstantNames.DefaultLocale);else{r=b;v()}},w=a.OUtil.formatString(g,p,c.get_appUILocale().toLowerCase(),a.ConstantNames.OfficeStringJS);a.OUtil.loadScript(w,s,a.ConstantNames.LocaleStringLoadingTimeout)})};p();return {getId:function(){return e.id},getClientEndPoint:function(){return e.clientEndPoint},getWebAppState:function(){return e},getContext:function(){return k},getHostFacade:function(){return l}}}()},r=function(){var w="correlationId",v="actionName",u="targetEventName",i="conversationId",t="unregisterMethod",r="registerMethod",k="eventName",q="methodName",o="serviceEndPointId";a.OUtil.setNamespace(p,h);a.OUtil.setNamespace(n,Microsoft);a.OUtil.setNamespace("Common",Microsoft.Office);Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};Microsoft.Office.Common.InvokeResultCode={noError:0,errorInRequest:-1,errorHandlingRequest:-2,errorInResponse:-3,errorHandlingResponse:-4,errorHandlingRequestAccessDenied:-5,errorHandlingMethodCallTimedout:-6};Microsoft.Office.Common.MessageType={request:0,response:1};Microsoft.Office.Common.ActionType={invoke:0,registerEvent:1,unregisterEvent:2};Microsoft.Office.Common.ResponseType={forCalling:0,forEventing:1};Microsoft.Office.Common.MethodObject=function(c,b,a){this._method=c;this._invokeType=b;this._blockingOthers=a};Microsoft.Office.Common.MethodObject.prototype={getMethod:function(){return this._method},getInvokeType:function(){return this._invokeType},getBlockingFlag:function(){return this._blockingOthers}};Microsoft.Office.Common.EventMethodObject=function(b,a){this._registerMethodObject=b;this._unregisterMethodObject=a};Microsoft.Office.Common.EventMethodObject.prototype={getRegisterMethodObject:function(){return this._registerMethodObject},getUnregisterMethodObject:function(){return this._unregisterMethodObject}};Microsoft.Office.Common.ServiceEndPoint=function(e){var a=this,d=Function._validateParams(arguments,[{name:o,type:String,mayBeNull:b}]);if(d)throw d;a._methodObjectList={};a._eventHandlerProxyList={};a._Id=e;a._conversations={};a._policyManager=c};Microsoft.Office.Common.ServiceEndPoint.prototype={registerMethod:function(g,h,c,e){var a="invokeType",d=Function._validateParams(arguments,[{name:q,type:String,mayBeNull:b},{name:"method",type:Function,mayBeNull:b},{name:a,type:Number,mayBeNull:b},{name:"blockingOthers",type:Boolean,mayBeNull:b}]);if(d)throw d;if(c!==Microsoft.Office.Common.InvokeType.async&&c!==Microsoft.Office.Common.InvokeType.sync)throw Error.argument(a);var f=new Microsoft.Office.Common.MethodObject(h,c,e);this._methodObjectList[g]=f},unregisterMethod:function(c){var a=Function._validateParams(arguments,[{name:q,type:String,mayBeNull:b}]);if(a)throw a;delete this._methodObjectList[c]},registerEvent:function(f,d,c){var a=Function._validateParams(arguments,[{name:k,type:String,mayBeNull:b},{name:r,type:Function,mayBeNull:b},{name:t,type:Function,mayBeNull:b}]);if(a)throw a;var e=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(d,Microsoft.Office.Common.InvokeType.syncRegisterEvent,b),new Microsoft.Office.Common.MethodObject(c,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,b));this._methodObjectList[f]=e},registerEventEx:function(h,f,d,e,c){var a=Function._validateParams(arguments,[{name:k,type:String,mayBeNull:b},{name:r,type:Function,mayBeNull:b},{name:"registerMethodInvokeType",type:Number,mayBeNull:b},{name:t,type:Function,mayBeNull:b},{name:"unregisterMethodInvokeType",type:Number,mayBeNull:b}]);if(a)throw a;var g=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(f,d,b),new Microsoft.Office.Common.MethodObject(e,c,b));this._methodObjectList[h]=g},unregisterEvent:function(c){var a=Function._validateParams(arguments,[{name:k,type:String,mayBeNull:b}]);if(a)throw a;this.unregisterMethod(c)},registerConversation:function(c){var a=Function._validateParams(arguments,[{name:i,type:String,mayBeNull:b}]);if(a)throw a;this._conversations[c]=d},unregisterConversation:function(c){var a=Function._validateParams(arguments,[{name:i,type:String,mayBeNull:b}]);if(a)throw a;delete this._conversations[c]},setPolicyManager:function(c){var a="policyManager",d=Function._validateParams(arguments,[{name:a,type:Object,mayBeNull:b}]);if(d)throw d;if(!c.checkPermission)throw Error.argument(a);this._policyManager=c},getPolicyManager:function(){return this._policyManager}};Microsoft.Office.Common.ClientEndPoint=function(f,d,g){var a="targetWindow",c=this,e=Function._validateParams(arguments,[{name:i,type:String,mayBeNull:b},{name:a,mayBeNull:b},{name:"targetUrl",type:String,mayBeNull:b}]);if(e)throw e;if(!d.postMessage)throw Error.argument(a);c._conversationId=f;c._targetWindow=d;c._targetUrl=g;c._callingIndex=0;c._callbackList={};c._eventHandlerList={}};Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(n,h,f){var a=this,m=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:b},{name:l,type:Function,mayBeNull:d},{name:"param",mayBeNull:d}]);if(m)throw m;var g=a._callingIndex++,q=new Date,i={callback:h,createdOn:q.getTime()};if(f&&typeof f===j&&typeof f.__timeout__===e){i.timeout=f.__timeout__;delete f.__timeout__}a._callbackList[g]=i;try{var o=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.invoke,a._conversationId,g,f),p=Microsoft.Office.Common.MessagePackager.envelope(o);a._targetWindow.postMessage(p,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(k){try{h!==c&&h(Microsoft.Office.Common.InvokeResultCode.errorInRequest,k)}finally{delete a._callbackList[g]}}},registerForEvent:function(g,j,f,n){var a=this,i=Function._validateParams(arguments,[{name:u,type:String,mayBeNull:b},{name:"eventHandler",type:Function,mayBeNull:b},{name:l,type:Function,mayBeNull:d},{name:m,mayBeNull:d,optional:d}]);if(i)throw i;var e=a._callingIndex++,p=new Date;a._callbackList[e]={callback:f,createdOn:p.getTime()};try{var k=new Microsoft.Office.Common.Request(g,Microsoft.Office.Common.ActionType.registerEvent,a._conversationId,e,n),o=Microsoft.Office.Common.MessagePackager.envelope(k);a._targetWindow.postMessage(o,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer();a._eventHandlerList[g]=j}catch(h){try{f!==c&&f(Microsoft.Office.Common.InvokeResultCode.errorInRequest,h)}finally{delete a._callbackList[e]}}},unregisterForEvent:function(g,f,k){var a=this,i=Function._validateParams(arguments,[{name:u,type:String,mayBeNull:b},{name:l,type:Function,mayBeNull:d},{name:m,mayBeNull:d,optional:d}]);if(i)throw i;var e=a._callingIndex++,o=new Date;a._callbackList[e]={callback:f,createdOn:o.getTime()};try{var j=new Microsoft.Office.Common.Request(g,Microsoft.Office.Common.ActionType.unregisterEvent,a._conversationId,e,k),n=Microsoft.Office.Common.MessagePackager.envelope(j);a._targetWindow.postMessage(n,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(h){try{f!==c&&f(Microsoft.Office.Common.InvokeResultCode.errorInRequest,h)}finally{delete a._callbackList[e]}}finally{delete a._eventHandlerList[g]}}};Microsoft.Office.Common.XdmCommunicationManager=function(){var e="channel is not ready.",a="Unknown conversation Id.",p=[],k=c,A=10,n=b,l=c,t=2e3,q=6e4,m={},j={},r=b;function u(c){for(var b in m)if(m[b]._conversations[c])return m[b];Sys.Debug.trace(a);throw Error.argument(i)}function v(c){var b=j[c];if(!b){Sys.Debug.trace(a);throw Error.argument(i)}return b}function y(e,b){var a=e._methodObjectList[b._actionName];if(!a){Sys.Debug.trace("The specified method is not registered on service endpoint:"+b._actionName);throw Error.argument("messageObject")}var d=c;if(b._actionType===Microsoft.Office.Common.ActionType.invoke)d=a;else if(b._actionType===Microsoft.Office.Common.ActionType.registerEvent)d=a.getRegisterMethodObject();else d=a.getUnregisterMethodObject();return d}function C(a){p.push(a)}function B(){if(k!==c){if(!n)if(p.length>0){var a=p.shift();n=a.getInvokeBlockingFlag();a.invoke()}else{clearInterval(k);k=c}}else Sys.Debug.trace(e)}function x(){if(l){var b,d=0,i=new Date,g;for(var h in j){b=j[h];for(var f in b._callbackList){var a=b._callbackList[f];g=a.timeout?a.timeout:q;if(Math.abs(i.getTime()-a.createdOn)>=g)try{a.callback&&a.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,c)}finally{delete b._callbackList[f]}else d++}}if(d===0){clearInterval(l);l=c}}else Sys.Debug.trace(e)}function w(){n=b}function z(a){if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&h.attachEvent)h.attachEvent("onmessage",a);else if(h.addEventListener)h.addEventListener("message",a,b);else{Sys.Debug.trace("Browser doesn't support the required API.");throw Error.argument("Browser")}}function D(b){var d="Access Denied";if(b.data!=g){var a;try{a=Microsoft.Office.Common.MessagePackager.unenvelope(b.data)}catch(e){return}if(typeof a._messageType==f)return;if(a._messageType===Microsoft.Office.Common.MessageType.request){var n=b.origin==c||b.origin=="null"?a._origin:b.origin;try{var h=u(a._conversationId),m=h.getPolicyManager();if(m&&!m.checkPermission(a._conversationId,a._actionName,a._data))throw d;var s=y(h,a),p=new Microsoft.Office.Common.InvokeCompleteCallback(b.source,n,a._actionName,a._conversationId,a._correlationId,w),t=new Microsoft.Office.Common.Invoker(s,a._data,p,h._eventHandlerProxyList,a._conversationId,a._actionName);if(k==c)k=setInterval(B,A);C(t)}catch(e){var o=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;if(e==d)o=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied;var r=new Microsoft.Office.Common.Response(a._actionName,a._conversationId,a._correlationId,o,Microsoft.Office.Common.ResponseType.forCalling,e),q=Microsoft.Office.Common.MessagePackager.envelope(r);b.source&&b.source.postMessage&&b.source.postMessage(q,n)}}else if(a._messageType===Microsoft.Office.Common.MessageType.response){var i=v(a._conversationId);if(a._responseType===Microsoft.Office.Common.ResponseType.forCalling){var j=i._callbackList[a._correlationId];if(j)try{j.callback&&j.callback(a._errorCode,a._data)}finally{delete i._callbackList[a._correlationId]}}else{var l=i._eventHandlerList[a._actionName];l!==undefined&&l!==c&&l(a._data)}}else return}}function s(){if(!r){z(D);r=d}}return {connect:function(b,c,d){s();var a=new Microsoft.Office.Common.ClientEndPoint(b,c,d);j[b]=a;return a},getClientEndPoint:function(c){var a=Function._validateParams(arguments,[{name:i,type:String,mayBeNull:b}]);if(a)throw a;return j[c]},createServiceEndPoint:function(a){s();var b=new Microsoft.Office.Common.ServiceEndPoint(a);m[a]=b;return b},getServiceEndPoint:function(c){var a=Function._validateParams(arguments,[{name:o,type:String,mayBeNull:b}]);if(a)throw a;return m[c]},deleteClientEndPoint:function(c){var a=Function._validateParams(arguments,[{name:i,type:String,mayBeNull:b}]);if(a)throw a;delete j[c]},_setMethodTimeout:function(a){var c=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:b}]);if(c)throw c;q=a<=0?6e4:a},_startMethodTimeoutTimer:function(){if(!l)l=setInterval(x,t)}}}();Microsoft.Office.Common.Message=function(l,n,j,k,e){var a=this,g=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:b},{name:v,type:String,mayBeNull:b},{name:i,type:String,mayBeNull:b},{name:w,mayBeNull:b},{name:m,mayBeNull:d,optional:d}]);if(g)throw g;a._messageType=l;a._actionName=n;a._conversationId=j;a._correlationId=k;a._origin=h.location.href;if(typeof e==f)a._data=c;else a._data=e};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(c,d,a,b,e){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,c,a,b,e);this._actionType=d};a.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(d,a,b,e,c,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,d,a,b,f);this._errorCode=e;this._responseType=c};a.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(a){return Sys.Serialization.JavaScriptSerializer.serialize(a)},unenvelope:function(a){return Sys.Serialization.JavaScriptSerializer.deserialize(a,d)}};Microsoft.Office.Common.ResponseSender=function(e,h,k,f,g,j){var a=this,d=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:b},{name:"requesterUrl",type:String,mayBeNull:b},{name:v,type:String,mayBeNull:b},{name:i,type:String,mayBeNull:b},{name:w,mayBeNull:b},{name:"responsetype",type:Number,maybeNull:b}]);if(d)throw d;a._requesterWindow=e;a._requesterUrl=h;a._actionName=k;a._conversationId=f;a._correlationId=g;a._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;a._responseType=j;var c=a;a._send=function(d){var b=new Microsoft.Office.Common.Response(c._actionName,c._conversationId,c._correlationId,c._invokeResultCode,c._responseType,d),a=Microsoft.Office.Common.MessagePackager.envelope(b);c._requesterWindow.postMessage(a,c._requesterUrl)}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(a){this._invokeResultCode=a}};Microsoft.Office.Common.InvokeCompleteCallback=function(d,g,h,e,f,c){var b=this;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(b,d,g,h,e,f,Microsoft.Office.Common.ResponseType.forCalling);b._postCallbackHandler=c;var a=b;b._send=function(d){var c=new Microsoft.Office.Common.Response(a._actionName,a._conversationId,a._correlationId,a._invokeResultCode,a._responseType,d),b=Microsoft.Office.Common.MessagePackager.envelope(c);a._requesterWindow.postMessage(b,a._requesterUrl);a._postCallbackHandler()}};a.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(h,j,e,f,g,l){var a=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:b},{name:"paramValue",mayBeNull:d},{name:"invokeCompleteCallback",mayBeNull:b},{name:"eventHandlerProxyList",mayBeNull:d},{name:i,type:String,mayBeNull:b},{name:k,type:String,mayBeNull:b}]);if(c)throw c;a._methodObject=h;a._param=j;a._invokeCompleteCallback=e;a._eventHandlerProxyList=f;a._conversationId=g;a._eventName=l};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var a=this;try{var b;switch(a._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:a._methodObject.getMethod()(a._param,a._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:b=a._methodObject.getMethod()(a._param);a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var d=a._createEventHandlerProxyObject(a._invokeCompleteCallback);b=a._methodObject.getMethod()(d.getSend(),a._param);a._eventHandlerProxyList[a._conversationId+a._eventName]=d.getSend();a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var g=a._eventHandlerProxyList[a._conversationId+a._eventName];b=a._methodObject.getMethod()(g,a._param);delete a._eventHandlerProxyList[a._conversationId+a._eventName];a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var c=a._createEventHandlerProxyObject(a._invokeCompleteCallback);a._methodObject.getMethod()(c.getSend(),a._invokeCompleteCallback.getSend(),a._param);a._eventHandlerProxyList[a._callerId+a._eventName]=c.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var f=a._eventHandlerProxyList[a._callerId+a._eventName];a._methodObject.getMethod()(f,a._invokeCompleteCallback.getSend(),a._param);delete a._eventHandlerProxyList[a._callerId+a._eventName]}}catch(e){a._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);a._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(a){return new Microsoft.Office.Common.ResponseSender(a.getRequesterWindow(),a.getRequesterUrl(),a.getActionName(),a.getConversationId(),a.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing)}};var z=function(b){if(b)a.OUtil.loadScript(b,function(){Sys.Debug.trace("loaded customized script:"+b)});else s()},B,D,x,y=c,C=a.OUtil.parseXdmInfo();if(C){x=C.split("|");if(x&&x.length==3){B=x[0];D=x[2];y=Microsoft.Office.Common.XdmCommunicationManager.connect(B,h.parent,D)}}var A=c;if(!y){try{A=h.external.getCustomizedScriptPath()}catch(E){Sys.Debug.trace("no script override through window.external.")}z(A)}else try{y.invoke("getCustomizedScriptPathAsync",function(b,a){z(b===0?a:c)},{__timeout__:1e3})}catch(E){Sys.Debug.trace("no script override through cross frame communication.")}},q=function(){if(typeof Sys!==f&&typeof Type!==f&&Sys.StringBuilder&&typeof Sys.StringBuilder===i&&Type.registerNamespace&&typeof Type.registerNamespace===i&&Type.registerClass&&typeof Type.registerClass===i)return d;else return b};if(q())r();else if(typeof Function!==f){var t=(h.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";a.OUtil.loadScript(t,function(){if(q())r();else if(typeof Function!==f)throw"Not able to load MicrosoftAjax.js."})}})(window)