Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

outlook-15.04.debug.js 191KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527
  1. /* Outlook specific API library */
  2. /* Version: 15.0.4856.3003 */
  3. /*
  4. Copyright (c) Microsoft Corporation. All rights reserved.
  5. */
  6. /*
  7. Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419.
  8. */
  9. Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");
  10. Microsoft.Office.WebExtension.MailboxEnums.EntityType={
  11. MeetingSuggestion: "meetingSuggestion",
  12. TaskSuggestion: "taskSuggestion",
  13. Address: "address",
  14. EmailAddress: "emailAddress",
  15. Url: "url",
  16. PhoneNumber: "phoneNumber",
  17. Contact: "contact",
  18. FlightReservations: "flightReservations",
  19. ParcelDeliveries: "parcelDeliveries"
  20. };
  21. Microsoft.Office.WebExtension.MailboxEnums.ItemType={
  22. Message: "message",
  23. Appointment: "appointment"
  24. };
  25. Microsoft.Office.WebExtension.MailboxEnums.ResponseType={
  26. None: "none",
  27. Organizer: "organizer",
  28. Tentative: "tentative",
  29. Accepted: "accepted",
  30. Declined: "declined"
  31. };
  32. Microsoft.Office.WebExtension.MailboxEnums.RecipientType={
  33. Other: "other",
  34. DistributionList: "distributionList",
  35. User: "user",
  36. ExternalUser: "externalUser"
  37. };
  38. Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={
  39. File: "file",
  40. Item: "item",
  41. Cloud: "cloud"
  42. };
  43. Microsoft.Office.WebExtension.MailboxEnums.BodyType={
  44. Text: "text",
  45. Html: "html"
  46. };
  47. Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={
  48. ProgressIndicator: "progressIndicator",
  49. InformationalMessage: "informationalMessage",
  50. ErrorMessage: "errorMessage"
  51. };
  52. Microsoft.Office.WebExtension.CoercionType={
  53. Text: "text",
  54. Html: "html"
  55. };
  56. Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={
  57. Office365: "office365",
  58. OutlookCom: "outlookCom",
  59. Enterprise: "enterprise"
  60. };
  61. Microsoft.Office.WebExtension.MailboxEnums.RestVersion={
  62. v1_0: "v1.0",
  63. v2_0: "v2.0",
  64. Beta: "beta"
  65. };
  66. Type.registerNamespace("OSF.DDA");
  67. var OSF=window.OSF || {};
  68. OSF.DDA=OSF.DDA || {};
  69. window["OSF"]["DDA"]["OutlookAppOm"]=OSF.DDA.OutlookAppOm=function(officeAppContext, targetWindow, appReadyCallback)
  70. {
  71. this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);
  72. this.$$d_displayContactCardAsync=Function.createDelegate(this,this.displayContactCardAsync);
  73. this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);
  74. this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);
  75. this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);
  76. this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);
  77. this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);
  78. this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);
  79. this.$$d__getItem$p$0=Function.createDelegate(this,this._getItem$p$0);
  80. this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);
  81. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=this;
  82. this._officeAppContext$p$0=officeAppContext;
  83. this._appReadyCallback$p$0=appReadyCallback;
  84. var $$t_4=this;
  85. var stringLoadedCallback=function()
  86. {
  87. if(appReadyCallback)
  88. if(!officeAppContext["get_isDialog"]())
  89. $$t_4.invokeHostMethod(1,null,$$t_4.$$d__getInitialDataResponseHandler$p$0);
  90. else
  91. window.setTimeout($$t_4.$$d__callAppReadyCallback$p$0,0)
  92. };
  93. if(this._areStringsLoaded$p$0())
  94. stringLoadedCallback();
  95. else
  96. this._loadLocalizedScript$p$0(stringLoadedCallback)
  97. };
  98. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i=function(currentPermissionLevel)
  99. {
  100. if(!currentPermissionLevel)
  101. throw Error.create(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeeded_Text"]);
  102. };
  103. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i=function(value, minValue, maxValue, argumentName)
  104. {
  105. if(value < minValue || value > maxValue)
  106. throw Error.argumentOutOfRange(argumentName);
  107. };
  108. window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p=function(data)
  109. {
  110. var htmlBody="";
  111. if("htmlBody" in data)
  112. {
  113. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p(data["htmlBody"]);
  114. htmlBody=data["htmlBody"]
  115. }
  116. return htmlBody
  117. };
  118. window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p=function(data)
  119. {
  120. var attachments=[];
  121. if("attachments" in data)
  122. {
  123. attachments=data["attachments"];
  124. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p(attachments)
  125. }
  126. return attachments
  127. };
  128. window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p=function(data)
  129. {
  130. var args=[];
  131. if("options" in data)
  132. args[0]=data["options"];
  133. if("callback" in data)
  134. args[args.length]=data["callback"];
  135. return args
  136. };
  137. window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p=function(attachments)
  138. {
  139. var attachmentsData=new Array(0);
  140. if(Array.isInstanceOfType(attachments))
  141. for(var i=0; i < attachments["length"]; i++)
  142. if(Object.isInstanceOfType(attachments[i]))
  143. {
  144. var attachment=attachments[i];
  145. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p(attachment);
  146. attachmentsData[i]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p(attachment)
  147. }
  148. else
  149. throw Error.argument("attachments");
  150. return attachmentsData
  151. };
  152. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p=function(htmlBody)
  153. {
  154. if(!String.isInstanceOfType(htmlBody))
  155. throw Error.argument("htmlBody");
  156. if($h.ScriptHelpers.isNullOrUndefined(htmlBody))
  157. throw Error.argument("htmlBody");
  158. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody["length"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody")
  159. };
  160. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p=function(attachments)
  161. {
  162. if(!Array.isInstanceOfType(attachments))
  163. throw Error.argument("attachments");
  164. };
  165. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p=function(attachment)
  166. {
  167. if(!Object.isInstanceOfType(attachment))
  168. throw Error.argument("attachments");
  169. if(!("type" in attachment) || !("name" in attachment))
  170. throw Error.argument("attachments");
  171. if(!("url" in attachment || "itemId" in attachment))
  172. throw Error.argument("attachments");
  173. };
  174. window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p=function(attachment)
  175. {
  176. var attachmentData=null;
  177. if(attachment["type"]==="file")
  178. {
  179. var url=attachment["url"];
  180. var name=attachment["name"];
  181. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p(url,name);
  182. attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p(url,name)
  183. }
  184. else if(attachment["type"]==="item")
  185. {
  186. var itemId=window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(attachment["itemId"]);
  187. var name=attachment["name"];
  188. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p(itemId,name);
  189. attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p(itemId,name)
  190. }
  191. else
  192. throw Error.argument("attachments");
  193. return attachmentData
  194. };
  195. window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p=function(url, name)
  196. {
  197. return["file",name,url]
  198. };
  199. window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p=function(itemId, name)
  200. {
  201. return["item",name,itemId]
  202. };
  203. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p=function(url, name)
  204. {
  205. if(!String.isInstanceOfType(url) || !String.isInstanceOfType(name))
  206. throw Error.argument("attachments");
  207. if(url["length"] > 2048)
  208. throw Error.argumentOutOfRange("attachments",url["length"],window["_u"]["ExtensibilityStrings"]["l_AttachmentUrlTooLong_Text"]);
  209. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name)
  210. };
  211. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p=function(itemId, name)
  212. {
  213. if(!String.isInstanceOfType(itemId) || !String.isInstanceOfType(name))
  214. throw Error.argument("attachments");
  215. if(itemId["length"] > 200)
  216. throw Error.argumentOutOfRange("attachments",itemId["length"],window["_u"]["ExtensibilityStrings"]["l_AttachmentItemIdTooLong_Text"]);
  217. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name)
  218. };
  219. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p=function(name)
  220. {
  221. if(name["length"] > 255)
  222. throw Error.argumentOutOfRange("attachments",name["length"],window["_u"]["ExtensibilityStrings"]["l_AttachmentNameTooLong_Text"]);
  223. };
  224. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p=function(restVersion)
  225. {
  226. if(!restVersion)
  227. throw Error.argumentNull("restVersion");
  228. if(restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v2_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["Beta"])
  229. throw Error.argument("restVersion");
  230. };
  231. window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost=function(itemId)
  232. {
  233. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0 && window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0.get__isRestIdSupported$i$0())
  234. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToRestId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]);
  235. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToEwsId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"])
  236. };
  237. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p=function(value, expectedType, argumentName)
  238. {
  239. if(Object["getType"](value) !==expectedType)
  240. throw Error.argumentType(argumentName);
  241. };
  242. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p=function(value, minLength, maxLength, name)
  243. {
  244. if($h.ScriptHelpers.isNullOrUndefined(value))
  245. return;
  246. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(value,String,name);
  247. var stringValue=value;
  248. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(stringValue["length"],minLength,maxLength,name)
  249. };
  250. window["OSF"]["DDA"]["OutlookAppOm"]._convertToOutlookParameters$p=function(dispid, data)
  251. {
  252. var executeParameters=null;
  253. switch(dispid)
  254. {
  255. case 1:
  256. case 2:
  257. case 12:
  258. case 3:
  259. case 14:
  260. case 18:
  261. case 26:
  262. case 32:
  263. case 41:
  264. case 34:
  265. break;
  266. case 4:
  267. var jsonProperty=window["JSON"]["stringify"](data["customProperties"]);
  268. executeParameters=[jsonProperty];
  269. break;
  270. case 5:
  271. executeParameters=[data["body"]];
  272. break;
  273. case 8:
  274. case 9:
  275. executeParameters=[data["itemId"]];
  276. break;
  277. case 7:
  278. executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["requiredAttendees"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["optionalAttendees"]),data["start"],data["end"],data["location"],window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["resources"]),data["subject"],data["body"]];
  279. break;
  280. case 44:
  281. executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["toRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["ccRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["bccRecipients"]),data["subject"],data["htmlBody"],data["attachments"]];
  282. break;
  283. case 43:
  284. executeParameters=[data["ewsIdOrEmail"]];
  285. break;
  286. case 40:
  287. executeParameters=[data["extensionId"],data["consentState"]];
  288. break;
  289. case 11:
  290. case 10:
  291. executeParameters=[data["htmlBody"]];
  292. break;
  293. case 31:
  294. case 30:
  295. executeParameters=[data["htmlBody"],data["attachments"]];
  296. break;
  297. case 23:
  298. case 13:
  299. case 38:
  300. case 29:
  301. executeParameters=[data["data"],data["coercionType"]];
  302. break;
  303. case 37:
  304. case 28:
  305. executeParameters=[data["coercionType"]];
  306. break;
  307. case 17:
  308. executeParameters=[data["subject"]];
  309. break;
  310. case 15:
  311. executeParameters=[data["recipientField"]];
  312. break;
  313. case 22:
  314. case 21:
  315. executeParameters=[data["recipientField"],window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p(data["recipientArray"])];
  316. break;
  317. case 19:
  318. executeParameters=[data["itemId"],data["name"]];
  319. break;
  320. case 16:
  321. executeParameters=[data["uri"],data["name"]];
  322. break;
  323. case 20:
  324. executeParameters=[data["attachmentIndex"]];
  325. break;
  326. case 25:
  327. executeParameters=[data["TimeProperty"],data["time"]];
  328. break;
  329. case 24:
  330. executeParameters=[data["TimeProperty"]];
  331. break;
  332. case 27:
  333. executeParameters=[data["location"]];
  334. break;
  335. case 33:
  336. case 35:
  337. executeParameters=[data["key"],data["type"],data["persistent"],data["message"],data["icon"]];
  338. break;
  339. case 36:
  340. executeParameters=[data["key"]];
  341. break;
  342. default:
  343. Sys.Debug.fail("Unexpected method dispid");
  344. break
  345. }
  346. return executeParameters
  347. };
  348. window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(array)
  349. {
  350. return array ? array["join"](";") : null
  351. };
  352. window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p=function(recipients)
  353. {
  354. if(!recipients)
  355. return null;
  356. var results=new Array(recipients.length);
  357. for(var i=0; i < recipients.length; i++)
  358. results[i]=[recipients[i]["address"],recipients[i]["name"]];
  359. return results
  360. };
  361. window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p=function(emailset, name)
  362. {
  363. if($h.ScriptHelpers.isNullOrUndefined(emailset))
  364. return null;
  365. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(emailset,Array,name);
  366. var originalAttendees=emailset;
  367. var updatedAttendees=null;
  368. var normalizationNeeded=false;
  369. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(originalAttendees["length"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p,String.format("{0}.length",name));
  370. for(var i=0; i < originalAttendees["length"]; i++)
  371. if($h.EmailAddressDetails.isInstanceOfType(originalAttendees[i]))
  372. {
  373. normalizationNeeded=true;
  374. break
  375. }
  376. if(normalizationNeeded)
  377. updatedAttendees=[];
  378. for(var i=0; i < originalAttendees["length"]; i++)
  379. if(normalizationNeeded)
  380. {
  381. updatedAttendees[i]=$h.EmailAddressDetails.isInstanceOfType(originalAttendees[i]) ? originalAttendees[i]["emailAddress"] : originalAttendees[i];
  382. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(updatedAttendees[i],String,String.format("{0}[{1}]",name,i))
  383. }
  384. else
  385. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(originalAttendees[i],String,String.format("{0}[{1}]",name,i));
  386. return updatedAttendees
  387. };
  388. OSF.DDA.OutlookAppOm.prototype={
  389. _initialData$p$0: null,
  390. _item$p$0: null,
  391. _userProfile$p$0: null,
  392. _diagnostics$p$0: null,
  393. _officeAppContext$p$0: null,
  394. _appReadyCallback$p$0: null,
  395. _clientEndPoint$p$0: null,
  396. get_clientEndPoint: function()
  397. {
  398. if(!this._clientEndPoint$p$0)
  399. this._clientEndPoint$p$0=window["OSF"]["_OfficeAppFactory"]["getClientEndPoint"]();
  400. return this._clientEndPoint$p$0
  401. },
  402. set_clientEndPoint: function(value)
  403. {
  404. this._clientEndPoint$p$0=value;
  405. return value
  406. },
  407. get_initialData: function()
  408. {
  409. return this._initialData$p$0
  410. },
  411. get__appName$i$0: function()
  412. {
  413. return this._officeAppContext$p$0["get_appName"]()
  414. },
  415. initialize: function(initialData)
  416. {
  417. var ItemTypeKey="itemType";
  418. this._initialData$p$0=new $h.InitialData(initialData);
  419. if(1===initialData[ItemTypeKey])
  420. this._item$p$0=new $h.Message(this._initialData$p$0);
  421. else if(3===initialData[ItemTypeKey])
  422. this._item$p$0=new $h.MeetingRequest(this._initialData$p$0);
  423. else if(2===initialData[ItemTypeKey])
  424. this._item$p$0=new $h.Appointment(this._initialData$p$0);
  425. else if(4===initialData[ItemTypeKey])
  426. this._item$p$0=new $h.MessageCompose(this._initialData$p$0);
  427. else if(5===initialData[ItemTypeKey])
  428. this._item$p$0=new $h.AppointmentCompose(this._initialData$p$0);
  429. else
  430. Sys.Debug.trace("Unexpected item type was received from the host.");
  431. this._userProfile$p$0=new $h.UserProfile(this._initialData$p$0);
  432. this._diagnostics$p$0=new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0["get_appName"]());
  433. this._initializeMethods$p$0();
  434. $h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d__getItem$p$0);
  435. $h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);
  436. $h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);
  437. $h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);
  438. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64)
  439. if(this._initialData$p$0.get__overrideWindowOpen$i$0())
  440. window.open=this.$$d_windowOpenOverrideHandler
  441. },
  442. windowOpenOverrideHandler: function(url, targetName, features, replace)
  443. {
  444. this.invokeHostMethod(403,{launchUrl: url},null)
  445. },
  446. makeEwsRequestAsync: function(data)
  447. {
  448. var args=[];
  449. for(var $$pai_5=1; $$pai_5 < arguments.length;++$$pai_5)
  450. args[$$pai_5 - 1]=arguments[$$pai_5];
  451. if($h.ScriptHelpers.isNullOrUndefined(data))
  452. throw Error.argumentNull("data");
  453. if(data["length"] > window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p)
  454. throw Error.argument("data",window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]);
  455. this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");
  456. var parameters=$h.CommonParameters.parse(args,true,true);
  457. var ewsRequest=new $h.EwsRequest(parameters._asyncContext$p$0);
  458. var $$t_4=this;
  459. ewsRequest.onreadystatechange=function()
  460. {
  461. if(4===ewsRequest.get__requestState$i$1())
  462. parameters._callback$p$0(ewsRequest._asyncResult$p$0)
  463. };
  464. ewsRequest.send(data)
  465. },
  466. recordDataPoint: function(data)
  467. {
  468. if($h.ScriptHelpers.isNullOrUndefined(data))
  469. throw Error.argumentNull("data");
  470. this.invokeHostMethod(402,data,null)
  471. },
  472. recordTrace: function(data)
  473. {
  474. if($h.ScriptHelpers.isNullOrUndefined(data))
  475. throw Error.argumentNull("data");
  476. this.invokeHostMethod(401,data,null)
  477. },
  478. trackCtq: function(data)
  479. {
  480. if($h.ScriptHelpers.isNullOrUndefined(data))
  481. throw Error.argumentNull("data");
  482. this.invokeHostMethod(400,data,null)
  483. },
  484. convertToLocalClientTime: function(timeValue)
  485. {
  486. var date=new Date(timeValue["getTime"]());
  487. var offset=date["getTimezoneOffset"]() * -1;
  488. if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0())
  489. {
  490. date["setUTCMinutes"](date["getUTCMinutes"]() - offset);
  491. offset=this._findOffset$p$0(date);
  492. date["setUTCMinutes"](date["getUTCMinutes"]()+offset)
  493. }
  494. var retValue=this._dateToDictionary$i$0(date);
  495. retValue["timezoneOffset"]=offset;
  496. return retValue
  497. },
  498. convertToUtcClientTime: function(input)
  499. {
  500. var retValue=this._dictionaryToDate$i$0(input);
  501. if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0())
  502. {
  503. var offset=this._findOffset$p$0(retValue);
  504. retValue["setUTCMinutes"](retValue["getUTCMinutes"]() - offset);
  505. offset=!input["timezoneOffset"] ? retValue["getTimezoneOffset"]() * -1 : input["timezoneOffset"];
  506. retValue["setUTCMinutes"](retValue["getUTCMinutes"]()+offset)
  507. }
  508. return retValue
  509. },
  510. convertToRestId: function(itemId, restVersion)
  511. {
  512. if(!itemId)
  513. throw Error.argumentNull("itemId");
  514. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion);
  515. return itemId["replace"](new RegExp("[/]","g"),"-")["replace"](new RegExp("[+]","g"),"_")
  516. },
  517. convertToEwsId: function(itemId, restVersion)
  518. {
  519. if(!itemId)
  520. throw Error.argumentNull("itemId");
  521. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion);
  522. return itemId["replace"](new RegExp("[-]","g"),"/")["replace"](new RegExp("[_]","g"),"+")
  523. },
  524. getUserIdentityTokenAsync: function()
  525. {
  526. var args=[];
  527. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  528. args[$$pai_2]=arguments[$$pai_2];
  529. this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync");
  530. var parameters=$h.CommonParameters.parse(args,true,true);
  531. this._invokeGetTokenMethodAsync$p$0(2,"GetUserIdentityToken",parameters._callback$p$0,parameters._asyncContext$p$0)
  532. },
  533. getCallbackTokenAsync: function()
  534. {
  535. var args=[];
  536. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  537. args[$$pai_2]=arguments[$$pai_2];
  538. this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync");
  539. var parameters=$h.CommonParameters.parse(args,true,true);
  540. this._invokeGetTokenMethodAsync$p$0(12,"GetCallbackToken",parameters._callback$p$0,parameters._asyncContext$p$0)
  541. },
  542. displayMessageForm: function(itemId)
  543. {
  544. if($h.ScriptHelpers.isNullOrUndefined(itemId))
  545. throw Error.argumentNull("itemId");
  546. this.invokeHostMethod(8,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null)
  547. },
  548. displayAppointmentForm: function(itemId)
  549. {
  550. if($h.ScriptHelpers.isNullOrUndefined(itemId))
  551. throw Error.argumentNull("itemId");
  552. this.invokeHostMethod(9,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null)
  553. },
  554. RegisterConsentAsync: function(consentState)
  555. {
  556. if(consentState !==2 && consentState !==1 && consentState)
  557. throw Error.argumentOutOfRange("consentState");
  558. var parameters={};
  559. parameters["consentState"]=consentState["toString"]();
  560. parameters["extensionId"]=this["GetExtensionId"]();
  561. this.invokeHostMethod(40,parameters,null)
  562. },
  563. CloseApp: function()
  564. {
  565. this.invokeHostMethod(42,null,null)
  566. },
  567. GetIsRead: function()
  568. {
  569. return this._initialData$p$0.get__isRead$i$0()
  570. },
  571. GetEndNodeUrl: function()
  572. {
  573. return this._initialData$p$0.get__endNodeUrl$i$0()
  574. },
  575. GetConsentMetadata: function()
  576. {
  577. return this._initialData$p$0.get__consentMetadata$i$0()
  578. },
  579. GetEntryPointUrl: function()
  580. {
  581. return this._initialData$p$0.get__entryPointUrl$i$0()
  582. },
  583. GetMarketplaceContentMarket: function()
  584. {
  585. return this._initialData$p$0.get__marketplaceContentMarket$i$0()
  586. },
  587. GetMarketplaceAssetId: function()
  588. {
  589. return this._initialData$p$0.get__marketplaceAssetId$i$0()
  590. },
  591. GetExtensionId: function()
  592. {
  593. return this._initialData$p$0.get__extensionId$i$0()
  594. },
  595. createAsyncResult: function(value, errorCode, detailedErrorCode, userContext, errorMessage)
  596. {
  597. var initArgs={};
  598. var errorArgs=null;
  599. initArgs[window["OSF"]["DDA"]["AsyncResultEnum"]["Properties"]["Value"]]=value;
  600. initArgs[window["OSF"]["DDA"]["AsyncResultEnum"]["Properties"]["Context"]]=userContext;
  601. if(0 !==errorCode)
  602. {
  603. errorArgs={};
  604. var errorProperties=$h.OutlookErrorManager.getErrorArgs(detailedErrorCode);
  605. errorArgs[window["OSF"]["DDA"]["AsyncResultEnum"]["ErrorProperties"]["Name"]]=errorProperties["name"];
  606. errorArgs[window["OSF"]["DDA"]["AsyncResultEnum"]["ErrorProperties"]["Message"]]=!errorMessage ? errorProperties["message"] : errorMessage;
  607. errorArgs[window["OSF"]["DDA"]["AsyncResultEnum"]["ErrorProperties"]["Code"]]=detailedErrorCode
  608. }
  609. return new window["OSF"]["DDA"]["AsyncResult"](initArgs,errorArgs)
  610. },
  611. _throwOnMethodCallForInsufficientPermission$i$0: function(requiredPermissionLevel, methodName)
  612. {
  613. if(this._initialData$p$0._permissionLevel$p$0 < requiredPermissionLevel)
  614. throw Error.create(String.format(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeededForMethod_Text"],methodName));
  615. },
  616. _displayReplyForm$i$0: function(obj)
  617. {
  618. this._displayReplyFormHelper$p$0(obj,false)
  619. },
  620. _displayReplyAllForm$i$0: function(obj)
  621. {
  622. this._displayReplyFormHelper$p$0(obj,true)
  623. },
  624. _displayReplyFormHelper$p$0: function(obj, isReplyAll)
  625. {
  626. if(String.isInstanceOfType(obj))
  627. this._doDisplayReplyForm$p$0(obj,isReplyAll);
  628. else if(Object.isInstanceOfType(obj) && Object.getTypeName(obj)==="Object")
  629. this._doDisplayReplyFormWithAttachments$p$0(obj,isReplyAll);
  630. else
  631. throw Error.argumentType();
  632. },
  633. _doDisplayReplyForm$p$0: function(htmlBody, isReplyAll)
  634. {
  635. if(!$h.ScriptHelpers.isNullOrUndefined(htmlBody))
  636. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody["length"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody");
  637. this.invokeHostMethod(isReplyAll ? 11 : 10,{htmlBody: htmlBody},null)
  638. },
  639. _doDisplayReplyFormWithAttachments$p$0: function(data, isReplyAll)
  640. {
  641. var htmlBody=window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p(data);
  642. var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(data);
  643. var parameters=$h.CommonParameters.parse(window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p(data),false);
  644. var $$t_6=this;
  645. this._standardInvokeHostMethod$i$0(isReplyAll ? 31 : 30,{
  646. htmlBody: htmlBody,
  647. attachments: window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments)
  648. },function(rawInput)
  649. {
  650. return rawInput
  651. },parameters._asyncContext$p$0,parameters._callback$p$0)
  652. },
  653. _standardInvokeHostMethod$i$0: function(dispid, data, format, userContext, callback)
  654. {
  655. var $$t_B=this;
  656. this.invokeHostMethod(dispid,data,function(resultCode, response)
  657. {
  658. if(callback)
  659. {
  660. var asyncResult=null;
  661. if(Object.isInstanceOfType(response))
  662. {
  663. var responseDictionary=response;
  664. if("error" in responseDictionary || "data" in responseDictionary || "errorCode" in responseDictionary)
  665. if(!responseDictionary["error"])
  666. {
  667. var formattedData=format ? format(responseDictionary["data"]) : responseDictionary["data"];
  668. asyncResult=$$t_B.createAsyncResult(formattedData,0,0,userContext,null)
  669. }
  670. else
  671. {
  672. var errorCode=responseDictionary["errorCode"];
  673. asyncResult=$$t_B.createAsyncResult(null,1,errorCode,userContext,null)
  674. }
  675. }
  676. if(!asyncResult && resultCode)
  677. asyncResult=$$t_B.createAsyncResult(null,1,9002,userContext,null);
  678. callback(asyncResult)
  679. }
  680. })
  681. },
  682. invokeHostMethod: function(dispid, data, responseCallback)
  683. {
  684. if(64===this._officeAppContext$p$0["get_appName"]())
  685. {
  686. var args={ApiParams: data};
  687. args["MethodData"]={
  688. ControlId: window["OSF"]["_OfficeAppFactory"]["getId"](),
  689. DispatchId: dispid
  690. };
  691. if(dispid===1)
  692. this.get_clientEndPoint()["invoke"]("GetInitialData",responseCallback,args);
  693. else
  694. this.get_clientEndPoint()["invoke"]("ExecuteMethod",responseCallback,args)
  695. }
  696. else if(!this._isOwaOnlyMethod$p$0(dispid))
  697. {
  698. var executeParameters=window["OSF"]["DDA"]["OutlookAppOm"]._convertToOutlookParameters$p(dispid,data);
  699. var $$t_B=this;
  700. window["OSF"]["ClientHostController"]["execute"](dispid,executeParameters,function(nativeData, resultCode)
  701. {
  702. if(responseCallback)
  703. {
  704. var responseData=nativeData.toArray();
  705. var rawData=window["JSON"]["parse"](responseData[0]);
  706. if(Object.isInstanceOfType(rawData))
  707. {
  708. var deserializedData=rawData;
  709. if(responseData["length"] > 1 && responseData[1])
  710. {
  711. deserializedData["error"]=true;
  712. deserializedData["errorCode"]=responseData[1]
  713. }
  714. else
  715. deserializedData["error"]=false;
  716. responseCallback(resultCode,deserializedData)
  717. }
  718. else if(Number.isInstanceOfType(rawData))
  719. {
  720. var returnDict={};
  721. returnDict["error"]=true;
  722. returnDict["errorCode"]=rawData;
  723. responseCallback(resultCode,returnDict)
  724. }
  725. else
  726. throw Error.notImplemented("Return data type from host must be Dictionary or int");
  727. }
  728. })
  729. }
  730. else if(responseCallback)
  731. responseCallback(-2,null)
  732. },
  733. _dictionaryToDate$i$0: function(input)
  734. {
  735. var retValue=new Date(input["year"],input["month"],input["date"],input["hours"],input["minutes"],input["seconds"],!input["milliseconds"] ? 0 : input["milliseconds"]);
  736. if(window["isNaN"](retValue["getTime"]()))
  737. throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]);
  738. return retValue
  739. },
  740. _dateToDictionary$i$0: function(input)
  741. {
  742. var retValue={};
  743. retValue["month"]=input["getMonth"]();
  744. retValue["date"]=input["getDate"]();
  745. retValue["year"]=input["getFullYear"]();
  746. retValue["hours"]=input["getHours"]();
  747. retValue["minutes"]=input["getMinutes"]();
  748. retValue["seconds"]=input["getSeconds"]();
  749. retValue["milliseconds"]=input["getMilliseconds"]();
  750. return retValue
  751. },
  752. _isOwaOnlyMethod$p$0: function(dispId)
  753. {
  754. switch(dispId)
  755. {
  756. case 402:
  757. case 401:
  758. case 400:
  759. case 403:
  760. return true;
  761. default:
  762. return false
  763. }
  764. },
  765. _displayNewAppointmentFormApi$p$0: function(parameters)
  766. {
  767. var normalizedRequiredAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["requiredAttendees"],"requiredAttendees");
  768. var normalizedOptionalAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["optionalAttendees"],"optionalAttendees");
  769. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["location"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p,"location");
  770. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["body"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"body");
  771. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject");
  772. if(!$h.ScriptHelpers.isNullOrUndefined(parameters["start"]))
  773. {
  774. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["start"],Date,"start");
  775. var startDateTime=parameters["start"];
  776. parameters["start"]=startDateTime["getTime"]();
  777. if(!$h.ScriptHelpers.isNullOrUndefined(parameters["end"]))
  778. {
  779. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["end"],Date,"end");
  780. var endDateTime=parameters["end"];
  781. if(endDateTime < startDateTime)
  782. throw Error.argumentOutOfRange("end",endDateTime,window["_u"]["ExtensibilityStrings"]["l_InvalidEventDates_Text"]);
  783. parameters["end"]=endDateTime["getTime"]()
  784. }
  785. }
  786. var updatedParameters=null;
  787. if(normalizedRequiredAttendees || normalizedOptionalAttendees)
  788. {
  789. updatedParameters={};
  790. var $$dict_7=parameters;
  791. for(var $$key_8 in $$dict_7)
  792. {
  793. var entry={
  794. key: $$key_8,
  795. value: $$dict_7[$$key_8]
  796. };
  797. updatedParameters[entry.key]=entry.value
  798. }
  799. if(normalizedRequiredAttendees)
  800. updatedParameters["requiredAttendees"]=normalizedRequiredAttendees;
  801. if(normalizedOptionalAttendees)
  802. updatedParameters["optionalAttendees"]=normalizedOptionalAttendees
  803. }
  804. this.invokeHostMethod(7,updatedParameters || parameters,null)
  805. },
  806. displayNewMessageFormApi: function(parameters)
  807. {
  808. var updatedParameters={};
  809. if(parameters)
  810. {
  811. var normalizedToRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["toRecipients"],"toRecipients");
  812. var normalizedCcRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["ccRecipients"],"ccRecipients");
  813. var normalizedBccRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["bccRecipients"],"bccRecipients");
  814. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["htmlBody"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody");
  815. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject");
  816. var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(parameters);
  817. var $$dict_7=parameters;
  818. for(var $$key_8 in $$dict_7)
  819. {
  820. var entry={
  821. key: $$key_8,
  822. value: $$dict_7[$$key_8]
  823. };
  824. updatedParameters[entry.key]=entry.value
  825. }
  826. if(normalizedToRecipients)
  827. updatedParameters["toRecipients"]=normalizedToRecipients;
  828. if(normalizedCcRecipients)
  829. updatedParameters["ccRecipients"]=normalizedCcRecipients;
  830. if(normalizedBccRecipients)
  831. updatedParameters["bccRecipients"]=normalizedBccRecipients;
  832. if(attachments)
  833. updatedParameters["attachments"]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments)
  834. }
  835. this.invokeHostMethod(44,updatedParameters || parameters,null)
  836. },
  837. displayContactCardAsync: function(ewsIdOrEmail, callback)
  838. {
  839. if($h.ScriptHelpers.isNullOrUndefined(ewsIdOrEmail))
  840. throw Error.argumentNull("ewsIdOrEmail");
  841. var asyncContext=null;
  842. var asyncFunctionCallback=null;
  843. if(callback)
  844. {
  845. var commonParameters=$h.CommonParameters.parse([callback],false);
  846. asyncContext=commonParameters._asyncContext$p$0;
  847. asyncFunctionCallback=commonParameters._callback$p$0
  848. }
  849. this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail: ewsIdOrEmail.trim()},null,asyncContext,asyncFunctionCallback)
  850. },
  851. _initializeMethods$p$0: function()
  852. {
  853. var currentInstance=this;
  854. if($h.Item.isInstanceOfType(this._item$p$0))
  855. {
  856. currentInstance["displayNewAppointmentForm"]=this.$$d__displayNewAppointmentFormApi$p$0;
  857. currentInstance["displayNewMessageForm"]=this.$$d_displayNewMessageFormApi;
  858. currentInstance["displayContactCardAsync"]=this.$$d_displayContactCardAsync
  859. }
  860. },
  861. _getInitialDataResponseHandler$p$0: function(resultCode, data)
  862. {
  863. if(resultCode)
  864. return;
  865. this.initialize(data);
  866. this["displayName"]="mailbox";
  867. window.setTimeout(this.$$d__callAppReadyCallback$p$0,0)
  868. },
  869. _callAppReadyCallback$p$0: function()
  870. {
  871. this._appReadyCallback$p$0()
  872. },
  873. _invokeGetTokenMethodAsync$p$0: function(outlookDispid, methodName, callback, userContext)
  874. {
  875. if($h.ScriptHelpers.isNullOrUndefined(callback))
  876. throw Error.argumentNull("callback");
  877. var $$t_8=this;
  878. this.invokeHostMethod(outlookDispid,null,function(resultCode, response)
  879. {
  880. var asyncResult;
  881. if(resultCode)
  882. asyncResult=$$t_8.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode));
  883. else
  884. {
  885. var responseDictionary=response;
  886. if(responseDictionary["wasSuccessful"])
  887. asyncResult=$$t_8.createAsyncResult(responseDictionary["token"],0,0,userContext,null);
  888. else
  889. asyncResult=$$t_8.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"])
  890. }
  891. callback(asyncResult)
  892. })
  893. },
  894. _getItem$p$0: function()
  895. {
  896. return this._item$p$0
  897. },
  898. _getUserProfile$p$0: function()
  899. {
  900. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0);
  901. return this._userProfile$p$0
  902. },
  903. _getDiagnostics$p$0: function()
  904. {
  905. return this._diagnostics$p$0
  906. },
  907. _getEwsUrl$p$0: function()
  908. {
  909. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0);
  910. return this._initialData$p$0.get__ewsUrl$i$0()
  911. },
  912. _findOffset$p$0: function(value)
  913. {
  914. var ranges=this._initialData$p$0.get__timeZoneOffsets$i$0();
  915. for(var r=0; r < ranges["length"]; r++)
  916. {
  917. var range=ranges[r];
  918. var start=window["parseInt"](range["start"]);
  919. var end=window["parseInt"](range["end"]);
  920. if(value["getTime"]() - start >=0 && value["getTime"]() - end < 0)
  921. return window["parseInt"](range["offset"])
  922. }
  923. throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]);
  924. },
  925. _areStringsLoaded$p$0: function()
  926. {
  927. var stringsLoaded=false;
  928. try
  929. {
  930. stringsLoaded=!$h.ScriptHelpers.isNullOrUndefined(window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"])
  931. }
  932. catch($$e_1){}
  933. return stringsLoaded
  934. },
  935. _loadLocalizedScript$p$0: function(stringLoadedCallback)
  936. {
  937. var url=null;
  938. var baseUrl="";
  939. var scripts=document.getElementsByTagName("script");
  940. for(var i=scripts.length - 1; i >=0; i--)
  941. {
  942. var filename=null;
  943. var attributes=scripts[i].attributes;
  944. if(attributes)
  945. {
  946. var attribute=attributes.getNamedItem("src");
  947. if(attribute)
  948. filename=attribute.value;
  949. if(filename)
  950. {
  951. var debug=false;
  952. filename=filename["toLowerCase"]();
  953. var officeIndex=filename["indexOf"]("office_strings.js");
  954. if(officeIndex < 0)
  955. {
  956. officeIndex=filename["indexOf"]("office_strings.debug.js");
  957. debug=true
  958. }
  959. if(officeIndex > 0 && officeIndex < filename["length"])
  960. {
  961. url=filename["replace"](debug ? "office_strings.debug.js" : "office_strings.js","outlook_strings.js");
  962. var languageUrl=filename["substring"](0,officeIndex);
  963. var lastIndexOfSlash=languageUrl["lastIndexOf"]("/",languageUrl["length"] - 2);
  964. if(lastIndexOfSlash===-1)
  965. lastIndexOfSlash=languageUrl["lastIndexOf"]("\\",languageUrl["length"] - 2);
  966. if(lastIndexOfSlash !==-1 && languageUrl["length"] > lastIndexOfSlash+1)
  967. baseUrl=languageUrl["substring"](0,lastIndexOfSlash+1);
  968. break
  969. }
  970. }
  971. }
  972. }
  973. if(url)
  974. {
  975. var head=document.getElementsByTagName("head")[0];
  976. var scriptElement=null;
  977. var $$t_H=this;
  978. var scriptElementCallback=function()
  979. {
  980. if(stringLoadedCallback && (!scriptElement.readyState || scriptElement.readyState && (scriptElement.readyState==="loaded" || scriptElement.readyState==="complete")))
  981. {
  982. scriptElement.onload=null;
  983. scriptElement.onreadystatechange=null;
  984. stringLoadedCallback()
  985. }
  986. };
  987. var $$t_I=this;
  988. var failureCallback=function()
  989. {
  990. if(!$$t_I._areStringsLoaded$p$0())
  991. {
  992. var fallbackUrl=baseUrl+"en-us/"+"outlook_strings.js";
  993. scriptElement.onload=null;
  994. scriptElement.onreadystatechange=null;
  995. scriptElement=$$t_I._createScriptElement$p$0(fallbackUrl);
  996. scriptElement.onload=scriptElementCallback;
  997. scriptElement.onreadystatechange=scriptElementCallback;
  998. head.appendChild(scriptElement)
  999. }
  1000. };
  1001. scriptElement=this._createScriptElement$p$0(url);
  1002. scriptElement.onload=scriptElementCallback;
  1003. scriptElement.onreadystatechange=scriptElementCallback;
  1004. window.setTimeout(failureCallback,2e3);
  1005. head.appendChild(scriptElement)
  1006. }
  1007. },
  1008. _createScriptElement$p$0: function(url)
  1009. {
  1010. var scriptElement=document.createElement("script");
  1011. scriptElement.type="text/javascript";
  1012. scriptElement.src=url;
  1013. return scriptElement
  1014. }
  1015. };
  1016. window["OSF"]["DDA"]["Settings"]=OSF.DDA.Settings=function(data)
  1017. {
  1018. this._rawData$p$0=data
  1019. };
  1020. window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p=function(rawSettings)
  1021. {
  1022. if(!rawSettings)
  1023. return{};
  1024. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===8)
  1025. {
  1026. var outlookSettings=rawSettings["SettingsKey"];
  1027. if(outlookSettings)
  1028. return window["OSF"]["DDA"]["SettingsManager"]["deserializeSettings"](outlookSettings)
  1029. }
  1030. return rawSettings
  1031. };
  1032. OSF.DDA.Settings.prototype={
  1033. _rawData$p$0: null,
  1034. _settingsData$p$0: null,
  1035. get__data$p$0: function()
  1036. {
  1037. if(!this._settingsData$p$0)
  1038. {
  1039. this._settingsData$p$0=window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p(this._rawData$p$0);
  1040. this._rawData$p$0=null
  1041. }
  1042. return this._settingsData$p$0
  1043. },
  1044. get: function(name)
  1045. {
  1046. return this.get__data$p$0()[name]
  1047. },
  1048. set: function(name, value)
  1049. {
  1050. this.get__data$p$0()[name]=value
  1051. },
  1052. remove: function(name)
  1053. {
  1054. delete this.get__data$p$0()[name]
  1055. },
  1056. saveAsync: function()
  1057. {
  1058. var args=[];
  1059. for(var $$pai_4=0; $$pai_4 < arguments.length;++$$pai_4)
  1060. args[$$pai_4]=arguments[$$pai_4];
  1061. var commonParameters=$h.CommonParameters.parse(args,false);
  1062. if(window["JSON"]["stringify"](window["OSF"]["DDA"]["SettingsManager"]["serializeSettings"](this.get__data$p$0()))["length"] > 32768)
  1063. {
  1064. var asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,commonParameters._asyncContext$p$0,"");
  1065. var $$t_3=this;
  1066. window.setTimeout(function()
  1067. {
  1068. commonParameters._callback$p$0(asyncResult)
  1069. },0);
  1070. return
  1071. }
  1072. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64)
  1073. this._saveSettingsForOwa$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0);
  1074. else
  1075. this._saveSettingsForOutlook$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0)
  1076. },
  1077. _saveSettingsForOutlook$p$0: function(callback, userContext)
  1078. {
  1079. var storedException=null;
  1080. try
  1081. {
  1082. var serializedSettings=window["OSF"]["DDA"]["SettingsManager"]["serializeSettings"](this.get__data$p$0());
  1083. var jsonSettings=window["JSON"]["stringify"](serializedSettings);
  1084. var settingsObjectToSave={SettingsKey: jsonSettings};
  1085. window["OSF"]["DDA"]["RichClientSettingsManager"]["write"](settingsObjectToSave)
  1086. }
  1087. catch(ex)
  1088. {
  1089. storedException=ex
  1090. }
  1091. if(callback)
  1092. {
  1093. var asyncResult;
  1094. if(storedException)
  1095. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,storedException["message"]);
  1096. else
  1097. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null);
  1098. callback(asyncResult)
  1099. }
  1100. },
  1101. _saveSettingsForOwa$p$0: function(callback, userContext)
  1102. {
  1103. var serializedSettings=window["OSF"]["DDA"]["SettingsManager"]["serializeSettings"](this.get__data$p$0());
  1104. var $$t_7=this;
  1105. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(404,[serializedSettings],function(resultCode, response)
  1106. {
  1107. if(callback)
  1108. {
  1109. var asyncResult;
  1110. if(resultCode)
  1111. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode));
  1112. else
  1113. {
  1114. var responseDictionary=response;
  1115. if(!responseDictionary["error"])
  1116. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null);
  1117. else
  1118. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,responseDictionary["errorMessage"])
  1119. }
  1120. callback(asyncResult)
  1121. }
  1122. })
  1123. }
  1124. };
  1125. Type.registerNamespace("$h");
  1126. var $h=window.$h || {};
  1127. Type.registerNamespace("Office.cast");
  1128. var Office=window.Office || {};
  1129. Office.cast=Office.cast || {};
  1130. $h.Appointment=function(dataDictionary)
  1131. {
  1132. this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);
  1133. this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);
  1134. this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);
  1135. this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);
  1136. this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);
  1137. this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);
  1138. this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);
  1139. this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);
  1140. this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);
  1141. $h.Appointment.initializeBase(this,[dataDictionary]);
  1142. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);
  1143. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);
  1144. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);
  1145. $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);
  1146. $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);
  1147. $h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);
  1148. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);
  1149. $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);
  1150. $h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)
  1151. };
  1152. $h.Appointment.prototype={
  1153. getEntities: function()
  1154. {
  1155. return this._data$p$0._getEntities$i$0()
  1156. },
  1157. getEntitiesByType: function(entityType)
  1158. {
  1159. return this._data$p$0._getEntitiesByType$i$0(entityType)
  1160. },
  1161. getRegExMatches: function()
  1162. {
  1163. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");
  1164. return this._data$p$0._getRegExMatches$i$0()
  1165. },
  1166. getFilteredEntitiesByName: function(name)
  1167. {
  1168. return this._data$p$0._getFilteredEntitiesByName$i$0(name)
  1169. },
  1170. getRegExMatchesByName: function(name)
  1171. {
  1172. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");
  1173. return this._data$p$0._getRegExMatchesByName$i$0(name)
  1174. },
  1175. displayReplyForm: function(obj)
  1176. {
  1177. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj)
  1178. },
  1179. displayReplyAllForm: function(obj)
  1180. {
  1181. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj)
  1182. },
  1183. getItemType: function()
  1184. {
  1185. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"]
  1186. },
  1187. _getStart$p$2: function()
  1188. {
  1189. return this._data$p$0.get__start$i$0()
  1190. },
  1191. _getEnd$p$2: function()
  1192. {
  1193. return this._data$p$0.get__end$i$0()
  1194. },
  1195. _getLocation$p$2: function()
  1196. {
  1197. return this._data$p$0.get__location$i$0()
  1198. },
  1199. _getOptionalAttendees$p$2: function()
  1200. {
  1201. return this._data$p$0.get__cc$i$0()
  1202. },
  1203. _getRequiredAttendees$p$2: function()
  1204. {
  1205. return this._data$p$0.get__to$i$0()
  1206. },
  1207. _getResources$p$2: function()
  1208. {
  1209. return this._data$p$0.get__resources$i$0()
  1210. },
  1211. _getSubject$p$2: function()
  1212. {
  1213. return this._data$p$0.get__subject$i$0()
  1214. },
  1215. _getNormalizedSubject$p$2: function()
  1216. {
  1217. return this._data$p$0.get__normalizedSubject$i$0()
  1218. },
  1219. _getOrganizer$p$2: function()
  1220. {
  1221. return this._data$p$0.get__organizer$i$0()
  1222. }
  1223. };
  1224. $h.AppointmentCompose=function(data)
  1225. {
  1226. this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);
  1227. this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);
  1228. this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);
  1229. this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);
  1230. this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);
  1231. $h.AppointmentCompose.initializeBase(this,[data]);
  1232. $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);
  1233. $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);
  1234. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);
  1235. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);
  1236. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)
  1237. };
  1238. $h.AppointmentCompose.prototype={
  1239. _requiredAttendees$p$2: null,
  1240. _optionalAttendees$p$2: null,
  1241. _start$p$2: null,
  1242. _end$p$2: null,
  1243. _location$p$2: null,
  1244. getItemType: function()
  1245. {
  1246. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"]
  1247. },
  1248. _getRequiredAttendees$p$2: function()
  1249. {
  1250. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1251. if(!this._requiredAttendees$p$2)
  1252. this._requiredAttendees$p$2=new $h.ComposeRecipient(0,"requiredAttendees");
  1253. return this._requiredAttendees$p$2
  1254. },
  1255. _getOptionalAttendees$p$2: function()
  1256. {
  1257. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1258. if(!this._optionalAttendees$p$2)
  1259. this._optionalAttendees$p$2=new $h.ComposeRecipient(1,"optionalAttendees");
  1260. return this._optionalAttendees$p$2
  1261. },
  1262. _getStart$p$2: function()
  1263. {
  1264. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1265. if(!this._start$p$2)
  1266. this._start$p$2=new $h.ComposeTime(1);
  1267. return this._start$p$2
  1268. },
  1269. _getEnd$p$2: function()
  1270. {
  1271. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1272. if(!this._end$p$2)
  1273. this._end$p$2=new $h.ComposeTime(2);
  1274. return this._end$p$2
  1275. },
  1276. _getLocation$p$2: function()
  1277. {
  1278. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1279. if(!this._location$p$2)
  1280. this._location$p$2=new $h.ComposeLocation;
  1281. return this._location$p$2
  1282. }
  1283. };
  1284. $h.AttachmentConstants=function(){};
  1285. $h.AttachmentDetails=function(data)
  1286. {
  1287. this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);
  1288. this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);
  1289. this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);
  1290. this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);
  1291. this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);
  1292. this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);
  1293. this._data$p$0=data;
  1294. $h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);
  1295. $h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);
  1296. $h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);
  1297. $h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);
  1298. $h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);
  1299. $h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)
  1300. };
  1301. $h.AttachmentDetails.prototype={
  1302. _data$p$0: null,
  1303. _getId$p$0: function()
  1304. {
  1305. return this._data$p$0["id"]
  1306. },
  1307. _getName$p$0: function()
  1308. {
  1309. return this._data$p$0["name"]
  1310. },
  1311. _getContentType$p$0: function()
  1312. {
  1313. return this._data$p$0["contentType"]
  1314. },
  1315. _getSize$p$0: function()
  1316. {
  1317. return this._data$p$0["size"]
  1318. },
  1319. _getAttachmentType$p$0: function()
  1320. {
  1321. var response=this._data$p$0["attachmentType"];
  1322. return response < $h.AttachmentDetails._attachmentTypeMap$p.length ? $h.AttachmentDetails._attachmentTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"]
  1323. },
  1324. _getIsInline$p$0: function()
  1325. {
  1326. return this._data$p$0["isInline"]
  1327. }
  1328. };
  1329. $h.Body=function(){};
  1330. $h.Body._tryMapToHostCoercionType$i=function(coercionType, hostCoercionType)
  1331. {
  1332. hostCoercionType.val=undefined;
  1333. if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"])
  1334. hostCoercionType.val=3;
  1335. else if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"])
  1336. hostCoercionType.val=0;
  1337. else
  1338. return false;
  1339. return true
  1340. };
  1341. $h.Body.prototype={getAsync: function(coercionType)
  1342. {
  1343. var args=[];
  1344. for(var $$pai_7=1; $$pai_7 < arguments.length;++$$pai_7)
  1345. args[$$pai_7 - 1]=arguments[$$pai_7];
  1346. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync");
  1347. var commonParameters=$h.CommonParameters.parse(args,true);
  1348. var hostCoercionType;
  1349. var $$t_5,
  1350. $$t_6;
  1351. if(!($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6))
  1352. throw Error.argument("coercionType");
  1353. var dataToHost={coercionType: hostCoercionType};
  1354. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(37,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  1355. }};
  1356. $h.ComposeBody=function()
  1357. {
  1358. $h.ComposeBody.initializeBase(this)
  1359. };
  1360. $h.ComposeBody._createParameterDictionaryToHost$i=function(data, parameters)
  1361. {
  1362. var dataToHost={data: data};
  1363. if(parameters._options$p$0 && !$h.ScriptHelpers.isNull(parameters._options$p$0["coercionType"]))
  1364. {
  1365. var hostCoercionType;
  1366. var $$t_4,
  1367. $$t_5;
  1368. if(!($$t_5=$h.Body._tryMapToHostCoercionType$i(parameters._options$p$0["coercionType"],$$t_4={val: hostCoercionType}),hostCoercionType=$$t_4["val"],$$t_5))
  1369. {
  1370. if(parameters._callback$p$0)
  1371. parameters._callback$p$0(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,1e3,parameters._asyncContext$p$0,null));
  1372. return null
  1373. }
  1374. dataToHost["coercionType"]=hostCoercionType
  1375. }
  1376. else
  1377. dataToHost["coercionType"]=0;
  1378. return dataToHost
  1379. };
  1380. $h.ComposeBody.prototype={
  1381. getTypeAsync: function()
  1382. {
  1383. var args=[];
  1384. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1385. args[$$pai_2]=arguments[$$pai_2];
  1386. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync");
  1387. var parameters=$h.CommonParameters.parse(args,true);
  1388. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(14,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1389. },
  1390. setSelectedDataAsync: function(data)
  1391. {
  1392. var args=[];
  1393. for(var $$pai_4=1; $$pai_4 < arguments.length;++$$pai_4)
  1394. args[$$pai_4 - 1]=arguments[$$pai_4];
  1395. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync");
  1396. var parameters=$h.CommonParameters.parse(args,false);
  1397. if(!String.isInstanceOfType(data))
  1398. throw Error.argumentType("data",Object["getType"](data),String);
  1399. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data["length"],0,1e6,"data");
  1400. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  1401. if(!dataToHost)
  1402. return;
  1403. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(13,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1404. },
  1405. prependAsync: function(data)
  1406. {
  1407. var args=[];
  1408. for(var $$pai_4=1; $$pai_4 < arguments.length;++$$pai_4)
  1409. args[$$pai_4 - 1]=arguments[$$pai_4];
  1410. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync");
  1411. var parameters=$h.CommonParameters.parse(args,false);
  1412. if(!String.isInstanceOfType(data))
  1413. throw Error.argumentType("data",Object["getType"](data),String);
  1414. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data["length"],0,1e6,"data");
  1415. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  1416. if(!dataToHost)
  1417. return;
  1418. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(23,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1419. },
  1420. setAsync: function(data)
  1421. {
  1422. var args=[];
  1423. for(var $$pai_4=1; $$pai_4 < arguments.length;++$$pai_4)
  1424. args[$$pai_4 - 1]=arguments[$$pai_4];
  1425. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync");
  1426. var parameters=$h.CommonParameters.parse(args,false);
  1427. if(!String.isInstanceOfType(data))
  1428. throw Error.argumentType("data",Object["getType"](data),String);
  1429. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data["length"],0,1e6,"data");
  1430. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  1431. if(!dataToHost)
  1432. return;
  1433. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(38,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1434. }
  1435. };
  1436. $h.ComposeItem=function(data)
  1437. {
  1438. this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1);
  1439. this.$$d__getSubject$p$1=Function.createDelegate(this,this._getSubject$p$1);
  1440. $h.ComposeItem.initializeBase(this,[data]);
  1441. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1);
  1442. $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1)
  1443. };
  1444. $h.ComposeItem.prototype={
  1445. _subject$p$1: null,
  1446. _body$p$1: null,
  1447. addFileAttachmentAsync: function(uri, attachmentName)
  1448. {
  1449. var args=[];
  1450. for(var $$pai_5=2; $$pai_5 < arguments.length;++$$pai_5)
  1451. args[$$pai_5 - 2]=arguments[$$pai_5];
  1452. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync");
  1453. if(!$h.ScriptHelpers.isNonEmptyString(uri))
  1454. throw Error.argument("uri");
  1455. if(!$h.ScriptHelpers.isNonEmptyString(attachmentName))
  1456. throw Error.argument("attachmentName");
  1457. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(uri["length"],0,2048,"uri");
  1458. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName["length"],0,255,"attachmentName");
  1459. var commonParameters=$h.CommonParameters.parse(args,false);
  1460. var parameters={
  1461. uri: uri,
  1462. name: attachmentName,
  1463. __timeout__: 6e5
  1464. };
  1465. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(16,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  1466. },
  1467. addItemAttachmentAsync: function(itemId, attachmentName)
  1468. {
  1469. var args=[];
  1470. for(var $$pai_5=2; $$pai_5 < arguments.length;++$$pai_5)
  1471. args[$$pai_5 - 2]=arguments[$$pai_5];
  1472. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync");
  1473. if(!$h.ScriptHelpers.isNonEmptyString(itemId))
  1474. throw Error.argument("itemId");
  1475. if(!$h.ScriptHelpers.isNonEmptyString(attachmentName))
  1476. throw Error.argument("attachmentName");
  1477. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(itemId["length"],0,200,"itemId");
  1478. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName["length"],0,255,"attachmentName");
  1479. var commonParameters=$h.CommonParameters.parse(args,false);
  1480. var parameters={
  1481. itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId),
  1482. name: attachmentName,
  1483. __timeout__: 6e5
  1484. };
  1485. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(19,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  1486. },
  1487. removeAttachmentAsync: function(attachmentId)
  1488. {
  1489. var args=[];
  1490. for(var $$pai_3=1; $$pai_3 < arguments.length;++$$pai_3)
  1491. args[$$pai_3 - 1]=arguments[$$pai_3];
  1492. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync");
  1493. if(!$h.ScriptHelpers.isNonEmptyString(attachmentId))
  1494. throw Error.argument("attachmentId");
  1495. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentId["length"],0,200,"attachmentId");
  1496. var commonParameters=$h.CommonParameters.parse(args,false);
  1497. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex: attachmentId},null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  1498. },
  1499. getSelectedDataAsync: function(coercionType)
  1500. {
  1501. var args=[];
  1502. for(var $$pai_7=1; $$pai_7 < arguments.length;++$$pai_7)
  1503. args[$$pai_7 - 1]=arguments[$$pai_7];
  1504. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync");
  1505. var commonParameters=$h.CommonParameters.parse(args,true);
  1506. var hostCoercionType;
  1507. var $$t_5,
  1508. $$t_6;
  1509. if(coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"] && coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"] || !($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6))
  1510. throw Error.argument("coercionType");
  1511. var dataToHost={coercionType: hostCoercionType};
  1512. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(28,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  1513. },
  1514. setSelectedDataAsync: function(data)
  1515. {
  1516. var args=[];
  1517. for(var $$pai_4=1; $$pai_4 < arguments.length;++$$pai_4)
  1518. args[$$pai_4 - 1]=arguments[$$pai_4];
  1519. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync");
  1520. var parameters=$h.CommonParameters.parse(args,false);
  1521. if(!String.isInstanceOfType(data))
  1522. throw Error.argumentType("data",Object["getType"](data),String);
  1523. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data["length"],0,1e6,"data");
  1524. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  1525. if(!dataToHost)
  1526. return;
  1527. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(29,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1528. },
  1529. close: function()
  1530. {
  1531. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null)
  1532. },
  1533. _getBody$p$1: function()
  1534. {
  1535. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1536. if(!this._body$p$1)
  1537. this._body$p$1=new $h.ComposeBody;
  1538. return this._body$p$1
  1539. },
  1540. _getSubject$p$1: function()
  1541. {
  1542. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1543. if(!this._subject$p$1)
  1544. this._subject$p$1=new $h.ComposeSubject;
  1545. return this._subject$p$1
  1546. },
  1547. saveAsync: function()
  1548. {
  1549. var args=[];
  1550. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1551. args[$$pai_2]=arguments[$$pai_2];
  1552. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync");
  1553. var parameters=$h.CommonParameters.parse(args,false);
  1554. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(32,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1555. }
  1556. };
  1557. $h.ComposeRecipient=function(type, propertyName)
  1558. {
  1559. this._type$p$0=type;
  1560. this._propertyName$p$0=propertyName
  1561. };
  1562. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p=function(displayName, emailAddress)
  1563. {
  1564. if(!displayName && !emailAddress)
  1565. throw Error.argument("recipients");
  1566. if(displayName && displayName["length"] > 255)
  1567. throw Error.argumentOutOfRange("recipients",displayName["length"],window["_u"]["ExtensibilityStrings"]["l_DisplayNameTooLong_Text"]);
  1568. if(emailAddress && emailAddress["length"] > 571)
  1569. throw Error.argumentOutOfRange("recipients",emailAddress["length"],window["_u"]["ExtensibilityStrings"]["l_EmailAddressTooLong_Text"]);
  1570. };
  1571. $h.ComposeRecipient._getAsyncFormatter$p=function(rawInput)
  1572. {
  1573. var input=rawInput;
  1574. var output=[];
  1575. for(var i=0; i < input["length"]; i++)
  1576. {
  1577. var email=new $h.EmailAddressDetails(input[i]);
  1578. output[i]=email
  1579. }
  1580. return output
  1581. };
  1582. $h.ComposeRecipient._createEmailDictionaryForHost$p=function(address, name)
  1583. {
  1584. return{
  1585. address: address,
  1586. name: name
  1587. }
  1588. };
  1589. $h.ComposeRecipient.prototype={
  1590. _propertyName$p$0: null,
  1591. _type$p$0: 0,
  1592. getAsync: function()
  1593. {
  1594. var args=[];
  1595. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1596. args[$$pai_2]=arguments[$$pai_2];
  1597. var parameters=$h.CommonParameters.parse(args,true);
  1598. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0+".getAsync");
  1599. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(15,{recipientField: this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,parameters._asyncContext$p$0,parameters._callback$p$0)
  1600. },
  1601. setAsync: function(recipients)
  1602. {
  1603. var args=[];
  1604. for(var $$pai_2=1; $$pai_2 < arguments.length;++$$pai_2)
  1605. args[$$pai_2 - 1]=arguments[$$pai_2];
  1606. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".setAsync");
  1607. this.setAddHelper(recipients,args,true)
  1608. },
  1609. addAsync: function(recipients)
  1610. {
  1611. var args=[];
  1612. for(var $$pai_2=1; $$pai_2 < arguments.length;++$$pai_2)
  1613. args[$$pai_2 - 1]=arguments[$$pai_2];
  1614. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".addAsync");
  1615. this.setAddHelper(recipients,args,false)
  1616. },
  1617. setAddHelper: function(recipients, args, isSet)
  1618. {
  1619. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(recipients["length"],0,100,"recipients");
  1620. var parameters=$h.CommonParameters.parse(args,false);
  1621. var recipientData=[];
  1622. if(Array.isInstanceOfType(recipients))
  1623. for(var i=0; i < recipients["length"]; i++)
  1624. if(String.isInstanceOfType(recipients[i]))
  1625. {
  1626. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(recipients[i],recipients[i]);
  1627. recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(recipients[i],recipients[i])
  1628. }
  1629. else if($h.EmailAddressDetails.isInstanceOfType(recipients[i]))
  1630. {
  1631. var address=recipients[i];
  1632. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(address["displayName"],address["emailAddress"]);
  1633. recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(address["emailAddress"],address["displayName"])
  1634. }
  1635. else if(Object.isInstanceOfType(recipients[i]))
  1636. {
  1637. var input=recipients[i];
  1638. var emailAddress=input["emailAddress"];
  1639. var displayName=input["displayName"];
  1640. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(displayName,emailAddress);
  1641. recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(emailAddress,displayName)
  1642. }
  1643. else
  1644. throw Error.argument("recipients");
  1645. else
  1646. throw Error.argument("recipients");
  1647. var $$t_B=this;
  1648. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(isSet ? 21 : 22,{
  1649. recipientField: this._type$p$0,
  1650. recipientArray: recipientData
  1651. },function(rawInput)
  1652. {
  1653. return rawInput
  1654. },parameters._asyncContext$p$0,parameters._callback$p$0)
  1655. }
  1656. };
  1657. $h.ComposeRecipient.RecipientField=function(){};
  1658. $h.ComposeRecipient.RecipientField.prototype={
  1659. to: 0,
  1660. cc: 1,
  1661. bcc: 2,
  1662. requiredAttendees: 0,
  1663. optionalAttendees: 1
  1664. };
  1665. $h.ComposeRecipient.RecipientField.registerEnum("$h.ComposeRecipient.RecipientField",false);
  1666. $h.ComposeLocation=function(){};
  1667. $h.ComposeLocation.prototype={
  1668. getAsync: function()
  1669. {
  1670. var args=[];
  1671. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1672. args[$$pai_2]=arguments[$$pai_2];
  1673. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync");
  1674. var parameters=$h.CommonParameters.parse(args,true);
  1675. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(26,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1676. },
  1677. setAsync: function(location)
  1678. {
  1679. var args=[];
  1680. for(var $$pai_3=1; $$pai_3 < arguments.length;++$$pai_3)
  1681. args[$$pai_3 - 1]=arguments[$$pai_3];
  1682. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync");
  1683. var parameters=$h.CommonParameters.parse(args,false);
  1684. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(location["length"],0,255,"location");
  1685. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(27,{location: location},null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1686. }
  1687. };
  1688. $h.ComposeSubject=function(){};
  1689. $h.ComposeSubject.prototype={
  1690. getAsync: function()
  1691. {
  1692. var args=[];
  1693. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1694. args[$$pai_2]=arguments[$$pai_2];
  1695. var parameters=$h.CommonParameters.parse(args,true);
  1696. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync");
  1697. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(18,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1698. },
  1699. setAsync: function(data)
  1700. {
  1701. var args=[];
  1702. for(var $$pai_3=1; $$pai_3 < arguments.length;++$$pai_3)
  1703. args[$$pai_3 - 1]=arguments[$$pai_3];
  1704. var parameters=$h.CommonParameters.parse(args,false);
  1705. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync");
  1706. if(!String.isInstanceOfType(data))
  1707. throw Error.argument("data");
  1708. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data["length"],0,255,"data");
  1709. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(17,{subject: data},null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1710. }
  1711. };
  1712. $h.ComposeTime=function(type)
  1713. {
  1714. this.$$d__ticksToDateFormatter$p$0=Function.createDelegate(this,this._ticksToDateFormatter$p$0);
  1715. this._timeType$p$0=type
  1716. };
  1717. $h.ComposeTime.prototype={
  1718. _timeType$p$0: 0,
  1719. getAsync: function()
  1720. {
  1721. var args=[];
  1722. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1723. args[$$pai_2]=arguments[$$pai_2];
  1724. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0()+".getAsync");
  1725. var parameters=$h.CommonParameters.parse(args,true);
  1726. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty: this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,parameters._asyncContext$p$0,parameters._callback$p$0)
  1727. },
  1728. setAsync: function(dateTime)
  1729. {
  1730. var args=[];
  1731. for(var $$pai_3=1; $$pai_3 < arguments.length;++$$pai_3)
  1732. args[$$pai_3 - 1]=arguments[$$pai_3];
  1733. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0()+".setAsync");
  1734. if(!Date.isInstanceOfType(dateTime))
  1735. throw Error.argumentType("dateTime",Object["getType"](dateTime),Date);
  1736. if(window["isNaN"](dateTime["getTime"]()))
  1737. throw Error.argument("dateTime");
  1738. if(dateTime["getTime"]() < -864e13 || dateTime["getTime"]() > 864e13)
  1739. throw Error.argumentOutOfRange("dateTime");
  1740. var parameters=$h.CommonParameters.parse(args,false);
  1741. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(25,{
  1742. TimeProperty: this._timeType$p$0,
  1743. time: dateTime["getTime"]()
  1744. },null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1745. },
  1746. _ticksToDateFormatter$p$0: function(rawInput)
  1747. {
  1748. var ticks=rawInput;
  1749. return new Date(ticks)
  1750. },
  1751. _getPropertyName$p$0: function()
  1752. {
  1753. return this._timeType$p$0===1 ? "start" : "end"
  1754. }
  1755. };
  1756. $h.ComposeTime.TimeType=function(){};
  1757. $h.ComposeTime.TimeType.prototype={
  1758. start: 1,
  1759. end: 2
  1760. };
  1761. $h.ComposeTime.TimeType.registerEnum("$h.ComposeTime.TimeType",false);
  1762. $h.Contact=function(data)
  1763. {
  1764. this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);
  1765. this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);
  1766. this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);
  1767. this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);
  1768. this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);
  1769. this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);
  1770. this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);
  1771. this._data$p$0=data;
  1772. $h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);
  1773. $h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);
  1774. $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);
  1775. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);
  1776. $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);
  1777. $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);
  1778. $h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)
  1779. };
  1780. $h.Contact.prototype={
  1781. _data$p$0: null,
  1782. _phoneNumbers$p$0: null,
  1783. _getPersonName$p$0: function()
  1784. {
  1785. return this._data$p$0["PersonName"]
  1786. },
  1787. _getBusinessName$p$0: function()
  1788. {
  1789. return this._data$p$0["BusinessName"]
  1790. },
  1791. _getAddresses$p$0: function()
  1792. {
  1793. return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")
  1794. },
  1795. _getEmailAddresses$p$0: function()
  1796. {
  1797. return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")
  1798. },
  1799. _getUrls$p$0: function()
  1800. {
  1801. return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")
  1802. },
  1803. _getPhoneNumbers$p$0: function()
  1804. {
  1805. if(!this._phoneNumbers$p$0)
  1806. {
  1807. var $$t_1=this;
  1808. this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(data)
  1809. {
  1810. return new $h.PhoneNumber(data)
  1811. })
  1812. }
  1813. return this._phoneNumbers$p$0
  1814. },
  1815. _getContactString$p$0: function()
  1816. {
  1817. return this._data$p$0["ContactString"]
  1818. }
  1819. };
  1820. $h.CustomProperties=function(data)
  1821. {
  1822. if($h.ScriptHelpers.isNullOrUndefined(data))
  1823. throw Error.argumentNull("data");
  1824. if(Array.isInstanceOfType(data))
  1825. {
  1826. var customPropertiesArray=data;
  1827. if(customPropertiesArray.length > 0)
  1828. this._data$p$0=customPropertiesArray[0];
  1829. else
  1830. throw Error.argument("data");
  1831. }
  1832. else
  1833. this._data$p$0=data
  1834. };
  1835. $h.CustomProperties.prototype={
  1836. _data$p$0: null,
  1837. get: function(name)
  1838. {
  1839. var value=this._data$p$0[name];
  1840. if(typeof value==="string")
  1841. {
  1842. var valueString=value;
  1843. if(valueString["length"] > 6 && valueString.startsWith("Date(") && valueString.endsWith(")"))
  1844. {
  1845. var ticksString=valueString["substring"](5,valueString["length"] - 1);
  1846. var ticks=window["parseInt"](ticksString);
  1847. if(!window["isNaN"](ticks))
  1848. {
  1849. var dateTimeValue=new Date(ticks);
  1850. if(dateTimeValue)
  1851. value=dateTimeValue
  1852. }
  1853. }
  1854. }
  1855. return value
  1856. },
  1857. set: function(name, value)
  1858. {
  1859. if(window["OSF"]["OUtil"]["isDate"](value))
  1860. value="Date("+value["getTime"]()+")";
  1861. this._data$p$0[name]=value
  1862. },
  1863. remove: function(name)
  1864. {
  1865. delete this._data$p$0[name]
  1866. },
  1867. saveAsync: function()
  1868. {
  1869. var args=[];
  1870. for(var $$pai_4=0; $$pai_4 < arguments.length;++$$pai_4)
  1871. args[$$pai_4]=arguments[$$pai_4];
  1872. var MaxCustomPropertiesLength=2500;
  1873. if(window["JSON"]["stringify"](this._data$p$0)["length"] > MaxCustomPropertiesLength)
  1874. throw Error.argument();
  1875. var parameters=$h.CommonParameters.parse(args,false,true);
  1876. var saveCustomProperties=new $h.SaveDictionaryRequest(parameters._callback$p$0,parameters._asyncContext$p$0);
  1877. saveCustomProperties._sendRequest$i$0(4,"SaveCustomProperties",{customProperties: this._data$p$0})
  1878. }
  1879. };
  1880. $h.Diagnostics=function(data, appName)
  1881. {
  1882. this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);
  1883. this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);
  1884. this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);
  1885. this._data$p$0=data;
  1886. this._appName$p$0=appName;
  1887. $h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);
  1888. $h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);
  1889. if(64===this._appName$p$0)
  1890. $h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)
  1891. };
  1892. $h.Diagnostics.prototype={
  1893. _data$p$0: null,
  1894. _appName$p$0: 0,
  1895. _getHostName$p$0: function()
  1896. {
  1897. if(8===this._appName$p$0)
  1898. return"Outlook";
  1899. else if(64===this._appName$p$0)
  1900. return"OutlookWebApp";
  1901. return null
  1902. },
  1903. _getHostVersion$p$0: function()
  1904. {
  1905. return this._data$p$0.get__hostVersion$i$0()
  1906. },
  1907. _getOwaView$p$0: function()
  1908. {
  1909. return this._data$p$0.get__owaView$i$0()
  1910. }
  1911. };
  1912. $h.EmailAddressDetails=function(data)
  1913. {
  1914. this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);
  1915. this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);
  1916. this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);
  1917. this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);
  1918. this._data$p$0=data;
  1919. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);
  1920. $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);
  1921. if($h.ScriptHelpers.dictionaryContainsKey(data,"appointmentResponse"))
  1922. $h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);
  1923. if($h.ScriptHelpers.dictionaryContainsKey(data,"recipientType"))
  1924. $h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)
  1925. };
  1926. $h.EmailAddressDetails._createFromEmailUserDictionary$i=function(data)
  1927. {
  1928. var emailAddressDetailsDictionary={};
  1929. var displayName=data["Name"];
  1930. var emailAddress=data["UserId"];
  1931. emailAddressDetailsDictionary["name"]=displayName || $h.EmailAddressDetails._emptyString$p;
  1932. emailAddressDetailsDictionary["address"]=emailAddress || $h.EmailAddressDetails._emptyString$p;
  1933. return new $h.EmailAddressDetails(emailAddressDetailsDictionary)
  1934. };
  1935. $h.EmailAddressDetails.prototype={
  1936. _data$p$0: null,
  1937. toJSON: function()
  1938. {
  1939. var result={};
  1940. result["emailAddress"]=this._getEmailAddress$p$0();
  1941. result["displayName"]=this._getDisplayName$p$0();
  1942. if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse"))
  1943. result["appointmentResponse"]=this._getAppointmentResponse$p$0();
  1944. if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType"))
  1945. result["recipientType"]=this._getRecipientType$p$0();
  1946. return result
  1947. },
  1948. _getEmailAddress$p$0: function()
  1949. {
  1950. return this._data$p$0["address"]
  1951. },
  1952. _getDisplayName$p$0: function()
  1953. {
  1954. return this._data$p$0["name"]
  1955. },
  1956. _getAppointmentResponse$p$0: function()
  1957. {
  1958. var response=this._data$p$0["appointmentResponse"];
  1959. return response < $h.EmailAddressDetails._responseTypeMap$p.length ? $h.EmailAddressDetails._responseTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"]
  1960. },
  1961. _getRecipientType$p$0: function()
  1962. {
  1963. var response=this._data$p$0["recipientType"];
  1964. return response < $h.EmailAddressDetails._recipientTypeMap$p.length ? $h.EmailAddressDetails._recipientTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"]
  1965. }
  1966. };
  1967. $h.Entities=function(data, filteredEntitiesData, timeSent, permissionLevel)
  1968. {
  1969. this.$$d__createMeetingSuggestion$p$0=Function.createDelegate(this,this._createMeetingSuggestion$p$0);
  1970. this.$$d__getParcelDeliveries$p$0=Function.createDelegate(this,this._getParcelDeliveries$p$0);
  1971. this.$$d__getFlightReservations$p$0=Function.createDelegate(this,this._getFlightReservations$p$0);
  1972. this.$$d__getContacts$p$0=Function.createDelegate(this,this._getContacts$p$0);
  1973. this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);
  1974. this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);
  1975. this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);
  1976. this.$$d__getMeetingSuggestions$p$0=Function.createDelegate(this,this._getMeetingSuggestions$p$0);
  1977. this.$$d__getTaskSuggestions$p$0=Function.createDelegate(this,this._getTaskSuggestions$p$0);
  1978. this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);
  1979. this._data$p$0=data || {};
  1980. this._filteredData$p$0=filteredEntitiesData || {};
  1981. this._dateTimeSent$p$0=timeSent;
  1982. $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);
  1983. $h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0);
  1984. $h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0);
  1985. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);
  1986. $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);
  1987. $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);
  1988. $h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0);
  1989. $h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0);
  1990. $h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0);
  1991. this._permissionLevel$p$0=permissionLevel
  1992. };
  1993. $h.Entities._getExtractedObjects$i=function(T, data, name, creator, removeDuplicates, stringPropertyName)
  1994. {
  1995. var results=null;
  1996. var extractedObjects=data[name];
  1997. if(!extractedObjects)
  1998. return new Array(0);
  1999. if(removeDuplicates)
  2000. extractedObjects=$h.Entities._removeDuplicate$p(Object,extractedObjects,$h.Entities._entityDictionaryEquals$p,stringPropertyName);
  2001. results=new Array(extractedObjects.length);
  2002. var count=0;
  2003. for(var $$arr_9=extractedObjects, $$len_A=$$arr_9["length"], $$idx_B=0; $$idx_B < $$len_A;++$$idx_B)
  2004. {
  2005. var extractedObject=$$arr_9[$$idx_B];
  2006. if(creator)
  2007. results[count++]=creator(extractedObject);
  2008. else
  2009. results[count++]=extractedObject
  2010. }
  2011. return results
  2012. };
  2013. $h.Entities._getExtractedStringProperty$i=function(data, name, removeDuplicate)
  2014. {
  2015. var extractedProperties=data[name];
  2016. if(!extractedProperties)
  2017. return new Array(0);
  2018. if(removeDuplicate)
  2019. extractedProperties=$h.Entities._removeDuplicate$p(String,extractedProperties,$h.Entities._stringEquals$p,null);
  2020. return extractedProperties
  2021. };
  2022. $h.Entities._createContact$p=function(data)
  2023. {
  2024. return new $h.Contact(data)
  2025. };
  2026. $h.Entities._createTaskSuggestion$p=function(data)
  2027. {
  2028. return new $h.TaskSuggestion(data)
  2029. };
  2030. $h.Entities._createPhoneNumber$p=function(data)
  2031. {
  2032. return new $h.PhoneNumber(data)
  2033. };
  2034. $h.Entities._entityDictionaryEquals$p=function(dictionary1, dictionary2, entityPropertyIdentifier)
  2035. {
  2036. if(dictionary1===dictionary2)
  2037. return true;
  2038. if(!dictionary1 || !dictionary2)
  2039. return false;
  2040. if(dictionary1[entityPropertyIdentifier]===dictionary2[entityPropertyIdentifier])
  2041. return true;
  2042. return false
  2043. };
  2044. $h.Entities._stringEquals$p=function(string1, string2, entityProperty)
  2045. {
  2046. return string1===string2
  2047. };
  2048. $h.Entities._removeDuplicate$p=function(T, array, entityEquals, entityPropertyIdentifier)
  2049. {
  2050. for(var matchIndex1=array.length - 1; matchIndex1 >=0; matchIndex1--)
  2051. {
  2052. var removeMatch=false;
  2053. for(var matchIndex2=matchIndex1 - 1; matchIndex2 >=0; matchIndex2--)
  2054. if(entityEquals(array[matchIndex1],array[matchIndex2],entityPropertyIdentifier))
  2055. {
  2056. removeMatch=true;
  2057. break
  2058. }
  2059. if(removeMatch)
  2060. Array.removeAt(array,matchIndex1)
  2061. }
  2062. return array
  2063. };
  2064. $h.Entities.prototype={
  2065. _dateTimeSent$p$0: null,
  2066. _data$p$0: null,
  2067. _filteredData$p$0: null,
  2068. _filteredEntitiesCache$p$0: null,
  2069. _permissionLevel$p$0: 0,
  2070. _taskSuggestions$p$0: null,
  2071. _meetingSuggestions$p$0: null,
  2072. _phoneNumbers$p$0: null,
  2073. _contacts$p$0: null,
  2074. _addresses$p$0: null,
  2075. _emailAddresses$p$0: null,
  2076. _urls$p$0: null,
  2077. _flightReservations$p$0: null,
  2078. _parcelDeliveries$p$0: null,
  2079. _getByType$i$0: function(entityType)
  2080. {
  2081. if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["MeetingSuggestion"])
  2082. return this._getMeetingSuggestions$p$0();
  2083. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["TaskSuggestion"])
  2084. return this._getTaskSuggestions$p$0();
  2085. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Address"])
  2086. return this._getAddresses$p$0();
  2087. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["PhoneNumber"])
  2088. return this._getPhoneNumbers$p$0();
  2089. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["EmailAddress"])
  2090. return this._getEmailAddresses$p$0();
  2091. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Url"])
  2092. return this._getUrls$p$0();
  2093. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Contact"])
  2094. return this._getContacts$p$0();
  2095. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["FlightReservations"])
  2096. return this._getFlightReservations$p$0();
  2097. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["ParcelDeliveries"])
  2098. return this._getParcelDeliveries$p$0();
  2099. return null
  2100. },
  2101. _getFilteredEntitiesByName$i$0: function(name)
  2102. {
  2103. if(!this._filteredEntitiesCache$p$0)
  2104. this._filteredEntitiesCache$p$0={};
  2105. if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,name))
  2106. {
  2107. var found=false;
  2108. for(var i=0; i < $h.Entities._allEntityKeys$p.length; i++)
  2109. {
  2110. var entityTypeKey=$h.Entities._allEntityKeys$p[i];
  2111. var perEntityTypeDictionary=this._filteredData$p$0[entityTypeKey];
  2112. if(!perEntityTypeDictionary)
  2113. continue;
  2114. if($h.ScriptHelpers.dictionaryContainsKey(perEntityTypeDictionary,name))
  2115. {
  2116. switch(entityTypeKey)
  2117. {
  2118. case"EmailAddresses":
  2119. case"Urls":
  2120. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name);
  2121. break;
  2122. case"Addresses":
  2123. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name,true);
  2124. break;
  2125. case"PhoneNumbers":
  2126. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.PhoneNumber,perEntityTypeDictionary,name,$h.Entities._createPhoneNumber$p,false,null);
  2127. break;
  2128. case"TaskSuggestions":
  2129. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,perEntityTypeDictionary,name,$h.Entities._createTaskSuggestion$p,true,"TaskString");
  2130. break;
  2131. case"MeetingSuggestions":
  2132. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,perEntityTypeDictionary,name,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString");
  2133. break;
  2134. case"Contacts":
  2135. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.Contact,perEntityTypeDictionary,name,$h.Entities._createContact$p,true,"ContactString");
  2136. break
  2137. }
  2138. found=true;
  2139. break
  2140. }
  2141. }
  2142. if(!found)
  2143. this._filteredEntitiesCache$p$0[name]=null
  2144. }
  2145. return this._filteredEntitiesCache$p$0[name]
  2146. },
  2147. _createMeetingSuggestion$p$0: function(data)
  2148. {
  2149. return new $h.MeetingSuggestion(data,this._dateTimeSent$p$0)
  2150. },
  2151. _getAddresses$p$0: function()
  2152. {
  2153. if(!this._addresses$p$0)
  2154. this._addresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true);
  2155. return this._addresses$p$0
  2156. },
  2157. _getEmailAddresses$p$0: function()
  2158. {
  2159. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2160. if(!this._emailAddresses$p$0)
  2161. this._emailAddresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false);
  2162. return this._emailAddresses$p$0
  2163. },
  2164. _getUrls$p$0: function()
  2165. {
  2166. if(!this._urls$p$0)
  2167. this._urls$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false);
  2168. return this._urls$p$0
  2169. },
  2170. _getPhoneNumbers$p$0: function()
  2171. {
  2172. if(!this._phoneNumbers$p$0)
  2173. this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p);
  2174. return this._phoneNumbers$p$0
  2175. },
  2176. _getTaskSuggestions$p$0: function()
  2177. {
  2178. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2179. if(!this._taskSuggestions$p$0)
  2180. this._taskSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString");
  2181. return this._taskSuggestions$p$0
  2182. },
  2183. _getMeetingSuggestions$p$0: function()
  2184. {
  2185. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2186. if(!this._meetingSuggestions$p$0)
  2187. this._meetingSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString");
  2188. return this._meetingSuggestions$p$0
  2189. },
  2190. _getContacts$p$0: function()
  2191. {
  2192. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2193. if(!this._contacts$p$0)
  2194. this._contacts$p$0=$h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString");
  2195. return this._contacts$p$0
  2196. },
  2197. _getParcelDeliveries$p$0: function()
  2198. {
  2199. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2200. if(!this._parcelDeliveries$p$0)
  2201. this._parcelDeliveries$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null);
  2202. return this._parcelDeliveries$p$0
  2203. },
  2204. _getFlightReservations$p$0: function()
  2205. {
  2206. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2207. if(!this._flightReservations$p$0)
  2208. this._flightReservations$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null);
  2209. return this._flightReservations$p$0
  2210. }
  2211. };
  2212. $h.ReplyConstants=function(){};
  2213. $h.AsyncConstants=function(){};
  2214. window["Office"]["cast"]["item"]=Office.cast.item=function(){};
  2215. window["Office"]["cast"]["item"]["toItemRead"]=function(item)
  2216. {
  2217. if($h.Item.isInstanceOfType(item))
  2218. return item;
  2219. throw Error.argumentType();
  2220. };
  2221. window["Office"]["cast"]["item"]["toItemCompose"]=function(item)
  2222. {
  2223. if($h.ComposeItem.isInstanceOfType(item))
  2224. return item;
  2225. throw Error.argumentType();
  2226. };
  2227. window["Office"]["cast"]["item"]["toMessage"]=function(item)
  2228. {
  2229. return window["Office"]["cast"]["item"]["toMessageRead"](item)
  2230. };
  2231. window["Office"]["cast"]["item"]["toMessageRead"]=function(item)
  2232. {
  2233. if($h.Message.isInstanceOfType(item))
  2234. return item;
  2235. throw Error.argumentType();
  2236. };
  2237. window["Office"]["cast"]["item"]["toMessageCompose"]=function(item)
  2238. {
  2239. if($h.MessageCompose.isInstanceOfType(item))
  2240. return item;
  2241. throw Error.argumentType();
  2242. };
  2243. window["Office"]["cast"]["item"]["toMeetingRequest"]=function(item)
  2244. {
  2245. if($h.MeetingRequest.isInstanceOfType(item))
  2246. return item;
  2247. throw Error.argumentType();
  2248. };
  2249. window["Office"]["cast"]["item"]["toAppointment"]=function(item)
  2250. {
  2251. return window["Office"]["cast"]["item"]["toAppointmentRead"](item)
  2252. };
  2253. window["Office"]["cast"]["item"]["toAppointmentRead"]=function(item)
  2254. {
  2255. if($h.Appointment.isInstanceOfType(item))
  2256. return item;
  2257. throw Error.argumentType();
  2258. };
  2259. window["Office"]["cast"]["item"]["toAppointmentCompose"]=function(item)
  2260. {
  2261. if($h.AppointmentCompose.isInstanceOfType(item))
  2262. return item;
  2263. throw Error.argumentType();
  2264. };
  2265. $h.Item=function(data)
  2266. {
  2267. this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1);
  2268. this.$$d__getAttachments$p$1=Function.createDelegate(this,this._getAttachments$p$1);
  2269. this.$$d__getItemClass$p$1=Function.createDelegate(this,this._getItemClass$p$1);
  2270. this.$$d__getItemId$p$1=Function.createDelegate(this,this._getItemId$p$1);
  2271. this.$$d__getDateTimeModified$p$1=Function.createDelegate(this,this._getDateTimeModified$p$1);
  2272. this.$$d__getDateTimeCreated$p$1=Function.createDelegate(this,this._getDateTimeCreated$p$1);
  2273. $h.Item.initializeBase(this,[data]);
  2274. $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1);
  2275. $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1);
  2276. $h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1);
  2277. $h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1);
  2278. $h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1);
  2279. $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1)
  2280. };
  2281. $h.Item.prototype={
  2282. _body$p$1: null,
  2283. _getItemId$p$1: function()
  2284. {
  2285. return this._data$p$0.get__itemId$i$0()
  2286. },
  2287. _getItemClass$p$1: function()
  2288. {
  2289. return this._data$p$0.get__itemClass$i$0()
  2290. },
  2291. _getDateTimeCreated$p$1: function()
  2292. {
  2293. return this._data$p$0.get__dateTimeCreated$i$0()
  2294. },
  2295. _getDateTimeModified$p$1: function()
  2296. {
  2297. return this._data$p$0.get__dateTimeModified$i$0()
  2298. },
  2299. _getAttachments$p$1: function()
  2300. {
  2301. return this._data$p$0.get__attachments$i$0()
  2302. },
  2303. _getBody$p$1: function()
  2304. {
  2305. if(!this._body$p$1)
  2306. this._body$p$1=new $h.Body;
  2307. return this._body$p$1
  2308. }
  2309. };
  2310. $h.ItemBase=function(data)
  2311. {
  2312. this.$$d__createCustomProperties$i$0=Function.createDelegate(this,this._createCustomProperties$i$0);
  2313. this.$$d__getNotificationMessages$p$0=Function.createDelegate(this,this._getNotificationMessages$p$0);
  2314. this.$$d_getItemType=Function.createDelegate(this,this.getItemType);
  2315. this._data$p$0=data;
  2316. $h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType);
  2317. $h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0)
  2318. };
  2319. $h.ItemBase.prototype={
  2320. _data$p$0: null,
  2321. _notificationMessages$p$0: null,
  2322. get_data: function()
  2323. {
  2324. return this._data$p$0
  2325. },
  2326. loadCustomPropertiesAsync: function()
  2327. {
  2328. var args=[];
  2329. for(var $$pai_3=0; $$pai_3 < arguments.length;++$$pai_3)
  2330. args[$$pai_3]=arguments[$$pai_3];
  2331. var parameters=$h.CommonParameters.parse(args,true,true);
  2332. var loadCustomProperties=new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",parameters._callback$p$0,parameters._asyncContext$p$0);
  2333. loadCustomProperties._sendRequest$i$0(3,"LoadCustomProperties",{})
  2334. },
  2335. _createCustomProperties$i$0: function(data)
  2336. {
  2337. return new $h.CustomProperties(data)
  2338. },
  2339. _getNotificationMessages$p$0: function()
  2340. {
  2341. if(!this._notificationMessages$p$0)
  2342. this._notificationMessages$p$0=new $h.NotificationMessages;
  2343. return this._notificationMessages$p$0
  2344. }
  2345. };
  2346. $h.MeetingRequest=function(data)
  2347. {
  2348. this.$$d__getRequiredAttendees$p$3=Function.createDelegate(this,this._getRequiredAttendees$p$3);
  2349. this.$$d__getOptionalAttendees$p$3=Function.createDelegate(this,this._getOptionalAttendees$p$3);
  2350. this.$$d__getLocation$p$3=Function.createDelegate(this,this._getLocation$p$3);
  2351. this.$$d__getEnd$p$3=Function.createDelegate(this,this._getEnd$p$3);
  2352. this.$$d__getStart$p$3=Function.createDelegate(this,this._getStart$p$3);
  2353. $h.MeetingRequest.initializeBase(this,[data]);
  2354. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3);
  2355. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3);
  2356. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3);
  2357. $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3);
  2358. $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3)
  2359. };
  2360. $h.MeetingRequest.prototype={
  2361. _getStart$p$3: function()
  2362. {
  2363. return this._data$p$0.get__start$i$0()
  2364. },
  2365. _getEnd$p$3: function()
  2366. {
  2367. return this._data$p$0.get__end$i$0()
  2368. },
  2369. _getLocation$p$3: function()
  2370. {
  2371. return this._data$p$0.get__location$i$0()
  2372. },
  2373. _getOptionalAttendees$p$3: function()
  2374. {
  2375. return this._data$p$0.get__cc$i$0()
  2376. },
  2377. _getRequiredAttendees$p$3: function()
  2378. {
  2379. return this._data$p$0.get__to$i$0()
  2380. }
  2381. };
  2382. $h.MeetingSuggestion=function(data, dateTimeSent)
  2383. {
  2384. this.$$d__getEndTime$p$0=Function.createDelegate(this,this._getEndTime$p$0);
  2385. this.$$d__getStartTime$p$0=Function.createDelegate(this,this._getStartTime$p$0);
  2386. this.$$d__getSubject$p$0=Function.createDelegate(this,this._getSubject$p$0);
  2387. this.$$d__getLocation$p$0=Function.createDelegate(this,this._getLocation$p$0);
  2388. this.$$d__getAttendees$p$0=Function.createDelegate(this,this._getAttendees$p$0);
  2389. this.$$d__getMeetingString$p$0=Function.createDelegate(this,this._getMeetingString$p$0);
  2390. this._data$p$0=data;
  2391. this._dateTimeSent$p$0=dateTimeSent;
  2392. $h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0);
  2393. $h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0);
  2394. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0);
  2395. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0);
  2396. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0);
  2397. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0)
  2398. };
  2399. $h.MeetingSuggestion.prototype={
  2400. _dateTimeSent$p$0: null,
  2401. _data$p$0: null,
  2402. _attendees$p$0: null,
  2403. _getMeetingString$p$0: function()
  2404. {
  2405. return this._data$p$0["MeetingString"]
  2406. },
  2407. _getLocation$p$0: function()
  2408. {
  2409. return this._data$p$0["Location"]
  2410. },
  2411. _getSubject$p$0: function()
  2412. {
  2413. return this._data$p$0["Subject"]
  2414. },
  2415. _getStartTime$p$0: function()
  2416. {
  2417. var time=this._createDateTimeFromParameter$p$0("StartTime");
  2418. var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0);
  2419. if(resolvedTime["getTime"]() !==time["getTime"]())
  2420. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime));
  2421. return time
  2422. },
  2423. _getEndTime$p$0: function()
  2424. {
  2425. var time=this._createDateTimeFromParameter$p$0("EndTime");
  2426. var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0);
  2427. if(resolvedTime["getTime"]() !==time["getTime"]())
  2428. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime));
  2429. return time
  2430. },
  2431. _createDateTimeFromParameter$p$0: function(keyName)
  2432. {
  2433. var dateTimeString=this._data$p$0[keyName];
  2434. if(!dateTimeString)
  2435. return null;
  2436. return new Date(dateTimeString)
  2437. },
  2438. _getAttendees$p$0: function()
  2439. {
  2440. if(!this._attendees$p$0)
  2441. {
  2442. var $$t_1=this;
  2443. this._attendees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(data)
  2444. {
  2445. return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data)
  2446. })
  2447. }
  2448. return this._attendees$p$0
  2449. }
  2450. };
  2451. $h.MeetingSuggestionTimeDecoder=function(){};
  2452. $h.MeetingSuggestionTimeDecoder.resolve=function(inTime, sentTime)
  2453. {
  2454. if(!sentTime)
  2455. return inTime;
  2456. try
  2457. {
  2458. var tod;
  2459. var outDate;
  2460. var extractedDate;
  2461. var sentDate=new Date(sentTime["getFullYear"](),sentTime["getMonth"](),sentTime["getDate"](),0,0,0,0);
  2462. var $$t_7,
  2463. $$t_8,
  2464. $$t_9;
  2465. if(!($$t_9=$h.MeetingSuggestionTimeDecoder._decode$p(inTime,$$t_7={val: extractedDate},$$t_8={val: tod}),extractedDate=$$t_7["val"],tod=$$t_8["val"],$$t_9))
  2466. return inTime;
  2467. else
  2468. {
  2469. if($h._preciseDate.isInstanceOfType(extractedDate))
  2470. outDate=$h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(sentDate,extractedDate);
  2471. else if($h._relativeDate.isInstanceOfType(extractedDate))
  2472. outDate=$h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(sentDate,extractedDate);
  2473. else
  2474. outDate=sentDate;
  2475. if(window["isNaN"](outDate["getTime"]()))
  2476. return sentTime;
  2477. outDate["setMilliseconds"](outDate["getMilliseconds"]()+tod);
  2478. return outDate
  2479. }
  2480. }
  2481. catch($$e_6)
  2482. {
  2483. return sentTime
  2484. }
  2485. };
  2486. $h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i=function(value)
  2487. {
  2488. return null===value || value===undefined
  2489. };
  2490. $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p=function(sentDate, precise)
  2491. {
  2492. var year=precise._year$i$1;
  2493. var month=!precise._month$i$1 ? sentDate["getMonth"]() : precise._month$i$1 - 1;
  2494. var day=precise._day$i$1;
  2495. if(!day)
  2496. return sentDate;
  2497. var candidate;
  2498. if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year))
  2499. {
  2500. candidate=new Date(sentDate["getFullYear"](),month,day);
  2501. if(candidate["getTime"]() < sentDate["getTime"]())
  2502. candidate=new Date(sentDate["getFullYear"]()+1,month,day)
  2503. }
  2504. else
  2505. candidate=new Date(year < 50 ? 2e3+year : 1900+year,month,day);
  2506. if(candidate["getMonth"]() !==month)
  2507. return sentDate;
  2508. return candidate
  2509. };
  2510. $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p=function(sentDate, relative)
  2511. {
  2512. var date;
  2513. switch(relative._unit$i$1)
  2514. {
  2515. case 0:
  2516. date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]());
  2517. date["setDate"](date["getDate"]()+relative._offset$i$1);
  2518. return date;
  2519. case 5:
  2520. return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(sentDate,relative._offset$i$1,relative._tag$i$1);
  2521. case 2:
  2522. var days=1;
  2523. switch(relative._modifier$i$1)
  2524. {
  2525. case 1:
  2526. break;
  2527. case 2:
  2528. days=16;
  2529. break;
  2530. default:
  2531. if(!relative._offset$i$1)
  2532. days=sentDate["getDate"]();
  2533. break
  2534. }
  2535. date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),days);
  2536. date["setMonth"](date["getMonth"]()+relative._offset$i$1);
  2537. if(date["getTime"]() < sentDate["getTime"]())
  2538. date["setDate"](date["getDate"]()+sentDate["getDate"]() - 1);
  2539. return date;
  2540. case 1:
  2541. date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]());
  2542. date["setDate"](sentDate["getDate"]()+7 * relative._offset$i$1);
  2543. if(relative._modifier$i$1===1 || !relative._modifier$i$1)
  2544. {
  2545. date["setDate"](date["getDate"]()+1 - date["getDay"]());
  2546. if(date["getTime"]() < sentDate["getTime"]())
  2547. return sentDate;
  2548. return date
  2549. }
  2550. else if(relative._modifier$i$1===2)
  2551. {
  2552. date["setDate"](date["getDate"]()+5 - date["getDay"]());
  2553. return date
  2554. }
  2555. break;
  2556. case 4:
  2557. return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(sentDate,relative);
  2558. case 3:
  2559. if(relative._offset$i$1 > 0)
  2560. return new Date(sentDate["getFullYear"]()+relative._offset$i$1,0,1);
  2561. break;
  2562. default:
  2563. break
  2564. }
  2565. return sentDate
  2566. };
  2567. $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(sentDate, offset, tag)
  2568. {
  2569. if(offset > -5 && offset < 5)
  2570. {
  2571. var dayOfWeek;
  2572. var days;
  2573. dayOfWeek=(tag+6) % 7+1;
  2574. days=7 * offset+(dayOfWeek - sentDate["getDay"]());
  2575. sentDate["setDate"](sentDate["getDate"]()+days);
  2576. return sentDate
  2577. }
  2578. else
  2579. {
  2580. var days=(tag - sentDate["getDay"]()) % 7;
  2581. if(days < 0)
  2582. days+=7;
  2583. sentDate["setDate"](sentDate["getDate"]()+days);
  2584. return sentDate
  2585. }
  2586. };
  2587. $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(sentDate, relative)
  2588. {
  2589. var date;
  2590. var firstDay;
  2591. var newDate;
  2592. date=sentDate;
  2593. if(relative._tag$i$1 <=0 || relative._tag$i$1 > 12 || relative._offset$i$1 <=0 || relative._offset$i$1 > 5)
  2594. return sentDate;
  2595. var monthOffset=(12+relative._tag$i$1 - date["getMonth"]() - 1) % 12;
  2596. firstDay=new Date(date["getFullYear"](),date["getMonth"]()+monthOffset,1);
  2597. if(relative._modifier$i$1===1)
  2598. if(relative._offset$i$1===1 && firstDay["getDay"]() !==6 && firstDay["getDay"]())
  2599. return firstDay;
  2600. else
  2601. {
  2602. newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),firstDay["getDate"]());
  2603. newDate["setDate"](newDate["getDate"]()+(7+(1 - firstDay["getDay"]())) % 7);
  2604. if(firstDay["getDay"]() !==6 && firstDay["getDay"]() && firstDay["getDay"]() !==1)
  2605. newDate["setDate"](newDate["getDate"]() - 7);
  2606. newDate["setDate"](newDate["getDate"]()+7 * (relative._offset$i$1 - 1));
  2607. if(newDate["getMonth"]()+1 !==relative._tag$i$1)
  2608. return sentDate;
  2609. return newDate
  2610. }
  2611. else
  2612. {
  2613. newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(firstDay["getMonth"](),firstDay["getFullYear"]()));
  2614. var offset=1 - newDate["getDay"]();
  2615. if(offset > 0)
  2616. offset=offset - 7;
  2617. newDate["setDate"](newDate["getDate"]()+offset);
  2618. newDate["setDate"](newDate["getDate"]()+7 * (1 - relative._offset$i$1));
  2619. if(newDate["getMonth"]()+1 !==relative._tag$i$1)
  2620. if(firstDay["getDay"]() !==6 && firstDay["getDay"]())
  2621. return firstDay;
  2622. else
  2623. return sentDate;
  2624. else
  2625. return newDate
  2626. }
  2627. };
  2628. $h.MeetingSuggestionTimeDecoder._decode$p=function(inDate, date, time)
  2629. {
  2630. var DateValueMask=32767;
  2631. date.val=null;
  2632. time.val=0;
  2633. if(!inDate)
  2634. return false;
  2635. time.val=$h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(inDate);
  2636. var inDateAtMidnight=inDate["getTime"]() - time.val;
  2637. var value=(inDateAtMidnight - $h.MeetingSuggestionTimeDecoder._baseDate$p["getTime"]()) / 864e5;
  2638. if(value < 0)
  2639. return false;
  2640. else if(value >=262144)
  2641. return false;
  2642. else
  2643. {
  2644. var type=value >> 15;
  2645. value=value & DateValueMask;
  2646. switch(type)
  2647. {
  2648. case 0:
  2649. return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(value,date);
  2650. case 1:
  2651. return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(value,date);
  2652. default:
  2653. return false
  2654. }
  2655. }
  2656. };
  2657. $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(value, date)
  2658. {
  2659. var c_SubTypeMask=7;
  2660. var c_MonthMask=15;
  2661. var c_DayMask=31;
  2662. var c_YearMask=127;
  2663. var year=null;
  2664. var month=0;
  2665. var day=0;
  2666. date.val=null;
  2667. var subType=value >> 12 & c_SubTypeMask;
  2668. if((subType & 4)===4)
  2669. {
  2670. year=value >> 5 & c_YearMask;
  2671. if((subType & 2)===2)
  2672. {
  2673. if((subType & 1)===1)
  2674. return false;
  2675. month=value >> 1 & c_MonthMask
  2676. }
  2677. }
  2678. else
  2679. {
  2680. if((subType & 2)===2)
  2681. month=value >> 8 & c_MonthMask;
  2682. if((subType & 1)===1)
  2683. day=value >> 3 & c_DayMask
  2684. }
  2685. date.val=new $h._preciseDate(day,month,year);
  2686. return true
  2687. };
  2688. $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(value, date)
  2689. {
  2690. var TagMask=15;
  2691. var OffsetMask=63;
  2692. var UnitMask=7;
  2693. var ModifierMask=3;
  2694. var tag=value & TagMask;
  2695. value >>=4;
  2696. var offset=$h.MeetingSuggestionTimeDecoder._fromComplement$p(value & OffsetMask,6);
  2697. value >>=6;
  2698. var unit=value & UnitMask;
  2699. value >>=3;
  2700. var modifier=value & ModifierMask;
  2701. try
  2702. {
  2703. date.val=new $h._relativeDate(modifier,offset,unit,tag);
  2704. return true
  2705. }
  2706. catch($$e_A)
  2707. {
  2708. date.val=null;
  2709. return false
  2710. }
  2711. };
  2712. $h.MeetingSuggestionTimeDecoder._fromComplement$p=function(value, n)
  2713. {
  2714. var signed=1 << n - 1;
  2715. var mask=(1 << n) - 1;
  2716. if((value & signed)===signed)
  2717. return-((value ^ mask)+1);
  2718. else
  2719. return value
  2720. };
  2721. $h.MeetingSuggestionTimeDecoder._daysInMonth$p=function(month, year)
  2722. {
  2723. return 32 - new Date(year,month,32)["getDate"]()
  2724. };
  2725. $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p=function(inputTime)
  2726. {
  2727. var timeOfDay=0;
  2728. timeOfDay+=inputTime["getUTCHours"]() * 3600;
  2729. timeOfDay+=inputTime["getUTCMinutes"]() * 60;
  2730. timeOfDay+=inputTime["getUTCSeconds"]();
  2731. timeOfDay *=1e3;
  2732. timeOfDay+=inputTime["getUTCMilliseconds"]();
  2733. return timeOfDay
  2734. };
  2735. $h._extractedDate=function(){};
  2736. $h._preciseDate=function(day, month, year)
  2737. {
  2738. $h._preciseDate.initializeBase(this);
  2739. if(day < 0 || day > 31)
  2740. throw Error.argumentOutOfRange("day");
  2741. if(month < 0 || month > 12)
  2742. throw Error.argumentOutOfRange("month");
  2743. this._day$i$1=day;
  2744. this._month$i$1=month;
  2745. if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year))
  2746. {
  2747. if(!month && day)
  2748. throw Error.argument("Invalid arguments");
  2749. if(year < 0 || year > 2099)
  2750. throw Error.argumentOutOfRange("year");
  2751. this._year$i$1=year % 100
  2752. }
  2753. else if(!this._month$i$1 && !this._day$i$1)
  2754. throw Error.argument("Invalid datetime");
  2755. };
  2756. $h._preciseDate.prototype={
  2757. _day$i$1: 0,
  2758. _month$i$1: 0,
  2759. _year$i$1: null
  2760. };
  2761. $h._relativeDate=function(modifier, offset, unit, tag)
  2762. {
  2763. $h._relativeDate.initializeBase(this);
  2764. if(offset < -32 || offset > 31)
  2765. throw Error.argumentOutOfRange("offset");
  2766. if(tag < 0 || tag > 15)
  2767. throw Error.argumentOutOfRange("tag");
  2768. if(!unit && offset < 0)
  2769. throw Error.argument("unit & offset do not form a valid date");
  2770. this._modifier$i$1=modifier;
  2771. this._offset$i$1=offset;
  2772. this._unit$i$1=unit;
  2773. this._tag$i$1=tag
  2774. };
  2775. $h._relativeDate.prototype={
  2776. _modifier$i$1: 0,
  2777. _offset$i$1: 0,
  2778. _unit$i$1: 0,
  2779. _tag$i$1: 0
  2780. };
  2781. $h.Message=function(dataDictionary)
  2782. {
  2783. this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2);
  2784. this.$$d__getInternetMessageId$p$2=Function.createDelegate(this,this._getInternetMessageId$p$2);
  2785. this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2);
  2786. this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2);
  2787. this.$$d__getFrom$p$2=Function.createDelegate(this,this._getFrom$p$2);
  2788. this.$$d__getSender$p$2=Function.createDelegate(this,this._getSender$p$2);
  2789. this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);
  2790. this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);
  2791. $h.Message.initializeBase(this,[dataDictionary]);
  2792. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);
  2793. $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);
  2794. $h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2);
  2795. $h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2);
  2796. $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2);
  2797. $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2);
  2798. $h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2);
  2799. $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2)
  2800. };
  2801. $h.Message.prototype={
  2802. getEntities: function()
  2803. {
  2804. return this._data$p$0._getEntities$i$0()
  2805. },
  2806. getEntitiesByType: function(entityType)
  2807. {
  2808. return this._data$p$0._getEntitiesByType$i$0(entityType)
  2809. },
  2810. getFilteredEntitiesByName: function(name)
  2811. {
  2812. return this._data$p$0._getFilteredEntitiesByName$i$0(name)
  2813. },
  2814. getRegExMatches: function()
  2815. {
  2816. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");
  2817. return this._data$p$0._getRegExMatches$i$0()
  2818. },
  2819. getRegExMatchesByName: function(name)
  2820. {
  2821. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");
  2822. return this._data$p$0._getRegExMatchesByName$i$0(name)
  2823. },
  2824. displayReplyForm: function(obj)
  2825. {
  2826. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj)
  2827. },
  2828. displayReplyAllForm: function(obj)
  2829. {
  2830. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj)
  2831. },
  2832. getItemType: function()
  2833. {
  2834. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"]
  2835. },
  2836. _getSubject$p$2: function()
  2837. {
  2838. return this._data$p$0.get__subject$i$0()
  2839. },
  2840. _getNormalizedSubject$p$2: function()
  2841. {
  2842. return this._data$p$0.get__normalizedSubject$i$0()
  2843. },
  2844. _getSender$p$2: function()
  2845. {
  2846. return this._data$p$0.get__sender$i$0()
  2847. },
  2848. _getFrom$p$2: function()
  2849. {
  2850. return this._data$p$0.get__from$i$0()
  2851. },
  2852. _getTo$p$2: function()
  2853. {
  2854. return this._data$p$0.get__to$i$0()
  2855. },
  2856. _getCc$p$2: function()
  2857. {
  2858. return this._data$p$0.get__cc$i$0()
  2859. },
  2860. _getInternetMessageId$p$2: function()
  2861. {
  2862. return this._data$p$0.get__internetMessageId$i$0()
  2863. },
  2864. _getConversationId$p$2: function()
  2865. {
  2866. return this._data$p$0.get__conversationId$i$0()
  2867. }
  2868. };
  2869. $h.MessageCompose=function(data)
  2870. {
  2871. this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2);
  2872. this.$$d__getBcc$p$2=Function.createDelegate(this,this._getBcc$p$2);
  2873. this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2);
  2874. this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2);
  2875. $h.MessageCompose.initializeBase(this,[data]);
  2876. $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2);
  2877. $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2);
  2878. $h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2);
  2879. $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2)
  2880. };
  2881. $h.MessageCompose.prototype={
  2882. _to$p$2: null,
  2883. _cc$p$2: null,
  2884. _bcc$p$2: null,
  2885. getItemType: function()
  2886. {
  2887. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"]
  2888. },
  2889. _getTo$p$2: function()
  2890. {
  2891. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  2892. if(!this._to$p$2)
  2893. this._to$p$2=new $h.ComposeRecipient(0,"to");
  2894. return this._to$p$2
  2895. },
  2896. _getCc$p$2: function()
  2897. {
  2898. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  2899. if(!this._cc$p$2)
  2900. this._cc$p$2=new $h.ComposeRecipient(1,"cc");
  2901. return this._cc$p$2
  2902. },
  2903. _getBcc$p$2: function()
  2904. {
  2905. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  2906. if(!this._bcc$p$2)
  2907. this._bcc$p$2=new $h.ComposeRecipient(2,"bcc");
  2908. return this._bcc$p$2
  2909. },
  2910. _getConversationId$p$2: function()
  2911. {
  2912. return this._data$p$0.get__conversationId$i$0()
  2913. }
  2914. };
  2915. $h.NotificationMessages=function(){};
  2916. $h.NotificationMessages._mapToHostItemNotificationMessageType$p=function(dataToHost)
  2917. {
  2918. var notificationType;
  2919. var hostItemNotificationMessageType;
  2920. notificationType=dataToHost["type"];
  2921. if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ProgressIndicator"])
  2922. hostItemNotificationMessageType=1;
  2923. else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"])
  2924. hostItemNotificationMessageType=0;
  2925. else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ErrorMessage"])
  2926. hostItemNotificationMessageType=2;
  2927. else
  2928. throw Error.argument("type");
  2929. dataToHost["type"]=hostItemNotificationMessageType
  2930. };
  2931. $h.NotificationMessages._validateKey$p=function(key)
  2932. {
  2933. if(!$h.ScriptHelpers.isNonEmptyString(key))
  2934. throw Error.argument("key");
  2935. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(key["length"],0,32,"key")
  2936. };
  2937. $h.NotificationMessages._validateDictionary$p=function(dictionary)
  2938. {
  2939. if(!$h.ScriptHelpers.isNonEmptyString(dictionary["type"]))
  2940. throw Error.argument("type");
  2941. if(dictionary["type"]===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"])
  2942. {
  2943. if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"]))
  2944. throw Error.argument("icon");
  2945. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"]["length"],0,32,"icon");
  2946. if($h.ScriptHelpers.isUndefined(dictionary["persistent"]))
  2947. throw Error.argument("persistent");
  2948. if(!Boolean.isInstanceOfType(dictionary["persistent"]))
  2949. throw Error.argumentType("persistent",Object["getType"](dictionary["persistent"]),Boolean);
  2950. }
  2951. else
  2952. {
  2953. if(!$h.ScriptHelpers.isUndefined(dictionary["icon"]))
  2954. throw Error.argument("icon");
  2955. if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"]))
  2956. throw Error.argument("persistent");
  2957. }
  2958. if(!$h.ScriptHelpers.isNonEmptyString(dictionary["message"]))
  2959. throw Error.argument("message");
  2960. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["message"]["length"],0,150,"message")
  2961. };
  2962. $h.NotificationMessages.prototype={
  2963. addAsync: function(key, dictionary)
  2964. {
  2965. var args=[];
  2966. for(var $$pai_5=2; $$pai_5 < arguments.length;++$$pai_5)
  2967. args[$$pai_5 - 2]=arguments[$$pai_5];
  2968. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync");
  2969. var commonParameters=$h.CommonParameters.parse(args,false);
  2970. $h.NotificationMessages._validateKey$p(key);
  2971. $h.NotificationMessages._validateDictionary$p(dictionary);
  2972. var dataToHost={};
  2973. dataToHost=$h.ScriptHelpers.deepClone(dictionary);
  2974. dataToHost["key"]=key;
  2975. $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost);
  2976. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(33,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  2977. },
  2978. getAllAsync: function()
  2979. {
  2980. var args=[];
  2981. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  2982. args[$$pai_2]=arguments[$$pai_2];
  2983. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync");
  2984. var commonParameters=$h.CommonParameters.parse(args,true);
  2985. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(34,null,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  2986. },
  2987. replaceAsync: function(key, dictionary)
  2988. {
  2989. var args=[];
  2990. for(var $$pai_5=2; $$pai_5 < arguments.length;++$$pai_5)
  2991. args[$$pai_5 - 2]=arguments[$$pai_5];
  2992. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync");
  2993. var commonParameters=$h.CommonParameters.parse(args,false);
  2994. $h.NotificationMessages._validateKey$p(key);
  2995. $h.NotificationMessages._validateDictionary$p(dictionary);
  2996. var dataToHost={};
  2997. dataToHost=$h.ScriptHelpers.deepClone(dictionary);
  2998. dataToHost["key"]=key;
  2999. $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost);
  3000. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(35,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  3001. },
  3002. removeAsync: function(key)
  3003. {
  3004. var args=[];
  3005. for(var $$pai_4=1; $$pai_4 < arguments.length;++$$pai_4)
  3006. args[$$pai_4 - 1]=arguments[$$pai_4];
  3007. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync");
  3008. var commonParameters=$h.CommonParameters.parse(args,false);
  3009. $h.NotificationMessages._validateKey$p(key);
  3010. var dataToHost={key: key};
  3011. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(36,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  3012. }
  3013. };
  3014. $h.OutlookErrorManager=function(){};
  3015. $h.OutlookErrorManager.getErrorArgs=function(errorCode)
  3016. {
  3017. if(!$h.OutlookErrorManager._isInitialized$p)
  3018. $h.OutlookErrorManager._initialize$p();
  3019. return window["OSF"]["DDA"]["ErrorCodeManager"]["getErrorArgs"](errorCode)
  3020. };
  3021. $h.OutlookErrorManager._initialize$p=function()
  3022. {
  3023. $h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window["_u"]["ExtensibilityStrings"]["l_AttachmentExceededSize_Text"]);
  3024. $h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window["_u"]["ExtensibilityStrings"]["l_ExceededMaxNumberOfAttachments_Text"]);
  3025. $h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window["_u"]["ExtensibilityStrings"]["l_InternalFormatError_Text"]);
  3026. $h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentId_Text"]);
  3027. $h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentPath_Text"]);
  3028. $h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window["_u"]["ExtensibilityStrings"]["l_CannotAddAttachmentBeforeUpgrade_Text"]);
  3029. $h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeletedBeforeUploadCompletes_Text"]);
  3030. $h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentUploadGeneralFailure_Text"]);
  3031. $h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window["_u"]["ExtensibilityStrings"]["l_DeleteAttachmentDoesNotExist_Text"]);
  3032. $h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeleteGeneralFailure_Text"]);
  3033. $h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window["_u"]["ExtensibilityStrings"]["l_InvalidEndTime_Text"]);
  3034. $h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window["_u"]["ExtensibilityStrings"]["l_HtmlSanitizationFailure_Text"]);
  3035. $h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window["_u"]["ExtensibilityStrings"]["l_NumberOfRecipientsExceeded_Text"],500));
  3036. $h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window["_u"]["ExtensibilityStrings"]["l_NoValidRecipientsProvided_Text"]);
  3037. $h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window["_u"]["ExtensibilityStrings"]["l_CursorPositionChanged_Text"]);
  3038. $h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window["_u"]["ExtensibilityStrings"]["l_InvalidSelection_Text"]);
  3039. $h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted","");
  3040. $h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError","");
  3041. $h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError","");
  3042. $h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError","");
  3043. $h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window["_u"]["ExtensibilityStrings"]["l_SaveError_Text"]);
  3044. $h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window["_u"]["ExtensibilityStrings"]["l_MessageInDifferentStoreError_Text"]);
  3045. $h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window["_u"]["ExtensibilityStrings"]["l_DuplicateNotificationKey_Text"]);
  3046. $h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window["_u"]["ExtensibilityStrings"]["l_NotificationKeyNotFound_Text"]);
  3047. $h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window["_u"]["ExtensibilityStrings"]["l_NumberOfNotificationsExceeded_Text"]);
  3048. $h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArrayReadError_Text"]);
  3049. $h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArraySaveError_Text"]);
  3050. $h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window["_u"]["ExtensibilityStrings"]["l_CannotPersistPropertyInUnsavedDraftError_Text"]);
  3051. $h.OutlookErrorManager._isInitialized$p=true
  3052. };
  3053. $h.OutlookErrorManager._addErrorMessage$p=function(errorCode, errorName, errorMessage)
  3054. {
  3055. window["OSF"]["DDA"]["ErrorCodeManager"]["addErrorMessage"](errorCode,{
  3056. name: errorName,
  3057. message: errorMessage
  3058. })
  3059. };
  3060. $h.OutlookErrorManager.OutlookErrorCodes=function(){};
  3061. $h.OutlookErrorManager.OsfDdaErrorCodes=function(){};
  3062. $h.PhoneNumber=function(data)
  3063. {
  3064. this.$$d__getPhoneType$p$0=Function.createDelegate(this,this._getPhoneType$p$0);
  3065. this.$$d__getOriginalPhoneString$p$0=Function.createDelegate(this,this._getOriginalPhoneString$p$0);
  3066. this.$$d__getPhoneString$p$0=Function.createDelegate(this,this._getPhoneString$p$0);
  3067. this._data$p$0=data;
  3068. $h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0);
  3069. $h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0);
  3070. $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0)
  3071. };
  3072. $h.PhoneNumber.prototype={
  3073. _data$p$0: null,
  3074. _getPhoneString$p$0: function()
  3075. {
  3076. return this._data$p$0["PhoneString"]
  3077. },
  3078. _getOriginalPhoneString$p$0: function()
  3079. {
  3080. return this._data$p$0["OriginalPhoneString"]
  3081. },
  3082. _getPhoneType$p$0: function()
  3083. {
  3084. return this._data$p$0["Type"]
  3085. }
  3086. };
  3087. $h.TaskSuggestion=function(data)
  3088. {
  3089. this.$$d__getAssignees$p$0=Function.createDelegate(this,this._getAssignees$p$0);
  3090. this.$$d__getTaskString$p$0=Function.createDelegate(this,this._getTaskString$p$0);
  3091. this._data$p$0=data;
  3092. $h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0);
  3093. $h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0)
  3094. };
  3095. $h.TaskSuggestion.prototype={
  3096. _data$p$0: null,
  3097. _assignees$p$0: null,
  3098. _getTaskString$p$0: function()
  3099. {
  3100. return this._data$p$0["TaskString"]
  3101. },
  3102. _getAssignees$p$0: function()
  3103. {
  3104. if(!this._assignees$p$0)
  3105. {
  3106. var $$t_1=this;
  3107. this._assignees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(data)
  3108. {
  3109. return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data)
  3110. })
  3111. }
  3112. return this._assignees$p$0
  3113. }
  3114. };
  3115. $h.UserProfile=function(data)
  3116. {
  3117. this.$$d__getUserProfileType$p$0=Function.createDelegate(this,this._getUserProfileType$p$0);
  3118. this.$$d__getTimeZone$p$0=Function.createDelegate(this,this._getTimeZone$p$0);
  3119. this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);
  3120. this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);
  3121. this._data$p$0=data;
  3122. $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);
  3123. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);
  3124. $h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0);
  3125. $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getUserProfileType$p$0)
  3126. };
  3127. $h.UserProfile.prototype={
  3128. _data$p$0: null,
  3129. _getUserProfileType$p$0: function()
  3130. {
  3131. return this._data$p$0.get__userProfileType$i$0()
  3132. },
  3133. _getDisplayName$p$0: function()
  3134. {
  3135. return this._data$p$0.get__userDisplayName$i$0()
  3136. },
  3137. _getEmailAddress$p$0: function()
  3138. {
  3139. return this._data$p$0.get__userEmailAddress$i$0()
  3140. },
  3141. _getTimeZone$p$0: function()
  3142. {
  3143. return this._data$p$0.get__userTimeZone$i$0()
  3144. }
  3145. };
  3146. $h.OutlookDispid=function(){};
  3147. $h.OutlookDispid.prototype={
  3148. owaOnlyMethod: 0,
  3149. getInitialData: 1,
  3150. getUserIdentityToken: 2,
  3151. loadCustomProperties: 3,
  3152. saveCustomProperties: 4,
  3153. ewsRequest: 5,
  3154. displayNewAppointmentForm: 7,
  3155. displayMessageForm: 8,
  3156. displayAppointmentForm: 9,
  3157. displayReplyForm: 10,
  3158. displayReplyAllForm: 11,
  3159. getCallbackToken: 12,
  3160. bodySetSelectedDataAsync: 13,
  3161. getBodyTypeAsync: 14,
  3162. getRecipientsAsync: 15,
  3163. addFileAttachmentAsync: 16,
  3164. setSubjectAsync: 17,
  3165. getSubjectAsync: 18,
  3166. addItemAttachmentAsync: 19,
  3167. removeAttachmentAsync: 20,
  3168. setRecipientsAsync: 21,
  3169. addRecipientsAsync: 22,
  3170. bodyPrependAsync: 23,
  3171. getTimeAsync: 24,
  3172. setTimeAsync: 25,
  3173. getLocationAsync: 26,
  3174. setLocationAsync: 27,
  3175. getSelectedDataAsync: 28,
  3176. setSelectedDataAsync: 29,
  3177. displayReplyFormWithAttachments: 30,
  3178. displayReplyAllFormWithAttachments: 31,
  3179. saveAsync: 32,
  3180. addNotficationMessageAsync: 33,
  3181. getAllNotficationMessagesAsync: 34,
  3182. replaceNotficationMessageAsync: 35,
  3183. removeNotficationMessageAsync: 36,
  3184. getBodyAsync: 37,
  3185. setBodyAsync: 38,
  3186. appCommands1: 39,
  3187. registerConsentAsync: 40,
  3188. close: 41,
  3189. closeApp: 42,
  3190. displayContactCardAsync: 43,
  3191. displayNewMessageForm: 44,
  3192. appCommands2: 94,
  3193. trackCtq: 400,
  3194. recordTrace: 401,
  3195. recordDataPoint: 402,
  3196. windowOpenOverrideHandler: 403,
  3197. saveSettingsRequest: 404
  3198. };
  3199. $h.OutlookDispid.registerEnum("$h.OutlookDispid",false);
  3200. $h.RequestState=function(){};
  3201. $h.RequestState.prototype={
  3202. unsent: 0,
  3203. opened: 1,
  3204. headersReceived: 2,
  3205. loading: 3,
  3206. done: 4
  3207. };
  3208. $h.RequestState.registerEnum("$h.RequestState",false);
  3209. $h.CommonParameters=function(options, callback, asyncContext)
  3210. {
  3211. this._options$p$0=options;
  3212. this._callback$p$0=callback;
  3213. this._asyncContext$p$0=asyncContext
  3214. };
  3215. $h.CommonParameters.parse=function(args, isCallbackRequired, tryLegacy)
  3216. {
  3217. var legacyParameters;
  3218. var $$t_8,
  3219. $$t_9;
  3220. if(tryLegacy && ($$t_9=$h.CommonParameters._tryParseLegacy$p(args,$$t_8={val: legacyParameters}),legacyParameters=$$t_8["val"],$$t_9))
  3221. return legacyParameters;
  3222. var argsLength=args.length;
  3223. var options=null;
  3224. var callback=null;
  3225. var asyncContext=null;
  3226. if(argsLength===1)
  3227. if(Function.isInstanceOfType(args[0]))
  3228. callback=args[0];
  3229. else if(Object.isInstanceOfType(args[0]))
  3230. options=args[0];
  3231. else
  3232. throw Error.argumentType();
  3233. else if(argsLength===2)
  3234. {
  3235. if(!Object.isInstanceOfType(args[0]))
  3236. throw Error.argument("options");
  3237. if(!Function.isInstanceOfType(args[1]))
  3238. throw Error.argument("callback");
  3239. options=args[0];
  3240. callback=args[1]
  3241. }
  3242. else if(argsLength)
  3243. throw Error.parameterCount(window["_u"]["ExtensibilityStrings"]["l_ParametersNotAsExpected_Text"]);
  3244. if(isCallbackRequired && !callback)
  3245. throw Error.argumentNull("callback");
  3246. if(options && !$h.ScriptHelpers.isNullOrUndefined(options["asyncContext"]))
  3247. asyncContext=options["asyncContext"];
  3248. return new $h.CommonParameters(options,callback,asyncContext)
  3249. };
  3250. $h.CommonParameters._tryParseLegacy$p=function(args, commonParameters)
  3251. {
  3252. commonParameters.val=null;
  3253. var argsLength=args.length;
  3254. var callback=null;
  3255. var userContext=null;
  3256. if(!argsLength || argsLength > 2)
  3257. return false;
  3258. if(!Function.isInstanceOfType(args[0]))
  3259. return false;
  3260. callback=args[0];
  3261. if(argsLength > 1)
  3262. userContext=args[1];
  3263. commonParameters.val=new $h.CommonParameters(null,callback,userContext);
  3264. return true
  3265. };
  3266. $h.CommonParameters.prototype={
  3267. _options$p$0: null,
  3268. _callback$p$0: null,
  3269. _asyncContext$p$0: null,
  3270. get_options: function()
  3271. {
  3272. return this._options$p$0
  3273. },
  3274. get_callback: function()
  3275. {
  3276. return this._callback$p$0
  3277. },
  3278. get_asyncContext: function()
  3279. {
  3280. return this._asyncContext$p$0
  3281. }
  3282. };
  3283. $h.EwsRequest=function(userContext)
  3284. {
  3285. $h.EwsRequest.initializeBase(this,[userContext])
  3286. };
  3287. $h.EwsRequest.prototype={
  3288. readyState: 1,
  3289. status: 0,
  3290. statusText: null,
  3291. onreadystatechange: null,
  3292. responseText: null,
  3293. get__statusCode$i$1: function()
  3294. {
  3295. return this.status
  3296. },
  3297. set__statusCode$i$1: function(value)
  3298. {
  3299. this.status=value;
  3300. return value
  3301. },
  3302. get__statusDescription$i$1: function()
  3303. {
  3304. return this.statusText
  3305. },
  3306. set__statusDescription$i$1: function(value)
  3307. {
  3308. this.statusText=value;
  3309. return value
  3310. },
  3311. get__requestState$i$1: function()
  3312. {
  3313. return this.readyState
  3314. },
  3315. set__requestState$i$1: function(value)
  3316. {
  3317. this.readyState=value;
  3318. return value
  3319. },
  3320. get_hasOnReadyStateChangeCallback: function()
  3321. {
  3322. return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)
  3323. },
  3324. get__response$i$1: function()
  3325. {
  3326. return this.responseText
  3327. },
  3328. set__response$i$1: function(value)
  3329. {
  3330. this.responseText=value;
  3331. return value
  3332. },
  3333. send: function(data)
  3334. {
  3335. this._checkSendConditions$i$1();
  3336. if($h.ScriptHelpers.isNullOrUndefined(data))
  3337. this._throwInvalidStateException$i$1();
  3338. this._sendRequest$i$0(5,"EwsRequest",{body: data})
  3339. },
  3340. _callOnReadyStateChangeCallback$i$1: function()
  3341. {
  3342. if(!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange))
  3343. this.onreadystatechange()
  3344. },
  3345. _parseExtraResponseData$i$1: function(response){},
  3346. executeExtraFailedResponseSteps: function(){}
  3347. };
  3348. $h.InitialData=function(data)
  3349. {
  3350. this._data$p$0=data;
  3351. this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()
  3352. };
  3353. $h.InitialData._defineReadOnlyProperty$i=function(o, methodName, getter)
  3354. {
  3355. var propertyDescriptor={
  3356. get: getter,
  3357. configurable: false
  3358. };
  3359. Object.defineProperty(o,methodName,propertyDescriptor)
  3360. };
  3361. $h.InitialData.prototype={
  3362. _toRecipients$p$0: null,
  3363. _ccRecipients$p$0: null,
  3364. _attachments$p$0: null,
  3365. _resources$p$0: null,
  3366. _entities$p$0: null,
  3367. _data$p$0: null,
  3368. _permissionLevel$p$0: 0,
  3369. get__isRestIdSupported$i$0: function()
  3370. {
  3371. return this._data$p$0["isRestIdSupported"]
  3372. },
  3373. get__itemId$i$0: function()
  3374. {
  3375. return this._data$p$0["id"]
  3376. },
  3377. get__itemClass$i$0: function()
  3378. {
  3379. return this._data$p$0["itemClass"]
  3380. },
  3381. get__dateTimeCreated$i$0: function()
  3382. {
  3383. return new Date(this._data$p$0["dateTimeCreated"])
  3384. },
  3385. get__dateTimeModified$i$0: function()
  3386. {
  3387. return new Date(this._data$p$0["dateTimeModified"])
  3388. },
  3389. get__dateTimeSent$i$0: function()
  3390. {
  3391. return new Date(this._data$p$0["dateTimeSent"])
  3392. },
  3393. get__subject$i$0: function()
  3394. {
  3395. this._throwOnRestrictedPermissionLevel$i$0();
  3396. return this._data$p$0["subject"]
  3397. },
  3398. get__normalizedSubject$i$0: function()
  3399. {
  3400. this._throwOnRestrictedPermissionLevel$i$0();
  3401. return this._data$p$0["normalizedSubject"]
  3402. },
  3403. get__internetMessageId$i$0: function()
  3404. {
  3405. return this._data$p$0["internetMessageId"]
  3406. },
  3407. get__conversationId$i$0: function()
  3408. {
  3409. return this._data$p$0["conversationId"]
  3410. },
  3411. get__sender$i$0: function()
  3412. {
  3413. this._throwOnRestrictedPermissionLevel$i$0();
  3414. var sender=this._data$p$0["sender"];
  3415. return $h.ScriptHelpers.isNullOrUndefined(sender) ? null : new $h.EmailAddressDetails(sender)
  3416. },
  3417. get__from$i$0: function()
  3418. {
  3419. this._throwOnRestrictedPermissionLevel$i$0();
  3420. var from=this._data$p$0["from"];
  3421. return $h.ScriptHelpers.isNullOrUndefined(from) ? null : new $h.EmailAddressDetails(from)
  3422. },
  3423. get__to$i$0: function()
  3424. {
  3425. this._throwOnRestrictedPermissionLevel$i$0();
  3426. if(null===this._toRecipients$p$0)
  3427. this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to");
  3428. return this._toRecipients$p$0
  3429. },
  3430. get__cc$i$0: function()
  3431. {
  3432. this._throwOnRestrictedPermissionLevel$i$0();
  3433. if(null===this._ccRecipients$p$0)
  3434. this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc");
  3435. return this._ccRecipients$p$0
  3436. },
  3437. get__attachments$i$0: function()
  3438. {
  3439. this._throwOnRestrictedPermissionLevel$i$0();
  3440. if(null===this._attachments$p$0)
  3441. this._attachments$p$0=this._createAttachmentDetails$p$0();
  3442. return this._attachments$p$0
  3443. },
  3444. get__ewsUrl$i$0: function()
  3445. {
  3446. return this._data$p$0["ewsUrl"]
  3447. },
  3448. get__marketplaceAssetId$i$0: function()
  3449. {
  3450. return this._data$p$0["marketplaceAssetId"]
  3451. },
  3452. get__extensionId$i$0: function()
  3453. {
  3454. return this._data$p$0["extensionId"]
  3455. },
  3456. get__marketplaceContentMarket$i$0: function()
  3457. {
  3458. return this._data$p$0["marketplaceContentMarket"]
  3459. },
  3460. get__consentMetadata$i$0: function()
  3461. {
  3462. return this._data$p$0["consentMetadata"]
  3463. },
  3464. get__isRead$i$0: function()
  3465. {
  3466. return this._data$p$0["isRead"]
  3467. },
  3468. get__endNodeUrl$i$0: function()
  3469. {
  3470. return this._data$p$0["endNodeUrl"]
  3471. },
  3472. get__entryPointUrl$i$0: function()
  3473. {
  3474. return this._data$p$0["entryPointUrl"]
  3475. },
  3476. get__start$i$0: function()
  3477. {
  3478. return new Date(this._data$p$0["start"])
  3479. },
  3480. get__end$i$0: function()
  3481. {
  3482. return new Date(this._data$p$0["end"])
  3483. },
  3484. get__location$i$0: function()
  3485. {
  3486. return this._data$p$0["location"]
  3487. },
  3488. get__userProfileType$i$0: function()
  3489. {
  3490. return this._data$p$0["userProfileType"]
  3491. },
  3492. get__resources$i$0: function()
  3493. {
  3494. this._throwOnRestrictedPermissionLevel$i$0();
  3495. if(null===this._resources$p$0)
  3496. this._resources$p$0=this._createEmailAddressDetails$p$0("resources");
  3497. return this._resources$p$0
  3498. },
  3499. get__organizer$i$0: function()
  3500. {
  3501. this._throwOnRestrictedPermissionLevel$i$0();
  3502. var organizer=this._data$p$0["organizer"];
  3503. return $h.ScriptHelpers.isNullOrUndefined(organizer) ? null : new $h.EmailAddressDetails(organizer)
  3504. },
  3505. get__userDisplayName$i$0: function()
  3506. {
  3507. return this._data$p$0["userDisplayName"]
  3508. },
  3509. get__userEmailAddress$i$0: function()
  3510. {
  3511. return this._data$p$0["userEmailAddress"]
  3512. },
  3513. get__userTimeZone$i$0: function()
  3514. {
  3515. return this._data$p$0["userTimeZone"]
  3516. },
  3517. get__timeZoneOffsets$i$0: function()
  3518. {
  3519. return this._data$p$0["timeZoneOffsets"]
  3520. },
  3521. get__hostVersion$i$0: function()
  3522. {
  3523. return this._data$p$0["hostVersion"]
  3524. },
  3525. get__owaView$i$0: function()
  3526. {
  3527. return this._data$p$0["owaView"]
  3528. },
  3529. get__overrideWindowOpen$i$0: function()
  3530. {
  3531. return this._data$p$0["overrideWindowOpen"]
  3532. },
  3533. _getEntities$i$0: function()
  3534. {
  3535. if(!this._entities$p$0)
  3536. 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);
  3537. return this._entities$p$0
  3538. },
  3539. _getEntitiesByType$i$0: function(entityType)
  3540. {
  3541. var entites=this._getEntities$i$0();
  3542. return entites._getByType$i$0(entityType)
  3543. },
  3544. _getFilteredEntitiesByName$i$0: function(name)
  3545. {
  3546. var entities=this._getEntities$i$0();
  3547. return entities._getFilteredEntitiesByName$i$0(name)
  3548. },
  3549. _getRegExMatches$i$0: function()
  3550. {
  3551. if(!this._data$p$0["regExMatches"])
  3552. return null;
  3553. return this._data$p$0["regExMatches"]
  3554. },
  3555. _getRegExMatchesByName$i$0: function(regexName)
  3556. {
  3557. var regexMatches=this._getRegExMatches$i$0();
  3558. if(!regexMatches || !regexMatches[regexName])
  3559. return null;
  3560. return regexMatches[regexName]
  3561. },
  3562. _throwOnRestrictedPermissionLevel$i$0: function()
  3563. {
  3564. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)
  3565. },
  3566. _createEmailAddressDetails$p$0: function(key)
  3567. {
  3568. var to=this._data$p$0[key];
  3569. if($h.ScriptHelpers.isNullOrUndefined(to))
  3570. return[];
  3571. var recipients=[];
  3572. for(var i=0; i < to["length"]; i++)
  3573. if(!$h.ScriptHelpers.isNullOrUndefined(to[i]))
  3574. recipients[i]=new $h.EmailAddressDetails(to[i]);
  3575. return recipients
  3576. },
  3577. _createAttachmentDetails$p$0: function()
  3578. {
  3579. var attachments=this._data$p$0["attachments"];
  3580. if($h.ScriptHelpers.isNullOrUndefined(attachments))
  3581. return[];
  3582. var attachmentDetails=[];
  3583. for(var i=0; i < attachments["length"]; i++)
  3584. if(!$h.ScriptHelpers.isNullOrUndefined(attachments[i]))
  3585. attachmentDetails[i]=new $h.AttachmentDetails(attachments[i]);
  3586. return attachmentDetails
  3587. },
  3588. _calculatePermissionLevel$p$0: function()
  3589. {
  3590. var HostReadItem=1;
  3591. var HostReadWriteMailbox=2;
  3592. var HostReadWriteItem=3;
  3593. var permissionLevelFromHost=this._data$p$0["permissionLevel"];
  3594. if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0))
  3595. return 0;
  3596. switch(permissionLevelFromHost)
  3597. {
  3598. case HostReadItem:
  3599. return 1;
  3600. case HostReadWriteItem:
  3601. return 2;
  3602. case HostReadWriteMailbox:
  3603. return 3;
  3604. default:
  3605. return 0
  3606. }
  3607. }
  3608. };
  3609. $h._loadDictionaryRequest=function(createResultObject, dictionaryName, callback, userContext)
  3610. {
  3611. $h._loadDictionaryRequest.initializeBase(this,[userContext]);
  3612. this._createResultObject$p$1=createResultObject;
  3613. this._dictionaryName$p$1=dictionaryName;
  3614. this._callback$p$1=callback
  3615. };
  3616. $h._loadDictionaryRequest.prototype={
  3617. _dictionaryName$p$1: null,
  3618. _createResultObject$p$1: null,
  3619. _callback$p$1: null,
  3620. handleResponse: function(response)
  3621. {
  3622. if(response["wasSuccessful"])
  3623. {
  3624. var value=response[this._dictionaryName$p$1];
  3625. var responseData=window["JSON"]["parse"](value);
  3626. this.createAsyncResult(this._createResultObject$p$1(responseData),0,0,null)
  3627. }
  3628. else
  3629. this.createAsyncResult(null,1,9020,response["errorMessage"]);
  3630. this._callback$p$1(this._asyncResult$p$0)
  3631. }
  3632. };
  3633. $h.ProxyRequestBase=function(userContext)
  3634. {
  3635. $h.ProxyRequestBase.initializeBase(this,[userContext])
  3636. };
  3637. $h.ProxyRequestBase.prototype={
  3638. handleResponse: function(response)
  3639. {
  3640. if(!response["wasProxySuccessful"])
  3641. {
  3642. this.set__statusCode$i$1(500);
  3643. this.set__statusDescription$i$1("Error");
  3644. var errorMessage=response["errorMessage"];
  3645. this.set__response$i$1(errorMessage);
  3646. this.createAsyncResult(null,1,9020,errorMessage)
  3647. }
  3648. else
  3649. {
  3650. this.set__statusCode$i$1(response["statusCode"]);
  3651. this.set__statusDescription$i$1(response["statusDescription"]);
  3652. this.set__response$i$1(response["body"]);
  3653. this.createAsyncResult(this.get__response$i$1(),0,0,null)
  3654. }
  3655. this._parseExtraResponseData$i$1(response);
  3656. this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1()
  3657. },
  3658. _throwInvalidStateException$i$1: function()
  3659. {
  3660. throw Error.create("DOMException",{
  3661. code: 11,
  3662. message: "INVALID_STATE_ERR"
  3663. });
  3664. },
  3665. _cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1: function()
  3666. {
  3667. var $$t_0=this;
  3668. this._changeReadyState$i$1(2,function()
  3669. {
  3670. $$t_0._changeReadyState$i$1(3,function()
  3671. {
  3672. $$t_0._changeReadyState$i$1(4,null)
  3673. })
  3674. })
  3675. },
  3676. _changeReadyState$i$1: function(state, nextStep)
  3677. {
  3678. this.set__requestState$i$1(state);
  3679. var $$t_2=this;
  3680. window.setTimeout(function()
  3681. {
  3682. try
  3683. {
  3684. $$t_2._callOnReadyStateChangeCallback$i$1()
  3685. }
  3686. finally
  3687. {
  3688. if(!$h.ScriptHelpers.isNullOrUndefined(nextStep))
  3689. nextStep()
  3690. }
  3691. },0)
  3692. },
  3693. _checkSendConditions$i$1: function()
  3694. {
  3695. if(this.get__requestState$i$1() !==1)
  3696. this._throwInvalidStateException$i$1();
  3697. if(this._isSent$p$0)
  3698. this._throwInvalidStateException$i$1()
  3699. }
  3700. };
  3701. $h.RequestBase=function(userContext)
  3702. {
  3703. this._userContext$p$0=userContext
  3704. };
  3705. $h.RequestBase.prototype={
  3706. _isSent$p$0: false,
  3707. _asyncResult$p$0: null,
  3708. _userContext$p$0: null,
  3709. get_asyncResult: function()
  3710. {
  3711. return this._asyncResult$p$0
  3712. },
  3713. _sendRequest$i$0: function(dispid, methodName, dataToSend)
  3714. {
  3715. this._isSent$p$0=true;
  3716. var $$t_5=this;
  3717. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(dispid,dataToSend,function(resultCode, response)
  3718. {
  3719. if(resultCode)
  3720. $$t_5.createAsyncResult(null,1,9017,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode));
  3721. else
  3722. $$t_5.handleResponse(response)
  3723. })
  3724. },
  3725. createAsyncResult: function(value, errorCode, detailedErrorCode, errorDescription)
  3726. {
  3727. this._asyncResult$p$0=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(value,errorCode,detailedErrorCode,this._userContext$p$0,errorDescription)
  3728. }
  3729. };
  3730. $h.SaveDictionaryRequest=function(callback, userContext)
  3731. {
  3732. $h.SaveDictionaryRequest.initializeBase(this,[userContext]);
  3733. if(!$h.ScriptHelpers.isNullOrUndefined(callback))
  3734. this._callback$p$1=callback
  3735. };
  3736. $h.SaveDictionaryRequest.prototype={
  3737. _callback$p$1: null,
  3738. handleResponse: function(response)
  3739. {
  3740. if(response["wasSuccessful"])
  3741. this.createAsyncResult(null,0,0,null);
  3742. else
  3743. this.createAsyncResult(null,1,9020,response["errorMessage"]);
  3744. if(!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1))
  3745. this._callback$p$1(this._asyncResult$p$0)
  3746. }
  3747. };
  3748. $h.ScriptHelpers=function(){};
  3749. $h.ScriptHelpers.isNull=function(value)
  3750. {
  3751. return null===value
  3752. };
  3753. $h.ScriptHelpers.isNullOrUndefined=function(value)
  3754. {
  3755. return $h.ScriptHelpers.isNull(value) || $h.ScriptHelpers.isUndefined(value)
  3756. };
  3757. $h.ScriptHelpers.isUndefined=function(value)
  3758. {
  3759. return value===undefined
  3760. };
  3761. $h.ScriptHelpers.dictionaryContainsKey=function(obj, keyName)
  3762. {
  3763. return Object.isInstanceOfType(obj) ? keyName in obj : false
  3764. };
  3765. $h.ScriptHelpers.isNonEmptyString=function(value)
  3766. {
  3767. if(!value)
  3768. return false;
  3769. return String.isInstanceOfType(value)
  3770. };
  3771. $h.ScriptHelpers.deepClone=function(obj)
  3772. {
  3773. return window["JSON"]["parse"](window["JSON"]["stringify"](obj))
  3774. };
  3775. window["OSF"]["DDA"]["OutlookAppOm"].registerClass("OSF.DDA.OutlookAppOm");
  3776. window["OSF"]["DDA"]["Settings"].registerClass("OSF.DDA.Settings");
  3777. $h.ItemBase.registerClass("$h.ItemBase");
  3778. $h.Item.registerClass("$h.Item",$h.ItemBase);
  3779. $h.Appointment.registerClass("$h.Appointment",$h.Item);
  3780. $h.ComposeItem.registerClass("$h.ComposeItem",$h.ItemBase);
  3781. $h.AppointmentCompose.registerClass("$h.AppointmentCompose",$h.ComposeItem);
  3782. $h.AttachmentConstants.registerClass("$h.AttachmentConstants");
  3783. $h.AttachmentDetails.registerClass("$h.AttachmentDetails");
  3784. $h.Body.registerClass("$h.Body");
  3785. $h.ComposeBody.registerClass("$h.ComposeBody",$h.Body);
  3786. $h.ComposeRecipient.registerClass("$h.ComposeRecipient");
  3787. $h.ComposeLocation.registerClass("$h.ComposeLocation");
  3788. $h.ComposeSubject.registerClass("$h.ComposeSubject");
  3789. $h.ComposeTime.registerClass("$h.ComposeTime");
  3790. $h.Contact.registerClass("$h.Contact");
  3791. $h.CustomProperties.registerClass("$h.CustomProperties");
  3792. $h.Diagnostics.registerClass("$h.Diagnostics");
  3793. $h.EmailAddressDetails.registerClass("$h.EmailAddressDetails");
  3794. $h.Entities.registerClass("$h.Entities");
  3795. $h.ReplyConstants.registerClass("$h.ReplyConstants");
  3796. $h.AsyncConstants.registerClass("$h.AsyncConstants");
  3797. window["Office"]["cast"]["item"].registerClass("Office.cast.item");
  3798. $h.Message.registerClass("$h.Message",$h.Item);
  3799. $h.MeetingRequest.registerClass("$h.MeetingRequest",$h.Message);
  3800. $h.MeetingSuggestion.registerClass("$h.MeetingSuggestion");
  3801. $h.MeetingSuggestionTimeDecoder.registerClass("$h.MeetingSuggestionTimeDecoder");
  3802. $h._extractedDate.registerClass("$h._extractedDate");
  3803. $h._preciseDate.registerClass("$h._preciseDate",$h._extractedDate);
  3804. $h._relativeDate.registerClass("$h._relativeDate",$h._extractedDate);
  3805. $h.MessageCompose.registerClass("$h.MessageCompose",$h.ComposeItem);
  3806. $h.NotificationMessages.registerClass("$h.NotificationMessages");
  3807. $h.OutlookErrorManager.registerClass("$h.OutlookErrorManager");
  3808. $h.OutlookErrorManager.OutlookErrorCodes.registerClass("$h.OutlookErrorManager.OutlookErrorCodes");
  3809. $h.OutlookErrorManager.OsfDdaErrorCodes.registerClass("$h.OutlookErrorManager.OsfDdaErrorCodes");
  3810. $h.PhoneNumber.registerClass("$h.PhoneNumber");
  3811. $h.TaskSuggestion.registerClass("$h.TaskSuggestion");
  3812. $h.UserProfile.registerClass("$h.UserProfile");
  3813. $h.CommonParameters.registerClass("$h.CommonParameters");
  3814. $h.RequestBase.registerClass("$h.RequestBase");
  3815. $h.ProxyRequestBase.registerClass("$h.ProxyRequestBase",$h.RequestBase);
  3816. $h.EwsRequest.registerClass("$h.EwsRequest",$h.ProxyRequestBase);
  3817. $h.InitialData.registerClass("$h.InitialData");
  3818. $h._loadDictionaryRequest.registerClass("$h._loadDictionaryRequest",$h.RequestBase);
  3819. $h.SaveDictionaryRequest.registerClass("$h.SaveDictionaryRequest",$h.RequestBase);
  3820. $h.ScriptHelpers.registerClass("$h.ScriptHelpers");
  3821. window["OSF"]["DDA"]["OutlookAppOm"].asyncMethodTimeoutKeyName="__timeout__";
  3822. window["OSF"]["DDA"]["OutlookAppOm"].ewsIdOrEmailParamName="ewsIdOrEmail";
  3823. window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p=100;
  3824. window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p=255;
  3825. window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength=32768;
  3826. window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p=255;
  3827. window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p=1e6;
  3828. window["OSF"]["DDA"]["OutlookAppOm"].executeMethodName="ExecuteMethod";
  3829. window["OSF"]["DDA"]["OutlookAppOm"].getInitialDataMethodName="GetInitialData";
  3830. window["OSF"]["DDA"]["OutlookAppOm"].itemIdParameterName="itemId";
  3831. window["OSF"]["DDA"]["OutlookAppOm"].restVersionParameterName="restVersion";
  3832. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=null;
  3833. $h.AttachmentConstants.maxAttachmentNameLength=255;
  3834. $h.AttachmentConstants.maxUrlLength=2048;
  3835. $h.AttachmentConstants.maxItemIdLength=200;
  3836. $h.AttachmentConstants.maxRemoveIdLength=200;
  3837. $h.AttachmentConstants.attachmentParameterName="attachments";
  3838. $h.AttachmentConstants.attachmentTypeParameterName="type";
  3839. $h.AttachmentConstants.attachmentUrlParameterName="url";
  3840. $h.AttachmentConstants.attachmentItemIdParameterName="itemId";
  3841. $h.AttachmentConstants.attachmentNameParameterName="name";
  3842. $h.AttachmentConstants.attachmentTypeFileName="file";
  3843. $h.AttachmentConstants.attachmentTypeItemName="item";
  3844. $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"]];
  3845. $h.Body.coercionTypeParameterName="coercionType";
  3846. $h.ComposeRecipient.displayNameLengthLimit=255;
  3847. $h.ComposeRecipient.maxSmtpLength=571;
  3848. $h.ComposeRecipient.recipientsLimit=100;
  3849. $h.ComposeRecipient.totalRecipientsLimit=500;
  3850. $h.ComposeRecipient.addressParameterName="address";
  3851. $h.ComposeRecipient.nameParameterName="name";
  3852. $h.ComposeLocation.locationKey="location";
  3853. $h.ComposeLocation.maximumLocationLength=255;
  3854. $h.ComposeSubject.maximumSubjectLength=255;
  3855. $h.ComposeTime.timeTypeName="TimeProperty";
  3856. $h.ComposeTime.timeDataName="time";
  3857. $h.Diagnostics.outlookAppName="Outlook";
  3858. $h.Diagnostics.outlookWebAppName="OutlookWebApp";
  3859. $h.EmailAddressDetails._emptyString$p="";
  3860. $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"]];
  3861. $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"]];
  3862. $h.Entities._allEntityKeys$p=["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"];
  3863. $h.ReplyConstants.htmlBodyKeyName="htmlBody";
  3864. $h.AsyncConstants.optionsKeyName="options";
  3865. $h.AsyncConstants.callbackKeyName="callback";
  3866. $h.AsyncConstants.asyncResultKeyName="asyncResult";
  3867. $h.MeetingSuggestionTimeDecoder._baseDate$p=new Date("0001-01-01T00:00:00Z");
  3868. $h.NotificationMessages.maximumKeyLength=32;
  3869. $h.NotificationMessages.maximumIconLength=32;
  3870. $h.NotificationMessages.maximumMessageLength=150;
  3871. $h.NotificationMessages.notificationsKeyParameterName="key";
  3872. $h.NotificationMessages.notificationsTypeParameterName="type";
  3873. $h.NotificationMessages.notificationsIconParameterName="icon";
  3874. $h.NotificationMessages.notificationsMessageParameterName="message";
  3875. $h.NotificationMessages.notificationsPersistentParameterName="persistent";
  3876. $h.OutlookErrorManager.errorNameKey="name";
  3877. $h.OutlookErrorManager.errorMessageKey="message";
  3878. $h.OutlookErrorManager._isInitialized$p=false;
  3879. $h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded=9e3;
  3880. $h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded=9001;
  3881. $h.OutlookErrorManager.OutlookErrorCodes.internalFormatError=9002;
  3882. $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId=9003;
  3883. $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath=9004;
  3884. $h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade=9005;
  3885. $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes=9006;
  3886. $h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure=9007;
  3887. $h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist=9008;
  3888. $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure=9009;
  3889. $h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime=9010;
  3890. $h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure=9011;
  3891. $h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded=9012;
  3892. $h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided=9013;
  3893. $h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged=9014;
  3894. $h.OutlookErrorManager.OutlookErrorCodes.invalidSelection=9016;
  3895. $h.OutlookErrorManager.OutlookErrorCodes.accessRestricted=9017;
  3896. $h.OutlookErrorManager.OutlookErrorCodes.genericTokenError=9018;
  3897. $h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError=9019;
  3898. $h.OutlookErrorManager.OutlookErrorCodes.genericResponseError=9020;
  3899. $h.OutlookErrorManager.OutlookErrorCodes.saveError=9021;
  3900. $h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError=9022;
  3901. $h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey=9023;
  3902. $h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound=9024;
  3903. $h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded=9025;
  3904. $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError=9026;
  3905. $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError=9027;
  3906. $h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError=9028;
  3907. $h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat=2006;
  3908. $h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported=1e3;
  3909. $h.CommonParameters.asyncContextKeyName="asyncContext";
  3910. $h.InitialData.userProfileTypeKey="userProfileType";
  3911. $h.ScriptHelpers.emptyString="";
  3912. OSF.ClientMode={
  3913. ReadWrite: 0,
  3914. ReadOnly: 1
  3915. }
  3916. OSF.DDA.RichInitializationReason={
  3917. 1: Microsoft.Office.WebExtension.InitializationReason.Inserted,
  3918. 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened
  3919. };
  3920. Microsoft.Office.WebExtension.FileType={
  3921. Text: "text",
  3922. Compressed: "compressed"
  3923. };
  3924. OSF.DDA.RichClientSettingsManager={
  3925. read: function OSF_DDA_RichClientSettingsManager$Read(onCalling, onReceiving) {
  3926. var keys=[];
  3927. var values=[];
  3928. if (onCalling) {
  3929. onCalling();
  3930. }
  3931. window.external.GetContext().GetSettings().Read(keys, values);
  3932. if (onReceiving) {
  3933. onReceiving();
  3934. }
  3935. var serializedSettings={};
  3936. for (var index=0; index < keys.length; index++) {
  3937. serializedSettings[keys[index]]=values[index];
  3938. }
  3939. return serializedSettings;
  3940. },
  3941. write: function OSF_DDA_RichClientSettingsManager$Write(serializedSettings, overwriteIfStale, onCalling, onReceiving) {
  3942. var keys=[];
  3943. var values=[];
  3944. for (var key in serializedSettings) {
  3945. keys.push(key);
  3946. values.push(serializedSettings[key]);
  3947. }
  3948. if (onCalling) {
  3949. onCalling();
  3950. }
  3951. window.external.GetContext().GetSettings().Write(keys, values);
  3952. if (onReceiving) {
  3953. onReceiving();
  3954. }
  3955. }
  3956. };
  3957. OSF.DDA.DispIdHost.getRichClientDelegateMethods=function (actionId) {
  3958. var delegateMethods={};
  3959. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync;
  3960. delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync;
  3961. delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync;
  3962. delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.MessageParent;
  3963. function getSettingsExecuteMethod(hostDelegateMethod) {
  3964. return function (args) {
  3965. var status, response;
  3966. try {
  3967. response=hostDelegateMethod(args.hostCallArgs, args.onCalling, args.onReceiving);
  3968. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;
  3969. } catch (ex) {
  3970. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  3971. response={ name : Strings.OfficeOM.L_InternalError, message : ex };
  3972. }
  3973. if (args.onComplete) {
  3974. args.onComplete(status, response);
  3975. }
  3976. };
  3977. }
  3978. function readSerializedSettings(hostCallArgs, onCalling, onReceiving) {
  3979. return OSF.DDA.RichClientSettingsManager.read(onCalling, onReceiving);
  3980. }
  3981. function writeSerializedSettings(hostCallArgs, onCalling, onReceiving) {
  3982. return OSF.DDA.RichClientSettingsManager.write(
  3983. hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings],
  3984. hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],
  3985. onCalling,
  3986. onReceiving
  3987. );
  3988. }
  3989. switch (actionId) {
  3990. case OSF.DDA.AsyncMethodNames.RefreshAsync.id:
  3991. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=getSettingsExecuteMethod(readSerializedSettings);
  3992. break;
  3993. case OSF.DDA.AsyncMethodNames.SaveAsync.id:
  3994. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=getSettingsExecuteMethod(writeSerializedSettings);
  3995. break;
  3996. default:
  3997. break;
  3998. }
  3999. return delegateMethods;
  4000. }
  4001. OSF.DDA.DispIdHost.getClientDelegateMethods=function (actionId) {
  4002. var delegateMethods={};
  4003. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync;
  4004. delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync;
  4005. delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync;
  4006. delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.MessageParent;
  4007. if (OSF.DDA.AsyncMethodNames.RefreshAsync && actionId==OSF.DDA.AsyncMethodNames.RefreshAsync.id) {
  4008. var readSerializedSettings=function (hostCallArgs, onCalling, onReceiving) {
  4009. return OSF.DDA.ClientSettingsManager.read(onCalling, onReceiving);
  4010. };
  4011. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings);
  4012. }
  4013. if (OSF.DDA.AsyncMethodNames.SaveAsync && actionId==OSF.DDA.AsyncMethodNames.SaveAsync.id) {
  4014. var writeSerializedSettings=function (hostCallArgs, onCalling, onReceiving) {
  4015. return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings], hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale], onCalling, onReceiving);
  4016. };
  4017. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings);
  4018. }
  4019. return delegateMethods;
  4020. }
  4021. OSF.DDA.File=function OSF_DDA_File(handle, fileSize, sliceSize) {
  4022. OSF.OUtil.defineEnumerableProperties(this, {
  4023. "size": {
  4024. value: fileSize
  4025. },
  4026. "sliceCount": {
  4027. value: Math.ceil(fileSize / sliceSize)
  4028. }
  4029. });
  4030. var privateState={};
  4031. privateState[OSF.DDA.FileProperties.Handle]=handle;
  4032. privateState[OSF.DDA.FileProperties.SliceSize]=sliceSize;
  4033. var am=OSF.DDA.AsyncMethodNames;
  4034. OSF.DDA.DispIdHost.addAsyncMethods(
  4035. this, [
  4036. am.GetDocumentCopyChunkAsync,
  4037. am.ReleaseDocumentCopyAsync
  4038. ],
  4039. privateState
  4040. );
  4041. }
  4042. OSF.DDA.FileSliceOffset="fileSliceoffset";
  4043. OSF.DDA.CustomXmlParts=function OSF_DDA_CustomXmlParts() {
  4044. this._eventDispatches=[];
  4045. var am=OSF.DDA.AsyncMethodNames;
  4046. OSF.DDA.DispIdHost.addAsyncMethods(this, [
  4047. am.AddDataPartAsync,
  4048. am.GetDataPartByIdAsync,
  4049. am.GetDataPartsByNameSpaceAsync
  4050. ]);
  4051. };
  4052. OSF.DDA.CustomXmlPart=function OSF_DDA_CustomXmlPart(customXmlParts, id, builtIn) {
  4053. OSF.OUtil.defineEnumerableProperties(this, {
  4054. "builtIn": {
  4055. value: builtIn
  4056. },
  4057. "id": {
  4058. value: id
  4059. },
  4060. "namespaceManager": {
  4061. value: new OSF.DDA.CustomXmlPrefixMappings(id)
  4062. }
  4063. });
  4064. var am=OSF.DDA.AsyncMethodNames;
  4065. OSF.DDA.DispIdHost.addAsyncMethods(this, [
  4066. am.DeleteDataPartAsync,
  4067. am.GetPartNodesAsync,
  4068. am.GetPartXmlAsync
  4069. ]);
  4070. var customXmlPartEventDispatches=customXmlParts._eventDispatches;
  4071. var dispatch=customXmlPartEventDispatches[id];
  4072. if (!dispatch) {
  4073. var et=Microsoft.Office.WebExtension.EventType;
  4074. dispatch=new OSF.EventDispatch([
  4075. et.DataNodeDeleted,
  4076. et.DataNodeInserted,
  4077. et.DataNodeReplaced
  4078. ]);
  4079. customXmlPartEventDispatches[id]=dispatch;
  4080. }
  4081. OSF.DDA.DispIdHost.addEventSupport(this, dispatch);
  4082. };
  4083. OSF.DDA.CustomXmlPrefixMappings=function OSF_DDA_CustomXmlPrefixMappings(partId) {
  4084. var am=OSF.DDA.AsyncMethodNames;
  4085. OSF.DDA.DispIdHost.addAsyncMethods(
  4086. this,
  4087. [
  4088. am.AddDataPartNamespaceAsync,
  4089. am.GetDataPartNamespaceAsync,
  4090. am.GetDataPartPrefixAsync
  4091. ],
  4092. partId
  4093. );
  4094. };
  4095. OSF.DDA.CustomXmlNode=function OSF_DDA_CustomXmlNode(handle, nodeType, ns, baseName) {
  4096. OSF.OUtil.defineEnumerableProperties(this, {
  4097. "baseName": {
  4098. value: baseName
  4099. },
  4100. "namespaceUri": {
  4101. value: ns
  4102. },
  4103. "nodeType": {
  4104. value: nodeType
  4105. }
  4106. });
  4107. var am=OSF.DDA.AsyncMethodNames;
  4108. OSF.DDA.DispIdHost.addAsyncMethods(
  4109. this,
  4110. [
  4111. am.GetRelativeNodesAsync,
  4112. am.GetNodeValueAsync,
  4113. am.GetNodeXmlAsync,
  4114. am.SetNodeValueAsync,
  4115. am.SetNodeXmlAsync,
  4116. am.GetNodeTextAsync,
  4117. am.SetNodeTextAsync
  4118. ],
  4119. handle
  4120. );
  4121. };
  4122. OSF.DDA.NodeInsertedEventArgs=function OSF_DDA_NodeInsertedEventArgs(newNode, inUndoRedo) {
  4123. OSF.OUtil.defineEnumerableProperties(this, {
  4124. "type": {
  4125. value: Microsoft.Office.WebExtension.EventType.DataNodeInserted
  4126. },
  4127. "newNode": {
  4128. value: newNode
  4129. },
  4130. "inUndoRedo": {
  4131. value: inUndoRedo
  4132. }
  4133. });
  4134. };
  4135. OSF.DDA.NodeReplacedEventArgs=function OSF_DDA_NodeReplacedEventArgs(oldNode, newNode, inUndoRedo) {
  4136. OSF.OUtil.defineEnumerableProperties(this, {
  4137. "type": {
  4138. value: Microsoft.Office.WebExtension.EventType.DataNodeReplaced
  4139. },
  4140. "oldNode": {
  4141. value: oldNode
  4142. },
  4143. "newNode": {
  4144. value: newNode
  4145. },
  4146. "inUndoRedo": {
  4147. value: inUndoRedo
  4148. }
  4149. });
  4150. };
  4151. OSF.DDA.NodeDeletedEventArgs=function OSF_DDA_NodeDeletedEventArgs(oldNode, oldNextSibling, inUndoRedo) {
  4152. OSF.OUtil.defineEnumerableProperties(this, {
  4153. "type": {
  4154. value: Microsoft.Office.WebExtension.EventType.DataNodeDeleted
  4155. },
  4156. "oldNode": {
  4157. value: oldNode
  4158. },
  4159. "oldNextSibling": {
  4160. value: oldNextSibling
  4161. },
  4162. "inUndoRedo": {
  4163. value: inUndoRedo
  4164. }
  4165. });
  4166. };
  4167. var OSFRichclient;
  4168. (function(OSFRichclient)
  4169. {
  4170. var RichClientHostController=function()
  4171. {
  4172. function RichClientHostController(){}
  4173. RichClientHostController.prototype.execute=function(id, params, callback)
  4174. {
  4175. window.external.Execute(id,params,callback)
  4176. };
  4177. RichClientHostController.prototype.registerEvent=function(id, targetId, handler, callback)
  4178. {
  4179. window.external.RegisterEvent(id,targetId,handler,callback)
  4180. };
  4181. RichClientHostController.prototype.unregisterEvent=function(id, targetId, callback)
  4182. {
  4183. window.external.UnregisterEvent(id,targetId,callback)
  4184. };
  4185. return RichClientHostController
  4186. }();
  4187. OSFRichclient.RichClientHostController=RichClientHostController
  4188. })(OSFRichclient || (OSFRichclient={}));
  4189. OSF.ClientHostController=new OSFRichclient.RichClientHostController;
  4190. var OfficeExt;
  4191. (function(OfficeExt)
  4192. {
  4193. (function(AppCommand)
  4194. {
  4195. var AppCommandManager=function()
  4196. {
  4197. function AppCommandManager()
  4198. {
  4199. var _this=this;
  4200. this._pseudoDocument=null;
  4201. this._eventDispatch=null;
  4202. this._processAppCommandInvocation=function(args)
  4203. {
  4204. var verifyResult=_this._verifyManifestCallback(args.callbackName);
  4205. if(verifyResult.errorCode !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  4206. {
  4207. _this._invokeAppCommandCompletedMethod(args.appCommandId,verifyResult.errorCode,"");
  4208. return
  4209. }
  4210. var eventObj=_this._constructEventObjectForCallback(args);
  4211. if(eventObj)
  4212. window.setTimeout(function()
  4213. {
  4214. verifyResult.callback(eventObj)
  4215. },0);
  4216. else
  4217. _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")
  4218. }
  4219. }
  4220. AppCommandManager.initializeOsfDda=function()
  4221. {
  4222. OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync"});
  4223. OSF.DDA.AsyncMethodCalls.define({
  4224. method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,
  4225. requiredArguments: [{
  4226. name: Microsoft.Office.WebExtension.Parameters.Id,
  4227. types: ["string"]
  4228. },{
  4229. name: Microsoft.Office.WebExtension.Parameters.Status,
  4230. types: ["number"]
  4231. },{
  4232. name: Microsoft.Office.WebExtension.Parameters.Data,
  4233. types: ["string"]
  4234. }]
  4235. });
  4236. OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked: "appCommandInvoked"});
  4237. OSF.OUtil.setNamespace("AppCommand",OSF.DDA);
  4238. OSF.DDA.AppCommand.AppCommandInvokedEventArgs=OfficeExt.AppCommand.AppCommandInvokedEventArgs
  4239. };
  4240. AppCommandManager.prototype.initializeAndChangeOnce=function(callback)
  4241. {
  4242. AppCommand.registerDdaFacade();
  4243. this._pseudoDocument={};
  4244. OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);
  4245. this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);
  4246. var onRegisterCompleted=function(result)
  4247. {
  4248. if(callback)
  4249. if(result.status=="succeeded")
  4250. callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);
  4251. else
  4252. callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)
  4253. };
  4254. OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch);
  4255. this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,onRegisterCompleted)
  4256. };
  4257. AppCommandManager.prototype._verifyManifestCallback=function(callbackName)
  4258. {
  4259. var defaultResult={
  4260. callback: null,
  4261. errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback
  4262. };
  4263. callbackName=callbackName.trim();
  4264. try
  4265. {
  4266. var callList=callbackName.split(".");
  4267. var parentObject=window;
  4268. for(var i=0; i < callList.length - 1; i++)
  4269. if(parentObject[callList[i]] && typeof parentObject[callList[i]]=="object")
  4270. parentObject=parentObject[callList[i]];
  4271. else
  4272. return defaultResult;
  4273. var callbackFunc=parentObject[callList[callList.length - 1]];
  4274. if(typeof callbackFunc !="function")
  4275. return defaultResult
  4276. }
  4277. catch(e)
  4278. {
  4279. return defaultResult
  4280. }
  4281. return{
  4282. callback: callbackFunc,
  4283. errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess
  4284. }
  4285. };
  4286. AppCommandManager.prototype._invokeAppCommandCompletedMethod=function(appCommandId, resultCode, data)
  4287. {
  4288. this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId,resultCode,data)
  4289. };
  4290. AppCommandManager.prototype._constructEventObjectForCallback=function(args)
  4291. {
  4292. var _this=this;
  4293. var eventObj=new AppCommandCallbackEventArgs;
  4294. try
  4295. {
  4296. var jsonData=JSON.parse(args.eventObjStr);
  4297. this._translateEventObjectInternal(jsonData,eventObj);
  4298. Object.defineProperty(eventObj,"completed",{
  4299. value: function()
  4300. {
  4301. var jsonString=JSON.stringify(eventObj);
  4302. _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,jsonString)
  4303. },
  4304. enumerable: true
  4305. })
  4306. }
  4307. catch(e)
  4308. {
  4309. eventObj=null
  4310. }
  4311. return eventObj
  4312. };
  4313. AppCommandManager.prototype._translateEventObjectInternal=function(input, output)
  4314. {
  4315. for(var key in input)
  4316. {
  4317. if(!input.hasOwnProperty(key))
  4318. continue;
  4319. var inputChild=input[key];
  4320. if(typeof inputChild=="object" && inputChild !=null)
  4321. {
  4322. OSF.OUtil.defineEnumerableProperty(output,key,{value: {}});
  4323. this._translateEventObjectInternal(inputChild,output[key])
  4324. }
  4325. else
  4326. Object.defineProperty(output,key,{
  4327. value: inputChild,
  4328. enumerable: true,
  4329. writable: true
  4330. })
  4331. }
  4332. };
  4333. AppCommandManager.prototype._constructObjectByTemplate=function(template, input)
  4334. {
  4335. var output={};
  4336. if(!template || !input)
  4337. return output;
  4338. for(var key in template)
  4339. if(template.hasOwnProperty(key))
  4340. {
  4341. output[key]=null;
  4342. if(input[key] !=null)
  4343. {
  4344. var templateChild=template[key];
  4345. var inputChild=input[key];
  4346. var inputChildType=typeof inputChild;
  4347. if(typeof templateChild=="object" && templateChild !=null)
  4348. output[key]=this._constructObjectByTemplate(templateChild,inputChild);
  4349. else if(inputChildType=="number" || inputChildType=="string" || inputChildType=="boolean")
  4350. output[key]=inputChild
  4351. }
  4352. }
  4353. return output
  4354. };
  4355. AppCommandManager.instance=function()
  4356. {
  4357. if(AppCommandManager._instance==null)
  4358. AppCommandManager._instance=new AppCommandManager;
  4359. return AppCommandManager._instance
  4360. };
  4361. AppCommandManager._instance=null;
  4362. return AppCommandManager
  4363. }();
  4364. AppCommand.AppCommandManager=AppCommandManager;
  4365. var AppCommandInvokedEventArgs=function()
  4366. {
  4367. function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr)
  4368. {
  4369. this.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked;
  4370. this.appCommandId=appCommandId;
  4371. this.callbackName=callbackName;
  4372. this.eventObjStr=eventObjStr
  4373. }
  4374. AppCommandInvokedEventArgs.create=function(eventProperties)
  4375. {
  4376. return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId],eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName],eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr])
  4377. };
  4378. return AppCommandInvokedEventArgs
  4379. }();
  4380. AppCommand.AppCommandInvokedEventArgs=AppCommandInvokedEventArgs;
  4381. var AppCommandCallbackEventArgs=function()
  4382. {
  4383. function AppCommandCallbackEventArgs(){}
  4384. return AppCommandCallbackEventArgs
  4385. }();
  4386. AppCommand.AppCommandCallbackEventArgs=AppCommandCallbackEventArgs;
  4387. AppCommand.AppCommandInvokedEventEnums={
  4388. AppCommandId: "appCommandId",
  4389. CallbackName: "callbackName",
  4390. EventObjStr: "eventObjStr"
  4391. }
  4392. })(OfficeExt.AppCommand || (OfficeExt.AppCommand={}));
  4393. var AppCommand=OfficeExt.AppCommand
  4394. })(OfficeExt || (OfficeExt={}));
  4395. OfficeExt.AppCommand.AppCommandManager.initializeOsfDda();
  4396. var OfficeExt;
  4397. (function(OfficeExt)
  4398. {
  4399. (function(AppCommand)
  4400. {
  4401. function registerDdaFacade()
  4402. {
  4403. if(OSF.DDA.SafeArray)
  4404. {
  4405. var parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap;
  4406. parameterMap.define({
  4407. type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod,
  4408. toHost: [{
  4409. name: Microsoft.Office.WebExtension.Parameters.Id,
  4410. value: 0
  4411. },{
  4412. name: Microsoft.Office.WebExtension.Parameters.Status,
  4413. value: 1
  4414. },{
  4415. name: Microsoft.Office.WebExtension.Parameters.Data,
  4416. value: 2
  4417. }]
  4418. });
  4419. parameterMap.define({
  4420. type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent,
  4421. fromHost: [{
  4422. name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent,
  4423. value: parameterMap.self
  4424. }],
  4425. isComplexType: true
  4426. });
  4427. parameterMap.define({
  4428. type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent,
  4429. fromHost: [{
  4430. name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId,
  4431. value: 0
  4432. },{
  4433. name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName,
  4434. value: 1
  4435. },{
  4436. name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr,
  4437. value: 2
  4438. }],
  4439. isComplexType: true
  4440. })
  4441. }
  4442. }
  4443. AppCommand.registerDdaFacade=registerDdaFacade
  4444. })(OfficeExt.AppCommand || (OfficeExt.AppCommand={}));
  4445. var AppCommand=OfficeExt.AppCommand
  4446. })(OfficeExt || (OfficeExt={}));
  4447. var OfficeJsClient_OutlookWin32;
  4448. (function(OfficeJsClient_OutlookWin32)
  4449. {
  4450. function prepareRightBeforeWebExtensionInitialize()
  4451. {
  4452. OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap));
  4453. var appCommandHandler=OfficeExt.AppCommand.AppCommandManager.instance();
  4454. appCommandHandler.initializeAndChangeOnce()
  4455. }
  4456. OfficeJsClient_OutlookWin32.prepareRightBeforeWebExtensionInitialize=prepareRightBeforeWebExtensionInitialize
  4457. })(OfficeJsClient_OutlookWin32 || (OfficeJsClient_OutlookWin32={}));
  4458. OSF.OUtil.setNamespace("SafeArray", OSF.DDA);
  4459. OSF.DDA.SafeArray.Response={
  4460. Status: 0,
  4461. Payload: 1
  4462. };
  4463. OSF.DDA.SafeArray.UniqueArguments={
  4464. Offset: "offset",
  4465. Run: "run",
  4466. BindingSpecificData: "bindingSpecificData",
  4467. MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}"
  4468. };
  4469. OSF.OUtil.setNamespace("Delegate", OSF.DDA.SafeArray);
  4470. OSF.DDA.SafeArray.Delegate.SpecialProcessor=function OSF_DDA_SafeArray_Delegate_SpecialProcessor() {
  4471. function _2DVBArrayToJaggedArray(vbArr) {
  4472. var ret;
  4473. try {
  4474. var rows=vbArr.ubound(1);
  4475. var cols=vbArr.ubound(2);
  4476. vbArr=vbArr.toArray();
  4477. if (rows==1 && cols==1) {
  4478. ret=[vbArr];
  4479. } else {
  4480. ret=[];
  4481. for (var row=0; row < rows; row++) {
  4482. var rowArr=[];
  4483. for (var col=0; col < cols; col++) {
  4484. var datum=vbArr[row * cols+col];
  4485. if (datum !=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) {
  4486. rowArr.push(datum);
  4487. }
  4488. }
  4489. if (rowArr.length > 0) {
  4490. ret.push(rowArr);
  4491. }
  4492. }
  4493. }
  4494. } catch (ex) {
  4495. }
  4496. return ret;
  4497. }
  4498. var complexTypes=[
  4499. OSF.DDA.PropertyDescriptors.FileProperties,
  4500. OSF.DDA.PropertyDescriptors.FileSliceProperties,
  4501. OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,
  4502. OSF.DDA.PropertyDescriptors.BindingProperties,
  4503. OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,
  4504. OSF.DDA.SafeArray.UniqueArguments.Offset,
  4505. OSF.DDA.SafeArray.UniqueArguments.Run,
  4506. OSF.DDA.PropertyDescriptors.Subset,
  4507. OSF.DDA.PropertyDescriptors.DataPartProperties,
  4508. OSF.DDA.PropertyDescriptors.DataNodeProperties,
  4509. OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,
  4510. OSF.DDA.EventDescriptors.DataNodeInsertedEvent,
  4511. OSF.DDA.EventDescriptors.DataNodeReplacedEvent,
  4512. OSF.DDA.EventDescriptors.DataNodeDeletedEvent,
  4513. OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,
  4514. OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,
  4515. OSF.DDA.EventDescriptors.ActiveViewChangedEvent,
  4516. OSF.DDA.EventDescriptors.AppCommandInvokedEvent,
  4517. OSF.DDA.DataNodeEventProperties.OldNode,
  4518. OSF.DDA.DataNodeEventProperties.NewNode,
  4519. OSF.DDA.DataNodeEventProperties.NextSiblingNode,
  4520. Microsoft.Office.Internal.Parameters.OfficeTheme,
  4521. Microsoft.Office.Internal.Parameters.DocumentTheme
  4522. ];
  4523. var dynamicTypes={};
  4524. dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]=(function () {
  4525. var tableRows=0;
  4526. var tableHeaders=1;
  4527. return {
  4528. toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) {
  4529. if (typeof data !="string" && data[OSF.DDA.TableDataProperties.TableRows] !==undefined) {
  4530. var tableData=[];
  4531. tableData[tableRows]=data[OSF.DDA.TableDataProperties.TableRows];
  4532. tableData[tableHeaders]=data[OSF.DDA.TableDataProperties.TableHeaders];
  4533. data=tableData;
  4534. }
  4535. return data;
  4536. },
  4537. fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) {
  4538. var ret;
  4539. if (hostArgs.toArray) {
  4540. var dimensions=hostArgs.dimensions();
  4541. if(dimensions===2) {
  4542. ret=_2DVBArrayToJaggedArray(hostArgs);
  4543. } else {
  4544. var array=hostArgs.toArray();
  4545. if(array.length===2 && ((array[0] !=null && array[0].toArray) || (array[1] !=null && array[1].toArray))) {
  4546. ret={};
  4547. ret[OSF.DDA.TableDataProperties.TableRows]=_2DVBArrayToJaggedArray(array[tableRows]);
  4548. ret[OSF.DDA.TableDataProperties.TableHeaders]=_2DVBArrayToJaggedArray(array[tableHeaders]);
  4549. } else {
  4550. ret=array;
  4551. }
  4552. }
  4553. } else {
  4554. ret=hostArgs;
  4555. }
  4556. return ret;
  4557. }
  4558. }
  4559. })();
  4560. OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes);
  4561. this.pack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$pack(param, arg) {
  4562. var value;
  4563. if (this.isDynamicType(param)) {
  4564. value=dynamicTypes[param].toHost(arg);
  4565. } else {
  4566. value=arg;
  4567. }
  4568. return value;
  4569. };
  4570. this.unpack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) {
  4571. var value;
  4572. if (this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) {
  4573. try {
  4574. value=arg.toArray();
  4575. } catch (ex) {
  4576. value=arg || {};
  4577. }
  4578. } else if (this.isDynamicType(param)) {
  4579. value=dynamicTypes[param].fromHost(arg);
  4580. } else {
  4581. value=arg;
  4582. }
  4583. return value;
  4584. };
  4585. this.dynamicTypes=dynamicTypes;
  4586. }
  4587. OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor);
  4588. OSF.DDA.SafeArray.Delegate.ParameterMap=(function () {
  4589. var parameterMap=new OSF.DDA.HostParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor());
  4590. var ns;
  4591. var self=parameterMap.self;
  4592. function createObject(properties) {
  4593. var obj=null;
  4594. if (properties) {
  4595. obj={};
  4596. var len=properties.length;
  4597. for (var i=0; i < len; i++) {
  4598. obj[properties[i].name]=properties[i].value;
  4599. }
  4600. }
  4601. return obj;
  4602. }
  4603. function define(definition) {
  4604. var args={};
  4605. var toHost=createObject(definition.toHost);
  4606. if (definition.invertible) {
  4607. args.map=toHost;
  4608. }
  4609. else if (definition.canonical) {
  4610. args.toHost=args.fromHost=toHost;
  4611. }
  4612. else {
  4613. args.toHost=toHost;
  4614. args.fromHost=createObject(definition.fromHost);
  4615. }
  4616. parameterMap.setMapping(definition.type, args);
  4617. }
  4618. ns=OSF.DDA.FileProperties;
  4619. define({
  4620. type: OSF.DDA.PropertyDescriptors.FileProperties,
  4621. fromHost: [
  4622. { name: ns.Handle, value: 0 },
  4623. { name: ns.FileSize, value: 1 }
  4624. ]
  4625. });
  4626. define({
  4627. type: OSF.DDA.PropertyDescriptors.FileSliceProperties,
  4628. fromHost: [
  4629. { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 },
  4630. { name: ns.SliceSize, value: 1}
  4631. ]
  4632. });
  4633. ns=OSF.DDA.FilePropertiesDescriptor;
  4634. define({
  4635. type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,
  4636. fromHost: [
  4637. { name: ns.Url, value: 0 }
  4638. ]
  4639. });
  4640. ns=OSF.DDA.BindingProperties;
  4641. define({
  4642. type: OSF.DDA.PropertyDescriptors.BindingProperties,
  4643. fromHost: [
  4644. { name: ns.Id, value: 0 },
  4645. { name: ns.Type, value: 1 },
  4646. { name: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, value: 2 }
  4647. ]
  4648. });
  4649. define({
  4650. type: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,
  4651. fromHost: [
  4652. { name: ns.RowCount, value: 0 },
  4653. { name: ns.ColumnCount, value: 1 },
  4654. { name: ns.HasHeaders, value: 2 }
  4655. ]
  4656. });
  4657. ns=OSF.DDA.SafeArray.UniqueArguments;
  4658. define({
  4659. type: OSF.DDA.PropertyDescriptors.Subset,
  4660. toHost: [
  4661. { name: ns.Offset, value: 0 },
  4662. { name: ns.Run, value: 1 }
  4663. ],
  4664. canonical: true
  4665. });
  4666. ns=Microsoft.Office.WebExtension.Parameters;
  4667. define({
  4668. type: OSF.DDA.SafeArray.UniqueArguments.Offset,
  4669. toHost: [
  4670. { name: ns.StartRow, value: 0 },
  4671. { name: ns.StartColumn, value: 1 }
  4672. ],
  4673. canonical: true
  4674. });
  4675. define({
  4676. type: OSF.DDA.SafeArray.UniqueArguments.Run,
  4677. toHost: [
  4678. { name: ns.RowCount, value: 0 },
  4679. { name: ns.ColumnCount, value: 1 }
  4680. ],
  4681. canonical: true
  4682. });
  4683. ns=OSF.DDA.DataPartProperties;
  4684. define({
  4685. type: OSF.DDA.PropertyDescriptors.DataPartProperties,
  4686. fromHost: [
  4687. { name: ns.Id, value: 0 },
  4688. { name: ns.BuiltIn, value: 1 }
  4689. ]
  4690. });
  4691. ns=OSF.DDA.DataNodeProperties;
  4692. define({
  4693. type: OSF.DDA.PropertyDescriptors.DataNodeProperties,
  4694. fromHost: [
  4695. { name: ns.Handle, value: 0 },
  4696. { name: ns.BaseName, value: 1 },
  4697. { name: ns.NamespaceUri, value: 2 },
  4698. { name: ns.NodeType, value: 3 }
  4699. ]
  4700. });
  4701. define({
  4702. type: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,
  4703. fromHost: [
  4704. { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: 0 },
  4705. { name: OSF.DDA.PropertyDescriptors.Subset, value: 1 }
  4706. ]
  4707. });
  4708. define({
  4709. type: OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,
  4710. fromHost: [
  4711. { name: Microsoft.Office.Internal.Parameters.DocumentTheme, value: self}
  4712. ]
  4713. })
  4714. define({
  4715. type: OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,
  4716. fromHost: [
  4717. { name: Microsoft.Office.Internal.Parameters.OfficeTheme, value: self}
  4718. ]
  4719. })
  4720. define({
  4721. type: OSF.DDA.EventDescriptors.ActiveViewChangedEvent,
  4722. fromHost: [
  4723. { name: Microsoft.Office.WebExtension.Parameters.ActiveView, value: 0}
  4724. ]
  4725. })
  4726. ns=OSF.DDA.DataNodeEventProperties;
  4727. define({
  4728. type: OSF.DDA.EventDescriptors.DataNodeInsertedEvent,
  4729. fromHost: [
  4730. { name: ns.InUndoRedo, value: 0 },
  4731. { name: ns.NewNode, value: 1 }
  4732. ]
  4733. });
  4734. define({
  4735. type: OSF.DDA.EventDescriptors.DataNodeReplacedEvent,
  4736. fromHost: [
  4737. { name: ns.InUndoRedo, value: 0 },
  4738. { name: ns.OldNode, value: 1 },
  4739. { name: ns.NewNode, value: 2 }
  4740. ]
  4741. });
  4742. define({
  4743. type: OSF.DDA.EventDescriptors.DataNodeDeletedEvent,
  4744. fromHost: [
  4745. { name: ns.InUndoRedo, value: 0 },
  4746. { name: ns.OldNode, value: 1 },
  4747. { name: ns.NextSiblingNode, value: 2 }
  4748. ]
  4749. });
  4750. define({
  4751. type: ns.OldNode,
  4752. fromHost: [
  4753. { name: OSF.DDA.PropertyDescriptors.DataNodeProperties, value: self }
  4754. ]
  4755. });
  4756. define({
  4757. type: ns.NewNode,
  4758. fromHost: [
  4759. { name: OSF.DDA.PropertyDescriptors.DataNodeProperties, value: self }
  4760. ]
  4761. });
  4762. define({
  4763. type: ns.NextSiblingNode,
  4764. fromHost: [
  4765. { name: OSF.DDA.PropertyDescriptors.DataNodeProperties, value: self }
  4766. ]
  4767. });
  4768. ns=Microsoft.Office.WebExtension.AsyncResultStatus;
  4769. define({
  4770. type: OSF.DDA.PropertyDescriptors.AsyncResultStatus,
  4771. fromHost: [
  4772. { name: ns.Succeeded, value: 0 },
  4773. { name: ns.Failed, value: 1 }
  4774. ]
  4775. });
  4776. ns=Microsoft.Office.WebExtension.CoercionType;
  4777. define({
  4778. type: Microsoft.Office.WebExtension.Parameters.CoercionType,
  4779. toHost: [
  4780. { name: ns.Text, value: 0 },
  4781. { name: ns.Matrix, value: 1 },
  4782. { name: ns.Table, value: 2 },
  4783. { name: ns.Html, value: 3 },
  4784. { name: ns.Ooxml, value: 4 },
  4785. { name: ns.SlideRange, value:7 },
  4786. { name: ns.Image, value:8 }
  4787. ]
  4788. });
  4789. ns=Microsoft.Office.WebExtension.GoToType;
  4790. define({
  4791. type: Microsoft.Office.WebExtension.Parameters.GoToType,
  4792. toHost: [
  4793. { name: ns.Binding, value: 0 },
  4794. { name: ns.NamedItem, value: 1 },
  4795. { name: ns.Slide, value: 2 },
  4796. { name: ns.Index, value: 3 }
  4797. ]
  4798. });
  4799. ns=Microsoft.Office.WebExtension.FileType;
  4800. if (ns) {
  4801. define({
  4802. type: Microsoft.Office.WebExtension.Parameters.FileType,
  4803. toHost: [
  4804. { name: ns.Text, value: 0 },
  4805. { name: ns.Compressed, value: 5 },
  4806. { name: ns.Pdf, value: 6 }
  4807. ]
  4808. });
  4809. }
  4810. ns=Microsoft.Office.WebExtension.BindingType;
  4811. if (ns) {
  4812. define({
  4813. type: Microsoft.Office.WebExtension.Parameters.BindingType,
  4814. toHost: [
  4815. { name: ns.Text, value: 0 },
  4816. { name: ns.Matrix, value: 1 },
  4817. { name: ns.Table, value: 2 }
  4818. ],
  4819. invertible: true
  4820. });
  4821. }
  4822. ns=Microsoft.Office.WebExtension.ValueFormat;
  4823. define({
  4824. type: Microsoft.Office.WebExtension.Parameters.ValueFormat,
  4825. toHost: [
  4826. { name: ns.Unformatted, value: 0 },
  4827. { name: ns.Formatted, value: 1 }
  4828. ]
  4829. });
  4830. ns=Microsoft.Office.WebExtension.FilterType;
  4831. define({
  4832. type: Microsoft.Office.WebExtension.Parameters.FilterType,
  4833. toHost: [
  4834. { name: ns.All, value: 0 },
  4835. { name: ns.OnlyVisible, value: 1 }
  4836. ]
  4837. });
  4838. ns=Microsoft.Office.Internal.OfficeTheme;
  4839. if (ns) {
  4840. define({
  4841. type:Microsoft.Office.Internal.Parameters.OfficeTheme,
  4842. fromHost: [
  4843. {name: ns.PrimaryFontColor, value: 0},
  4844. {name: ns.PrimaryBackgroundColor, value: 1},
  4845. {name: ns.SecondaryFontColor, value:2},
  4846. {name: ns.SecondaryBackgroundColor, value:3}
  4847. ]
  4848. })
  4849. }
  4850. ns=Microsoft.Office.WebExtension.ActiveView;
  4851. if (ns) {
  4852. define({
  4853. type:Microsoft.Office.WebExtension.Parameters.ActiveView,
  4854. fromHost: [
  4855. {name: 0, value: ns.Read},
  4856. {name: 1, value: ns.Edit}
  4857. ]
  4858. })
  4859. }
  4860. ns=Microsoft.Office.Internal.DocumentTheme;
  4861. if (ns) {
  4862. define({
  4863. type:Microsoft.Office.Internal.Parameters.DocumentTheme,
  4864. fromHost: [
  4865. {name: ns.PrimaryBackgroundColor, value: 0},
  4866. {name: ns.PrimaryFontColor, value: 1},
  4867. {name: ns.SecondaryBackgroundColor, value: 2},
  4868. {name: ns.SecondaryFontColor, value: 3},
  4869. {name: ns.Accent1, value: 4},
  4870. {name: ns.Accent2, value: 5},
  4871. {name: ns.Accent3, value: 6},
  4872. {name: ns.Accent4, value: 7},
  4873. {name: ns.Accent5, value: 8},
  4874. {name: ns.Accent6, value: 9},
  4875. {name: ns.Hyperlink, value: 10},
  4876. {name: ns.FollowedHyperlink, value: 11},
  4877. {name: ns.HeaderLatinFont, value: 12},
  4878. {name: ns.HeaderEastAsianFont, value: 13},
  4879. {name: ns.HeaderScriptFont, value: 14},
  4880. {name: ns.HeaderLocalizedFont, value: 15},
  4881. {name: ns.BodyLatinFont, value: 16},
  4882. {name: ns.BodyEastAsianFont, value: 17},
  4883. {name: ns.BodyScriptFont, value: 18},
  4884. {name: ns.BodyLocalizedFont, value: 19}
  4885. ]
  4886. })
  4887. }
  4888. ns=Microsoft.Office.WebExtension.SelectionMode;
  4889. define({
  4890. type: Microsoft.Office.WebExtension.Parameters.SelectionMode,
  4891. toHost: [
  4892. { name: ns.Default, value: 0 },
  4893. { name: ns.Selected, value: 1 },
  4894. { name: ns.None, value: 2 },
  4895. ]
  4896. });
  4897. ns=Microsoft.Office.WebExtension.Parameters;
  4898. var cns=OSF.DDA.MethodDispId;
  4899. define({
  4900. type: cns.dispidNavigateToMethod,
  4901. toHost: [
  4902. { name: ns.Id, value: 0 },
  4903. { name: ns.GoToType, value: 1 },
  4904. { name: ns.SelectionMode, value: 2 }
  4905. ]
  4906. });
  4907. define({
  4908. type: cns.dispidGetSelectedDataMethod,
  4909. fromHost: [
  4910. { name: ns.Data, value: self }
  4911. ],
  4912. toHost: [
  4913. { name: ns.CoercionType, value: 0 },
  4914. { name: ns.ValueFormat, value: 1 },
  4915. { name: ns.FilterType, value: 2 }
  4916. ]
  4917. });
  4918. define({
  4919. type: cns.dispidSetSelectedDataMethod,
  4920. toHost: [
  4921. { name: ns.CoercionType, value: 0 },
  4922. { name: ns.Data, value: 1 },
  4923. { name: ns.ImageLeft, value: 2 },
  4924. { name: ns.ImageTop, value: 3 },
  4925. { name: ns.ImageWidth, value: 4 },
  4926. { name: ns.ImageHeight, value: 5 }
  4927. ]
  4928. });
  4929. define({
  4930. type: cns.dispidGetFilePropertiesMethod,
  4931. fromHost: [
  4932. { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: self }
  4933. ]
  4934. });
  4935. define({
  4936. type: cns.dispidGetDocumentCopyMethod,
  4937. toHost: [{ name: ns.FileType, value: 0}],
  4938. fromHost: [
  4939. { name: OSF.DDA.PropertyDescriptors.FileProperties, value: self }
  4940. ]
  4941. });
  4942. define({
  4943. type: cns.dispidGetDocumentCopyChunkMethod,
  4944. toHost: [
  4945. { name: OSF.DDA.FileProperties.Handle, value: 0 },
  4946. { name: OSF.DDA.FileSliceOffset, value: 1 },
  4947. { name: OSF.DDA.FileProperties.SliceSize, value: 2 }
  4948. ],
  4949. fromHost: [
  4950. { name: OSF.DDA.PropertyDescriptors.FileSliceProperties, value: self }
  4951. ]
  4952. });
  4953. define({
  4954. type: cns.dispidReleaseDocumentCopyMethod,
  4955. toHost: [{ name: OSF.DDA.FileProperties.Handle, value: 0}]
  4956. });
  4957. define({
  4958. type: cns.dispidAddBindingFromSelectionMethod,
  4959. fromHost: [
  4960. { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: self }
  4961. ],
  4962. toHost: [
  4963. { name: ns.Id, value: 0 },
  4964. { name: ns.BindingType, value: 1 }
  4965. ]
  4966. });
  4967. define({
  4968. type: cns.dispidAddBindingFromPromptMethod,
  4969. fromHost: [
  4970. { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: self }
  4971. ],
  4972. toHost: [
  4973. { name: ns.Id, value: 0 },
  4974. { name: ns.BindingType, value: 1 },
  4975. { name: ns.PromptText, value: 2 }
  4976. ]
  4977. });
  4978. define({
  4979. type: cns.dispidAddBindingFromNamedItemMethod,
  4980. fromHost: [
  4981. { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: self }
  4982. ],
  4983. toHost: [
  4984. { name: ns.ItemName, value: 0 },
  4985. { name: ns.Id, value: 1 },
  4986. { name: ns.BindingType, value: 2 },
  4987. { name: ns.FailOnCollision, value: 3 }
  4988. ]
  4989. });
  4990. define({
  4991. type: cns.dispidReleaseBindingMethod,
  4992. toHost: [
  4993. { name: ns.Id, value: 0 }
  4994. ]
  4995. });
  4996. define({
  4997. type: cns.dispidGetBindingMethod,
  4998. fromHost: [
  4999. { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: self }
  5000. ],
  5001. toHost: [
  5002. { name: ns.Id, value: 0 }
  5003. ]
  5004. });
  5005. define({
  5006. type: cns.dispidGetAllBindingsMethod,
  5007. fromHost: [
  5008. { name: OSF.DDA.ListDescriptors.BindingList, value: self }
  5009. ]
  5010. });
  5011. define({
  5012. type: cns.dispidGetBindingDataMethod,
  5013. fromHost: [
  5014. { name: ns.Data, value: self }
  5015. ],
  5016. toHost: [
  5017. { name: ns.Id, value: 0 },
  5018. { name: ns.CoercionType, value: 1 },
  5019. { name: ns.ValueFormat, value: 2 },
  5020. { name: ns.FilterType, value: 3 },
  5021. { name: OSF.DDA.PropertyDescriptors.Subset, value: 4 }
  5022. ]
  5023. });
  5024. define({
  5025. type: cns.dispidSetBindingDataMethod,
  5026. toHost: [
  5027. { name: ns.Id, value: 0 },
  5028. { name: ns.CoercionType, value: 1 },
  5029. { name: ns.Data, value: 2 },
  5030. { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 }
  5031. ]
  5032. });
  5033. define({
  5034. type: cns.dispidAddRowsMethod,
  5035. toHost: [
  5036. { name: ns.Id, value: 0 },
  5037. { name: ns.Data, value: 1 }
  5038. ]
  5039. });
  5040. define({
  5041. type: cns.dispidAddColumnsMethod,
  5042. toHost: [
  5043. { name: ns.Id, value: 0 },
  5044. { name: ns.Data, value: 1 }
  5045. ]
  5046. });
  5047. define({
  5048. type: cns.dispidClearAllRowsMethod,
  5049. toHost: [
  5050. { name: ns.Id, value: 0 }
  5051. ]
  5052. });
  5053. define({
  5054. type: cns.dispidClearFormatsMethod,
  5055. toHost: [
  5056. { name: ns.Id, value: 0 }
  5057. ]
  5058. });
  5059. define({
  5060. type: cns.dispidSetTableOptionsMethod,
  5061. toHost: [
  5062. { name: ns.Id, value: 0 },
  5063. { name: ns.TableOptions, value: 1 },
  5064. ]
  5065. });
  5066. define({
  5067. type: cns.dispidSetFormatsMethod,
  5068. toHost: [
  5069. { name: ns.Id, value: 0 },
  5070. { name: ns.CellFormat, value: 1 },
  5071. ]
  5072. });
  5073. define({
  5074. type: cns.dispidLoadSettingsMethod,
  5075. fromHost: [
  5076. { name: OSF.DDA.SettingsManager.SerializedSettings, value: self }
  5077. ]
  5078. });
  5079. define({
  5080. type: cns.dispidSaveSettingsMethod,
  5081. toHost: [
  5082. { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SettingsManager.SerializedSettings },
  5083. { name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale }
  5084. ]
  5085. });
  5086. define({
  5087. type: OSF.DDA.MethodDispId.dispidGetOfficeThemeMethod,
  5088. fromHost: [
  5089. { name: Microsoft.Office.Internal.Parameters.OfficeTheme, value: self }
  5090. ]
  5091. });
  5092. define({
  5093. type: OSF.DDA.MethodDispId.dispidGetDocumentThemeMethod,
  5094. fromHost: [
  5095. { name: Microsoft.Office.Internal.Parameters.DocumentTheme, value: self }
  5096. ]
  5097. });
  5098. define({
  5099. type: OSF.DDA.MethodDispId.dispidGetActiveViewMethod,
  5100. fromHost: [
  5101. { name: Microsoft.Office.WebExtension.Parameters.ActiveView, value: self }
  5102. ]
  5103. });
  5104. define({
  5105. type: cns.dispidAddDataPartMethod,
  5106. fromHost: [
  5107. { name: OSF.DDA.PropertyDescriptors.DataPartProperties, value: self }
  5108. ],
  5109. toHost: [
  5110. { name: ns.Xml, value: 0 }
  5111. ]
  5112. });
  5113. define({
  5114. type: cns.dispidGetDataPartByIdMethod,
  5115. fromHost: [
  5116. { name: OSF.DDA.PropertyDescriptors.DataPartProperties, value: self }
  5117. ],
  5118. toHost: [
  5119. { name: ns.Id, value: 0 }
  5120. ]
  5121. });
  5122. define({
  5123. type: cns.dispidGetDataPartsByNamespaceMethod,
  5124. fromHost: [
  5125. { name: OSF.DDA.ListDescriptors.DataPartList, value: self }
  5126. ],
  5127. toHost: [
  5128. { name: ns.Namespace, value: 0 }
  5129. ]
  5130. });
  5131. define({
  5132. type: cns.dispidGetDataPartXmlMethod,
  5133. fromHost: [
  5134. { name: ns.Data, value: self}
  5135. ],
  5136. toHost: [
  5137. { name: ns.Id, value: 0 }
  5138. ]
  5139. });
  5140. define({
  5141. type: cns.dispidGetDataPartNodesMethod,
  5142. fromHost: [
  5143. { name: OSF.DDA.ListDescriptors.DataNodeList, value: self }
  5144. ],
  5145. toHost: [
  5146. { name: ns.Id, value: 0 },
  5147. { name: ns.XPath, value: 1 }
  5148. ]
  5149. });
  5150. define({
  5151. type: cns.dispidDeleteDataPartMethod,
  5152. toHost: [
  5153. { name: ns.Id, value: 0 }
  5154. ]
  5155. });
  5156. define({
  5157. type: cns.dispidGetDataNodeValueMethod,
  5158. fromHost: [
  5159. { name: ns.Data, value: self}
  5160. ],
  5161. toHost: [
  5162. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 }
  5163. ]
  5164. });
  5165. define({
  5166. type: cns.dispidGetDataNodeXmlMethod,
  5167. fromHost: [
  5168. { name: ns.Data, value: self}
  5169. ],
  5170. toHost: [
  5171. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 }
  5172. ]
  5173. });
  5174. define({
  5175. type: cns.dispidGetDataNodesMethod,
  5176. fromHost: [
  5177. { name: OSF.DDA.ListDescriptors.DataNodeList, value: self }
  5178. ],
  5179. toHost: [
  5180. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 },
  5181. { name: ns.XPath, value: 1 }
  5182. ]
  5183. });
  5184. define({
  5185. type: cns.dispidSetDataNodeValueMethod,
  5186. toHost: [
  5187. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 },
  5188. { name: ns.Data, value: 1 }
  5189. ]
  5190. });
  5191. define({
  5192. type: cns.dispidSetDataNodeXmlMethod,
  5193. toHost: [
  5194. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 },
  5195. { name: ns.Xml, value: 1 }
  5196. ]
  5197. });
  5198. define({
  5199. type: cns.dispidAddDataNamespaceMethod,
  5200. toHost: [
  5201. { name: OSF.DDA.DataPartProperties.Id, value: 0 },
  5202. { name: ns.Prefix, value: 1 },
  5203. { name: ns.Namespace, value: 2 }
  5204. ]
  5205. });
  5206. define({
  5207. type: cns.dispidGetDataUriByPrefixMethod,
  5208. fromHost: [
  5209. { name: ns.Data, value: self}
  5210. ],
  5211. toHost: [
  5212. { name: OSF.DDA.DataPartProperties.Id, value: 0 },
  5213. { name: ns.Prefix, value: 1 }
  5214. ]
  5215. });
  5216. define({
  5217. type: cns.dispidGetDataPrefixByUriMethod,
  5218. fromHost: [
  5219. { name: ns.Data, value: self}
  5220. ],
  5221. toHost: [
  5222. { name: OSF.DDA.DataPartProperties.Id, value: 0 },
  5223. { name: ns.Namespace, value: 1 }
  5224. ]
  5225. });
  5226. define({
  5227. type: cns.dispidGetDataNodeTextMethod,
  5228. fromHost: [
  5229. { name: ns.Data, value: self}
  5230. ],
  5231. toHost: [
  5232. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 }
  5233. ]
  5234. });
  5235. define({
  5236. type: cns.dispidSetDataNodeTextMethod,
  5237. toHost: [
  5238. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 },
  5239. { name: ns.Text, value: 1 }
  5240. ]
  5241. });
  5242. define({
  5243. type: cns.dispidGetSelectedTaskMethod,
  5244. fromHost: [
  5245. { name: ns.TaskId, value: self }
  5246. ]
  5247. });
  5248. define({
  5249. type: cns.dispidGetTaskMethod,
  5250. fromHost: [
  5251. { name: "taskName", value: 0 },
  5252. { name: "wssTaskId", value: 1 },
  5253. { name: "resourceNames", value: 2 }
  5254. ],
  5255. toHost: [
  5256. { name: ns.TaskId, value: 0 }
  5257. ]
  5258. });
  5259. define({
  5260. type: cns.dispidGetTaskFieldMethod,
  5261. fromHost: [
  5262. { name: ns.FieldValue, value: self }
  5263. ],
  5264. toHost: [
  5265. { name: ns.TaskId, value: 0 },
  5266. { name: ns.FieldId, value: 1 },
  5267. { name: ns.GetRawValue, value: 2 }
  5268. ]
  5269. });
  5270. define({
  5271. type: cns.dispidGetWSSUrlMethod,
  5272. fromHost: [
  5273. { name: ns.ServerUrl, value: 0 },
  5274. { name: ns.ListName, value: 1 }
  5275. ]
  5276. });
  5277. define({
  5278. type: cns.dispidGetSelectedResourceMethod,
  5279. fromHost: [
  5280. { name: ns.ResourceId, value: self }
  5281. ]
  5282. });
  5283. define({
  5284. type: cns.dispidGetResourceFieldMethod,
  5285. fromHost: [
  5286. { name: ns.FieldValue, value: self }
  5287. ],
  5288. toHost: [
  5289. { name: ns.ResourceId, value: 0 },
  5290. { name: ns.FieldId, value: 1 },
  5291. { name: ns.GetRawValue, value: 2 }
  5292. ]
  5293. });
  5294. define({
  5295. type: cns.dispidGetProjectFieldMethod,
  5296. fromHost: [
  5297. { name: ns.FieldValue, value: self }
  5298. ],
  5299. toHost: [
  5300. { name: ns.FieldId, value: 0 },
  5301. { name: ns.GetRawValue, value: 1 }
  5302. ]
  5303. });
  5304. define({
  5305. type: cns.dispidGetSelectedViewMethod,
  5306. fromHost: [
  5307. { name: ns.ViewType, value: 0 },
  5308. { name: ns.ViewName, value: 1 }
  5309. ]
  5310. });
  5311. cns=OSF.DDA.EventDispId
  5312. define({ type: cns.dispidDocumentSelectionChangedEvent });
  5313. define({
  5314. type: cns.dispidBindingSelectionChangedEvent,
  5315. fromHost: [
  5316. {name: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, value: self}
  5317. ]
  5318. });
  5319. define({
  5320. type: cns.dispidBindingDataChangedEvent,
  5321. fromHost: [{ name: OSF.DDA.PropertyDescriptors.BindingProperties, value: self}]
  5322. });
  5323. define({ type: cns.dispidSettingsChangedEvent });
  5324. define({
  5325. type: cns.dispidDocumentThemeChangedEvent,
  5326. fromHost: [
  5327. {name: OSF.DDA.EventDescriptors.DocumentThemeChangedEvent, value: self}
  5328. ]
  5329. });
  5330. define({
  5331. type: cns.dispidOfficeThemeChangedEvent,
  5332. fromHost: [
  5333. {name: OSF.DDA.EventDescriptors.OfficeThemeChangedEvent, value: self}
  5334. ]
  5335. });
  5336. define({
  5337. type: cns.dispidActiveViewChangedEvent,
  5338. fromHost: [{ name: OSF.DDA.EventDescriptors.ActiveViewChangedEvent, value: self}]
  5339. });
  5340. define({
  5341. type: cns.dispidDataNodeAddedEvent,
  5342. fromHost: [{ name: OSF.DDA.EventDescriptors.DataNodeInsertedEvent, value: self}]
  5343. });
  5344. define({
  5345. type: cns.dispidDataNodeReplacedEvent,
  5346. fromHost: [{ name: OSF.DDA.EventDescriptors.DataNodeReplacedEvent, value: self}]
  5347. });
  5348. define({
  5349. type: cns.dispidDataNodeDeletedEvent,
  5350. fromHost: [{ name: OSF.DDA.EventDescriptors.DataNodeDeletedEvent, value: self}]
  5351. });
  5352. define({ type: cns.dispidTaskSelectionChangedEvent });
  5353. define({ type: cns.dispidResourceSelectionChangedEvent });
  5354. define({ type: cns.dispidViewSelectionChangedEvent });
  5355. parameterMap.define=define;
  5356. return parameterMap;
  5357. })();
  5358. OSF.DDA.SafeArray.Delegate._onException=function OSF_DDA_SafeArray_Delegate$OnException(ex, args) {
  5359. var status;
  5360. var number=ex.number;
  5361. if (number) {
  5362. switch (number) {
  5363. case -2146828218:
  5364. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;
  5365. break;
  5366. case -2146827850:
  5367. default:
  5368. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  5369. break;
  5370. }
  5371. }
  5372. if (args.onComplete) {
  5373. args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);
  5374. }
  5375. }
  5376. OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) {
  5377. try {
  5378. if (args.onCalling) {
  5379. args.onCalling();
  5380. }
  5381. function toArray(args) {
  5382. var arrArgs=args;
  5383. if (OSF.OUtil.isArray(args)) {
  5384. var len=arrArgs.length;
  5385. for (var i=0; i < len; i++) {
  5386. arrArgs[i]=toArray(arrArgs[i]);
  5387. }
  5388. } else if (OSF.OUtil.isDate(args)) {
  5389. arrArgs=args.getVarDate();
  5390. } else if (typeof args==="object" && !OSF.OUtil.isArray(args)) {
  5391. arrArgs=[];
  5392. for (var index in args) {
  5393. if (!OSF.OUtil.isFunction(args[index])) {
  5394. arrArgs[index]=toArray(args[index]);
  5395. }
  5396. }
  5397. }
  5398. return arrArgs;
  5399. }
  5400. var startTime=(new Date()).getTime();
  5401. window.external.Execute(
  5402. args.dispId,
  5403. toArray(args.hostCallArgs),
  5404. function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs) {
  5405. if (args.onReceiving) {
  5406. args.onReceiving();
  5407. }
  5408. var result=hostResponseArgs.toArray();
  5409. var status=result[OSF.DDA.SafeArray.Response.Status];
  5410. if (args.onComplete) {
  5411. var payload;
  5412. if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) {
  5413. if (result.length > 2) {
  5414. payload=[];
  5415. for (var i=1; i < result.length; i++)
  5416. payload[i - 1]=result[i];
  5417. }
  5418. else {
  5419. payload=result[OSF.DDA.SafeArray.Response.Payload];
  5420. }
  5421. }
  5422. else {
  5423. payload=result[OSF.DDA.SafeArray.Response.Payload];
  5424. }
  5425. args.onComplete(status, payload);
  5426. }
  5427. if (OSF.AppTelemetry) {
  5428. OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status);
  5429. }
  5430. }
  5431. );
  5432. }
  5433. catch (ex) {
  5434. OSF.DDA.SafeArray.Delegate._onException(ex, args);
  5435. }
  5436. };
  5437. OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) {
  5438. var startTime=(new Date()).getTime();
  5439. return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) {
  5440. if (args.onReceiving) {
  5441. args.onReceiving();
  5442. }
  5443. var status=hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs;
  5444. if (args.onComplete) {
  5445. args.onComplete(status)
  5446. }
  5447. if (OSF.AppTelemetry) {
  5448. OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status);
  5449. }
  5450. }
  5451. }
  5452. OSF.DDA.SafeArray.Delegate.registerEventAsync=function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) {
  5453. if (args.onCalling) {
  5454. args.onCalling();
  5455. }
  5456. var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args);
  5457. try {
  5458. window.external.RegisterEvent(
  5459. args.dispId,
  5460. args.targetId,
  5461. function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) {
  5462. if (args.onEvent) {
  5463. args.onEvent(payload);
  5464. }
  5465. if (OSF.AppTelemetry) {
  5466. OSF.AppTelemetry.onEventDone(args.dispId);
  5467. }
  5468. },
  5469. callback
  5470. );
  5471. }
  5472. catch (ex) {
  5473. OSF.DDA.SafeArray.Delegate._onException(ex, args);
  5474. }
  5475. };
  5476. OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) {
  5477. if (args.onCalling) {
  5478. args.onCalling();
  5479. }
  5480. var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args);
  5481. try {
  5482. window.external.UnregisterEvent(
  5483. args.dispId,
  5484. args.targetId,
  5485. callback
  5486. );
  5487. }
  5488. catch (ex) {
  5489. OSF.DDA.SafeArray.Delegate._onException(ex, args);
  5490. }
  5491. };
  5492. OSF.DDA.SafeArray.Delegate.MessageParent=function OSF_DDA_SafeArray_Delegate$MessageParent(args){
  5493. try {
  5494. if (args.onCalling) {
  5495. args.onCalling();
  5496. }
  5497. var startTime=(new Date()).getTime();
  5498. var message=args.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent];
  5499. window.external.MessageParent(message);
  5500. if (args.onReceiving) {
  5501. args.onReceiving();
  5502. }
  5503. if (OSF.AppTelemetry) {
  5504. OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), result);
  5505. }
  5506. return result;
  5507. }
  5508. catch (ex) {
  5509. var status;
  5510. var number=ex.number;
  5511. if (number) {
  5512. switch (number) {
  5513. case -2146828218:
  5514. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;
  5515. break;
  5516. case -2146827850:
  5517. default:
  5518. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  5519. break;
  5520. }
  5521. }
  5522. return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  5523. }
  5524. }