var microsoft=microsoft||{},app,awasaServicesSettings,WLSPHIP0,WLSPHIP1;microsoft.support=microsoft.support||{};microsoft.support.config=microsoft.support.config||{};microsoft.support.config.authInfo=microsoft.support.config.authInfo||{},function(n){n.authState=2;n.isLoggedIn=function(){return n.puid!=null};n.authStatus=function(){return n.authState};n.userSignedIn=function(t){n.puidAsHex=t.puidAsHex;n.displayName=t.displayName;n.puid=t.puid;n.firstName=t.firstName;n.lastName=t.lastName;n.cid=t.cid;n.authState=1;i();r()};n.userSignedOut=function(){n.puidAsHex=null;n.displayName=null;n.puid=null;n.firstName=null;n.lastName=null;n.cid=null;n.authState=0;i();u()};var r=function(){var n=t();n&&n.$broadcast("UserSignedIn")},u=function(){var n=t();n&&n.$broadcast("UserSignedOut")},i=function(){var n=t();n&&n.$broadcast("AuthStatusChange")},t=function(){var n=angular.element(document.body),t=n&&n.scope();return t&&t.$root};return n}(microsoft.support.config.authInfo);try{document.domain="microsoft.com"}catch(e){}microsoft=microsoft||{};microsoft.support=microsoft.support||{};microsoft.support.moduleName="SelfAssistWeb";microsoft.support.config=microsoft.support.config||{};microsoft.support.serverInfo=microsoft.support.serverInfo||{};typeof console=="undefined"&&(console={});typeof console.log=="undefined"&&(console.log=function(){});app=angular.module(microsoft.support.moduleName,["ngSanitize","ngRoute","ngCookies","ngAria","ui.bootstrap","ngMessages","ngFileUpload"]);app.value("clientConfig",microsoft.support.config);app.value("serverInfo",microsoft.support.serverInfo);app.run(["$rootScope","$timeout","$anchorScroll","$location",function(n,t,i,r){t(function(){n.$broadcast("AngularJsReady")},10);r&&r.hash&&r.hash()&&t(function(){i()},2e3)}]),function(n){n.factory("errorInterceptor",["$rootScope","$q",function(n,t){var i={},r=[/api\/search(?!(withdialog=true))/i,/api\/content\/kb/i,/api\/content\/gwt/i,/api\/content\/article/i,/api\/content\/help/i,/api\/content\/instantanswers/i,/api\/content\/getcompasscontentforpage(?!(\/partnerconfig|\/widgetconfig|\/contactus\/.+))/i];return i.responseError=function(i){var u=r.filter(function(n){return i&&i.config&&i.config.url.match(n)!==null}).length>0;return u&&i.status===404?n.$broadcast("404Error"):u&&n.$broadcast("500Error",{reason:"Http request failed",response:i}),t.reject(i)},i}])}(angular.module(microsoft.support.moduleName));app.config(["$provide",function(n){n.decorator("$exceptionHandler",["$delegate","$injector",function(n,t){return function(i,r){var u={},f=t.get("qosTelemetryService");u.message=i.message||"";u.stack=i.stack||"";u.context=i&&JSON.stringify(i)||"";f.createEvent(f.eventTypes.app.exception).reject(JSON.stringify(u));n(i,r)}}])}]);app.service("navigationOverrideService",["$rootScope","$location","$route","$routeParams","$window","compassService","breadcrumbsService",function(n,t,i,r,u,f,e){function o(){var n=t.search().flighting;n&&(u.document.cookie="smc_f="+decodeURIComponent(n)+";path=/;domain="+u.location.host)}n.$on("$routeChangeSuccess",function(i,r){f.fetchContent(t.path().substring(1));r&&r.data&&r.data.noIndex===!0&&n.$broadcast("NoIndex")});n.$on("$routeChangeStart",function(){o()});n.$on("$routeChangeSuccess",function(){e.generateBreadcrumbs(i,r)});o()}]),function(){function t(n){return n!==null&&typeof n=="object"}var n=function(n){var i,r;if(n&&n.data)try{try{i=t(n.data)?n.data:JSON.parse(n.data)}catch(u){console.info("Received cross-frame message, was unable to parse event.data: "+u);return}i.type==="$broadcast"&&i.name&&angular.element(document)&&angular.element(document).injector()&&(r=angular.element(document).injector().get("$rootScope"),r.$broadcast(i.name,i.args,n.source),r.$digest())}catch(u){console.error("Error parsing message as JSON: "+u)}};window.addEventListener?window.addEventListener("message",n,!1):window.attachEvent("onmessage",n)}(),function(n){n.service("ParentWindowBroadcaster",["$rootScope","$window","$log",function(n,t){function i(i){n.$on(i,function(n,r,f){t.window!==f&&u(i,r)})}function r(i,r){i.$on(r,function(i,u,f){t.window!==f&&n.$broadcast(r,u)})}function u(n,i){t.parent&&t.parent.postMessage(JSON.stringify({type:"$broadcast",name:n,args:i}),"*")}this.init=function(n,u){n.forEach(i);try{if(t&&t.parent&&t.parent.angular&&t.parent.angular.element(t.frameElement)){var f=t.parent.angular.element(t.frameElement).scope();f&&u.forEach(function(n){r(f,n)})}}catch(e){}};this.init([],[])}]).run(["ParentWindowBroadcaster",function(){}])}(angular.module(microsoft.support.moduleName));app.config(["$routeProvider","$locationProvider","$compileProvider",function(n,t,i){var f,e;html5mode=!!(window.history&&window.history.pushState);i.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|file|blob|ms-contact-support|ms-windows-store|ms-photos|ms-get-started):/);html5mode||(f=document.getElementsByTagName("base")[0].href,e=location.href.replace(f,"").replace(location.hash,""),location.hash=location.hash||e);var u=["$route","$location","chatStateService","clientConfig","nativeAppService",function(n,t,i){if(i.isReconnectValid()&&i.getChatEstablished()&&(n.current.params.subject||i.getSubject())){var r=n.current.params.subject?n.current.params.subject:i.getSubject();t.path("/contact/chat/"+r+"/")}}],r={commercialNonFlightRedirect:["$location","$route","flightService",function(n,t,i){i.isUserInFlight("commercial-incident-mgmt-1")||n.url(t.current.params.langLocale).replace()}]},o=["authenticationHelperService","$q",function(n,t){var i=t.defer();return n.signIn(i.resolve),i.promise}];microsoft.support.ignoreMvcRouting||n.when("/enterprise/",{resolve:{isChatInProgress:u},controller:"SupportMenuController",templateUrl:"/PartialViews/SupportMenu/Container.html",data:{noIndex:!0,isLandingPage:!0}}).when("/virtual-agent/",{controller:"VirtualAgentController",templateUrl:"/PartialViews/VirtualAgent/VirtualAgent.html"}).when("/menu/",{resolve:{isChatInProgress:u},controller:"SupportMenuController",templateUrl:"/PartialViews/SupportMenu/Container.html",data:{noIndex:!0,isLandingPage:!0}}).when("/menu/:issueType?/:product?/:issue?/",{resolve:{isChatInProgress:u},controller:"SupportMenuController",templateUrl:"/PartialViews/SupportMenu/Container.html",data:{noIndex:!0}}).when("/partner/:partner/menu/",{resolve:{isChatInProgress:u},controller:"SupportMenuController",templateUrl:"/PartialViews/SupportMenu/Container.html",data:{noIndex:!0,isLandingPage:!0}}).when("/hoops/:channelType/:subject/",{controller:"HoopsController",templateUrl:"/PartialViews/Contact/HoursOfOperation/HoursOfOperation.html",data:{noIndex:!0}}).when("/chat/:subject/",{controller:"ChatController",templateUrl:"/PartialViews/Contact/Chat/Container.html",data:{noIndex:!0}}).when("/callback/:subject/",{template:'<div id="callback-container" callback is-schedule-callback="false"><\/div>',data:{noIndex:!0}}).when("/schedulecallback/:subject/",{template:'<div id="schedule-callback-container" callback is-schedule-callback="true"><\/div>',data:{noIndex:!0}}).when("/form/:id/:name/:modality?/",{controller:"UnauthFormController",templateUrl:"/PartialViews/Contact/UnauthForm/Container.html",data:{noIndex:!0}}).when("/rat-phone",{controller:"PhoneScreenShareController",templateUrl:"/PartialViews/RATOverPhone/PhoneScreenShare.html",data:{noIndex:!0}}).when("/:langLocale/kb/:articleId",{controller:"KbController",templateUrl:"/PartialViews/KB/Index.html",reloadOnSearch:!1}).when("/:langLocale/contactus/:product/:issuetype/",{controller:"ContactUsController",templateUrl:"/PartialViews/ContactUs/V2.html",reloadOnSearch:!1,data:{fluidContainer:!0,hideSearch:!0,noIndex:!0}}).when("/:langLocale/contactus/products/",{controller:"ContactUsController",templateUrl:"/PartialViews/ContactUs/V2.html",reloadOnSearch:!1,data:{fluidContainer:!0,hideSearch:!0,showProductsList:!0}}).when("/:langLocale/contactus/:product/",{controller:"ContactUsController",templateUrl:"/PartialViews/ContactUs/V2.html",reloadOnSearch:!1,data:{fluidContainer:!0,hideSearch:!0,noIndex:!0}}).when("/:langLocale/contactus/",{controller:"ContactUsController",templateUrl:"/PartialViews/ContactUs/V2.html",reloadOnSearch:!1,data:{fluidContainer:!0,hideSearch:!0}}).when("/:langLocale/premier",{resolve:r,templateUrl:"/PartialViews/Commercial/CommercialHub.html",reloadOnSearch:!1,data:{breadcrumb:{text:"commercialLanding"},isCommercial:!0,enablePremierAlert:!0}}).when("/:langLocale/commercial/incidents/create",{resolve:r,controller:"IncidentCreationController",templateUrl:"/PartialViews/Commercial/IncidentCreation/index.html",reloadOnSearch:!1,data:{isCommercial:!0}}).when("/:langLocale/commercial/incidents",{resolve:r,controller:"IncidentsHubController",templateUrl:"/PartialViews/Commercial/IncidentsHub.html",reloadOnSearch:!1,data:{breadcrumb:{parent:"/:langLocale/commercial",text:"incidentList"},isCommercial:!0}}).when("/:langLocale/commercial/incidents/:incidentId",{resolve:r,templateUrl:"/PartialViews/Commercial/IncidentHub.html",reloadOnSearch:!1,data:{breadcrumb:{parent:"/:langLocale/commercial/incidents",text:":incidentId"},isCommercial:!0}}).when("/:langLocale/commercial/accounts",{resolve:r,templateUrl:"/PartialViews/Commercial/CommercialAccountHub.html",controller:"commercialAccountController",reloadOnSearch:!1,data:{breadcrumb:{parent:"/:langLocale/commercial",text:"accounts"},isCommercial:!0}}).when("/:langLocale/premier/contacts",{resolve:r,templateUrl:"/PartialViews/Commercial/PremierContacts.html",controller:"premierContactsController",reloadOnSearch:!1,data:{isCommercial:!0}}).when("/:langLocale/devices/addpayment/:piid?/:errorCode?",{resolve:{devicesNonFlightRedirect:["$location","$route","flightService",function(n,t,i){i.isUserInFlight("odc-1")||n.url(t.current.params.langLocale)}]},templateUrl:"/PartialViews/Devices/AddPayment.html",controller:"AddPaymentController",reloadOnSearch:!1}).when("/:langLocale/devices",{resolve:{devicesNonFlightRedirect:["$location","$route","flightService",function(n,t,i){i.isUserInFlight("odc-1")||n.url(t.current.params.langLocale)}]},templateUrl:"/PartialViews/Devices/MyDevices.html",reloadOnSearch:!1}).when("/:langLocale/devices/:deviceId",{templateUrl:"/PartialViews/Devices/Device.html",reloadOnSearch:!1}).when("/:langLocale/lifecycle",{resolve:{lifecycleNonFlightRedirect:["$location","$route","flightService",function(n,t,i){i.isUserInFlight("pslc-1")||n.url(t.current.params.langLocale)}]},controller:"LifecycleController",templateUrl:"/PartialViews/Lifecycle/Index.html"}).when("/:langLocale/lifecycle/search",{resolve:{lifecycleNonFlightRedirect:["$location","$route","flightService",function(n,t,i){i.isUserInFlight("pslc-1")||n.url(t.current.params.langLocale)}]},controller:"LifecycleSearchController",templateUrl:"/PartialViews/Lifecycle/LifecycleSearch.html"}).when("/:langLocale/answerdesk/accessibility",{resolve:{accessibilityNonFlightRedirect:["$location","$route","flightService",function(n,t,i){i.isUserInFlight("dad-1")||n.url(t.current.params.langLocale)}]},templateUrl:"/PartialViews/Accessibility/Index.html",controller:"AccessibilityController",reloadOnSearch:!1}).when("/:langLocale/gwt/:articleId",{controller:"GwtController",templateUrl:"/PartialViews/Gwt/Index.html"}).when("/:langLocale/help/:articleId",{controller:"HelpArticleController",templateUrl:"/PartialViews/HelpArticle/Index.html"}).when("/:langLocale/help/:articleId/:title",{controller:"HelpArticleController",templateUrl:"/PartialViews/HelpArticle/Index.html"}).when("/:langLocale/instantanswers/:iaId",{controller:"InstantAnswerController",templateUrl:"/PartialViews/InstantAnswer/Index.html"}).when("/:langLocale/instantanswers/:iaId/:title",{controller:"InstantAnswerController",templateUrl:"/PartialViews/InstantAnswer/Index.html"}).when("/:langLocale/fre/:productId",{controller:"FreController",templateUrl:"/PartialViews/Fre/Index.html",resolve:{noChrome:["$location",function(n){n.search().nochrome||n.search("nochrome")}]}}).when("/:langLocale/article/:articleId",{controller:"GenericArticleController",templateUrl:"/PartialViews/GenericArticle/Index.html"}).when("/:langLocale/allproducts",{controller:"AllProductsController",templateUrl:"/PartialViews/AllProducts/Index.html"}).when("/:langLocale/search",{controller:"SearchResultsController",templateUrl:"/PartialViews/Search/Results.html",data:{noIndex:!0}}).when("/:langLocale/products/:productfamily/:product/:subproduct",{controller:"ProductHubController",templateUrl:"/PartialViews/Products/ProductPages.html"}).when("/:langLocale/products/:productfamily/:product",{controller:"ProductHubController",templateUrl:"/PartialViews/Products/ProductPages.html"}).when("/:langLocale/products/:productfamily",{controller:"ProductHubController",templateUrl:"/PartialViews/Products/ProductPages.html"}).when("/:langLocale/topics/:productfamily",{controller:"ProductHubController",templateUrl:"/PartialViews/Products/ProductPages.html"}).when("/:langLocale/products",{resolve:{AllProductsRedirect:["$location","$route","languageService",function(n,t,i){n.path(i.langLocale()+"/allproducts").replace()}]}}).when("/:langLocale/locations/:product",{controller:"StoreLocationsController",templateUrl:"/PartialViews/StoreLocations/Index.html"}).when("/",{resolve:{homeRedirect:["$location","languageService",function(n,t){n.url(t.langLocale())}]}}).when("/errors",{resolve:{error:["$rootScope",function(n){n.$broadcast("500Error",{reason:"Hit errors route"})}]},data:{noIndex:!0}}).when("/:langLocale",{templateUrl:"/PartialViews/Index.html",resolve:{langRedirect:["$location","$route","languageService",function(n,t,i){i.redirectWithLocale(t.current.params.langLocale)}]},data:{isLandingPage:!0}}).otherwise({resolve:{refresh:["$route","$rootScope","$location","$log","languageService","locationService",function(n,t,i,r,u){var f=i.path().split("/")[1];u.redirectWithLocale(f);t.$broadcast("404Error",{location:i.url()});r.log("hit otherwise statement for route: ",n)}]}});t.html5Mode(html5mode)}]),function(n){n.service("seoService",["$http","$rootScope","$window","$timeout",function(n,t,i,r){function c(){u=u||n.pendingRequests.length;u&&!n.pendingRequests.length&&r(function(){u&&!n.pendingRequests.length&&(i.callPhantom(),h())},200)}function s(n,t){var r=t&&t.reason||"Page not found";i.callPhantom({error:!0,reason:r});h()}function h(){f();e();o()}var u=!1,f,e,o;typeof i.callPhantom=="function"&&(f=t.$watch(function(){return n.pendingRequests.length},c),e=t.$on("500Error",s),o=t.$on("404Error",s))}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("AccessibilityController",["$scope","compassService",function(n,t){function i(){t.getAccessibilityView().then(function(t){n.view=t})}i()}])}(angular.module(microsoft.support.moduleName));app.directive("avPartnerRender",["contentApiService",function(n){return{templateUrl:"/PartialViews/Antivirus/AvPartnerTemplate.html",restrict:"A",scope:{os:"@avPartnerRender"},link:function(t){function i(n){return n.replace(/\s/g,"").toLowerCase()}function r(n){for(var t=n.length,i,r;t>0;)i=Math.floor(Math.random()*t),t--,r=n[t],n[t]=n[i],n[i]=r;return n}t.updating=!0;n.getCompassContentForPage("antivirus").then(function(n){t.vendors=n.data.antiVirusInformation.vendors}).catch(function(){t.updating=!1});t.$watchCollection("vendors",function(){if(t.vendors&&t.vendors.length>0){var n=t.vendors.filter(function(n){return n.operatingSystem.filter(function(n){return angular.equals(i(n),i(t.os))?!0:!1}).length>0});t.filteredVendors=r(n);t.updating=!1}})}}}]),function(n){n.controller("F1FooterController",["$rootScope","$scope","compassService",function(n,t,i){function r(){var n=i.getF1Footer();n&&(t.viewlinkfarm=n.f1FooterView)}t.reset=function(){r()};t.reset();t.$on("CompassContentReady",function(){r()})}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("FeedbackController",["$rootScope","$scope","compassService",function(n,t,i){t.feedbackWizard={};t.feedbackText={};t.feedbackWizard.reset=function(){t.feedbackWizard.show=!1;t.feedbackWizard.type="suggestion";t.feedbackWizard.comment=""};t.feedbackWizard.reset();t.feedbackWizard.toggle=function(){t.feedbackWizard.show=!t.feedbackWizard.show;t.feedbackWizard.show&&setTimeout(function(){$("#feedback-wizard textarea").first().focus()})};t.feedbackWizard.submit=function(i){i&&(n.$broadcast("SiteFeedback",t.feedbackWizard),t.feedback.$setPristine());t.feedbackWizard.reset()};var r=function(){var n=i.getFeedbackCtrl();n&&(t.feedbackText=n)};r();t.$on("CompassContentReady",function(){r()})}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("L0HeaderController",["$rootScope","$scope","$sce","$window","clientConfig","compassService","authenticationHelperService",function(n,t,i,r,u,f,e){var o=function(){t.userDisplayName=null;t.signInLink=i.trustAsHtml(u.RpsSignInInfo.SignInLink);t.$on("UserSignedIn",function(){t.userDisplayName=u.authInfo.displayName;t.signInLink=i.trustAsHtml(u.RpsSignInInfo.SignOutLink)});t.$on("UserSignedOut",function(){t.userDisplayName=null;t.signInLink=i.trustAsHtml(u.RpsSignInInfo.SignInLink)})};t.$on("UserSignedIn",function(){if(r&&r.msCommonShell){var t=r.msCommonShell,n=e.getShellOptions();n.meControlOptions.userData.firstName=u.authInfo.firstName;n.meControlOptions.userData.lastName=u.authInfo.lastName;n.meControlOptions.userData.memberName=u.authInfo.displayName;n.meControlOptions.userData.cid=u.authInfo.cid;n.meControlOptions.userData.authenticatedState=t.AuthState.SignedIn;t.load(n)}});t.$on("UserSignedOut",function(){if(r&&r.msCommonShell){var n=r.msCommonShell;n.load(e.getShellOptions())}});o()}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("languaugeselector",["$rootScope",function(){return{restrict:"A",link:function(n){$(document).ready(function(){$('a[id="locale-picker-link"]').on("click",function(){n.$broadcast("languageSelectorClicked");n.$digest()})})}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("SelfHostFeedbackController",["$scope","$window","$http","$location","clientConfig","compassService","surveyCookieService",function(n,t,i,r,u,f,e){var o=function(){var u=e.setSurveyCookie(),t=f.getSelfhostFeedback(),i;t&&(n.viewfeedback=t,i=t.selfHostFeedbackEmailBody,i=i.replace(/(\n)+/g,"%0D%0A"),t.selfHostFeedbackEmailBody=i,n.currentUrl="%0D%0AUrl: "+r.absUrl(),n.icon=String.fromCharCode("0x"+t.selfHostFeedbackIcon))};o();n.$on("CompassContentReady",function(){o()})}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("surveyCookieService",["$document",function(n){this.setSurveyCookie=function(){var t=this.getCookie("msresearch"),n="",i=(new Date).getTime(),r="",u,f,e;return(t?(u={},t.split(",").forEach(function(n){var t=n.split(":"),i;t[1]&&(u[t[0]]=t[1]);i=t[0].toString();i.indexOf("lastinvited")>-1&&(r=t[1])}),f='"lastinvited":'+r+",",e='"lastinvited":'+i+",",n=t.replace(f,e),this.setCookie("msresearch",n)):(n='"lastinvited":'+i+",",n='{ "version": "5.0", "state": { "name": "IDLE", "url": undefined, "timestamp": '+i+' }, "lastinvited": '+i+', "userid": "", "vendorid": 1, "surveys": [""], "graceperiod": 5, "trackertimestamp": 0 }',this.setCookie("msresearch",n)),n!=t)?!0:!1};this.getSurveyCookie=function(){return this.getCookie("msresearch")||""};this.setCookie=function(t,i){n[0].cookie=t+"="+i+";expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/"};this.getCookie=function(t){return t?decodeURIComponent(n[0].cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null:null}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("commercialAccountController",["$scope","$modal","$q","clientConfig","compassService","languageService","entitlementsService","commercialInfoService","commercialMessageModalService",function(n,t,i,r,u,f,e,o,s){function v(){var t=u.getManageAccountHub();t&&(n.tableSortDisabled=!0,n.accountView=t.manageAccountContent,n.tableConfig={disableSorting:!0,columns:[{columnName:n.accountView.removeColumnHeading,propertyName:"removeChecked",defaultColumn:!0,defaultColumnOrder:0,checkBoxControl:!0},{columnName:n.accountView.accessIdColumnHeading,propertyName:"accessId",defaultColumn:!0,defaultColumnOrder:1},{columnName:n.accountView.scheduleNameColumnHeading,propertyName:"scheduleName",defaultColumn:!0,defaultColumnOrder:2},{columnName:n.accountView.expirationColumnHeading,propertyName:"endDate",defaultColumn:!0,defaultColumnOrder:3,format:"dateTimeFormat"},{columnName:n.accountView.statusColumnHeading,propertyName:"status",defaultColumn:!0,defaultColumnOrder:4}]})}function c(){e.getEntitlements().then(function(t){var f=[],u={},i,r;if(t&&t.incidentSubmitContracts&&t.incidentSubmitContracts.length&&t.incidentSubmitContracts.length>0)for(i=0;i<t.incidentSubmitContracts.length;i++)t.incidentSubmitContracts[i].removeChecked=!1,r=l(t.incidentSubmitContracts[i]),r&&!u[r]&&(f.push(t.incidentSubmitContracts[i]),u[r]=!0);if(t&&t.viewOnlyContracts&&t.viewOnlyContracts.length&&t.viewOnlyContracts.length>0)for(i=0;i<t.viewOnlyContracts.length;i++)r=l(t.viewOnlyContracts[i]),t.viewOnlyContracts[i].removeChecked=!1,r&&!u[r]&&(f.push(t.viewOnlyContracts[i]),u[r]=!0);n.tableContracts=f})}function l(n){var t="";return n&&n.accessId&&n.contractId&&n.clarifyInstallationSiteId&&(t=n.accessId+";"+n.contractId+";"+n.clarifyInstallationSiteId),t}function y(){n.registerState=h.ready;n.registerForm={};c()}function p(n){return n.replace(/\{0\}/,r.authInfo.displayName)}var h={ready:0,succeeded:1,error:2,registering:3},a;n.registerStates=h;a="checkbox";n.$on("CompassContentReady",function(){v()});n.submitRegisterForm=function(t,i){n.registerState=h.ready;e.registerEntitlement({AccessId:t,ContractId:i}).then(function(){n.registerState=h.succeeded;n.registerForm={};c();s.showStandardMessageModal({id:"register-access-id-acknowledge",message:p(n.accountView.addAccessIdSuccessMessageTemplate),dismissCaption:n.accountView.dialogBoxDismissButtonCaption})},function(){n.registerState=h.error;s.showStandardMessageModal({id:"register-access-id-failure-acknowledge",message:n.accountView.addAccessIdFailureGeneralMessage,dismissCaption:n.accountView.dialogBoxDismissButtonCaption})})};n.submitRemoveForm=function(){for(var f,u,o,r=[],t=0;t<n.tableContracts.length;t++)if(n.tableContracts[t].removeChecked){for(f=!1,u=0;u<r.length;u++)if(r[u].accessId==n.tableContracts[t].accessId&&r[u].contractId==n.tableContracts[t].contractId){f=!0;break}if(f)continue;r.push({accessId:n.tableContracts[t].accessId,contractId:n.tableContracts[t].contractId})}if(!(r.length<1)){for(o=[],t=0;t<r.length;t++)o.push(e.unregisterEntitlement({AccessId:r[t].accessId,ContractId:r[t].contractId}));i.all(o).then(function(){s.showStandardMessageModal({id:"remove-access-id-acknowledge",message:n.accountView.accessIdRemovedMessage,dismissCaption:n.accountView.dialogBoxDismissButtonCaption});c()},function(){s.showStandardMessageModal({id:"remove-access-id-fail-acknowledge",message:n.accountView.accessIdNotRemovedMessage,dismissCaption:n.accountView.dialogBoxDismissButtonCaption});c()})}};n.elementChanged=function(t,i,r,u){if(i&&i==="removeChecked")for(var f=0;f<n.tableContracts.length;f++)n.tableContracts[f].accessId===t.accessId&&(n.tableContracts[f].removeChecked=u)};n.formatData=function(n,t){var i=n,r,u;return t=="dateTimeFormat"&&(r=new Date(n),u=f.langLocale(),i=r.toLocaleDateString(u)),i};y()}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("commercialContactService",["$http","$location",function(n){this.getPremierContacts=function(){return n.get("api/commercialcontacts/audiences/premier",{httpAppOptions:{cacheBust:!0,qosOperation:{name:"CommercialContactsService.GetPremierContacts",description:"Get all contacts for premier customers"}}})};this.getRegionalContacts=function(){return n.get("api/commercialcontacts/regions",{httpAppOptions:{cacheBust:!0,qosOperation:{name:"CommercialContactsService.GetRegionalContacts",description:"Get regional CSS contacts"}}})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("CommercialHubController",["$scope","$modal","clientConfig","authenticationHelperService","compassFormatFilter","compassService","flightService","entitlementsService","commercialMessageModalService",function(n,t,i,r,u,f,e,o,s){function h(){var t=f.getPremierHomeView();t&&(n.view=t,n.actionLinks=t.actionLinks,n.commercialLinkFarm=t.commercialLinkFarm)}function c(){n.isAuthenticated=!1}function l(){n.isAuthenticated=!0;a()}function a(){n.requestingEntitlements=!0;o.getEntitlements().then(function(t){var f=t,r;n.userState=f.userContractState;n.userState==1&&(r={id:"no-contracts-alert-acknowledge",title:n.view.noContractAlert.title,message:u(n.view.noContractAlert.body,{"user-email":i.authInfo.displayName}),dismissCaption:n.view.dialogAcknowledgeCaption},s.showStandardMessageModal(r))},function(){n.userState=1;var t={id:"get-entitlements-error-acknowledge",title:n.view.serviceErrorAlert.title,message:n.view.serviceErrorAlert.body,dismissCaption:n.view.dialogAcknowledgeCaption};s.showStandardMessageModal(t)})["finally"](function(){n.requestingEntitlements=!1})}n.isAuthenticated=i.authInfo.authStatus()==1;h();n.isAuthenticated?l():c();n.$on("UserSignedIn",function(){l()});n.$on("UserSignedOut",function(){c()});n.$on("CompassContentReady",function(){h()});n.noAccessPermission=function(){var t={id:"no-access-permission-acknowledge",title:n.view.noPermissionAlert.title,message:n.view.noPermissionAlert.body,dismissCaption:n.view.dialogAcknowledgeCaption};s.showStandardMessageModal(t)};n.signIn=function(){r.signIn()}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("incidentDetail",["$route","$q","incidentsService","compassFormatFilter","dateFilter","orderByFilter","messageBannerManagerService","clientConfig","authenticationHelperService","compassFormatFilter","fileUploaderService","compassService","commercialMessageModalService","commercialTelemetryService",function(n,t,i,r,u,f,e,o,s,r,h,c,l,a){return{templateUrl:"/PartialViews/Commercial/IncidentDetails.html",link:function(v){function b(){var n=c.getIncidentDetailHub(),t;n&&(v.view=n.incidentDetailContent,v.incidentNumber=r(v.view.titleFormat,{"incident-id":y}),v.detailTabs=[v.view.incidentDetailSummaryContent.subtitle,v.view.incidentDetailEngineerNotesTitle,v.view.incidentDetailMessagesContent.incidentDetailMessagesSubtitle],t=r(v.view.incidentDetailMessagesContent.incidentDetailMessageDetailPrivacyStatementLinkFormat,{"privacy-link-url":v.view.incidentDetailMessagesContent.incidentDetailMessageDetailPrivacyStatementLinkUrl}),v.messageUpdatePrivayStatement=r(v.view.incidentDetailMessagesContent.incidentDetailMessageDetailPrivacyStatementFormat,{"privacy-link":t}))}function k(n){v.canUpdate?(w=v.currentCommunicationIndex>=-1?v.currentCommunicationIndex:w,n!=undefined&&n>=0?(v.currentCommunicationIndex=-2,v.messageSubject=v.communications[n].subject):v.currentCommunicationIndex=-3):e.notifyBanner(p,{type:"info",title:r(v.view.incidentDetailMessagesContent.noPermissionToUpdateIncidentAlert.title,{email:o.authInfo.displayName}),body:v.view.incidentDetailMessagesContent.noPermissionToUpdateIncidentAlert.body})}function d(){v.canUpdate=!1;v.canView=!1;v.gettingIncident=!0;i.getIncident(n.current.params.incidentId).then(function(n){v.incident=n;v.createdDateLabel=r(v.view.incidentDetailSummaryContent.incidentFieldCreateDateFormat,{"datetime-format":u(n.incident.createdDateTime,v.view.incidentDetailSummaryContent.incidentCreateDateShortFormat)});var t=parseInt(v.incident.incident.userIncidentPermission,10);v.canUpdate=t==2;v.canView=t>0;t>0&&g(v.incident.incident)},function(n){n.status===403?e.notifyBanner(p,{type:"warning",title:r(v.view.noPermissionToViewIncidentAlert.title,{email:o.authInfo.displayName}),body:v.view.noPermissionToViewIncidentAlert.body}):e.notifyBanner(p,{type:"warning",title:v.view.generalServiceErrorAlert.title,body:v.view.generalServiceErrorAlert.body})})["finally"](function(){v.gettingIncident=!1})}function g(n){var r=[],t=[],i;v.currentCommunicationIndex=-1;n&&(n.notes&&n.notes.forEach(function(n){n&&n.logs&&n.logs.forEach(function(n){n&&r.push(n)})}),n.communications&&n.communications.forEach(function(n){n&&n.isCustomerViewable===!0&&n.subject&&t.push(n)}));i=null;r.length>0&&(r=f(r,"createdDateTime",!0),r.forEach(function(n){if(n){i==null&&(i={});var t=u(n.createdDateTime,v.view.incidentDetailSummaryContent.incidentCreateDateShortFormat);i.hasOwnProperty(t)?i[t].push(n):i[t]=[n]}}));v.engineerNotes=i;t&&t.length>0&&(t,v.isCommunicationDateDesc=!0,t=f(t,"createdDateTime",v.isCommunicationDateDesc));v.communications=t}function nt(n,i){return i&&i.length?h.getIncidentWorkspace(n).then(function(r){return h.getWorkspaceFiles(r.data.workspaceId).then(function(r){var u=r.data,o=[],f,s,e,c;if(u&&u.length)for(f=0;f<i.length;f++)for(s=i[f],e=0;e<u.length;e++)c=u[e],s.name==c.fileName&&o.push(s);return o.length>0?(console.log("rejecting attachment upload due to conflicting files"),t.reject({conflictingFiles:o})):(console.log("no conflicting files found so uploading files"),h.uploadToWorkspace(i,n))})},function(r){return r.status=="404"?(console.log("fileUploaderService.getIncidentWorkspace did not return a workspace"),h.uploadToWorkspace(i,n)):t.reject("fileUploaderService.getIncidentWorkspace returned unexpected error")}):t.when([])}function tt(n){var t=[];return n&&n.length&&n.length>0?angular.forEach(n,function(n){t.push(n.data)}):n&&!angular.isArray(n)&&t.push(n.data),t}s.signIn(d);var y=n.current.params.incidentId,w=-1,p="incidentServiceMessages";v.sectionUrls=["/PartialViews/Commercial/IncidentSummary.html","/PartialViews/Commercial/IncidentNotes.html","/PartialViews/Commercial/IncidentMessages.html"];v.selectedTabIndex=0;v.sectionUrl=v.sectionUrls[0];v.newMessageForm={};v.maxFileSizeBytes=o.DtmWorkspaceConfiguration.FileUploadMaxBytes;v.maxFileCount=o.DtmWorkspaceConfiguration.FileUploadMaxFiles;b();v.$on("CompassContentReady",function(){b()});v.loadSection=function(n){v.selectedTabIndex=n;v.sectionUrl=v.sectionUrls[n];v.currentCommunicationIndex=-1;v.hasMessageSendingError=!1};v.toggleCommunicationsOrder=function(){v.isCommunicationDateDesc=!v.isCommunicationDateDesc;v.communications=f(v.communications,"createdDateTime",v.isCommunicationDateDesc)};v.viewCommunicationDetail=function(n){v.currentCommunicationIndex=n;v.currentCummunication=v.communications[n]};v.viewAllCommunications=function(){v.currentCommunicationIndex=-1};v.getPreviousMessage=function(){v.currentCommunicationIndex--;v.currentCummunication=v.communications[v.currentCommunicationIndex]};v.getNextMessage=function(){v.currentCommunicationIndex++;v.currentCummunication=v.communications[v.currentCommunicationIndex]};v.replyMessage=function(n){k(n)};v.createNewMessage=function(){k()};v.cancelMessageUpdate=function(){v.currentCommunicationIndex=w;v.hasMessageSendingError=!1;v.newMessageForm={}};v.sendMessageUpdate=function(n){v.isSendingMessage=!0;v.hasMessageSendingError=!1;n.subject=n.subject||v.messageSubject;var u=(new Date).getTime(),t=null;nt(y,n.attachments).then(function(r){return t=tt(r),i.updateIncident(y,n.subject,n.body,o.authInfo.displayName,t)}).then(function(n){a.logUpdateIncident(y,(new Date).getTime()-u,t&&t.length&&t.length>0?t.length:0,!0);v.newMessageForm={};var i=n;return v.communications.unshift(i),v.currentCommunicationIndex=-1,v.currentCummunication=v.communications[0],n},function(n){if(a.logUpdateIncident(y,(new Date).getTime()-u,t&&t.length&&t.length>0?t.length:0,!1),v.hasMessageSendingError=!0,n.status===403)e.notifyBanner(p,{type:"info",title:r(v.view.incidentDetailMessagesContent.noPermissionToUpdateIncidentAlert.title,{email:o.authInfo.displayName}),body:v.view.incidentDetailMessagesContent.noPermissionToUpdateIncidentAlert.body});else if(n.conflictingFiles){var i=[];angular.forEach(n.conflictingFiles,function(n){i.push(n.name)});l.showStandardMessageModal({id:"update-incident-error-acknowledge",title:v.view.filesAlreadyUploadedAlert.title,message:v.view.filesAlreadyUploadedAlert.body+i.join(", "),dismissCaption:v.view.alertDialogDismissButtonCaption})}else e.notifyBanner(p,{type:"warning",title:v.view.generalServiceErrorAlert.title,body:v.view.generalServiceErrorAlert.body})})["finally"](function(){v.isSendingMessage=!1})};v.removeFile=function(n,t){if(t&&t.length&&t.length>0)for(var i=0;i<t.length;i++)if(t[i].name===n.name){t.splice(i,1);break}};v.filesChanged=function(){$('[data-toggle="tooltip"]').tooltip()}}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("commercialInfoService",["clientConfig","$rootScope",function(n,t){function u(){n.authInfo.commercialUserInfo||(n.authInfo.commercialUserInfo={})}function o(t){return u(),n.authInfo.commercialUserInfo[t]!=null?n.authInfo.commercialUserInfo[t]:null}function e(t){return u(),n.authInfo.commercialUserInfo[t]==null&&(n.authInfo.commercialUserInfo[t]={}),n.authInfo.commercialUserInfo[t]}function s(t,i){return u(),n.authInfo.commercialUserInfo[t]=i}function h(t){u();n.authInfo.commercialUserInfo[t]=null}function i(n,t,i){if(i){h(n);return}if(!t)return o(n);s(n,t)}function c(t){u();n.authInfo.commercialUserInfo[t]={}}function r(n,t,i,r){if(r){c(n);return}var u=e(n);u[t]=i}function f(n,t){var i=e(n);return i[t]!=null?i[t]:null}t.$on("ProcessUserSignOut",function(){n.authInfo&&(n.authInfo.commercialUserInfo={})});this.incidentList=function(n,t){return i("incidentList",n,t)};this.saveIncident=function(n,t){if(t){r("incident",null,null,t);return}r("incident",n.incident.id,n,t)};this.getIncident=function(n){return n?f("incident",n):null};this.contracts=function(n,t){return i("contracts",n,t)};this.getProductContracts=function(n){return n?f("product-contracts",n):null};this.saveProductContracts=function(n,t,i){r("product-contracts",n,t,i)};this.getProductContractsPromise=function(n){return n?f("product-contracts-promise",n):null};this.saveProductContractsPromise=function(n,t,i){r("product-contracts-promise",n,t,i)};this.productContractsPromise=function(n,t,r){return i("product-contracts-promise:"+n,t,r)};this.incidentTableColumnConfig=function(n,t){return i("incidentTableColumnConfig",n,t)};this.incidentTableFilterConfig=function(n,t){return i("incidentTableFilterConfig",n,t)};this.accessIdProducts=function(n,t){return i("accessIdProducts",n,t)};this.tamInfo=function(n,t,r){return i("tamInfo"+n,t,r)};this.supportTopics=function(n,t,r,u){return i("supportTopics,"+n+","+t,r,u)};this.scopingQuestions=function(n,t,r,u,f){return i("scopingQuestions,"+n+","+t+","+r,u,f)};this.customScopingQuestions=function(n,t,r,u){return i("customScopingQuestions,"+n+","+t,r,u)};this.diagnosticMetadata=function(n,t,r,u,f){return i("diagnosticMetadata,"+n+","+t+","+r,u,f)};this.saveThirdTierCompCode=function(n,t){if(t){r("3rdTierComponentCode",null,null,t);return}r("3rdTierComponentCode",n.componentCode,n,t)};this.getThirdTierCompCode=function(n){return n?f("3rdTierComponentCode",n):null};this.saveHidenAlert=function(n,t){return i("siteAlerts:"+n,!0,t)};this.getHidenAlert=function(n){if(n)return i("siteAlerts:"+n)}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("commercialMessageModalService",["$modal",function(n){this.showStandardMessageModal=function(t,i,r){var u=n.open({templateUrl:"/PartialViews/Commercial/standardModal.html",backdropClass:"smc-modal-backdrop",windowClass:"commercial-modal-window",resolve:{displayContent:function(){return t}},controller:["$scope","$modalInstance","displayContent",function(n,t,i){n.registerMessage=i;n.dismiss=function(){t.close()}}]});u.result.then(function(){if(typeof i=="function")return i()},function(){typeof r=="function"&&r()})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("commercialMySupport",[function(){return{scope:{userState:"=",actionLinks:"=",noAccessPermission:"="},templateUrl:"/PartialViews/Commercial/CommercialMySupport.html",link:function(n){n.contractStateConfig={unauthenticated:0,authenticated:1,readOnly:2,full:3}}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("emailListValidator",[function(){var n=/^.+@.+\..+$/i;return{restrict:"A",require:"ngModel",link:function(t,i,r,u){u&&u.$validators&&(u.$validators.emailList=function(t,i){var f,s,h,e,o;if(u.$isEmpty(i)||(f=i.trim().split(/\s*;\s*/),f==undefined||f.length==0))return!0;for(s=0,h=r.maxEmailLimit&&parseInt(10,r.maxEmailLimit)||10,o=0;o<f.length;o++)if((e=f[o],e&&!n.test(e))||e&&(s++,s>h))return!1;return!0})}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("entitlementsService",["$http","$q","$location","commercialInfoService","incidentsService",function(n,t,i,r,u){function h(n){n.userContractState=1;n&&n.isPremier&&(n.incidentSubmitContracts&&n.incidentSubmitContracts.length?n.userContractState=3:n.viewOnlyContracts&&n.viewOnlyContracts.length&&(n.userContractState=2))}function c(){r.contracts(null,!0);r.saveProductContracts(null,null,!0);r.saveProductContractsPromise(null,null,!0);l.getEntitlements()}var f=!1,o=null,e=!1,s=null,l=this;this.getEntitlements=function(){var i;return r.contracts()?t.when(r.contracts()):(i=this,r.incidentList(null,!0),r.accessIdProducts(null,!0),r.tamInfo(null,!0),u.getIncidents(),f||(o=n.get("/api/entitlements",{httpAppOptions:{cacheBust:!0,qosOperation:{name:"EntitlementsService.GetAllEntitlements",description:"get all entitlements for a user"}}}).then(function(n){h(n.data);r.contracts(n.data);var t=[];return angular.forEach(n.data.incidentSubmitContracts,function(n){t.push(n.accessId)}),t.length>0&&(i.getAccessIdProducts(t),i.getTamInfo(t[0])),n.data})["finally"](function(){f=!1}),f=!0),o)};this.getProductEntitlements=function(i){var u;return r.getProductContracts(i)?t.when(r.getProductContracts(i)):r.getProductContractsPromise(i)?r.getProductContractsPromise(i):(u=n.get("/api/entitlements",{params:{productId:i},httpAppOptions:{cacheBust:!0,qosOperation:{name:"EntitlementsService.GetUserEntitlementsForProductId",description:"get a user's entitlements filtered by productId"}}}).then(function(n){return h(n.data),r.saveProductContracts(i,n.data),n.data},function(n){r.saveProductContractsPromise(i,null);t.reject(n)}),r.saveProductContractsPromise(i,u),u)};this.getAccessIdProducts=function(i){var f,u,o;return r.accessIdProducts()?(f=t.defer(),f.resolve(r.accessIdProducts()),f.promise):(e||(u=null,i!=null&&i.length&&(u=i.join(",")),o={httpAppOptions:{cacheBust:!0,qosOperation:{name:"EntitlementsService.GetDisplayProductsForAccessIds",description:"get products that can be displayed to a user filtered by access IDs associated with their account"}}},u!=null&&(o.params={accessIds:u}),s=n.get("/api/entitlements/displayproducts",o).then(function(n){return r.accessIdProducts(n.data),n.data})["finally"](function(){e=!1}),e=!0),s)};this.disclaimerForPesId=function(t){return n.get("api/Entitlements/DisplayProducts/Disclaimers/"+t,{httpAppOptions:{cacheBust:!0,qosOperation:{name:"EntitlementsService.GetDisclaimersForPesId",description:"Get disclaimers for a specific product"}}})};this.registerEntitlement=function(t){return t.Action="Add",n.post("/api/entitlements",t,{headers:{"Content-Type":"application/json"},httpAppOptions:{qosOperation:{name:"EntitlementsService.RegisterAccessId",description:"register a new entitlement for a user"}}}).then(function(n){return c(),n})};this.unregisterEntitlement=function(t){return t.Action="Remove",n.post("/api/entitlements",t,{headers:{"Content-Type":"application/json"},httpAppOptions:{qosOperation:{name:"EntitlementsService.RemoveAccessId",description:"unregister entitlement for a user"}}}).then(function(n){return c(),n})};this.getTamInfo=function(i){var u;return r.tamInfo(i)?(u=t.defer(),u.resolve(r.tamInfo(i)),u.promise):(u=t.defer(),n.get("/api/entitlements/"+i+"/taminfo",{httpAppOptions:{cacheBust:!0,qosOperation:{name:"EntitlementsService.GetTamInfo",description:"Fetch TAM information for a user's access ID"}}}).then(function(n){angular.forEach(n.data.tamContactInfo,function(t){r.tamInfo(t.accessId,n.data)});u.resolve(n.data)}),u.promise)};this.getThirdTierComponentCode=function(i){var u;return r.getThirdTierCompCode(i)?(u=t.defer(),u.resolve(r.getThirdTierCompCode(i)),u.promise):promise=n.get("/api/entitlements/thirdtiercomponentcodes/"+i,{httpAppOptions:{cacheBust:!0,qosOperation:{name:"EntitlementsService.GetThirdTierComponentCode",description:"Fetch component code information for a third tier component code"}}}).then(function(n){return r.saveThirdTierCompCode(n.data),n.data})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("fakeEntitlementsService",["$http","$q","commercialInfoService","incidentsService",function(n,t,i){var u=!1,f=null,r=!1,e=null;this.getEntitlements=function(){return t.reject()};this.getAccessIdProducts=function(n){var r,s,e;return i.accessIdProducts()?(r=t.defer(),r.resolve(i.accessIdProducts()),r.promise):(u||(s="",n!=null&&n.length&&(s="?accessIds="+n.join(",")),e=t.defer(),f=e.promise,e.resolve(o),i.accessIdProducts(o),u=!1),f)};this.registerEntitlement=function(t){return n.post("/api/entitlements",t,{headers:{"Content-Type":"application/json"}})};this.getTamInfo=function(u){if(i.tamInfo()){var f=t.defer();return f.resolve(i.tamInfo()),f.promise}return r||(e=n.get("/api/entitlements/"+u+"/taminfo").then(function(n){return i.tamInfo(n.data),n.data}).finally(function(){r=!1}),r=!0),e};this.getSupportTopics=function(){var n=t.defer();return n.resolve(mockProductSupportTopics),n.promise};var o=[{applicableRegion:"en-us",pesId:4787,name:"Microsoft Windows Media Services 9 Series",disclaimer:{productId:4787,disclaimerContents:[]},redirect:null},{applicableRegion:"en-us",pesId:9101,name:"Windows Server Update Services 2.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:9864,name:"Microsoft .NET Framework 2.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:9892,name:"Microsoft Expression Web",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10040,name:"Microsoft Visual Studio 2005 Team Foundation Server",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10068,name:"Microsoft SQL Server 2005 Express Edition with Advanced Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10156,name:"Microsoft Office Access 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10159,name:"Microsoft Office Excel 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10160,name:"Microsoft Office Groove 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10161,name:"Microsoft Office OneNote 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10162,name:"Microsoft Office Outlook 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10163,name:"Microsoft Office PowerPoint 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10164,name:"Microsoft Office Project Professional 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10165,name:"Microsoft Office Project Standard 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10166,name:"Microsoft Office Publisher 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10171,name:"Microsoft Office Word 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10172,name:"Microsoft Office InfoPath 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10173,name:"Microsoft Office Forms Server 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10175,name:"Microsoft Office Project Server 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10176,name:"Microsoft Office Project Portfolio Server 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10177,name:"Microsoft Office SharePoint Server 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10181,name:"Microsoft Office Enterprise 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10183,name:"Microsoft Office Professional 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10184,name:"Microsoft Office Professional Plus 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10185,name:"Microsoft Office Standard 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10186,name:"Microsoft Office Ultimate 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10191,name:"Microsoft Dynamics AX 4.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10257,name:"Microsoft Exchange Server 2007 Enterprise Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10258,name:"Microsoft Exchange Server 2007 Standard Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10297,name:"Windows Vista Starter",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10298,name:"Windows Vista Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10299,name:"Windows Vista Business",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10300,name:"Windows Vista Ultimate",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10515,name:"Windows Embedded CE 6.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10654,name:"Windows Vista Enterprise 64-bit Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10657,name:"Windows Vista Business 64-bit Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10659,name:"Windows Vista Ultimate 64-bit Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10707,name:"Microsoft Office Groove Server 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10738,name:"Microsoft Office Small Business 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10844,name:"Microsoft Windows SharePoint Services 3.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10911,name:"Microsoft ProClarity Desktop Professional 6.3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10917,name:"Microsoft ProClarity Analytics Server 6.3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:10920,name:"Microsoft ProClarity Dashboard Server 6.3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11036,name:"Microsoft Office Groove Enterprise Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11106,name:"Microsoft Visual J# Version 2.0 Redistributable Package Second Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11167,name:"Microsoft Office PerformancePoint Server 2007, 32 Bit Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11180,name:"Microsoft Dynamics NAV 5.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11308,name:"Windows Server Update Services 3.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11350,name:"Microsoft ProClarity Web Standard 6.3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11402,name:"Microsoft Intelligent Application Gateway 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11593,name:"Microsoft System Center Capacity Planner 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11725,name:"Microsoft System Center Configuration Manager 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11773,name:"Microsoft Office PerformancePoint Server 2007, 64 Bit Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11792,name:"Microsoft System Center Configuration Manager 2007 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11793,name:"Microsoft System Center Virtual Machine Manager 2007",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11872,name:"Microsoft Office Communications Server 2007 R2 Best Practices Analyzer",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11917,name:"Microsoft Dynamics CRM 4.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:11920,name:"Microsoft Visual C# 2008 Express Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12077,name:"Microsoft Visual Basic 2008 Express Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12078,name:"Microsoft Visual C++ 2008 Express Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12079,name:"Microsoft Visual Web Developer 2008 Express Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12094,name:"Windows Server 2008 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12095,name:"Windows Server 2008 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12096,name:"Windows Server 2008 Datacenter",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12097,name:"Windows Server 2008 for Itanium-Based Systems",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12098,name:"Windows Web Server 2008",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12248,name:"Windows Server 2008 Enterprise without Hyper-V",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12249,name:"Windows Server 2008 Standard without Hyper-V",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12250,name:"Windows Server 2008 Datacenter without Hyper-V",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12316,name:"Microsoft Office PerformancePoint 2007 Management Reporter",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12334,name:"Microsoft Search Server 2008",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12335,name:"Microsoft Search Server 2008 Express",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12347,name:"Microsoft Dynamics AX 2009",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12382,name:"Microsoft Expression Web 2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12600,name:"Microsoft SQL Server 2008 Express",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12602,name:"Microsoft SQL Server 2008 Express with Advanced Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12651,name:"Windows Small Business Server 2008 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12652,name:"Windows Small Business Server 2008 Premium",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12714,name:"Microsoft System Center Virtual Machine Manager 2008",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12716,name:"Windows Essential Business Server 2008",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12717,name:"Windows HPC Server 2008",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12718,name:"Microsoft HPC Pack 2008",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12801,name:"Microsoft Application Virtualization 4.5 for Terminal Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12813,name:"Microsoft Hyper-V Server 2008",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12896,name:"Microsoft Application Virtualization 4.5 for Windows Desktops",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12900,name:"Microsoft Dynamics NAV 2009",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12944,name:"Microsoft Semblio Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12950,name:"Windows Server 2008 for Windows Essential Server Solutions",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12951,name:"Windows Server 2008 for Windows Essential Server Solutions without Hyper-V",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12953,name:"Microsoft Office Communicator 2007 Mobile R2 for Java",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12954,name:"Microsoft Office Communications Server 2007 R2 Group Chat",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12955,name:"Microsoft Unified Communications Managed API v.2.0 Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12972,name:"Windows Embedded POSReady 2009",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12990,name:"Microsoft Office Communicator 2007 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12992,name:"Microsoft Office Communicator Mobile",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12993,name:"Microsoft Office Communications Server 2007 R2 Attendant",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12994,name:"Microsoft Office Communications Server 2007 R2 Enterprise Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:12995,name:"Microsoft Office Communications Server 2007 R2 Standard Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13005,name:"Agent Communications Panel for Microsoft Dynamics CRM 4.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13020,name:"Windows Server 2008 R2 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13022,name:"Windows Server 2008 R2 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13023,name:"Windows Server 2008 R2 Datacenter",disclaimer:{productId:13185,disclaimerContents:[{name:"Microsoft Azure support",body:"Support request for the product you selected must be submitted through the <a href='azure.microsoft.com'>Azure website<\/a>.",applicableRegion:"en-us",isPremier:!0,disclaimerLevel:"readOnly"}]},redirect:null},{applicableRegion:"en-us",pesId:13028,name:"Windows Web Server 2008 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13185,name:"Microsoft Azure Cloud Services",disclaimer:{productId:13185,disclaimerContents:[{name:"Microsoft Azure support",body:"Support request for the product you selected must be submitted through the <a href='azure.microsoft.com'>Azure website<\/a>.",applicableRegion:"en-us",isPremier:!0,disclaimerLevel:"blocking"}]},redirect:null},{applicableRegion:"en-us",pesId:13186,name:"Microsoft Azure Service Bus",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13192,name:"Windows 7 Professional",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13195,name:"Windows 7 Ultimate",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13197,name:"Windows 7 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13203,name:"Microsoft Sync Framework",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13223,name:"Microsoft Office Communications Server 2007 R2 XMPP Gateway",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13245,name:"Microsoft Synchronization Services for ADO.NET 1.0 Service Pack 1",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13265,name:"Windows Server 2008 R2 for Itanium-Based Systems",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13267,name:"Microsoft Hyper-V Server 2008 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13274,name:"Windows Automated Installation Kit for Windows 7",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13345,name:"Microsoft Sync Framework 2.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13346,name:"Microsoft Expression Studio 3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13347,name:"Microsoft Expression Web 3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13348,name:"Microsoft Expression Encoder 3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13349,name:"Microsoft Expression Design 3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13370,name:"Microsoft Expression Blend 3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13428,name:"Windows Virtual PC",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13430,name:"Microsoft Exchange Server 2010 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13434,name:"Microsoft Exchange Server 2010 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13482,name:"Windows Driver Kit 7.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13490,name:"Microsoft Internet Information Services 7.5",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13491,name:"Microsoft Azure SQL Database",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13499,name:"Microsoft Forefront Threat Management Gateway 2010 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13500,name:"Microsoft Forefront Threat Management Gateway 2010 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13503,name:"Microsoft Forefront Unified Access Gateway 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13505,name:"Windows Identity Foundation",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13511,name:"Microsoft Forefront Identity Manager 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13512,name:"Microsoft Forefront Endpoint Protection 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13522,name:"Microsoft Enterprise Desktop Platform",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13534,name:"Microsoft Forefront Protection Suite",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13554,name:"Microsoft Application Virtualization 4.6 for Windows Desktops",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13555,name:"Microsoft Application Virtualization Hosting 4.6 for Windows Desktops",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13556,name:"Microsoft Application Virtualization 4.6 for Terminal Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13558,name:"Microsoft Application Virtualization 4.6 Sequencer",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13581,name:"Microsoft Dynamics CRM 2011",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13585,name:"Microsoft Access 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13586,name:"Microsoft Excel 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13588,name:"Microsoft InfoPath 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13589,name:"Microsoft OneNote 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13591,name:"Microsoft Outlook 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13592,name:"Microsoft PowerPoint 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13594,name:"Microsoft Project Professional 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13595,name:"Microsoft Project Standard 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13596,name:"Microsoft Publisher 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13597,name:"Microsoft Visio Standard 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13598,name:"Microsoft Visio Professional 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13599,name:"Microsoft Visio Premium 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13600,name:"Microsoft Word 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13604,name:"Microsoft Office Professional 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13605,name:"Microsoft Office Professional Academic 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13654,name:"Windows MultiPoint Server 2010 Academic",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13756,name:"Microsoft Dynamics GP 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13760,name:"Microsoft SQL Server 2008 R2 Express",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13761,name:"Microsoft SQL Server 2008 R2 Express with Advanced Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13762,name:"Microsoft System Center Data Protection Manager 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13763,name:"Microsoft System Center Essentials 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13769,name:"Windows Communication Foundation 4",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13770,name:"Windows Workflow Foundation 4.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13777,name:"Microsoft ASP.NET 4",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13795,name:"Microsoft Office Professional Plus 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13796,name:"Microsoft Project Server 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13798,name:"Microsoft SharePoint Designer 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13799,name:"Microsoft Groove Server 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13801,name:"Microsoft Outlook 2010 with Business Contact Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13802,name:"Microsoft Search Server 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13803,name:"Microsoft Search Server 2010 Express",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13804,name:"Microsoft SharePoint Workspace 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13805,name:"Microsoft SharePoint 2010 For Internet Sites Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13806,name:"Microsoft SharePoint 2010 For Internet Sites Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13807,name:"Microsoft SharePoint Server 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13808,name:"Microsoft SharePoint Foundation 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13809,name:"Microsoft FAST Search Server 2010 for SharePoint",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13810,name:"Microsoft FAST Search Server 2010 for SharePoint Internet Sites",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13811,name:"Microsoft Excel Web App",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13812,name:"Microsoft OneNote Web App",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13813,name:"Microsoft PowerPoint Web App",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13814,name:"Microsoft Word Web App",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13815,name:"Microsoft System Center Service Manager 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13817,name:"Microsoft Visual Studio 2010 Professional",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13821,name:"Microsoft Visual Studio 2010 Premium",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13822,name:"Microsoft Visual Studio 2010 Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13823,name:"Microsoft Visual Studio 2010 Ultimate",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13824,name:"Microsoft Visual Studio Test Professional 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13825,name:"Microsoft Visual Studio Team Foundation Server 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13828,name:"Microsoft Visual Web Developer 2010 Express",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13829,name:"Microsoft Visual C# 2010 Express",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13830,name:"Microsoft Visual C++ 2010 Express",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13831,name:"Microsoft Visual Basic 2010 Express",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13832,name:"Microsoft Visual Studio Lab Management 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13833,name:"Microsoft Visual Studio Team Agents 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13835,name:"Microsoft Visual Studio 2010 Remote Debugger",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13844,name:"Microsoft Visual Studio Team Explorer Everywhere 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13846,name:"Microsoft Office Standard 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13856,name:"Microsoft SQL Server Migration Assistant 2008 for Sybase PowerBuilder Applications v1.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13867,name:"Windows Server AppFabric",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13870,name:"Windows Embedded Standard 7",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13876,name:"Windows Communication Foundation RIA Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13895,name:"Microsoft Commerce Server 2009 R2 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13896,name:"Microsoft Commerce Server 2009 R2 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13963,name:"Microsoft HPC Pack 2008 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:13970,name:"Internet Information Services Smooth Streaming Client 1.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14064,name:"Microsoft Sync Framework 2.1",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14069,name:"Microsoft Host Integration Server 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14071,name:"Microsoft Office for Mac Standard 2011",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14072,name:"Microsoft Excel for Mac 2011",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14073,name:"Microsoft Outlook for Mac 2011",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14076,name:"Microsoft Office for Mac Home and Business 2011",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14079,name:"Microsoft Office Communicator 2011 for Mac",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14080,name:"Microsoft PowerPoint for Mac 2011",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14081,name:"Microsoft Word for Mac 2011",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14091,name:"Windows 7 Professional for Embedded Systems",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14092,name:"Windows 7 Ultimate for Embedded Systems",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14104,name:"Microsoft System Center Configuration Manager 2007 R3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14109,name:"Microsoft Lync 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14110,name:"Microsoft Lync Phone Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14111,name:"Microsoft Lync 2010 Attendant",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14112,name:"Microsoft Lync 2010 Attendee",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14115,name:"Microsoft Unified Communications Managed API v3.0 Core Runtime",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14118,name:"Microsoft Lync Server 2010, Group Chat",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14120,name:"Microsoft Lync 2010 Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14127,name:"Windows Small Business Server 2011 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14136,name:"Microsoft Lync Server 2010 Standard Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14139,name:"Microsoft Lync Server 2010 Enterprise Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14162,name:"Microsoft Lync Server 2010 Planning Tool",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14170,name:"Duet Enterprise for Microsoft SharePoint and SAP",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14196,name:"Microsoft Dynamics SL 2011",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14200,name:"Microsoft Dynamics NAV 2009 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14202,name:"Windows Home Server 2011",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14203,name:"Windows Small Business Server 2011 Essentials",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14258,name:"Microsoft Dynamics AX 2012",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14268,name:"Microsoft SQL Server Compact 4.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14388,name:"Microsoft Visual Studio LightSwitch 2011",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14437,name:"Microsoft System Center 2012 Virtual Machine Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14466,name:"Microsoft System Center 2012 Orchestrator",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14490,name:"Microsoft System Center 2012 Data Protection Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14503,name:"BHOLD Suite",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14505,name:"Microsoft System Center 2012 Endpoint Protection",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14515,name:"Microsoft System Center 2012 App Controller",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14517,name:"Microsoft System Center 2012 Configuration Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14526,name:"Windows Driver Kit 8.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14529,name:"Microsoft System Center 2012 Operations Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14530,name:"Microsoft System Center 2012 Service Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14531,name:"Microsoft System Center 2012 Endpoint Protection for Mac",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14532,name:"Microsoft System Center 2012 Endpoint Protection for Linux",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14539,name:"Microsoft OneNote for iPhone",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14540,name:"Microsoft OneNote for Android",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14654,name:"Windows 8.x Store App Dev",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14693,name:"Microsoft Forefront Identity Manager 2010 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14694,name:"Windows Software Development Kit for Windows 8",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14695,name:"Microsoft Internet Information Services 8.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14697,name:"Microsoft Visual Studio Team Explorer Everywhere 2012",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14699,name:"Microsoft Visual Studio Ultimate 2012",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14701,name:"Microsoft Visual Studio Team Foundation Server 2012",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14725,name:"Microsoft User Experience Virtualization",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14727,name:"Microsoft Visual Studio Express 2012 for Windows 8",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14728,name:"Microsoft Visual Studio 2012 Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14729,name:"Microsoft Visual Studio 2012 Remote Tools",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14730,name:"Team Explorer for Microsoft Visual Studio 2012",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14731,name:"Agents for Visual Studio 2012",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14732,name:"Microsoft Visual Studio Express 2012 for Web",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14734,name:"Microsoft Visual Studio Team Foundation Server Express 2012",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14735,name:"Microsoft Visual Studio 2012 Test Professional",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14737,name:"Microsoft Visual Studio Professional 2012",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14738,name:"Microsoft Visual Studio Premium 2012",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14748,name:"Microsoft Azure App Service Web Apps",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14749,name:"Microsoft Azure Virtual Machine running Windows",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14754,name:"Microsoft Platform Ready Test Tool 3.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14783,name:"Microsoft Azure Cache Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14785,name:"Microsoft Azure Active Directory",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14789,name:"Microsoft Azure BizTalk Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14822,name:"Microsoft Dynamics NAV 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14842,name:"Windows Server 2012 Datacenter",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14843,name:"Windows Server 2012 Essentials",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14844,name:"Windows Server 2012 Foundation",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14845,name:"Windows Server 2012 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14846,name:"Windows Multipoint Server 2012 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14847,name:"Windows Multipoint Server 2012 Premium",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14850,name:"Windows 8 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14854,name:"Windows 8 Pro",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14855,name:"Windows 8",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14856,name:"Microsoft Hyper-V Server 2012",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14861,name:"Microsoft ASP.NET 4.5",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14862,name:"Windows Workflow Foundation 4.5",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14864,name:"Windows Communication Foundation 4.5",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14867,name:"Microsoft Visual Studio Express 2012 for Windows Phone",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14873,name:"Microsoft Application Virtualization 5.0 for Windows Desktops",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14874,name:"Microsoft Application Virtualization 5.0 for Remote Desktop Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14875,name:"Microsoft Application Virtualization Hosting 5.0 for Windows Desktops",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14879,name:"Windows Phone SDK 8.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14880,name:"Microsoft Deployment Toolkit 2012 Update 1",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14882,name:"Microsoft Visual Studio Express 2012 for Windows Desktop",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14884,name:"Microsoft Dynamics GP 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14885,name:"Microsoft Azure Media Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14886,name:"Microsoft Exchange Server 2013 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14891,name:"Windows RT",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14894,name:"Microsoft Outlook 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14895,name:"Microsoft Excel 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14896,name:"Microsoft Access 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14897,name:"Microsoft InfoPath 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14898,name:"Microsoft Lync 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14899,name:"Microsoft Office Home and Business 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14900,name:"Microsoft Office Home and Student 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14901,name:"Microsoft Office Professional 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14902,name:"Microsoft Office Standard 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14903,name:"Microsoft Office Professional Plus 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14904,name:"Microsoft Project Professional 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14905,name:"Microsoft Project 2013 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14906,name:"Microsoft Project Server 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14907,name:"Microsoft OneNote 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14908,name:"Microsoft PowerPoint 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14909,name:"Microsoft Publisher 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14910,name:"Microsoft SharePoint Server 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14911,name:"Microsoft Visio Standard 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14912,name:"Microsoft Visio Professional 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14913,name:"Microsoft Word 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14915,name:"Microsoft Lync Server 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14916,name:"Microsoft Exchange Server 2013 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14918,name:"Microsoft SharePoint Foundation 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14921,name:"Windows Phone 8 for Business",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14926,name:"Microsoft Office Home and Student 2013 RT",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14937,name:"Microsoft Lync VDI 2013 plug-in",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14938,name:"Microsoft Audit and Control Management Server 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14941,name:"Microsoft Office Web Apps Server 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14946,name:"Perceptive Pixel by Microsoft Touch Devices",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14947,name:"Microsoft Azure Multi-Factor Authentication - PhoneFactor",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14948,name:"Microsoft Lync Basic 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14949,name:"Microsoft Lync Web App",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14954,name:"Surface RT",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14959,name:"Microsoft Lync Windows Store App",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14964,name:"Microsoft SharePoint Designer 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14965,name:"Microsoft Dynamics AX 2012 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14967,name:"Microsoft Lync Server 2013 Persistent Chat Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14968,name:"Microsoft Lync Server 2013 Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14969,name:"Microsoft Lync Server 2013 Debugging Tools",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14970,name:"Microsoft Lync Server 2013 Watcher Node",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14971,name:"Microsoft Lync Server 2013 Monitoring Management Pack",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14972,name:"Microsoft Lync Server 2013 Best Practices Analyzer",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14973,name:"Microsoft Lync 2013 Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14974,name:"Microsoft Lync Server 2013 Resource Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14996,name:"Dynamics CRM Online",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:14997,name:"Microsoft Azure Rights Management",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15009,name:"Workflow Manager 1.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15013,name:"Microsoft BitLocker Administration and Monitoring 2.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15036,name:"Windows Azure Pack",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15046,name:"Microsoft Azure App Service Mobile Apps",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15052,name:"Surface Pro",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15071,name:"Microsoft Virtual Machine Converter 2.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15073,name:"Microsoft Lync Server 2013 Planning Tool",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15074,name:"Microsoft Lync Server 2013 Stress and Performance Tool",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15075,name:"Windows Embedded 8 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15078,name:"Microsoft Azure HDInsight Service",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15081,name:"Microsoft SharePoint Newsfeed",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15105,name:"Microsoft Diagnostics and Recovery Toolset 8.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15108,name:"Microsoft BizTalk Server 2013 Branch",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15109,name:"Microsoft BizTalk Server 2013 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15110,name:"Microsoft BizTalk Server 2013 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15111,name:"Windows Server Update Services for Windows Server 2012",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15112,name:"Microsoft Visual Studio Team System 2008 Team Explorer",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15113,name:"Microsoft Visual Studio Team Explorer 2010",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15115,name:"Windows Embedded 8 Industry Pro",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15116,name:"Windows Embedded 8 Industry Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15128,name:"Microsoft Lync 2013 for Windows Phone",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15129,name:"Microsoft Lync 2013 for iPhone",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15130,name:"Microsoft Lync 2013 for iPad",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15131,name:"Microsoft Lync 2013 for Android",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15134,name:"Microsoft Unified Communications Managed API 4.0 Runtime",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15138,name:"Enhanced Mitigation Experience Toolkit 4.x",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15139,name:"Internet Explorer 11",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15146,name:"Lync Meeting room",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15157,name:"Microsoft Visual Studio Team Foundation Server 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15158,name:"Agents for Microsoft Visual Studio 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15159,name:"Team Explorer for Visual Studio 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15162,name:"Microsoft Visual Studio Team Explorer Everywhere for Team Foundation Server",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15165,name:"Microsoft Visual Studio 2013 Remote Tools",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15167,name:"Microsoft Visual Studio 2013 Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15168,name:"Microsoft Visual Studio 2013 Modeling Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15169,name:"IntelliTrace Collector for Visual Studio",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15170,name:"Microsoft Visual Studio Team Foundation Server Express 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15174,name:"Microsoft Power Query for Excel",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15183,name:"Windows Embedded Compact 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15184,name:"Microsoft Office Mobile for iPhone",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15185,name:"Microsoft OneNote for iPad",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15186,name:"Microsoft Office Mobile for Windows Phone",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15192,name:"Windows Hardware Certification Kit for Windows 8.1",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15193,name:"Windows Driver Kit 8.1",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15194,name:"Microsoft OneNote for Windows Phone",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15195,name:"Microsoft Visual Studio Professional 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15196,name:"Microsoft Visual Studio Premium 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15197,name:"Microsoft Visual Studio Ultimate 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15198,name:"Microsoft Visual Studio Test Professional 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15199,name:"Microsoft Visual Studio Express 2013 for Windows Desktop",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15200,name:"Microsoft Visual Studio Express 2013 for Web",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15201,name:"Microsoft Visual Studio Express 2013 for Windows",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15207,name:"Microsoft Azure Recovery Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15210,name:"Microsoft System Center 2012 R2 Configuration Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15211,name:"Microsoft System Center 2012 R2 Operations Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15212,name:"Microsoft System Center 2012 R2 Virtual Machine Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15214,name:"Microsoft System Center 2012 R2 Data Protection Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15215,name:"Microsoft System Center 2012 R2 App Controller",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15216,name:"Microsoft System Center 2012 R2 Service Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15217,name:"Microsoft System Center 2012 R2 Endpoint Protection",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15219,name:"Microsoft Office Mobile for Android",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15220,name:"Microsoft Host Integration Server 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15221,name:"Microsoft Dynamics CRM 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15223,name:"Microsoft Dynamics NAV 2013 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15227,name:"Microsoft BizTalk Server 2013 Developer",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15234,name:"Windows Embedded 8.1 Industry Pro",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15235,name:"Windows Embedded 8.1 Industry Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15236,name:"Microsoft Unified Communications Managed API 4.0 Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15239,name:"Microsoft User Experience Virtualization 2.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15240,name:"Microsoft Diagnostics and Recovery Toolset 8.1",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15242,name:"Windows Server 2012 R2 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15243,name:"Windows Server 2012 R2 Datacenter",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15244,name:"Windows Server 2012 R2 Essentials",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15245,name:"Windows Server 2012 R2 Foundation",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15248,name:"Microsoft Hyper-V Server 2012 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15250,name:"Skype for iPhone",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15251,name:"Skype for iPad",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15252,name:"Skype for Mac",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15253,name:"Skype for Symbian",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15254,name:"Skype for modern Windows",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15255,name:"Skype for Android",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15256,name:"Skype for Blackberry",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15257,name:"Skype for Linux",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15258,name:"Skype for Windows Phone",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15259,name:"Skype for Windows desktop",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15277,name:"RMS sharing app for Mac",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15294,name:"Windows Software Development Kit for Windows 8.1",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15310,name:"Surface 2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15311,name:"Surface Pro 2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15312,name:"Test Agent",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15315,name:"Windows 8.1",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15316,name:"Windows 8.1 Pro",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15318,name:"Windows RT 8.1",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15320,name:"Windows 8.1 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15322,name:"Microsoft .NET Framework 4.5.2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15325,name:"Microsoft Internet Information Services 8.5",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15327,name:"Test Controller",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15333,name:"Power Map for Microsoft Excel",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15336,name:"Release Management for Visual Studio 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15364,name:"Microsoft Lync Server 2010 Multitenant Hosting Pack",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15365,name:"Microsoft Lync Server 2013 Multitenant Hosting Pack",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15374,name:"Cloud Platform System",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15399,name:"Microsoft Deployment Toolkit 2013",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15400,name:"Microsoft Azure Traffic Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15403,name:"Microsoft Dynamics GP 2013 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15425,name:"Microsoft Dynamics AX 2012 R3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15427,name:"Microsoft OneNote for Mac",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15428,name:"Microsoft Social Engagement",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15429,name:"Microsoft Dynamics Marketing",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15430,name:"Microsoft SQL Server 2014 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15431,name:"Microsoft SQL Server 2014 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15432,name:"Microsoft SQL Server 2014 Business Intelligence",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15433,name:"Microsoft SQL Server 2014 Developer",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15434,name:"Microsoft SQL Server 2014 Web",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15435,name:"Microsoft SQL Server 2014 Enterprise Core",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15436,name:"Microsoft SQL Server 2014 Express",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15438,name:"Microsoft Azure StorSimple Appliance",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15444,name:"Microsoft Azure Scheduler",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15454,name:"Microsoft Azure Alert Service",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15459,name:"Microsoft OneNote Online",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15460,name:"Microsoft Excel Online",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15461,name:"Microsoft PowerPoint Online",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15462,name:"Microsoft Word Online",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15463,name:"Microsoft Word for iPad, iPhone and iPod touch",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15464,name:"Microsoft Excel for iPad, iPhone and iPod touch",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15465,name:"Microsoft PowerPoint for iPad, iPhone and iPod touch",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15466,name:"Microsoft HPC Pack 2012 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15469,name:"Microsoft BitLocker Administration and Monitoring 2.5",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15480,name:"Microsoft Azure ExpressRoute",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15487,name:"Microsoft BizTalk Server 2013 R2 Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15488,name:"Microsoft BizTalk Server 2013 R2 Standard",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15489,name:"Microsoft BizTalk Server 2013 R2 Developer",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15490,name:"Microsoft BizTalk Server 2013 R2 Branch",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15491,name:"Microsoft Forefront Threat Management Gateway Web Protection Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15526,name:"Microsoft Azure Virtual Network",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15527,name:"Microsoft Azure AutoScale Service",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15528,name:"Microsoft Azure Content Delivery Network",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15535,name:"Microsoft System Center 2012 R2 Endpoint Protection for Linux",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15536,name:"Microsoft System Center 2012 R2 Endpoint Protection for Mac",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15551,name:"Microsoft Azure API Management",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15560,name:"Microsoft Dynamics NAV 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15567,name:"Microsoft Dynamics SL 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15568,name:"Microsoft Azure Search",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15570,name:"Microsoft Azure Machine Learning",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15575,name:"Surface Pro 3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15584,name:"Microsoft Intune",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15585,name:"Microsoft Azure DocumentDB",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15586,name:"Microsoft SQL Server Migration Assistant V5.3 for Oracle",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15587,name:"Microsoft SQL Server Migration Assistant V5.3 for Sybase ASE",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15588,name:"Microsoft SQL Server Migration Assistant V5.3 for Access",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15589,name:"Microsoft SQL Server Migration Assistant V5.3 for MySQL",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15607,name:"Microsoft Azure Automation",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15613,name:"Microsoft Azure Data Factory",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15614,name:"Microsoft Azure Batch",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15615,name:"Microsoft Dynamics CRM 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15619,name:"Windows Embedded 8.1 Pro",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15620,name:"Windows Embedded 8 Pro",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15622,name:"Outlook for Mac for Office 365",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15626,name:"Microsoft Dynamics GP 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15629,name:"Microsoft Azure Storage",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15631,name:"Parature, from Microsoft",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15652,name:"Microsoft SQL Server Migration Assistant V6.0 for Access",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15653,name:"Microsoft SQL Server Migration Assistant V6.0 for Sybase ASE",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15654,name:"Microsoft SQL Server Migration Assistant V6.0 for Oracle",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15655,name:"Microsoft SQL Server Migration Assistant V6.0 for MySQL",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15656,name:"Scout (InMage – 8.0)",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15657,name:"Microsoft Azure Key Vault",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15658,name:"Microsoft Azure Mobile Engagement",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15661,name:"Microsoft Dynamics AX 2012 R3 CU8",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15662,name:"Microsoft Virtual Machine Converter 3.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15663,name:"Microsoft Azure Stream Analytics",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15665,name:"Kinect for Windows Software Development Kit 2.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15674,name:"Windows Storage Server 2012 R2 Essentials",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15677,name:"Microsoft Wireless Display Adapter",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15684,name:"Visual Studio 2013 Community Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15691,name:"Microsoft User Experience Virtualization 2.1",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15693,name:"Microsoft Azure Application Insights",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15695,name:"Microsoft Excel for Android",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15696,name:"Microsoft PowerPoint for Android",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15697,name:"Microsoft Word for Android",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15701,name:"Microsoft .NET Framework 4.6",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15705,name:"Designer Bluetooth Desktop",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15710,name:"Skype for Business 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15711,name:"Skype for Business Server 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15714,name:"Skype for Business for Android",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15719,name:"Windows Driver Kit 10",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15720,name:"Hardware Lab Kit for Windows 10",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15724,name:"Windows Software Development Kit for Windows 10",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15725,name:"Microsoft Operations Management Suite",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15726,name:"Outlook Mail & Calendar Apps for Windows 10",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15741,name:"Local Administrator Password Solution 1.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15769,name:"Surface 3",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15771,name:"Microsoft Dynamics NAV managed service for partners",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15792,name:"Microsoft Azure App Service API Apps",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15798,name:"Windows 10 IoT Core",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15801,name:"Skype for Business for Windows Mobile",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15802,name:"Microsoft Advanced Threat Analytics",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15808,name:"Microsoft Office Standard 2016 for Mac",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15809,name:"Microsoft Excel 2016 for Mac",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15810,name:"Microsoft Outlook 2016 for Mac",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15811,name:"Microsoft Word 2016 for Mac",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15812,name:"Microsoft PowerPoint 2016 for Mac",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15818,name:"Microsoft Azure SQL Data Warehouse",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15820,name:"Microsoft Edge Development",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15821,name:"Microsoft Identity Manager 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15822,name:"Visual Studio Team Foundation Server 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15823,name:"Visual Studio Team Foundation Server 2015 Express",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15824,name:"Visual Studio Professional 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15825,name:"Visual Studio Enterprise 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15826,name:"Visual Studio Test Professional 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15827,name:"Visual Studio Community Edition 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15828,name:"Visual Studio Express 2015 for Windows 10",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15829,name:"Visual Studio Express 2015 for Desktop",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15830,name:"Visual Studio Express 2015 for Web",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15831,name:"Visual Studio 2015 Software Development Kit",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15842,name:"Microsoft Azure Service Fabric",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15843,name:"Microsoft Dynamics GP 2015 R2",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15846,name:"Release Management for Visual Studio 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15856,name:"Microsoft Wireless Desktop 900",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15859,name:"Microsoft Wireless Desktop 3050",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15860,name:"Microsoft Wireless Comfort Desktop 5050",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15861,name:"Microsoft Wireless Desktop 850",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15862,name:"Microsoft Wireless Keyboard 850",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15871,name:"Microsoft R Server/Rev Analytics",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15872,name:"Skype for Business 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15875,name:"Surface Hub",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15876,name:"Windows 10 IoT Enterprise 2015 LTSB",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15877,name:"Windows 10 IoT Mobile Enterprise",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15879,name:"Microsoft Azure Data Lake Store",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15885,name:"Microsoft Office Professional Plus 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15886,name:"Microsoft Office Standard 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15887,name:"Word 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15888,name:"Excel 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15889,name:"PowerPoint 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15890,name:"OneNote 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15891,name:"Outlook 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15892,name:"Microsoft Publisher 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15893,name:"Access 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15894,name:"Microsoft Project Standard 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15895,name:"Microsoft Project Professional 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15897,name:"Visio Standard 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15898,name:"Visio Professional 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15905,name:"Windows 10 Home, released in July 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15909,name:"Windows 10 Pro, released in July 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15911,name:"Windows 10 Education, released in July 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15916,name:"Windows 10 Enterprise 2015 LTSB",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15921,name:"Windows 10 Enterprise, released in July 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15922,name:"Microsoft Azure Application Gateway",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15923,name:"Microsoft ASP.NET 4.6",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15926,name:"Exchange Server 2016 Enterprise Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15928,name:"Exchange Server 2016 Standard Edition",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15934,name:"Microsoft Application Virtualization 5.1 for Windows Desktops",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15935,name:"Microsoft Application Virtualization Hosting 5.1 for Windows Desktops",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15936,name:"Microsoft Application Virtualization 5.1 for Remote Desktop Services",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15938,name:"Microsoft Diagnostics and Recovery Toolset 10.0",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15940,name:"Microsoft Azure Data Lake Analytics",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15942,name:"Microsoft Azure Billing Usage & RateCard APIs",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15944,name:"Windows 10 Universal App Dev",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15945,name:"Microsoft Azure IoT Suite",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15946,name:"Microsoft Azure IoT Hub",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15947,name:"Microsoft Azure Security Center",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15956,name:"Microsoft Dynamics NAV 2016",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15959,name:"Skype for Business for iOS",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15963,name:"Windows 10 Mobile Enterprise, released in November 2015",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15968,name:"Microsoft Azure DevTest Labs",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15973,name:"Microsoft Azure Notification Hub",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15975,name:"Windows Store for Business",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15979,name:"Surface Pro 4",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15980,name:"Surface Book",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15981,name:"Enhanced Mitigation Experience Toolkit 5.x",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15982,name:"Microsoft System Center Endpoint Protection",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15983,name:"System Center Configuration Manager",disclaimer:null,redirect:null},{applicableRegion:"en-us",pesId:15986,name:"Microsoft Dynamics CRM 2016",disclaimer:null,redirect:null}]}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("fakeProductsService",["$q","$timeout",function(n){var t=n.defer(),u=t.promise,i=n.defer(),f=i.promise,r,e;this.getSupportTopics=function(){return t.resolve(r),u};this.getScopingQuestions=function(){return i.resolve([]),f};r=[{pesId:"9101",locale:"en-us",level:0,id:"31463491",name:"Client Issues",description:"Issues that are related to installing, configuring, and using WSUS to update clients.",subtopics:[{pesId:"9101",locale:"en-us",level:1,id:"31463494",name:"Client connectivity issues",description:"Client failures when connecting to update servers.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463495",name:"Client update configuration issues",description:"Client update failures and configuration issues.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463497",name:"High CPU and resource utilization",description:"Issues that are related to high CPU utilization, high utilization of other resources, or general performance problems.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463503",name:"Other",description:"Client issues that are not otherwise listed here.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463505",name:"Permissions and rights issues",description:"Issues that are related to user permissions and rights.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463509",name:"Updates Installation Issues",description:"Issues that are related to identifying, downloading, or installing updates.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463511",name:"WSUS client detection issues",description:"Issues that are related to WSUS client detection and identification.",subtopics:null}]},{pesId:"9101",locale:"en-us",level:0,id:"31463493",name:"Server Issues",description:"Issues that are related to installing, configuring, and using the WSUS server and console.",subtopics:[{pesId:"9101",locale:"en-us",level:1,id:"31463496",name:"Database and SQL Server issues",description:"Issues that are related to SQL Server configuration and connectivity.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463498",name:"High CPU and resource utilization",description:"Issues that are related to high CPU utilization, high utilization of other resources, or general performance problems.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463499",name:"IIS-related issues",description:"Issues that are related to IIS configuration and connectivity.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463500",name:"Management Console issues",description:"Management Console error messages or usage-related issues.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463501",name:"Managing clients",description:"Client management errors and usage issues.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463502",name:"Managing security updates",description:"Issues that are related to managing security updates.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463504",name:"Other",description:"Server issues that are not otherwise listed here.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463506",name:"Permissions and rights issues",description:"Issues that are related to user permissions and rights.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463507",name:"Setup and installation issues",description:"Issues that are related to installing or configuring the server components.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463508",name:"Synchronization issues",description:"Issues that are related to synchronizing updates.",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"31463510",name:"Upstream Server (USS) and Downstream Server (DSS) Issues",description:"Any issue that is related to the installation and use of upstream servers (USS) or downstream servers (DSS).",subtopics:null},{pesId:"9101",locale:"en-us",level:1,id:"32321532",name:"CSA update import",description:"Issues that are related to importing Custom Support Agreement (CSA) updates into Windows Server Update Services (WSUS).",subtopics:null}]}];e=[{pesId:"14665",locale:"en-us",level:0,id:"32090809",name:"Account and Password",description:"",subtopics:[{pesId:"14665",locale:"en-us",level:1,id:"32090818",name:"Blocked Accounts",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090827",name:"Contact list",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090828",name:"Creating an account",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090829",name:"Deleting an account",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090834",name:"My profile",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090839",name:"Password / SkypeName problems",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090849",name:"Signing in with a Microsoft account",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32446947",name:"Cannot access paid services",description:"",subtopics:null}]},{pesId:"14665",locale:"en-us",level:0,id:"32090810",name:"Calling",description:"",subtopics:[{pesId:"14665",locale:"en-us",level:1,id:"32090819",name:"Call forwarding",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090820",name:"Call transfer",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090821",name:"Caller ID",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090822",name:"Calling Phones and mobiles",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090824",name:"Calling rates",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090830",name:"Group video calling",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090835",name:"Online Numbers (SkypeIn)",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090851",name:"Skype Credit (Pay as you go)",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090860",name:"Skype To Go Number",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090862",name:"Skype to Skype calls",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090867",name:"Subscriptions",description:"",subtopics:null},{pesId:"14665",locale:"en-us",level:1,id:"32090870",name:"Video calling",description:"",subtopics:null}]},{pesId:"14665",locale:"en-us",level:0,id:"32090811",name:"Mobile / Other Devices",description:"",subtopics:null}]}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("fileUploaderService",["$http","$q","$log","Upload",function(n,t,i,r){function u(n,i){var f={name:"FileUploaderService.DoFileUpload",description:"Upload a single file to the DTM Workspace"},u=[];return angular.forEach(i,function(t){var i="/api/Incidents/Assets/FileWorkspaces/"+n+"/Files";u.push(r.upload({url:i,file:t,httpAppOptions:{qosOperation:f}}))}),t.all(u)}this.uploadToNewWorkspace=function(t){return n.post("api/Incidents/Assets/FileWorkspaces",null,{headers:{"Content-Type":"application/json"},httpAppOptions:{qosOperation:{name:"FileUploaderService.UploadToNewWorkspace",description:"Create a new DTM workspace for an incident and upload files to the workspace"}}}).then(function(n){return u(n.data.workspaceId,t)})};this.uploadToWorkspace=function(t,i){return n.post("api/Incidents/Assets/FileWorkspaces",{incidentId:i},{headers:{"Content-Type":"application/json"},httpAppOptions:{qosOperation:{name:"FileUploaderService.UploadToWorkspace",description:"Find or create DTM workspace for an incident and upload files to the workspace"}}}).then(function(n){return u(n.data.workspaceId,t)})};this.uploadFiles=function(n,t){return u(n,t)};this.setWorkspaceIncidentIdProperty=function(t,r){var u="/api/Incidents/Assets/FileWorkspaces/"+t+"/Properties",f={workspaceId:t,incidentId:r};return i.info("DTM worksapce with id "+t+" associated with incident "+r),n.post(u,f,{headers:{"Content-Type":"application/json"},httpAppOptions:{qosOperation:{name:"FileUploaderService.SetWorkspaceIncidentProperty",description:"Set the METIS incident ID on DTM workspace"}}})};this.getIncidentWorkspace=function(t){return n.get("/api/Incidents/Assets/FileWorkspaces",{params:{incidentId:t},httpAppOptions:{cacheBust:!0,qosOperation:{name:"FileUploaderService.GetIncidentWorkspace",description:"Get DTM file workspace for user specified incident ID"}}})};this.getWorkspaceFiles=function(t){return n.get("/api/Incidents/Assets/FileWorkspaces/"+t+"/Files",{httpAppOptions:{cacheBust:!0,qosOperation:{name:"FileUploaderService.GetWorkspaceFiles",description:"Get DTM workspace files for a user specified workspace id"}}})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("incidentSeverityService",["$http","$q","currentLanguageService",function(n,t,i){this.getSeverityConfig=function(t,r){var u={marketServiceId:r.serviceId,localeOverride:i.getLang(),pesId:t.pesId};return n.get("/api/Incidents/severityoptions/"+r.contractTypeName,{params:u,httpAppOptions:{cacheBust:!0,qosOperation:{name:"IncidentSeverityService.GetSeverityConfig",description:"Get severity configuration for an incident request"}}})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("IncidentsHubController",["$scope","$location","incidentsService","languageService","compassService","commercialInfoService","objectTableApi","clientConfig","authenticationHelperService","commercialMessageModalService",function(n,t,i,r,u,f,e,o,s,h){function p(){n.showFilters=!1;n.isFilterOpen=!1;n.showColumnPicker=!1;n.isColumnPickerOpen=!1;n.filterSelection={};n.columnSelection={};l={endDate:null,beginDate:null,openRequests:!0,closedRequests:!0}}function w(){var t=u.getCommercialIncidentsHub();t&&(n.myIncidentsView=t,n.objectTable=t.incidentsTable,d(),v(),k())}function b(){p();w()}function k(){i.getIncidents().then(function(t){angular.forEach(t,function(n){n.visible=!0});n.userIncidents=t;a()},function(){n.userIncidents=[];h.showStandardMessageModal({id:"get-incidents-error-acknowledge",title:n.myIncidentsView.generalServiceErrorAlert.title,message:n.myIncidentsView.generalServiceErrorAlert.body,dismissCaption:n.myIncidentsView.alertDialogDismissButtonCaption})})}function d(){var t,i;if(f.incidentTableColumnConfig())for(n.columnSelection=f.incidentTableColumnConfig(),t=0;t<n.objectTable.columns.length;t++)i=y(n.objectTable.columns[t].columnName),n.objectTable.columns[t].defaultColumn=n.columnSelection[i]?n.columnSelection[i].selected:!1;else{for(t=0;t<n.objectTable.columns.length;t++)i=y(n.objectTable.columns[t].columnName),n.columnSelection[i]={selected:n.objectTable.columns[t].defaultColumn?!0:!1,name:n.objectTable.columns[t].columnName};f.incidentTableColumnConfig(n.columnSelection)}}function c(n,t){return n.endDate=t.endDate,n.beginDate=t.beginDate,n.openRequests=t.openRequests,n.closedRequests=t.closedRequests,n}function v(){f.incidentTableFilterConfig()?c(n.filterSelection,f.incidentTableFilterConfig()):(c(n.filterSelection,l),f.incidentTableFilterConfig(c({},l)))}function g(){n.filterSelection&&f.incidentTableFilterConfig(c({},n.filterSelection))}function nt(){f.incidentTableFilterConfig(c({},l));c(n.filterSelection,l);a()}function a(){var i,r,u,t;(n.filterSelection.openRequests!=null||n.filterSelection.closedRequests!=null||n.filterSelection.beginDate!=null||n.filterSelection.endDate!=null)&&angular.forEach(n.userIncidents,function(n){n.visible=!1});n.filterSelection.openRequests&&angular.forEach(n.userIncidents,function(n){n.filterableStatus===2&&(n.visible=!0)});n.filterSelection.closedRequests&&angular.forEach(n.userIncidents,function(n){n.filterableStatus===3&&(n.visible=!0)});i=n.filterSelection.openRequests||n.filterSelection.closedRequests;n.filterSelection.beginDate&&n.filterSelection.endDate?(r=new Date(n.filterSelection.endDate),u=new Date(n.filterSelection.beginDate),angular.forEach(n.userIncidents,function(n){var t=new Date(n.incident.createdDateTime);i?n.visible&&(n.visible=t>=u&&t<=r):n.visible=t>=u&&t<=r})):n.filterSelection.beginDate?(t=new Date(n.filterSelection.beginDate),angular.forEach(n.userIncidents,function(n){var r=new Date(n.incident.createdDateTime);i?n.visible&&(n.visible=r>=t):n.visible=r>=t})):n.filterSelection.endDate&&(t=new Date(n.filterSelection.endDate),angular.forEach(n.userIncidents,function(n){var r=new Date(n.incident.createdDateTime);i?n.visible&&(n.visible=r<=t):n.visible=r<=t}))}function y(n){return n=n.toLowerCase(),n.replace(/ /g,"")}function tt(n,t,i,r){var u=e.objectByString(r,t),f=e.objectByString(i,t);return n?u-f:f-u}function it(n,t,i,r){var u=new Date(e.objectByString(r,t)),f=new Date(e.objectByString(i,t));return n?u-f:f-u}function rt(n,t,i,r){var u=e.objectByString(r,t),f=e.objectByString(i,t);return n?u<f?-1:u>f?1:0:u<f?1:u>f?-11:0}function ut(n,t,i,r){var u=e.getJoinProperty(r,t),f=e.getJoinProperty(i,t);return n?u<f?-1:u>f?1:0:u<f?1:u>f?-11:0}var l;n.newIncident=function(){t.path("/commercial/incidents/create")};n.sortData=function(t,i){var r=i.indexOf(e.joinToken)==0?e.joinToken:i;switch(r){case"incident.id":n.userIncidents.sort(function(n,r){return tt(t.ascending,i,n,r)});break;case"incident.status":case"incident.title":case"incident.severity":case"incident.productName":n.userIncidents.sort(function(n,r){return rt(t.ascending,i,n,r)});break;case"incident.createdDateTime":n.userIncidents.sort(function(n,r){return it(t.ascending,i,n,r)});break;case e.joinToken:n.userIncidents.sort(function(n,r){return ut(t.ascending,i,n,r)})}};n.formatData=function(n,t){var i=n,u,f;return t=="dateTimeFormat"&&(u=new Date(n),f=r.langLocale(),i=u.toLocaleDateString(f)),i};n.toggleFilterControls=function(t){n.showFilters=!n.showFilters;n.isFilterOpen=!t;n.showColumnPicker=n.showFilters?!1:n.showColumnPicker};n.toggleViewControls=function(t){n.showColumnPicker=!n.showColumnPicker;n.isColumnPickerOpen=!t;n.showFilters=n.showColumnPicker?!1:n.showFilters};n.applyFilter=function(){n.showFilters=!1;g();a()};n.cancelFilter=function(){n.showFilters=!1;v()};n.resetFilter=function(){n.showFilters=!1;nt()};n.applyColumPicker=function(){var i,r,u,t;n.showColumnPicker=!1;for(i in n.columnSelection)for(r=n.columnSelection[i].selected,u=n.columnSelection[i].name,t=0;t<n.objectTable.columns.length;t++)n.objectTable.columns[t].columnName==u&&(n.objectTable.columns[t].defaultColumn=r);f.incidentTableColumnConfig(n.columnSelection)};$(document).ready(function(){var n=$(".month-calendar input");n&&n.datepicker&&n.datepicker({showOtherMonths:!0,beforeShow:function(){$("#ui-datepicker-div").addClass("month-calendar-widget")}})});s.signIn(b)}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("incidentsService",["Upload","$http","$q","commercialInfoService","fileUploaderService","productsService","clientConfig","commercialTelemetryService",function(n,t,i,r,u,f,e,o){function c(n){return n.incidentDescriptionAndQuestions.files&&n.incidentDescriptionAndQuestions.files.length&&n.incidentDescriptionAndQuestions.files.length>0}function a(n){var t;return n&&n.incidentDescriptionAndQuestions&&n.incidentDescriptionAndQuestions.uploadedFiles&&n.incidentDescriptionAndQuestions.uploadedFiles.length&&n.incidentDescriptionAndQuestions.uploadedFiles.length>0&&(t=n.incidentDescriptionAndQuestions.uploadedFiles[0].workspaceId),t}function v(n){var r={name:"IncidentsService.DoSubmitRequest",description:"Create a new incident in METIS"},i={confirmation:{locale:n.primaryContact.primaryLanguage,incidentTitle:n.incidentDescriptionAndQuestions.title,productName:n.selectedProduct.name,severity:n.selectedSeverity.label,responseTime:n.selectedSeverity.sla,customerEmail:n.primaryContact.email,customerPhone:n.primaryContact.phoneNumber,contactPreference:n.primaryContact.preferredContactMethod.label,alternateRecipients:n.primaryContact.additionalEmails,primaryLanguageDisplay:n.primaryContact.primaryLanguageDisplay,secondaryLanguageDisplay:n.primaryContact.secondaryLanguageDisplay},customerCountry:n.selectedContract.isoCountryCode,description:n.incidentDescriptionAndQuestions.formattedDescription,entitlement:{entitlementId:n.selectedContract.accessId,entitlementType:n.selectedContract.entitlementTypeName,extendedProperties:[{key:"clarifyInstallationSiteId",value:n.selectedContract.clarifyInstallationSiteId+""},{key:"contractLineItemId",value:n.selectedContract.lineItemId+""},{key:"productServicePackageSku",value:n.selectedContract.sku},{key:"serviceLevel",value:n.selectedContract.contractTypeName}]},primaryContact:{firstName:n.primaryContact.firstName,lastName:n.primaryContact.lastName,preferredContactMethod:n.primaryContact.preferredContactMethod.preference,primaryEmailAddress:n.primaryContact.email,primaryPhoneNumber:n.primaryContact.phoneNumber,timeZoneId:n.primaryContact.timeZone.id,language:n.primaryContact.primaryLanguage},productId:n.selectedProduct.pesId,severity:n.selectedSeverity.metisValue,title:n.incidentDescriptionAndQuestions.title};return n.primaryContact.secondaryLanguage&&(i.primaryContact.alternateLanguage=n.primaryContact.secondaryLanguage),n.supportTopics&&n.supportTopics.length&&(i.supportTopicId=n.supportTopics[n.supportTopics.length-1].id),n.incidentDescriptionAndQuestions&&(i.fileLinks=l(n.incidentDescriptionAndQuestions.uploadedFiles)),y(n.selectedProduct.pesId,n.supportTopics).then(function(n){return i.diagnosticMetadata=n,t.post("/api/incidents/",i,{headers:{"Content-Type":"application/json"},httpAppOptions:{qosOperation:r}}).then(function(n){return n.data})})}function y(n,t){return n&&t&&t.length?f.getDiagnosticMetadata(n,t[t.length-1].id).then(function(i){return i?i:t.length>1?f.getDiagnosticMetadata(n,t[0].id).then(function(n){return n},function(){return""}):""},function(){return""}):i.when("")}function l(n){return n&&n.length?[{path:e.DtmWorkspaceConfiguration.AgentFacingUrl+n[0].workspaceId}]:[]}function p(n,t){var i=r.getIncident(n);i&&(i.incident.communications.push(t),r.saveIncident(i))}var s=!1,h=null;this.getIncidents=function(){var n;return r.incidentList()?(n=i.defer(),n.resolve(r.incidentList()),n.promise):(s||(h=t.get("/api/incidents",{httpAppOptions:{cacheBust:!0,qosOperation:{name:"IncidentsService.GetIncidents",description:"Get all incidents for a user from METIS"}}}).then(function(n){return r.incidentList(n.data),n.data},function(n){return i.reject(n)})["finally"](function(){s=!1}),s=!0),h)};this.getIncident=function(n){var e=r.getIncident(n),u;return e?(u=i.defer(),u.resolve(e),u.promise):t.get("/api/incidents/"+n,{httpAppOptions:{cacheBust:!0,qosOperation:{name:"IncidentsService.GetIncident",description:"Get a single incident by its incident id"}}}).then(function(n){return r.saveIncident(n.data),n.data}).then(function(n){var t=n.incident,i;return t&&t.SupportTopic?(i=t.SupportTopic.split("/")[0],f.getSupportTopics(t.productId).then(function(u){var o,f,e;if(u&&u.length)for(o=0;o<u.length;o++){if(f=u[o],f.id==i)return t.supportTopicName=f.name,r.saveIncident(n),n;if(f.subtopic&&f.subtopic.length)for(e=0;e<f.subtopic.length;e++)if(f.subtopic[e].id==i)return t.supportTopicName=f.subtopic[e].name,r.saveIncident(n),n}return n})):n})};this.updateIncident=function(n,i,r,u,f){var e={communications:[{subject:i,body:r,sender:u,isCustomerViewable:!0}],fileLinks:l(f)};return t.patch("/api/incidents/"+n,e,{headers:{"Content-Type":"application/json"},httpAppOptions:{qosOperation:{name:"IncidentsService.UpdateIncident",description:"Update an incident in METIS"}}}).then(function(){var t={communicationType:0,createdDateTime:(new Date).getTime(),directionCode:"0",modifiedDateTime:(new Date).getTime(),sentDateTime:(new Date).getTime(),subject:e.communications[0].subject,body:e.communications[0].body,sender:e.communications[0].sender,isCustomerViewable:!0};return p(n,t),t})};this.submitIncident=function(n){var r=i.defer(),h=(new Date).getTime(),f=0,e=null,t,s;return c(n)?u.uploadToNewWorkspace(n.incidentDescriptionAndQuestions.files).then(function(t){var i=[];t&&t.length&&t.length>0?(angular.forEach(t,function(n){i.push(n.data)}),f=t.length):t&&(i.push(t.data),f=1);n.incidentDescriptionAndQuestions.uploadedFiles=i;r.resolve(n)},function(){r.reject()}):r.resolve(n),t=i.defer(),s=null,r.promise.then(function(i){s=a(i);v(i).then(function(i){e=i.incidentId;c(n)?u.setWorkspaceIncidentIdProperty(s,i.incidentId).then(function(){t.resolve(i)}):t.resolve(i)},function(n){t.reject(n)})},function(n){t.reject(n)}),t.promise.then(function(n){return o.logCreateIncident(e,(new Date).getTime()-h,f,!0),n},function(n){return o.logCreateIncident(e,(new Date).getTime()-h,f,!1),n})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("linkFarm",[function(){return{restrict:"A",templateUrl:"/PartialViews/Commercial/LinkFarm.html",scope:{linkSectionList:"="}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("premierContactsController",["$scope","$modal","$q","$location","commercialContactService","clientConfig","compassService","languageService","entitlementsService","commercialInfoService",function(n,t,i,r,u,f,e,o,s){function a(n){var i=null,r,u,t;if(n&&n.length&&n.length>0)for(r=o.langLocale(),u=o.lang(),t=0;t<n.length;t++)if(n[t].region&&n[t].region.toLowerCase()==r.toLowerCase()){i=n[t];break}return i}function l(){var t=e.getCommercialContactsHub();t&&(n.viewModel=t.commercialContactsContent,u.getPremierContacts().then(function(t){n.premierContacts=t.data.phoneContacts},function(){}),u.getRegionalContacts().then(function(t){if(n.regionalContacts=t.data,t.data&&t.data.length&&t.data.length>0){var i=a(n.regionalContacts);i&&(n.selectedRegionalContact=i)}},function(){}),s.getEntitlements().then(function(t){var i;if(n.tamInformation=[],t.incidentSubmitContracts&&t.incidentSubmitContracts.length)for(i=0;i<t.incidentSubmitContracts.length;i++)n.tamInformation.push(t.incidentSubmitContracts[i]);if(t.viewOnlyContracts&&t.viewOnlyContracts.length)for(i=0;i<t.viewOnlyContracts.length;i++)n.tamInformation.push(t.viewOnlyContracts[i]);n.tamInfosReceived=0;angular.forEach(n.tamInformation,function(t){s.getTamInfo(t.accessId).then(function(t){n.tamInfosReceived++;n.tamInfosReceived==n.tamInformation.length&&(n.tamInfosLoaded=!0,n.viewReady!=null&&typeof n.viewReady=="function"&&n.viewReady());v(n.tamInformation,t.tamContactInfo)})})}),n.addAccessId=function(){r.path("/commercial/accounts")},n.tableConfig={disableSorting:!0,columns:[{columnName:n.viewModel.emailTableEmail,propertyName:"tamName",defaultColumn:!0,defaultColumnOrder:0,eMail:"tamEmail",eMailCaption:"tamName"},{columnName:n.viewModel.emailTableName,propertyName:"scheduleName",defaultColumn:!0,defaultColumnOrder:1},{columnName:n.viewModel.emailTableAccessId,propertyName:"accessId",defaultColumn:!0,defaultColumnOrder:2},{columnName:n.viewModel.emailTableExpirationDate,propertyName:"endDate",defaultColumn:!0,defaultColumnOrder:3,format:c},{columnName:n.viewModel.emailTableExpirationPermission,propertyName:"roleName",defaultColumn:!0,defaultColumnOrder:4,format:h}]})}function v(n,t){var i,r;if(t&&t.length&&t.length>0&&n&&n.length&&n.length>0)for(i=0;i<t.length;i++)for(r=0;r<n.length;r++)n[r].accessId!=null&&t[i].accessId!=null&&n[r].accessId==t[i].accessId&&(n[r].tamName=t[i].firstName+" "+t[i].lastName,n[r].tamEmail=t[i].email)}var h="roleNameFormat",c="dateTimeFormat";n.$on("CompassContentReady",function(){l()});n.formatData=function(t,i){var u=t,f,e,r;if(i==c)f=new Date(t),e=o.langLocale(),u=f.toLocaleDateString(e);else if(i==h&&n.viewModel&&n.viewModel.roleDisplayInfo)for(r=0;r<n.viewModel.roleDisplayInfo.length;r++)if(n.viewModel.roleDisplayInfo[r].roleKey==t){u=n.viewModel.roleDisplayInfo[r].roleDisplayName;break}return u};n.regionalContacts=null;n.premierContacts=null;n.tamInformation=null;n.tamInfosLoaded=null;l()}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("productsService",["$http","$q","commercialInfoService","clientConfig","currentLanguageService",function(n,t,i,r,u){function e(n){var t=[];return n&&n.length&&f&&!angular.equals(f,{})&&angular.forEach(n,function(n){n&&f[n.controlType]&&t.push(n)}),t}var f={textArea:!0,textBox:!0};this.getSupportTopics=function(f){var e=u.getLang(),o,s;return i.supportTopics(e,f)?(o=t.defer(),o.resolve(i.supportTopics(e,f)),o.promise):(s=r.ProductsServiceConfig.BaseUrl,n.get(s+"/api/"+e+"/products/"+f+"/topics",{httpAppOptions:{cacheBust:!0,qosOperation:{name:"ProductsService.GetSupportTopics",description:"Get support topics for a product"}}}).then(function(n){var t=n.data;return i.supportTopics(e,f,t),t}))};this.getScopingQuestions=function(f,o){var h,s,c=u.getLang(),l,a,v;return o&&(h=s=o[0].id,o[1]&&(s=o[1].id)),l=i.scopingQuestions(c,h,s),l?t.when(l):(a=r.ProductsServiceConfig.BaseUrl,v=a+"/api/"+c+"/products/"+f+"/topics/"+h+"/subtopics/"+s+"/questions",n.get(v,{httpAppOptions:{cacheBust:!0,qosOperation:{name:"ProductsService.GetScopingQuestions",description:"Get support topics for a product"}}}).then(function(n){var t=n.data;return t=e(t),i.scopingQuestions(c,h,s,t),t}))};this.getCustomScopingQuestions=function(f){var o=u.getLang(),s=i.customScopingQuestions(o,f),h,c;return s?t.when(s):(h=r.ProductsServiceConfig.BaseUrl,c=h+"/api/"+o+"/customsq/"+f,n.get(c,{httpAppOptions:{cacheBust:!0,qosOperation:{name:"ProductsService.GetCustomScopingQuestions",description:"Get custom scoping questions"}}}).then(function(n){var t=n.data;return t=e(t),i.customScopingQuestions(o,f,t),t}))};this.getDiagnosticMetadata=function(f,e){var o=u.getLang(),s=i.diagnosticMetadata(o,f,e),h,c;return s?t.when(s):(h=r.ProductsServiceConfig.BaseUrl,c=h+"/api/"+o+"/products/"+f+"/topics/"+e+"/assets",n.get(c,{httpAppOptions:{cacheBust:!0,qosOperation:{name:"ProductsService.GetDiagnosticMetadata",description:"Get diagnostic metadata"}}}).then(function(n){var t=n.data,r=t&&t.diagnostic;return i.diagnosticMetadata(o,f,e,r),r}))}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("siteAlert",["commercialInfoService","compassService",function(n,t){return{restrict:"A",scope:{messages:"="},templateUrl:"/PartialViews/Common/MessageBanner.html",link:function(i,r,u){function e(){i.isFullWidth=!0;f();i.messages&&i.messages.length&&(i.messages=o(i.messages));i.hasIcon=!1;u&&u.hasicon&&(i.hasIcon=u.hasicon.toLowerCase()==="true")}function o(t){var i=[];return angular.forEach(t,function(t){n.getHidenAlert(t.name)||(t.type=t.alertType,i.push(t))}),i}function s(t){t&&t.name&&n.saveHidenAlert(t.name)}function f(){var n=t.getPremierHomeView();n&&(i.view=n)}e();i.$on("CompassContentReady",function(){f()});i.dismissMessage=function(n){if(i.messages&&i.messages.length&&n){var t=i.messages.indexOf(n);t>=0&&(i.messages.splice(t,1),s(n))}}}}}]),function(n){n.controller("IncidentCreationContactStepController",["$scope","stepInstance","clientConfig","compassService","orderByFilter","currentLanguageService",function(n,t,i,r,u,f){function e(){var n=r.getCreateIncidentsHub();n&&s(n)}function s(t){var e,r,i;for(n.view=t.content,n.stepView=n.view.contactStepContent,n.timeZones=u(t.content.timeZoneList,"offset"),e=(new Date).getTimezoneOffset()*-1,i=0;i<n.timeZones.length;i++)if(n.timeZones[i].offset==e){n.primaryContactForm.userTimeZone=n.timeZones[i];break}for(n.primaryLanguages=t.configuration.primaryLanguages,n.nameLayout=t.configuration.userNameLayout,n.smcMssolveLocaleMappings=t.configuration.smcMssolveLocaleMappings,r=f.getLang().toLowerCase(),i=0;i<n.primaryLanguages.length;i++)if(n.primaryLanguages[i].locale.toLowerCase()==r){n.primaryContactForm.primaryLanguage=n.primaryLanguages[i];break}if(!n.primaryContactForm.primaryLanguage)for(i=0;i<n.primaryLanguages.length;i++)if(r.indexOf(n.primaryLanguages[i].locale.toLowerCase())==0){n.primaryContactForm.primaryLanguage=n.primaryLanguages[i];break}n.secondaryLanguages=[];n.primaryContactForm.primaryLanguage?angular.forEach(t.configuration.secondaryLanguages,function(t){n.primaryContactForm.primaryLanguage.language!=t.language&&n.secondaryLanguages.push(t)}):n.secondaryLanguages.concat(t.configuration.secondaryLanguages)}function o(t){var r,i;if(n.smcMssolveLocaleMappings&&n.smcMssolveLocaleMappings.length&&t){for(i=0;i<n.smcMssolveLocaleMappings.length;i++)if(n.smcMssolveLocaleMappings[i].originLocale.toLowerCase()==t.toLowerCase()){r=n.smcMssolveLocaleMappings[i].targetLocale;break}if(!r)for(i=0;i<n.smcMssolveLocaleMappings.length;i++)if(t.toLowerCase().indexOf(n.smcMssolveLocaleMappings[i].originLocale.toLowerCase())==0){r=n.smcMssolveLocaleMappings[i].targetLocale;break}}return r?r:t}n.primaryContactForm={};e();n.enterStep=function(){n.primaryContactForm.firstName=n.primaryContactForm.firstName||i.authInfo.firstName;n.primaryContactForm.lastName=n.primaryContactForm.lastName||i.authInfo.lastName;n.primaryContactForm.lastFirstFullName=n.primaryContactForm.lastFirstFullName||i.authInfo.lastName+" "+i.authInfo.firstName;n.nameLayout&&n.nameLayout=="LastAndFirstAndPronounce"&&(n.primaryContactForm.kana=n.primaryContactForm.kana||i.authInfo.lastName+i.authInfo.firstName);n.primaryContactForm.firstName;n.userEmail=i.authInfo.displayName};n.exitStep=function(){var i={};i.primaryContact={firstName:n.primaryContactForm.firstName,lastName:n.primaryContactForm.lastName,phoneNumber:n.primaryContactForm.phoneNumber,email:n.userEmail,additionalEmails:n.primaryContactForm.additionalEmails,timeZone:n.primaryContactForm.userTimeZone,primaryLanguage:o(f.getLang()),secondaryLanguage:o(n.primaryContactForm.secondaryLanguage?n.primaryContactForm.secondaryLanguage.locale:""),preferredContactMethod:n.primaryContactForm.contactMethod,primaryLanguageDisplay:n.primaryContactForm.primaryLanguage.languageDisplayName,secondaryLanguageDisplay:n.secondaryLanguage?n.secondaryLanguage.languageDisplayName:""};n.nameLayout&&(n.nameLayout=="LastFirstFull"?(i.primaryContact.firstName=n.primaryContactForm.lastFirstFullName,i.primaryContact.lastName=n.primaryContactForm.lastFirstFullName):n.nameLayout=="LastAndFirstAndPronounce"&&(i.primaryContact.firstName=n.primaryContactForm.kana,i.primaryContact.lastName=n.primaryContactForm.kanji));t.saveStepResult(i)};n.isStepComplete=function(){return n.contactForm.$valid};n.$on("CompassContentReady",function(){e()})}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("IncidentCreationController",["$scope","entitlementsService","authenticationHelperService","messageBannerManagerService","compassService","compassFormatFilter","clientConfig","correlationVectorService",function(n,t,i,r,u,f,e,o){function h(){var t=u.getCreateIncidentsHub();t&&(n.view=t.content,n.context.view=n.view)}function c(){l()}function l(){n.hasError=!1;n.isAuthorized=!1;t.getEntitlements().then(function(t){n.userEntitlements=t;t.isPremier?n.isAuthorized=!0:r.notifyBanner(s,{type:"warning",title:n.view.noContractFoundAlert.title,body:f(n.view.noContractFoundAlert.body,{"user-email":e.authInfo.displayName})})},function(){n.hasError=!0;r.notifyBanner(s,{type:"warning",title:n.view.generalServiceErrorAlert.title,body:n.view.generalServiceErrorAlert.body,cv:o.getValue()})})}var s="workflowServiceMessageBanner";i.signIn(c());n.context={};h();n.$on("CompassContentReady",function(){h()})}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("IncidentCreationDescriptionStepController",["$scope","$q","stepInstance","productsService","messageBannerManagerService","compassService","clientConfig","correlationVectorService",function(n,t,i,r,u,f,e,o){function c(){var t=f.getCreateIncidentsHub();t&&(n.view=t.content,s=t.configuration,n.stepView=n.view.descriptionStepContent)}function v(t){var i="";return angular.forEach(n.scopingQuestions,function(r){r&&r.name&&t[r.name]&&(i+=n.stepView.questionLabel+" "+r.label+h,i+=n.stepView.answerLabel+" ",(r.controlType=="textBox"||r.controlType=="textArea")&&(i+=t[r.name]),i+=h)}),i}function l(){n.incidentDescriptionAndQuestions=n.incidentDescriptionAndQuestions||{};y();n.maxFileSizeBytes=e.DtmWorkspaceConfiguration.FileUploadMaxBytes;n.maxFileCount=e.DtmWorkspaceConfiguration.FileUploadMaxFiles}function y(){var u=i.getStepResults(),f=[],o=!1,e;u&&u.supportTopics&&u.supportTopics.length&&u.selectedProduct&&(f.push(r.getScopingQuestions(u.selectedProduct.pesId,u.supportTopics)),o=!0);u&&u.selectedContract&&(e=p(u.selectedContract),e&&f.push(r.getCustomScopingQuestions(e)));f.length?(n.loadingQuestions=!0,n.hasError=!1,t.all(f).then(function(t){t&&t.length&&(n.scopingQuestions=[],angular.forEach(t,function(t){n.scopingQuestions=n.scopingQuestions.concat(t)}),o&&t[0].length&&(n.hasStandardScopingQuestions=!0))},function(t){n.scopingQuestions=[];w(t)})["finally"](function(){n.loadingQuestions=!1})):(n.hasStandardScopingQuestions=!1,n.scopingQuestions=[])}function p(t){var i,r;if(t&&n.view&&s&&s.marketServiceScopingQuestions&&s.marketServiceScopingQuestions.questionConfigurations&&s.marketServiceScopingQuestions.questionConfigurations.length)for(i=0;i<s.marketServiceScopingQuestions.questionConfigurations.length;i++)if(r=s.marketServiceScopingQuestions.questionConfigurations[i],r&&r.marketServiceId==t.serviceId)return r.scopingQuestionKey;return""}function w(){n.hasError=!0;u.notifyBanner(a,{type:"warning",title:n.view.generalServiceErrorAlert.title,body:n.view.generalServiceErrorAlert.body,cv:o.getValue()})}var a="workflowServiceMessageBanner",h="\n",s;c();n.$on("CompassContentReady",function(){c()});n.formContainer={};l();n.submitDescription=function(){i.moveToNext()};n.isStepComplete=function(){return n.formContainer.incidentDescriptionForm&&n.formContainer.incidentDescriptionForm.$valid};n.enterStep=function(){l()};n.exitStep=function(){var t={};t.incidentDescriptionAndQuestions=n.incidentDescriptionAndQuestions;t.incidentDescriptionAndQuestions.formattedDescription="";n.hasStandardScopingQuestions||(t.incidentDescriptionAndQuestions.formattedDescription=n.stepView.questionLabel+" "+n.stepView.generalDescriptionLabel+h,t.incidentDescriptionAndQuestions.formattedDescription+=n.stepView.answerLabel+" "+n.incidentDescriptionAndQuestions.description+h);n.incidentDescriptionAndQuestions.questionsAndUserAnswers&&(t.incidentDescriptionAndQuestions.formattedDescription+=v(n.incidentDescriptionAndQuestions.questionsAndUserAnswers));i.saveStepResult(t)};n.removeFile=function(t){if(n.incidentDescriptionAndQuestions.files&&n.incidentDescriptionAndQuestions.files.length&&n.incidentDescriptionAndQuestions.files.length>0)for(var i=0;i<n.incidentDescriptionAndQuestions.files.length;i++)if(n.incidentDescriptionAndQuestions.files[i].name===t.name){n.incidentDescriptionAndQuestions.files.splice(i,1);break}};n.filesChanged=function(){$('[data-toggle="tooltip"]').tooltip()}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("IncidentCreationOptionsStepController",["$scope","stepInstance","osService","entitlementsService","compassService",function(n,t,i,r,u){function e(){var t=u.getCreateIncidentsHub();t&&(n.view=t.content,n.stepView=n.view.optionStepContent)}function o(){var i=t.getStepResults();f=null;i&&(i.selectedProduct&&i.selectedProduct.pesId?(n.requestingProductEntitlements=!0,r.getProductEntitlements(i.selectedProduct.pesId).then(function(t){f=t;n.groupedEntitlements=s(f)})["finally"](function(){n.requestingProductEntitlements=!1})):(f=i.userEntitlements,n.groupedEntitlements=s(f)))}function s(t){var i={},r;return t&&t.incidentSubmitContracts&&t.incidentSubmitContracts.length&&(r=!1,angular.forEach(t.incidentSubmitContracts,function(t){t&&(!r&&(t===n.contractForm.selected||h(t,n.contractForm.selected))&&(n.contractForm.selected=t,r=!0),i[t.accessId]!=undefined?i[t.accessId].list.push(t):i[t.accessId]={name:t.scheduleName,list:[t]})}),r||(n.contractForm.selected=null)),i}function h(n,t){return n&&t&&n.accessId==t.accessId&&n.lineItemId==t.lineItemId&&n.clarifyInstallationSiteId==t.clarifyInstallationSiteId?!0:!1}var f=null;n.contractForm={};o();e();n.$on("CompassContentReady",function(){e()});n.enterStep=function(){o()};n.exitStep=function(){var i={};i.selectedContract=n.contractForm.selected;t.saveStepResult(i)};n.isStepComplete=function(){return f&&n.contractPickerForm&&n.contractPickerForm.$valid};n.isMobile=function(){return i.isMobile()}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("IncidentCreationProductStepController",["$rootScope","$scope","$q","$timeout","$location","entitlementsService","messageBannerManagerService","languageService","productsService","stepInstance","compassService","correlationVectorService",function(n,t,i,r,u,f,e,o,s,h,c,l){function nt(n){var i=null;n&&(i=rt(n.disclaimerContents));i&&ut(i);t.hasBlockingProductDisclaimer||tt(t.selectedProduct.selected.pesId)}function b(){var n=c.getCreateIncidentsHub();n&&(t.view=n.content,t.stepView=t.view.productStepContent)}function tt(n){v=!1;t.selectedPrimaryTopicId="";t.selectedSecondaryTopicId="";s.getSupportTopics(n).then(function(n){t.primarySupportTopics=n;t.primarySupportTopics&&t.primarySupportTopics.length||(v=!0)},function(n){y(n)})}function it(){t.hasBlockingProductDisclaimer=!1;t.primarySupportTopics=[];t.selectedPrimaryTopic=null;t.selectedSecondaryTopic=null;e.clearBanner(w);e.clearBanner(p)}function rt(n){var r,i;if(!n||!n.length||n.length<1)return null;for(r=o.langLocale(),i=0;i<n.length;i++)if(n[i].applicableRegion&&n[i].applicableRegion.toLowerCase()===r)return n[i];for(i=0;i<n.length;i++)if(n[i].isPremier&&t.userEntitlements.isPremier)return n[i];for(i=0;i<n.length;i++)if(!n[i].isPremier&&!n[i].applicableRegion)return n[i];return null}function ut(n){t.hasBlockingProductDisclaimer=n.disclaimerLevel&&n.disclaimerLevel===d.level.blocking;e.notifyBanner(w,{type:t.hasBlockingProductDisclaimer?"warning":"info",title:n.name,body:n.body})}function k(n){var r=[],i;return n&&t.products.length>0&&(n.sort(function(n,t){return t.length-n.length}),i=[],angular.forEach(n,function(n){var t;try{t=new RegExp("("+n+")","i")}catch(r){}t&&i.push(t)}),i.length&&angular.forEach(t.products,function(n){var t=n.name,f,u;if(t){for(f=!0,u=0;u<i.length;u++)if(t&&i[u].test(t))t=t.replace(i[u],"");else{f=!1;break}f&&r.push(n)}})),t.hasMatch=r.length>0,{suggestions:r}}function ft(n){if(n)return n=n.replace(/([\d\.]+)/g,function(n,t){return" "+t+" "}),n=n.trim(),n.split(/[\s]+/);return[]}function et(){t.hasError=!1;t.isAuthorized=!1;t.loadingProducts=!0;f.getEntitlements().then(function(n){t.userEntitlements=n;var i=[];angular.forEach(n.incidentSubmitContracts,function(n){i.push(n.accessId)});i.length>0?(f.getAccessIdProducts(i).then(function(n){a.resolve();t.products=n},function(n){a.reject();y(n)})["finally"](function(){t.loadingProducts=!1}),f.getTamInfo(i[0]).then(function(n){n.tamContactInfo&&n.tamContactInfo.length>0&&(t.tamInfo=n.tamContactInfo[0])})):t.loadingProducts=!1},function(n){t.loadingProducts=!1;y(n)})}function y(){t.hasError=!0;e.notifyBanner(p,{type:"warning",title:t.view.generalServiceErrorAlert.title,body:t.view.generalServiceErrorAlert.body,cv:l.getValue()})}function ot(){et()}var p="workflowServiceMessageBanner",w="productDisclaimerBanner",a=i.defer(),st=angular.element("#incident-product-picker"),v,d={level:{blocking:"blocking",messageOnly:"messageOnly"}},g={productPicked:"premierIncidentCreationProductPicked"};t.selectedProduct={selected:null};t.hasMatch=!0;t.selectedPrimaryTopic;t.loadingProducts=!0;ot();b();t.$on("CompassContentReady",function(){b()});t.isStepComplete=function(){return t.selectedProduct.selected&&!t.hasBlockingProductDisclaimer&&(v||t.selectedPrimaryTopic&&(!t.selectedPrimaryTopic.subtopics||!t.selectedPrimaryTopic.subtopics.length||t.selectedSecondaryTopic))};t.getCompleteText=function(n){return n.name};t.getSuggestions=function(n){var r=i.defer(),u=ft(n);return u?t.products!=undefined?r.resolve(k(u)):a.promise.then(function(){r.resolve(k(u))}):r.reject("empty query"),r.promise};t.primarySearchClicked=function(){if(it(),t.selectedProduct&&t.selectedProduct.selected&&t.hasMatch){n.$broadcast(g.productPicked,t.selectedProduct.selected.pesId);var i=t.selectedProduct.selected;f.getProductEntitlements(i.pesId);nt(i.disclaimer)}};t.inputOnBlur=function(){t.isInputFocused=!1};t.inputOnFocus=function(){t.isInputFocused=!0};t.selectedPrimaryTopic;t.selectedPrimaryTopicGetterSetter=function(n){if(n&&(t.selectedPrimaryTopicId=n,t.primarySupportTopics&&t.primarySupportTopics.length))for(var i=0;i<t.primarySupportTopics.length;i++)if(t.primarySupportTopics[i].id==n){t.selectedPrimaryTopic=t.primarySupportTopics[i];s.getDiagnosticMetadata(t.selectedProduct.selected.pesId,t.selectedPrimaryTopic.id);break}return t.selectedPrimaryTopicId};t.selectedSecondaryTopic;t.selectedSecondaryTopicGetterSetter=function(n){if(n&&t.selectedPrimaryTopic&&t.selectedPrimaryTopic.subtopics&&t.selectedPrimaryTopic.subtopics.length)for(var i=0;i<t.selectedPrimaryTopic.subtopics.length;i++)if(t.selectedPrimaryTopic.subtopics[i].id==n){t.selectedSecondaryTopic=t.selectedPrimaryTopic.subtopics[i];s.getDiagnosticMetadata(t.selectedProduct.selected.pesId,t.selectedSecondaryTopic.id);break}return arguments.length?t.selectedSecondaryTopicId=n:t.selectedSecondaryTopicId};t.exitStep=function(){var n={};n.userEntitlements=t.userEntitlements;n.selectedProduct=t.selectedProduct.selected;n.supportTopics=[];t.selectedPrimaryTopic&&n.supportTopics.push(t.selectedPrimaryTopic);t.selectedSecondaryTopic&&n.supportTopics.push(t.selectedSecondaryTopic);h.saveStepResult(n)}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("IncidentCreationSeverityStepController",["$scope","stepInstance","languageService","incidentSeverityService","messageBannerManagerService","compassService","correlationVectorService",function(n,t,i,r,u,f,e){function o(){var i=t.getStepResults(),u=i.selectedProduct,f=i.selectedContract;n.severityConfig={};u&&f&&(n.loadingSeverity=!0,n.hasError=!1,r.getSeverityConfig(u,f).then(function(t){n.severityConfig=a(t)},function(n){v(n)})["finally"](function(){n.loadingSeverity=!1}))}function s(){var t=f.getCreateIncidentsHub();t&&(n.view=t.content,n.stepView=n.view.severityStepContent)}function a(t){if(t.data&&t.data.severityCollection&&t.data.severityCollection.length){var i=!1,r=t.data.severityCollection;r.sort(function(n,t){return n.metisValue-t.metisValue});angular.forEach(r,function(n){n.sla=n.serviceLevelAgreement;n.value=n.readOnlyOption?{}:{metisValue:n.metisValue,sla:n.serviceLevelAgreement,use24x7Option:!1,label:n.label};i||n.options.length||(i=h(n.value));i||(i=c(n));n.options&&n.options.length&&angular.forEach(n.options,function(t){t.value={metisValue:n.metisValue,sla:n.serviceLevelAgreement,use24x7Option:t.use24x7Option,label:n.label};i||(i=h(t.value));i||(i=c(t))})});i||(n.severityForm.selected=undefined)}return r}function h(t){return n.severityForm.selected&&angular.equals(n.severityForm.selected,t)?(n.severityForm.selected=t,!0):!1}function c(t){return t.defaultSelection&&!n.severityForm.selected?(n.severityForm.selected=t.value,!0):!1}function v(){n.hasError=!0;u.notifyBanner(l,{type:"warning",title:n.view.generalServiceErrorAlert.title,body:n.view.generalServiceErrorAlert.body,cv:e.getValue()})}var l="workflowServiceMessageBanner";n.severityForm={};o();s();n.$on("CompassContentReady",function(){s()});n.enterStep=function(){o()};n.exitStep=function(){var i={};i.selectedSeverity=n.severityForm.selected;t.saveStepResult(i)};n.isStepComplete=function(){return!!n.severityForm.selected&&!angular.equals(n.severityForm.selected,{})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("IncidentCreationSubmissionStepController",["$scope","stepInstance","clientConfig","incidentsService","messageBannerManagerService","dateFilter","commercialInfoService","compassService","compassFormatFilter","correlationVectorService",function(n,t,i,r,u,f,e,o,s,h){function l(){var t=o.getCreateIncidentsHub();t&&(n.view=t.content,n.stepView=n.view.submitStepContent,n.serviceAgreement=s(n.stepView.acceptAgreementStatementFormat,{"Microsoft-service-link":s(n.stepView.microsoftServiceLinkHtmlFormat,{"service-url":n.stepView.microsoftServiceUrl})}),n.privacyStatement=s(n.stepView.privacyStatementFormat,{"privacy-statement-link":s(n.stepView.privacyStatementLinkHtmlFormat,{"privacy-url":n.stepView.privacyStatementLinkUrl})}))}function a(){n.hasError=!0;u.notifyBanner(c,{type:"warning",title:n.view.generalServiceErrorAlert.title,body:n.view.generalServiceErrorAlert.body,cv:h.getValue()})}var c="workflowServiceMessageBanner";l();n.$on("CompassContentReady",function(){l()});n.enterStep=function(){n.stepResults=t.getStepResults();n.userEmail=i.authInfo.displayName;n.todayDateInShort=f(new Date,"shortDate")};n.submit=function(){n.isSubmitting=!0;u.clearBanner(c);r.submitIncident(n.stepResults).then(function(i){t.saveStepResult({createdIncident:i});e.incidentList(null,!0);r.getIncidents();n.moveToNext()},function(n){a(n)})["finally"](function(){n.isSubmitting=!1})};n.showCommonStepNavi=function(){return!1};n.moveToPrev=function(){return t.moveToPrev()};n.moveToNext=function(){return t.moveToNext()};n.hasPrev=function(){return t.hasPrev()};n.hasNext=function(){return t.hasNext()};n.isStepComplete=function(){return!0}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("IncidentCreationSuccessStepController",["$scope","stepInstance","compassFormatFilter","currentLanguageService","compassService",function(n,t,i,r,u){function f(){var t=u.getCreateIncidentsHub();t&&(n.view=t.content,n.stepView=n.view.confirmationStepContent)}f();n.$on("CompassContentReady",function(){f()});n.showCommonStepNavi=function(){return!1};n.enterStep=function(){var f=t.getStepResults(),u=f.createdIncident;u&&(n.header=i(n.stepView.pageTitleFormat,{"incident-id":u.incidentId}),n.trackOnlineLink=i('<a href={incident-url} id="new-incident-url">{link-text}<\/a>',{"incident-url":"/"+r.getLang()+"/commercial/incidents/"+u.incidentId,"link-text":n.stepView.trackIncidentLink.linkText}),u.sdpResponse==200&&u.sdpSessionLaunchUrl&&(n.hasDiagnostic=!0,n.sdpSessionLaunchUrl=u.sdpSessionLaunchUrl))}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("questionValidators",["compassFormatFilter",function(n){function r(n,t){var i=t.name;switch(i){case"email":n[i]=u;break;case"cidr-edfsmsbl3":n[i]=f;break;default:o(n,t)}}function u(n,i){return t.test(i)}function f(n,t){return i.test(t)}function e(t,i,r){var u=t.substring(10);return u&&(u=parseInt(u,10),u!=NaN&&(i.label=n(i.label,{"0":u}),!r||r.length<=u))?!0:!1}function o(n,t){var i=t.name;i&&i.indexOf("maxLength-")>=0&&(n[i]=function(n,r){return e(i,t,r)})}var t=/^.+@.+\..+$/i,i=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;return{restrict:"A",require:"ngModel",link:function(n,t,i,u){n.question&&n.question.validators&&n.question.validators.length&&angular.forEach(n.question.validators,function(n){n&&n.name&&r(u.$validators,n,u.$modelValue)})}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("scopingQuestions",[function(){return{restrict:"A",scope:{formCtrl:"=",formModel:"=",questions:"="},templateUrl:"/PartialViews/Commercial/IncidentCreation/ScopingQuestions.html",link:function(n){n.questions&&n.questions.length&&angular.forEach(n.questions,function(n){n&&n.validators&&n.validators.length&&angular.forEach(n.validators,function(t){t&&t.name=="required"&&(n.isRequired=!0)})})}}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("arrowNav",[function(){function f(t,f){var s=t[0];i=f[0];t.on("keydown",function(n){r(n.keyCode)&&u(s)&&n.preventDefault()});t.on("keyup",function(t){var i;r(t.keyCode)&&u(s)&&(t.preventDefault(),i=t.keyCode===n.upArrow?o():e(),i&&i.focus())})}function r(t){return Object.keys(n).some(function(i){return t===n[i]})}function t(){return i.activeElement}function u(n){var i=t();return i&&i.parentNode===n}function e(){var n=t();return n&&n.nextElementSibling}function o(){var n=t();return n&&n.previousElementSibling}var n={upArrow:38,downArrow:40},i;return{restrict:"A",scope:{},controller:["$element","$document",f]}}]),function(n){n.service("authenticationHelperService",["$window","$rootScope","$location","$timeout","clientConfig","osService","languageService","nativeAppService",function(n,t,i,r,u,f,e,o){function h(n,t){var r,e;n?(r=$(u.RpsSignInInfo.SignInLink).attr("href"),e="wreply"):(r=$(u.RpsSignInInfo.SignOutLink).attr("href"),e="ru");var o=s(r),h=s(i.absUrl()),c=s(o[e]);return $.each(c,function(n,t){h[n]=t}),o[e]=encodeURI(i.absUrl().substring(0,i.absUrl().indexOf(i.path())+i.path().length)+"?"+$.param(h)),n&&(f.isMobile()||t)&&(o.pcexp="false"),r.substring(0,r.indexOf("?")+1)+$.param(o)}function c(n,i){if(u.authInfo.authStatus()===2){var f=function(){u.authInfo.isLoggedIn()?n&&n():t.$broadcast("ProcessUserSignIn",i)},e=r(function(){f()},5e3);t.$on("AuthStatusChange",function(){r.cancel(e);f();t.$apply()})}else u.authInfo.authStatus()===1?n&&n():t.$broadcast("ProcessUserSignIn",i)}var s=function(n){for(var i={},r=n.substring(n.indexOf("?")+1),u=/([^&=]+)=([^&]*)/g,t;t=u.exec(r);)i[decodeURIComponent(t[1])]=decodeURIComponent(t[2]);return i};this.getUpdatedAuthenticationUrl=function(n,t){return h(n,t)};this.signIn=function(n){c(n,!1)};this.mobileSignIn=function(n){c(n,!0)};this.getShellOptions=function(){var i=n.msCommonShell;return{meControlOptions:{rpData:{msaInfo:{signInUrl:jQuery(u.RpsSignInInfo.SignInLink).attr("href"),signOutUrl:jQuery(u.RpsSignInInfo.SignOutLink).attr("href"),meUrl:u.RpsSignInInfo.MeControlLink}},userData:{idp:i.SupportedAuthIdp.MSA,firstName:null,lastName:null,memberName:null,cid:null,authenticatedState:i.AuthState.NotSignedIn},events:{onSignIn:function(){t.$broadcast("ProcessUserSignIn")},onBeforeSignOut:function(){t.$broadcast("ProcessUserSignOut")}}}}};t.$on("ProcessUserSignIn",function(t,r){return o.isNative()?o.signInUser(i.absUrl()):n.location=h(!0,!!r),!1});t.$on("ProcessUserSignOut",function(){n.location=h(!1,!1)})}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("breadcrumbs",["$rootScope","breadcrumbsService",function(n,t){return{restrict:"EA",scope:{},templateUrl:"/PartialViews/Common/Breadcrumbs.html",link:function(i){i.breadcrumbs=t.getBreadcrumbs();n.$on("$viewContentLoaded",function(){i.breadcrumbs=t.getBreadcrumbs()})}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("breadcrumbsService",[function(){function t(r,u,f){if(r&&r.data&&r.data.breadcrumb&&(n.length||r.data.breadcrumb.parent)){var e=r.data.breadcrumb;n.unshift({url:i(r.originalPath,f),text:i(e.text,f)});t(u[e.parent],u,f)}}function i(n,t){return n&&n.indexOf(":")>=0&&t&&(n=n.replace(/:([a-zA-Z]+)/g,function(n,i){return t[i]?t[i]:n})),n}var n=[];this.generateBreadcrumbs=function(i,r){var u=i.current;n=[];t(u.$$route,i.routes,r)};this.getBreadcrumbs=function(){return n}}])}(angular.module(microsoft.support.moduleName));app.directive("compile",["$compile","$sanitize",function(n){return{restrict:"A",transclude:!0,scope:{compile:"="},link:function(t,i){t.$watch(function(n){return n.compile},function(r){if(r)try{i.html(r);n(i.contents())(t)}catch(u){console.log("Does not compile",u)}})}}}]);app.directive("debug",["$routeParams",function(n){return{restrict:"A",scope:{debug:"="},link:function(t,i,r){t.enabled=n.debug;t.name=r.debug},template:'<pre ng-if="enabled"> {{name}}: {{debug | json}}<\/pre>'}}]),function(n){n.service("delayService",["$q","$timeout",function(n,t){this.delay=function(i,r){return n.all([i,t(function(){},r)]).then(function(n){return n[0]})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("focusContent",["$timeout","focusContentService",function(n,t){return{restrict:"A",scope:{name:"@",condition:"@"},link:function(i,r){function f(t){t===i.name&&u&&n(function(){r[0].focus()})}var u=!1;i.$on("FocusContent",function(n,t){f(t.name)});i.$watch("condition",function(n){u=n&&n.toLowerCase()==="true"||typeof i.condition=="undefined"?!0:!1;f(i.name)});f(t.activeTarget)}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("focusContentService",["$rootScope",function(n){this.activeTarget=null;this.focus=function(t){n.$broadcast("FocusContent",{name:t});this.activeTarget=t}}])}(angular.module(microsoft.support.moduleName)),function(n){n.component("geo",{templateUrl:"/PartialViews/ContactUs/Geo.html",bindings:{view:"<?",path:"@?",onSelection:"&",onContinue:"&"},controller:["$log","$rootScope","$location","geoService","languageService","compassService","widgetService",function(n,t,i,r,u,f,e){var o=this;this.continue=function(t){this.isVisible=!1;this.onContinue?this.onContinue({isUserInitiated:t}):n.log("No onContinue passed in - geo")};this.access=function(t){u.set(t,!0);f.clearCache();this.isVisible=!1;this.onSelection?this.onSelection({language:t}):n.log("No onSelection passed in - geo")};this.$onInit=function(){this.languages=[];this.isReady=!1;u.languages().then(r.getLocationInfo).then(function(n){if(!n.LocationRequestMismatch||!n.LanguageList||n.LanguageList.length===0){o.continue(!1);return}t.$broadcast("GeoOptionsPresented",i.path());o.currentLanguage=u.getLanguageInfo(u.langLocale());o.languages=n.LanguageList.map(function(n){return u.getLanguageInfo(n)}).filter(function(n){return!!n})},function(t){n.error(t);o.continue(!1)})["finally"](function(){o.isReady=!0})};this.$onChanges=function(t){t.view&&t.view.currentValue?(this.componentView=this.view,this.isVisible=!0):e.getWidgetConfig("Geo",this.path).then(function(t){t?(o.componentView=t.view,o.isVisible=!0):(n.error("Geo view not available for this path: "+i.path()),o.continue(!1))},function(t){n.error(t);o.continue(!1)})}}]})}(angular.module(microsoft.support.moduleName)),function(n){n.service("geoService",["$http","$routeParams",function(n,t){var i="/api/geo/location";this.getLocationInfo=function(){var r={};return t.ip&&(r.ip=t.ip),n.get(i,{params:r}).then(function(n){return n.data})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("getScriptService",["$timeout","$q","clientConfig",function(n,t,i){function e(){r.readyState&&r.readyState!="complete"||(r.onload=r.onreadystatechange=null,n.cancel(f),u.resolve())}function o(){r.onload=r.onreadystatechange=null;n.cancel(f);u.reject()}var u=t.defer(),f,r;this.addScript=function(t,s){var h=s&&s.element?s.element:angular.element("head");return r=document.createElement("script"),f=n(function(){u.reject({status:504})},i.ChatConfig.ChatDefaultTimeout),h.append(r),r.onload=r.onreadystatechange=e,r.onerror=o,r.src=t,u.promise}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("guidGenerator",["$window",function(n){this.newGuid=function(){var r=n.crypto||n.msCrypto,t,i;return r&&r.getRandomValues?(t=new Uint16Array(8),r.getRandomValues(t),i=function(n){for(var t=n.toString(16);t.length<4;)t="0"+t;return t},i(t[0])+i(t[1])+"-"+i(t[2])+"-"+i(t[3]&20479)+"-"+i(t[4]&16383|32768)+"-"+i(t[5])+i(t[6])+i(t[7])):"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.factory("httpAppOptionsInterceptor",["$rootScope","$cookies","$routeParams",function(n,t,i){function u(n,t){n.params?angular.extend(n.params,t):n.params=t}var r={};return r.request=function(r){if(r.httpAppOptions){var f={};r.httpAppOptions.cacheBust&&(f.iecbust=(new Date).getTime());r.httpAppOptions.allowPreview&&(i.preview||t.get("smc_preview")||n.preview)&&(f.preview=!0);(f.iecbust||f.preview)&&u(r,f)}return r},r}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).filter("linkify",function(){return function(n){var t,i=n,u,r;if(n&&n.toLowerCase().indexOf("<a")!==-1&&n.toLowerCase().indexOf("<\/a>")!==-1){do if(t=n.match(/<a.*?(?=>)/i),t!==null){if(r=t.toString(),r.toLowerCase().indexOf("target")!==-1){u=n.match(/target\=.*?(?=\s|>)/i);i=i.replace(u,"target='_blank'");n=n.replace(t,"");continue}i=i.replace(t,t+" target='_blank'");n=n.replace(t,"")}while(t!==null)}else if(n)do t=n.match(/^(?:(?:https?):\/\/?|www\.)[a-zA-Z0-9+&@#/%=~_|$?!:.-]*[a-zA-Z0-9+&@#/%=~_|$]/),t!==null&&(r=t.toString(),r.indexOf("http")!==0&&(r="http://"+r),i=i.replace(t,"<a href='"+r+"' target='_blank'>"+t+"<\/a>"),n=n.replace(t,""));while(t!==null);return i}});angular.module(microsoft.support.moduleName).directive("loadingSpinner",["$rootScope","$timeout","qosTelemetryService",function(n,t,i){return{restrict:"A",templateUrl:"/PartialViews/Common/LoadingSpinner.html",scope:{content:"=",deferred:"="},link:function(r,u,f){function c(){f.timeout&&(o=t(a,f.timeout));f.delay?s=t(l,f.delay):r.isStarted=!0;f.message&&(h=i.createEvent("/app/"+f.message));f.type==="bar"?v():y()}function l(){r.isStarted=!0}function a(){f.message&&n.$broadcast(f.message,r.content);h&&h.reject("Timeout after "+f.timeout+"seconds")}function v(){r.barClasses["indeterminate-bar"]=!0;r.indicatorClasses["indeterminate-indicator"]=!0;r.isBar=!0}function y(){r.progressClasses.ring=!0;r.indicatorClasses["indeterminate-ring"]=!0;f.size==="small"||(f.size==="large"?(r.indicatorClasses["indeterminate-large"]=!0,r.progressClasses["ring-large"]=!0):(r.indicatorClasses["indeterminate-medium"]=!0,r.progressClasses["ring-medium"]=!0))}function e(){o&&(t.cancel(o),o=null);s&&(t.cancel(s),s=null);r.isStarted=!1}r.isStarted=!1;r.progressClasses={};r.barClasses={};r.indicatorClasses={};r.isBar=!1;var o,s,h;r.$watch("deferred",function(){r.deferred&&r.deferred.then&&(e(),c(),r.deferred.then(e,e))});r.$on("$destroy",e);u.on("$destroy",e);f.deferred||c()}}}]),function(n){n.service("localStorageService",["$window","$log","clientConfig","currentLanguageService",function(n,t,i,r){var f="cacheConfigKey",u=n&&n.navigator&&n.navigator.cookieEnabled&&n.localStorage,e,o;try{n.localStorage.setItem("storageTest","");n.localStorage.removeItem("storageTest","")}catch(s){u=!1}u||t.error("Local storage not supported");e=function(){var n={};return n.language=r.getLang().toLowerCase(),i&&i.SiteContentConfig&&i.SiteContentConfig.BuildVersion&&(n.buildVersion=i.SiteContentConfig.BuildVersion),n};o=function(){var t,r,i;if(u&&n.localStorage[f]){t=JSON.parse(n.localStorage[f]);r=e();for(i in t)if(t[i]!=r[i])return!1;return!0}return!1};this.getCacheContent=function(t){if(u&&n.localStorage[t]){if(!o())return this.invalidateCache(),null;var r=JSON.parse(n.localStorage[t]),f=(new Date).getTime()-new Date(r.timestamp);return!r.noExpiration&&f>i.SiteContentConfig.ClientCompassCacheTimeout?(localStorage.removeItem(t),null):r.data}return null};this.commit=function(t,r){if(u&&i.SiteContentConfig&&i.SiteContentConfig.ClientCompassCachingEnabled&&i.SiteContentConfig.ClientCompassCacheTimeout){var o={data:r,timestamp:(new Date).getTime()};n.localStorage.setItem(f,JSON.stringify(e()));n.localStorage.setItem(t,JSON.stringify(o))}};this.commitWithoutExpiration=function(t,i){if(u){var r={data:i,timestamp:(new Date).getTime(),noExpiration:!0};n.localStorage.setItem(f,JSON.stringify(e()));n.localStorage.setItem(t,JSON.stringify(r))}};this.invalidateCache=function(){u&&i.SiteContentConfig&&i.SiteContentConfig.ClientCompassCachingEnabled&&i.SiteContentConfig.ClientCompassCacheTimeout&&localStorage.clear()}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("locationService",["$window","$location","$route","$anchorScroll","$rootScope","$timeout",function(n,t,i,r,u,f){this.getCurrentPath=function(){return t.url().replace(t.hash(),"")};this.setPathAndReload=function(t){n.location=t||this.getCurrentPath()};this.switchLocale=function(n,i){i=i||t.path();var r=i.split("/");return r.length>1&&r[1]!==n?(r[1]=n,r.join("/")):i};this.pathNoReload=function(n){var r=i.current,f=u.$on("$locationChangeSuccess",function(){i.current=r;f()});return t.path(n)};this.scrollTo=function(n,i){f(function(){var i=t.hash();t.hash(n);r();t.hash(i)},i)};this.appendCurrentRouteParams=function(n){var i=t.search();if(Object.keys(i).length>0&&n){n.indexOf("?")<0&&(n+="?");for(query in i)n+=query+"="+i[query]+"&";n=n.slice(0,-1)}return n};this.getPathSubset=function(n,i,r){return r=r?r.split("?")[0]:t.path(),r.split("/").slice(n,i).join("/")};this.getPathLength=function(n){n||(n=t.path());var i=n[0]==="/"?1:0,r=n[n.length-1]==="/"?-1:undefined;return n.split("/").slice(i,r).length};this.getReferrerDomain=function(){var t=/\/\/(.*?)(\/|$|\?)/;return n.document.referrer&&t.test(n.document.referrer)?n.document.referrer.match(t)[1]:null}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("messageBanner",["$sce","messageBannerManagerService","compassService",function(n,t,i){return{restrict:"A",scope:{},templateUrl:"/PartialViews/Common/MessageBanner.html",link:function(r,u,f){function o(){var n=i.getPremierHomeView();n&&(r.view=n)}o();r.$on("CompassContentReady",function(){o()});r.messages=[];r.name=f&&f.name||"messageBanner";var e=!1;f&&f.isstacked&&(e=f.isstacked.toLowerCase()==="true");r.hasIcon=!1;f&&f.hasicon&&(r.hasIcon=f.hasicon.toLowerCase()==="true");r.dismissMessage=function(n){if(r.messages&&n){var t=r.messages.indexOf(n);t>=0&&r.messages.splice(t,1)}};r.clearMessages=function(){r.messages=[]};r.pushMessage=function(t){t&&(t.body&&(t.body=n.trustAsHtml(t.body)),e||!r.messages.length?r.messages.unshift(t):r.messages[0]=t)};t.registerBanner(r.name,r);r.$on("$destroy",function(){t.removeBanner(r.name)});u.on("$destroy",function(){t.removeBanner(r.name)})}}}]),function(n){n.service("messageBannerManagerService",function(){var n={};this.registerBanner=function(t,i){if(n[t]&&n[t].messages&&n[t].messages.length)while(n[t].messages.length)i.pushMessage(n[t].messages.shift());n[t]={scope:i,messages:[]}};this.removeBanner=function(t){n[t]=undefined};this.getBanner=function(t){return n[t]};this.notifyBanner=function(t,i){if(n[t]&&n[t].scope){var r=n[t].scope;r.pushMessage(i)}else n[t]?n[t].messages.push(i):n[t]={messages:[i]}};this.clearBanner=function(t){if(n[t]&&n[t].scope){var i=n[t].scope;i.clearMessages()}}})}(angular.module(microsoft.support.moduleName)),function(n){n.service("modalService",["$q","$templateRequest","$document","$rootScope","$controller","$compile",function(n,t,i,r,u,f){function e(n){return t(n,!0)}this.open=function(t){function v(){s&&(s.$destroy(),s=null);o!=null&&(o.remove(),o=null)}function a(){return l.resolve(!0),o!=null?(o.modal("hide"),v(),!0):!1}var h;if(!t.templateUrl||!t.controller)throw new Error("templateUrl and controller are required.");t.appendTo=t.appendTo||i.find("body").eq(0);t.id=t.id||"modalDialog";var l=n.defer(),c=n.defer(),o=null,s=null;return h={opened:null,closed:l.promise,result:c.promise,close:function(n){c.resolve(n);a()},dismiss:function(n){c.reject(n);a()}},h.opened=e(t.templateUrl).then(function(n){var c=t.scope||r,l,e;s=c.$new();e={};t.controller&&(e.$scope=s,e.modalInstance=h,l=u(t.controller,e));o=angular.element('<div class="modal" role="dialog" tabindex="-1"><\/div>').attr("aria-describedby",t.id);o.append(angular.element('<div class="modal-dialog" role="document"><\/div>').append(angular.element('<div class="modal-content"><\/div>').attr("id",t.id).html(n)));t.appendTo.append(o);f(o)(s);i.on("hidden.bs.modal",function(){h.dismiss("clickoutside")});o.modal("show")}),h}}])}(angular.module(microsoft.support.moduleName)),function(n){n.value("contactCommands",{notifyChatStarted:"NotifyChatStarted",notifyChatEnded:"NotifyChatEnded",angularJsReady:"angularjsready",notifyAppClosingComplete:"notifyappclosingcomplete",showtoast:"showtoast",notifychatenqueue:"notifychatenqueue",notifychatdequeue:"notifychatdequeue",signInUser:"signinuser",appStartContext:"appstartcontext",getRelayInfo:"getrelayinfo",forwardToAgent:"forwardtoagent",sharingSessionConnected:"sharingsessionconnected",sharingSessionFailed:"sharingsessionconnectionfailed",notifyAppClosing:"notifyappclosing",signInFailed:"signinfailed",getAppContext:"getappcontext",beginSharing:"beginsharing",endSharing:"endsharing",pauseSharingByAgent:"pausesharingbyagent",resumeSharingByAgent:"resumesharingbyagent",clearCanvas:"clearcanvas",changeBrushColor:"changebrushcolor",changeBrushSize:"changebrushsize",setSharingMode:"setsharingmode",endSharingByUser:"endsharingbyuser",pauseSharingByUser:"pausesharingbyuser",resumeSharingByUser:"resumesharingbyuser"});n.value("contactMessageTypes",{requestResponse:"requestresponse",userRequest:"userrequest"});n.service("nativeAppService",["$log","$window","$rootScope","$cookies","$location","contactCommands","contactMessageTypes","chatStateService","relayService",function(n,t,i,r,u,f,e,o,s){function a(n,t){t&&(n={command:f.forwardToAgent,context:n});v(n,!0)}function v(n,r){n&&n.command&&(r&&n.context?i.$broadcast("ForwardToAgent",JSON.stringify(n.context)):t&&t.external&&"notify"in t.external&&(i.$broadcast("AppActionStart",n.command),t.external.notify(JSON.stringify(n))))}function w(t){switch(t.command){case f.appStartContext:return t.context&&(i.$broadcast("AppStartContext",t.context),ft(t.context.EffectiveCapabilities),o.setAppStartContext(t.context)),!0;case f.forwardToAgent:return nt(t.context)||a(t,!1),b(t.context),!0;case f.signInFailed:return i.$broadcast("NativeSignInFailed"),!0;case f.notifyAppClosing:return i.$broadcast("NativeAppClosing"),!0;default:n.error("Unknown App Command: '"+t.command+"' received")}return!1}function b(t){switch(t.command){case e.userRequest:case e.requestResponse:return tt(t.command,t.context)?it(t.command,t.context):rt(t.command,t.context),!0;default:n.error("Unknown App Message Type: '"+t.command+"' received")}return!1}function k(t){switch(t.command){case f.getAppContext:return h.sendAgentRequestResponse(f.getAppContext,!0,"App start context in custom field","",o.getAppStartContext()),!0;case f.getRelayInfo:return s.getNearestRelay().then(function(n){h.sendAgentRequestResponse(f.getRelayInfo,!0,"Nearest relay information in custom field","",{relayEndpoint:n.data.HostName})},function(n){h.sendAgentRequestResponse(f.getRelayInfo,!1,"Nearest Relay information error in custom field","",{error:n})}),!0;case f.beginSharing:return t.context&&t.context.promptuser?i.$broadcast("ChatScreenShareRequest",t):(i.$broadcast("ChatScreenShareReconnect"),h.sendAppCommand(t)),!0;case f.endSharing:case f.pauseSharingByAgent:case f.resumeSharingByAgent:case f.clearCanvas:case f.changeBrushColor:case f.changeBrushSize:return h.sendAppCommand(t),!0;case f.setSharingMode:return i.$broadcast("SetSharingModeRequest",t.context.sharingmode),h.sendAppCommand(t),!0;default:n.error("Unknown Agent Command: '"+t.command+"' received")}return!1}function d(n){return n&&n.requestname}function g(n){return n&&n.responsename&&n.success}function nt(n){if(n&&n.command&&n.context){var t=y(n.command,n.context);return t===f.sharingSessionFailed}return!1}function tt(n,t){switch(n){case e.userRequest:return d(t)&&h.isUnderstoodCommand(t.requestname);case e.requestResponse:return g(t)&&h.isUnderstoodCommand(t.responsename)}return!1}function y(n,t){switch(n){case e.userRequest:return t.requestname;case e.requestResponse:return t.responsename}return null}function it(n,t){var r=y(n,t);i.$broadcast("AppActionEnd",{command:r,success:!0});switch(r){case f.sharingSessionConnected:return i.$broadcast("ChatScreenShareEstablished"),!0;case f.sharingSessionFailed:return i.$broadcast("ChatScreenShareConnectFailed"),!0;case f.endSharing:case f.endSharingByUser:return i.$broadcast("ChatScreenShareClosed"),!0;case f.pauseSharingByAgent:case f.pauseSharingByUser:return i.$broadcast("ToggleScreenShare",!0),!0;case f.resumeSharingByAgent:case f.resumeSharingByUser:return i.$broadcast("ToggleScreenShare",!1),!0;case f.setSharingMode:return i.$broadcast("SetSharingMode"),!0;case f.beginSharing:case f.clearCanvas:case f.changeBrushColor:case f.changeBrushSize:return!0}return!1}function rt(t,r){var u=y(t,r);i.$broadcast("AppActionEnd",{command:u,success:!1});switch(u){case f.beginSharing:case f.pauseSharingByUser:case f.resumeSharingByUser:return i.$broadcast("ChatScreenShareError",u),n.error("Native Command: "+r.command+" failed with context: "+JSON.stringify(r.context)),!0;case f.endSharing:case f.pauseSharingByAgent:case f.resumeSharingByAgent:case f.clearCanvas:case f.changeBrushColor:case f.changeBrushSize:case f.setSharingMode:return!0}return!1}function ut(){document.cookie=p.nativeCookie+"="+c+";path=/"}function ft(n){n&&n.map(function(n){typeof l[n]!="undefined"&&(l[n]=!0)})}var p={nativeCookie:"isNative"},l={ScreenSharing:!1,Annotation:!1,FullControl:!1,PauseSharing:!1},h=this,c;this.setNative=function(n){var t=c;c=n;c!==t&&i.$broadcast("NativeCookieUpdate");ut()};this.isNative=function(){return u&&u.search()&&typeof u.search().isNative!="undefined"?u.search().isNative:c||!1};this.hasCapability=function(n){return!!l[n]};this.isUnderstoodCommand=function(n){for(var t in f)if(f[t]===n)return!0;return!1};this.receiveCommand=function(n,t){return c&&n&&n.command?t?k(n):w(n):!1};this.signInUser=function(n){v({command:f.signInUser,context:{successUrl:n}},!1)};this.sendAppCommand=function(n){c&&v(n,!1)};this.sendAgentUserRequest=function(n,t){a({command:e.userRequest,context:{requestname:n,data:t||null}},!0)};this.sendAgentRequestResponse=function(n,t,i,r,u){a({command:e.requestResponse,context:{responsename:n,success:t,message:i,errorcode:r,custom:u||null}},!0)};i.$on("CommandMessageReceived",function(n,t){h.receiveCommand(t,!0)});i.$on("ChatSessionEstablished",function(){h.sendAppCommand({command:f.notifyChatStarted})});i.$on("ChatSessionClosed",function(){h.sendAppCommand({command:f.notifyChatEnded})});i.$on("NotifyAppClosingComplete",function(){h.sendAppCommand({command:f.notifyAppClosingComplete})});i.$on("ShowToast",function(n,t){h.sendAppCommand({command:f.showtoast,context:{text:t}})});i.$on("EnqueueChatSuccess",function(){h.sendAppCommand({command:f.notifychatenqueue})});i.$on("ChatDisengageSuccess",function(){h.sendAppCommand({command:f.notifychatdequeue})});i.$on("AngularJsReady",function(){h.sendAppCommand({command:f.angularJsReady})});u.search()&&typeof u.search().isNative!="undefined"?this.setNative(u.search().isNative):c=r.get(p.nativeCookie)}])}(angular.module(microsoft.support.moduleName));window&&(window.selfAssistWeb=window.selfAssistWeb||{},window.selfAssistWeb.receiveCommand=function(n){return angular.element(document).injector().get("nativeAppService").receiveCommand(n,!1).toString()});angular.module(microsoft.support.moduleName).directive("navigationConfirmation",["$window","$rootScope","rccService","chatStateService",function(n,t,i,r){return{restrict:"A",scope:{message:"&",condition:"&"},link:function(t){function u(n){if(t.condition())return(n||window.event).returnValue=t.message(),t.message()}function f(){i.endChat()}function e(){r.getChatEstablished()||i.endChat()}$(n).bind("beforeunload",u);$(n).bind("onbeforeunload",u);$(n).bind("beforeunload",e);$(n).bind("onbeforeunload",e);$(n).bind("unload",f);$(n).bind("onunload",f);t.$on("$destroy",function(){$(n).unbind("beforeunload",u);$(n).unbind("onbeforeunload",u);$(n).unbind("unload",f);$(n).unbind("onunload",f)})}}}]);angular.module(microsoft.support.moduleName).filter("objectOrderBy",function(){return function(n,t,i){var r=[];for(var u in n)n[u]!==undefined&&r.push(n[u]);return r.sort(function(n,i){return n[t]>i[t]?1:-1}),i&&r.reverse(),r}}),function(n){n.service("objectTableApi",[function(){this.joinToken="join:";this.objectByString=function(n,t){var r,i,u;for(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),r=t.split("."),i=0;i<r.length;++i)if(u=r[i],u in n)n=n[u];else return;return n};this.setObjectProperty=function(n,t,i){var r,u,f,e;for(i=i.replace(/\[(\w+)\]/g,".$1"),i=i.replace(/^\./,""),r=i.split("."),u=n,f=0;f<r.length;f++)if(e=r[f],e in n)u=n,n=n[e];else return;return u&&(u[r[r.length-1]]=t),n};this.getJoinProperty=function(n,t){for(var f,u,e=t.slice(this.joinToken.length).trim().split(","),r=[],i=0;i<e.length;i++)f=this.objectByString(n,e[i]),f&&r.push(f);if(r.length>0){if(r.length==1)return r[0];for(u="",i=0;i<r.length;i++)u+=r[i],i<r.length-1&&(u+=" ");return u}return""}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("objectTable",["objectTableApi",function(n){return{templateUrl:"/PartialViews/Common/ObjectTable.html",scope:{bindObject:"=",tableConfig:"=",sortFunction:"&",formatFunction:"&",elementChangedFunction:"&"},controller:["$scope","$location","languageService",function(t,i,r){function u(t,i){return i.linkTemplate.replace(/\{[\w.\[\]]+\}/g,function(i){var u=i.substr(1,i.length-2);return u=="langLocale"?r.langLocale():n.objectByString(t,u)})}function f(n){if(t.tableConfig.columns[n]!=null&&t.tableConfig.columns[n].defaultColumn)for(var i=0;i<t.tableConfig.columns.length;i++)i==n?(t.tableConfig.columns[i].style.active=!0,t.tableConfig.columns[i].style.ascending==!0?(t.tableConfig.columns[i].style.ascending=!1,t.tableConfig.columns[i].style.descending=!0):(t.tableConfig.columns[i].style.ascending=!0,t.tableConfig.columns[i].style.descending=!1)):t.tableConfig.columns[i].style.active=!1}t.getObjectProperty=function(i,r){var u=null;return u=r.propertyName.indexOf(n.joinToken)==0?n.getJoinProperty(i,r.propertyName):n.objectByString(i,r.propertyName),r.format!=null&&r.format.length>0&&t.formatFunction&&(u=t.formatFunction({value:u,format:r.format})),u};t.linkPropertyClicked=function(n,t){return i.url(u(n,t))};t.checkboxPropertyClicked=function(i,r){var u=n.objectByString(i,r.propertyName);n.setObjectProperty(i,!u,r.propertyName);t.elementChangedFunction&&typeof t.elementChangedFunction=="function"&&t.elementChangedFunction({element:i,propName:r.propertyName,oldVal:u,newVal:!u})};t.sortColumn=function(n){f(n);t.sortFunction({sortParams:t.tableConfig.columns[n].style,propertyName:t.tableConfig.columns[n].propertyName})};t.getNumberOfVisibleObject=function(){if(t.bindObject&&t.bindObject.length){var n=0;return angular.forEach(t.bindObject,function(i){t.isObjectVisible(i)&&n++}),n}return 0};t.isObjectVisible=function(n){return n.visible==null||n.visible!=null&&n.visible==!0};t.$watch("tableConfig",function(n){if(n!=null)for(var t=0;t<n.columns.length;t++)n.columns[t].style={sortable:!(n.disableSorting!=="undefined"&&n.disableSorting),ascending:!0,descending:!1,active:!1}})}]}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("OnlineController",["$scope","compassService",function(n,t){function i(){n.offlineMessage=t.getOfflineMessage()}n.$on("CompassContentReady",function(){i()});i()}])}(angular.module(microsoft.support.moduleName));app.run(["$window","$rootScope",function(n,t){t.online=navigator.onLine?!0:!1;n.addEventListener&&(n.addEventListener("online",function(){t.online=!0;t.$apply();t.$broadcast("ClientReconnected")}),n.addEventListener("offline",function(){t.online=!1;t.$apply()}))}]),function(n){n.service("osService",["$window",function(n){var i,r={"Windows 2000":["Windows NT 5.0"],"Windows XP":["Windows NT 5.1"],"Windows 2003":["Windows NT 5.2"],"Windows Vista":["Windows NT 6.0"],"Windows 7":["Windows NT 6.1","Windows 7"],"Windows 8":["Windows NT 6.2","Windows 8"],"Windows 8.1":["Windows NT 6.3","Windows 8"],"Windows 10":["Windows NT 10"],Mac:["Mac"],X11:["Unix"],Linux:["Linux"],"Windows 10 Mobile":["Windows Phone 10"],"Windows 8.1 Mobile":["Windows Phone 8","Windows Phone 8.1"]},t={Android:function(){return n.navigator.userAgent.match(/Android/i)},BlackBerry:function(){return n.navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return n.navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return n.navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return n.navigator.userAgent.match(/IEMobile/i)},Other:function(){return n.navigator.userAgent.indexOf("Mobi")>=0},any:function(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||t.Other()}};this.getOS=function(){return i};this.isMobile=function(){return!!t.any()};this.determineOS=function(){var f=n.navigator.platform,u=n.navigator.userAgent,t,i;for(t in r)if(i=r[t].filter(function(n){return u.indexOf(n)>-1}),i.length)return t;return"Other"};this.isWindows=function(){return n.navigator.platform.indexOf("Win")>=0};this.is64bitWindows=function(){return n.navigator.userAgent.indexOf("WOW64")>-1||n.navigator.platform=="Win64"};i=this.determineOS();this.isCorsEnabled=function(){return n.navigator.userAgent.indexOf("MSIE 8.0")>-1||n.navigator.userAgent.indexOf("MSIE 9.0")>-1?!1:!0}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("PageController",["$rootScope","$scope","$window","$location","$route","$routeParams","compassService","osService","partnerDataService","languageService","currentLanguageService","flightService",function(n,t,i,r,u,f,e,o,s,h){function l(){t.errorStatus=i.navigator.cookieEnabled?null:"cookies"}t.title="";t.noIndex=!1;t.isThemeLoaded=!0;t.locale=h.langLocale();t.noChrome=r.search().nochrome;t.metaTags=[];var c=function(n){var i=e.getPageInfo();h.languages().then(function(n){t.languages=n});i&&(t.title=t.title&&n?t.title:i.pageTitle,t.alertBanner=i.alertBanner,i.alertBannerLink&&i.alertBannerLink.linkText&&i.alertBannerLink.linkUrl&&(t.alertBannerLink='<a id="alert-banner-link" href="'+i.alertBannerLink.linkUrl+'">'+i.alertBannerLink.linkText+"<\/a>"),i.alertBannerLink2&&i.alertBannerLink2.linkText&&i.alertBannerLink2.linkUrl&&(t.alertBannerLink2='<a id="alert-banner-link-2" href="'+i.alertBannerLink2.linkUrl+'">'+i.alertBannerLink2.linkText+"<\/a>"))};t.isThemeLoaded=!1;s.loadTheme().then(function(){t.isThemeLoaded=!0},function(){t.isThemeLoaded=!0});t.getCv=function(){return i&&i.Asimov&&i.Asimov.cv?i.Asimov.cv.getValue():null};t.reset=function(){t.isMobile=o.isMobile();c();l()};t.$on("UpdateTitle",function(n,i){t.title=i});t.$on("AddMetaTags",function(n,i){var r,u;for(r in i)u=t.metaTags.map(function(n){return n.name}).indexOf(i[r].name),u>=0?t.metaTags[u]=i[r]:t.metaTags.push(i[r])});t.$on("CompassContentReady",function(){c(!0)});t.$on("NoIndex",function(){t.noIndex=!0});t.$on("500Error",function(){t.errorStatus||(t.errorStatus="500")});t.$on("404Error",function(n,i){t.errorStatus||i&&i.preventError||(t.errorStatus="404")});t.$on("$routeChangeStart",function(){t.errorStatus!=="cookies"&&(t.errorStatus=null);t.noIndex=!1});t.$on("$routeChangeSuccess",function(){t.canonicalUrl="https://support.microsoft.com"+r.path();t.noChrome=r.search().nochrome;t.hideSearch=u.current&&u.current.data&&u.current.data.hideSearch==!0;t.fluidContainer=u.current&&u.current.data&&u.current.data.fluidContainer==!0});t.reset()}])}(angular.module(microsoft.support.moduleName)),function(n,t){t.service("resourceLoaderService",["$q","$document","qosTelemetryService",function(t,i,r){this.loadCSS=function(u){var f=t.defer(),e=r.createEvent(r.eventTypes.app.downloadCSS);return i[0].createStyleSheet?(i[0].createStyleSheet(u),f.resolve(),e.resolve(),f.promise):(n.element("head").append(n.element('<link rel="stylesheet" type="text/css" />').attr("href",u).on("load",function(){e.resolve();f.resolve()}).on("error",function(){e.reject();f.reject()})),f.promise)}}])}(angular,angular.module(microsoft.support.moduleName));app.directive("scrollTo",["$location","$anchorScroll","$log","$timeout",function(n,t,i,r){return{restrict:"A",link:function(i,u,f){u.bind("click",function(){r(function(){f&&f.location&&(n.hash(f.location),t())})})}}}]);app.directive("searchableDropdown",["$timeout",function(n){return{restrict:"AE",scope:{items:"=",prompt:"@",display:"@",modelObject:"=",onSelect:"&",preserveInput:"=?",resetOnClear:"=?"},templateUrl:"/PartialViews/Common/SearchableDropdownTemplate.html",link:function(t){t.setCurrent=function(n){t.current=n};t.onItemSelected=function(i){t.model=i[t.display];t.modelObject=i;t.current=0;t.selected=!0;n(function(){t.onSelect();t.preserveInput&&t.preserveInput===!0||(t.model=null)})};t.actionOnKeyDown=function(n){if(n.keyCode==38&&t.current>0)t.current--;else if(n.keyCode==40&&t.current<t.filtered.length-1)t.current++;else if(n.keyCode==13)t.onItemSelected(t.filtered[t.current])};t.$watch("modelObject",function(n){t.selected&&t.modelObject==n||(t.current=0,t.selected=!1)});t.preserveInput&&t.preserveInput===!0&&(t.preserveInput&&t.preserveInput===!0&&t.modelObject&&(t.model=t.modelObject[t.display],t.selected=!0),t.resetOnClear&&t.resetOnClear===!0&&t.$watch("model",function(){t.model||(t.modelObject="",t.current=0,t.onSelect())}))}}}]),function(n){n.service("sessionStorageService",["$window","$log",function(n,t){var i=!1;try{i=n&&n.sessionStorage;n.sessionStorage.setItem("storageTest","");n.sessionStorage.removeItem("storageTest","")}catch(r){i=!1}i||t.error("Local storage not supported");this.get=function(t){return i&&n.sessionStorage.getItem(t)?JSON.parse(n.sessionStorage.getItem(t)):null};this.set=function(t,r){i&&n.sessionStorage.setItem(t,JSON.stringify(r))}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("smoothScroll",["$window","$document","$timeout",function(n,t,i){return{restrict:"A",scope:{maxSpeed:"=?",minSkipDistance:"=?",maxStep:"=?"},link:function(r,u,f){function o(t){var o=s(),u=h(t),c=Math.abs(u-o),f=Math.round(c/25),l=Math.round(c/100);if(l>=r.maxSpeed&&(l=r.maxSpeed),f>=r.maxStep&&(f=r.maxStep),c<=r.minSkipDistance){n.scrollTo(0,u);return}e=i(function a(t){u>o?(t+=f,t>u&&(t=u)):(t-=f,t<u&&(t=u));n.scrollTo(0,t);t!==u&&(e=i(a.bind(this,t),l))}.bind(this,o))}function s(){return n.self.pageYOffset?n.self.pageYOffset:t[0].documentElement&&t[0].documentElement.scrollTop?t[0].documentElement.scrollTop:t[0].body&&t[0].body.scrollTop?t[0].body.scrollTop:0}function h(n){if(n){for(var i=n,r=i.offsetTop;i.offsetParent&&i.offsetParent!==t[0].body;)i=i.offsetParent,r+=i.offsetTop;return r}return 0}var e;r.maxSpeed=r.maxSpeed||5;r.minSkipDistance=r.minSkipDistance||10;r.maxStep=r.maxStep||15;r.$on("SmoothScroll",function(n,t){f.id===t&&o(u[0])});r.$on("$destroy",function(){i.cancel(e)})}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("smoothScrollService",["$rootScope",function(n){this.scroll=function(t){n.$broadcast("SmoothScroll",t)}}])}(angular.module(microsoft.support.moduleName));app.directive("starRating",["compassService",function(n){function t(){return n.getChatSurvey()}return{restrict:"A",templateUrl:"/PartialViews/Common/StarRating.html",scope:{ratingValue:"=value",name:"@",max:"=?"},link:function(n){n.max=n.max||5;n.stars=new Array(n.max);n.view=t();n.rate=function(t){n.ratingValue=t+1};n.preview=function(t){n.previewValue=t+1}}}}]);angular.module(microsoft.support.moduleName).directive("workflow",["$rootScope","workflowManagerService",function(n,t){return{restrict:"A",scope:{context:"="},transclude:!0,templateUrl:function(n,t){return t.templateUrl},controller:["$scope","$element","$attrs",function(i,r,u){var f=u.workflowName;t.registerWorkflow(f);i.$on("$destroy",function(){t.removeWorkflow(f)});n.$on("$locationChangeStart",function(){t.removeWorkflow(f)});this.getWorkflowName=function(){return f};this.getStepTemplateUrl=function(){return u.stepTemplateUrl};this.registerStep=function(n,i){return t.registerStep(f,n,i)};this.canEnter=function(n){return t.canEnter(f,n)};this.isOpen=function(n){return t.isOpen(f,n)};this.moveToNext=function(n){t.moveToNext(f,n)};this.moveToPrev=function(n){t.moveToPrev(f,n)};this.hasPrev=function(n){return t.hasPrev(f,n)};this.hasNext=function(n){return t.hasNext(f,n)};this.totalSteps=function(){return t.totalSteps(f)};this.getContext=function(){return i.context}}]}}]),function(n){n.service("workflowManagerService",["$window",function(n){var t={};this.registerWorkflow=function(n){if(n)if(t[n])throw new Error("workflow name:"+n+" already exists.");else t[n]={steps:[],currentStepIndex:-1,results:{}};else throw new Error("workflow name is required for workflow registration.");};this.totalSteps=function(n){return t[n]?t[n].steps.length:0};this.getWorkflow=function(n){return n&&t.hasOwnProperty(n)&&t.hasOwnProperty(n)&&t[n]!=undefined?t[n]:null};this.removeWorkflow=function(n){n&&t.hasOwnProperty(n)&&(t[n]=undefined)};this.registerStep=function(n,i,r){if(n&&i&&r){t[n]||this.registerWorkflow(n);var u={step:i,providedScope:r,isOpen:!1},f=t[n],e=f.currentStepIndex;return e==-1&&(u.isOpen=!0,f.currentStepIndex=0),t[n].steps.push(u),t[n].steps.length-1}throw new Error("workflow name, workflow step and providedScope are required for registering steps.");};this.updateStep=function(n,i,r,u){if(n&&r&&u&&i!=undefined){if(t[n]||this.registerWorkflow(n),i<0||i>=t[n].steps.length)throw new Error("stepIndex out of range");var f=t[n].steps[i];r&&(f.step=r);u&&(f.providedScope=u);t[n].steps[i]=f}else throw new Error("workflow name, workflow step, providedScope and stepIndex are required for registering steps.");};this.getCurrentStepIndex=function(n){if(n&&t[n])return t[n].currentStepIndex;throw new Error("Workflow name="+n+' doesn"t exist');};this.canEnter=function(n,i){var r,u;if(t[n]&&t[n].steps.length>0)for(r=0;r<t[n].steps.length;r++)if(u=t[n].steps[r].step,r!=i){if(u.isComplete!=undefined&&typeof u.isComplete=="function"&&!u.isComplete())return!1}else return!0;else return!1};this.enter=function(i,r){if(this.canEnter(i,r)){n.scrollTo(0,0);var u=this.getCurrentStepIndex(i);t[i].steps[u].isOpen=!1;t[i].steps[u].providedScope.exit();t[i].steps[t[i].currentStepIndex].step.exitStep();t[i].currentStepIndex=r;t[i].steps[t[i].currentStepIndex].providedScope.enter();t[i].steps[t[i].currentStepIndex].step.enterStep();t[i].steps[t[i].currentStepIndex].isOpen=!0}};this.isOpen=function(n,i){return i!=undefined&&n!=undefined&&t[n]!=undefined?t[n].steps[i].isOpen:!1};this.hasNext=function(n,i){return n!=undefined&&t[n]!=undefined&&t[n].steps.length-1>i&&i>=0?!0:!1};this.hasPrev=function(n,i){return n!=undefined&&t[n]!=undefined&&t[n].steps.length>i&&i>0?!0:!1};this.moveToNext=function(n,t){this.hasNext(n,t)&&this.enter(n,t+1)};this.moveToPrev=function(n,t){this.hasPrev(n,t)&&this.enter(n,t-1)};this.getStepResults=function(n){return t[n]&&t[n].results?t[n].results:{}};this.saveStepResult=function(n,i){t[n]&&t[n].results&&i&&(t[n].results=angular.extend(t[n].results,i))}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("workflowStep",["$q","workflowStepService",function(n,t){return{restrict:"A",require:"^workflow",scope:{},link:function(n,i,r,u){var f=u.registerStep({},{}),e,s,l,h;n.stepIndex=f;n.totalSteps=function(){return u.totalSteps()};n.stepName=r.stepName||n.stepIndex;n.view=function(){var n=u.getContext();return n?n.view:{}};n.canEnter=function(){return u.canEnter(f)};n.isOpen=function(){return u.isOpen(f)};n.moveToNext=function(){u.moveToNext(f)};n.moveToPrev=function(){u.moveToPrev(f)};n.hasPrev=function(){return u.hasPrev(f)};n.hasNext=function(){return u.hasNext(f)};n.enter=function(){};n.exit=function(){};e=u.getWorkflowName();n.workflowName=e;var c=u.getStepTemplateUrl(),a=r.viewTemplateUrl,v=r.controllerName,o=i[0].querySelector(".workflow-step");o=o?angular.element(o):i;s=r.templateUrl;s!=undefined&&(c=s);l={stepDirectiveTemplateUrl:c,viewTemplateUrl:a,controllerName:v,appendTo:i,workflowName:e,scope:n,stepIndex:f};h=t.create(l);n.showNavi=function(){return h.showCommonStepNavi()};n.isComplete=function(){return h.isStepComplete()}}}}]),function(n){n.service("workflowStepService",["$q","$templateRequest","$rootScope","$controller","$compile","workflowManagerService",function(n,t,i,r,u,f){function e(n){return t(n,!0)}this.create=function(t){var s,c;if(!t.viewTemplateUrl||!t.controllerName||!t.appendTo||!t.workflowName||!t.scope)throw new Error("templateUrl, controllerName, appendTo and workflowName are required.");var h=n.defer(),o=null,i={output:h.promise,complete:function(n){h.resolve(n)},invalidate:function(n){h.reject(n)}};return["moveToNext","moveToPrev","hasPrev","hasNext"].forEach(function(n){i[n]=function(){return f[n](t.workflowName,t.stepIndex)}}),i.getStepResults=function(){return f.getStepResults(t.workflowName)},i.saveStepResult=function(n){return f.saveStepResult(t.workflowName,n)},s=[e(t.viewTemplateUrl)],c=t.stepDirectiveTemplateUrl!==""&&t.stepDirectiveTemplateUrl!==undefined,s=c?s.concat(e(t.stepDirectiveTemplateUrl)):s,i.created=n.all(s).then(function(n){var h=t.scope,p,a,s,l;o=h.$new(c);a={$scope:o,stepInstance:i};p=r(t.controllerName,a);["enterStep","exitStep"].forEach(function(n){i[n]=function(){if(angular.isFunction(o[n]))return o[n]()}});["isStepComplete","showCommonStepNavi"].forEach(function(n){i[n]=function(){return angular.isFunction(o[n])?o[n]():!0}});var w=n[0],v=angular.element(w),e=t.appendTo,y=n[1];y!=undefined&&(s=angular.element(y),u(s)(h),e.append(s),l=e[0].querySelector(".workflow-step"),e=l?angular.element(l):angular.element(s[0]));e.append(v);u(v)(o);f.updateStep(t.workflowName,t.stepIndex,i,h)}),i}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("callback",["$rootScope","$log","$location","$sanitize","$filter","clientConfig","chatStateService","rccService","languageService","compassService","sessionStorageService","phoneNumberService","waitTimeService","modalityTags","unauthNames",function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function p(r){function b(){r.loadingTimes=!0;r.callInfo.times=[];r.callInfo.disableTimeSelect=!0;o.getCallbackTime(r.callInfo.date.toISOString().substring(0,19)+"Z",96,e.getSubject())}function d(n){for(var t=0;t<r.callInfo.availableCountries.length;t++)if(r.callInfo.availableCountries[t].locale.toUpperCase()===n.toUpperCase())return t.toString();return null}function k(){r.callback=h.getCallback();r.status.waitingOnCompass=!r.callback}function p(n){r.callInfo.currentError=n;r.$apply(function(){r.callInfo.templateUrl="/PartialViews/Contact/Callback/Error.html"});r.loadingTimes=!1}function g(n){var i=[],t,r;for(i.push(new Date),t=1;t<n;t++)r=new Date((new Date).getTime()+t*864e5),r.setHours(0,0,0,0),i.push(r);return i}function nt(n){var f=r.callInfo.date.getDate(),u=[],t,i;for(t in n)i=new Date(n[t]),i.getDate()===f&&u.push({time:n[t],dateobject:i});return u}function w(n,t,i){if(typeof n!="undefined"){var r=parseInt(n);i(r)}else return t()}function tt(n){r.callInfo.countryCode=l.selectCountryCode(n);r.callInfo.placeholder=l.getCurrentMask();r.getValidNumber()}r.hoops={};r.config={templateUrl:"/PartialViews/Contact/Callback/Callback.html",hoopsEnabled:f.ChatConfig.AllowHoursOfOperation,timeout:f.ChatConfig.ChatDefaultTimeout};r.reset=function(){r.awaitingResponse=!0;r.status={waitingOnHoops:!1,waitingOnRcc:!0,waitingOnCompass:!0};r.callInfo={};r.callInfo.countryCodeProperty=function(n){return w(n,function(){return r.callInfo.countryCodeIndex},function(n){n>=0&&n<r.callInfo.availableCountries.length?(tt(r.callInfo.availableCountries[n].locale),r.callInfo.countryCodeIndex=n.toString()):t.error("Index for scope.callInfo.availableCountries is out of bounds. Index: "+n+". Array length: "+r.callInfo.availableCountries.length)})};r.callInfo.dateProperty=function(n){return w(n,function(){return r.callInfo.dateIndex},function(n){n>=0&&n<r.callInfo.availableDates.length?(r.callInfo.date=r.callInfo.availableDates[n],r.callInfo.dateIndex=n.toString(),r.callInfo.availableCountries&&b()):t.error("Index for scope.callInfo.availableDates is out of bounds. Index: "+n+". Array length: "+r.callInfo.availableDates.length)})};r.callInfo.timeProperty=function(n){return w(n,function(){return r.callInfo.timeIndexString},function(n){n>=0&&n<r.callInfo.times.length?(r.callInfo.time=r.callInfo.times[n],r.callInfo.timeIndexString=n.toString()):t.error("Index for scope.callInfo.times is out of bounds. Index: "+n+". Array length: "+r.callInfo.times.length)})};r.callInfo.number="";r.callInfo.invalidNumber=!1;r.callInfo.times=[];r.callInfo.availableDates=r.isScheduleCallback?g(7):[];r.callInfo.dateProperty("0");r.callInfo.currentError="";r.callInfo.disableTimeSelect=!0;var n=!c.get(y.storage);o.init(n,function(){r.awaitingResponse=!1;r.status.waitingOnRcc=!1;r.config.hoopsEnabled&&!r.isScheduleCallback?(r.status.waitingOnHoops=!0,o.isWithinOperatingHours(e.getSubject(),v.callback).then(function(n){r.status.waitingOnHoops=!1;n[v.callback].isOpen?r.initCallback():i.path("/hoops/callback/"+e.getSubject())})):r.initCallback()});k()};r.initCallback=function(){r.callInfo.availableCountries=l.populateDropdown();r.callInfo.countryCodeProperty(d(s.locale()));r.callInfo.templateUrl=r.config.templateUrl;r.isScheduleCallback&&b()};r.requestCall=function(t){if(r.getValidNumber(),!r.callInfo.invalidNumber){n.$broadcast("ButtonClickedAndDisabled",t);r.awaitingResponse=!0;var i=r.callInfo.countryCode.code+" "+r.callInfo.number;r.isScheduleCallback?o.enqueueCallback(i,e.getSubject(),l.getCurrentLocale(),r.callInfo.time.time):o.enqueueCallback(i,e.getSubject(),l.getCurrentLocale())}};r.goToSuccess=function(){r.isScheduleCallback?(r.callInfo.displayDate=u("date")(r.callInfo.date,"fullDate"),r.callInfo.displayTime=u("date")(r.callInfo.time.dateobject,"shortTime"),r.loadingTimes=!1):a.getCallbackWaitTime().then(function(n){r.callInfo.waitTime=n});r.callInfo.number=l.avoidIEParser(r.callInfo.number);r.callInfo.templateUrl="/PartialViews/Contact/Callback/Success.html"};r.checkIfValidNumber=function(){var n=l.checkIfValidNumber(r.callInfo);n||(r.callInfo.invalidNumber=!1)};r.getValidNumber=function(){r.callInfo=l.getValidNumber(r.callInfo)};r.disableConfirm=function(){var n=r.callInfo.invalidNumber||!r.callInfo.number||r.callInfo.number.length===0||r.awaitingResponse;return r.isScheduleCallback&&(n=n||r.loadingTimes||r.callInfo.disableTimeSelect),n};r.$on("CompassContentReady",k);r.$on("CallbackPhoneValidation",function(n,t){t&&!t.isValid&&(r.currentError="invalidPhoneNumber",p())});r.$on("EnqueueCallbackSuccess",function(){r.awaitingResponse=!1;r.goToSuccess()});r.$on("EnqueueCallbackFailure",function(n,t){r.awaitingResponse=!1;t.errorCode==="CHANNEL_CONTACTSCHEDULED"?p("doubleCallback"):t.errorCode==="CHANNEL_CONTACTINVALID"?p("invalidPhoneNumber"):p()});r.$on("EnterCallbackQueueTimeout",function(){r.awaitingResponse=!1;p()});r.$on("CallbackPageTimeout",function(){r.isReady||(r.status.isScheduleCallback=r.isScheduleCallback,n.$broadcast("500Error",{reason:"Timeout occurred on a callback ASAP or schedule callback page",data:r.status}))});r.$on("GetCallbackTimeSuccess",function(n,t){r.callInfo.times=nt(t.slots);r.callInfo.times.length===0?(r.callInfo.disableTimeSelect=!0,r.callInfo.times=[{dateobject:r.callback.scheduleCallback.noTimesAvailable}]):(r.callInfo.timeProperty("0"),r.callInfo.disableTimeSelect=!1);r.loadingTimes=!1});r.$on("ScheduleCallbackTimesTimeout",function(){r.loadingTimes=!1;r.awaitingResponse=!1;p()});r.$watchCollection("status",function(n){r.isReady=n&&!Object.keys(n).some(function(t){return n[t]})});r.reset()}return{restrict:"A",scope:{isScheduleCallback:"="},templateUrl:"/PartialViews/Contact/Callback/Container.html",link:p}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("phoneNumberService",["$rootScope","rccService","compassService",function(n,t,i){function h(){var n=i.getSupportedLocales()||[s];e!==n.length&&(u=[],angular.copy(n,u),e=n.length,o=!1)}function f(n,i){i||(i="US");var r=t.validateNumber(n,i);return r?r:{isValid:!0,mask:"+1 XXX-XXX-XXXX",formattedContact:n}}var u,e,r,c,o,s={country:"United States",locale:"US"},l=0;this.init=function(){h()};this.getCurrentCountryCode=function(){return r&&r.code?r.code:"+1"};this.getCurrentLocale=function(){return r&&r.locale?r.locale:"US"};this.getCurrentCountry=function(){return r&&r.country?r.country:"United States"};this.getCurrentMask=function(){return r&&r.mask?r.mask:this.getMask("US")};this.getFormattedNumber=function(n,t){var i=f(n,t),e=i.formattedContact.indexOf("+")>-1,r=i.formattedContact.indexOf(" "),u;return e&&r>0&&(u=i.formattedContact.substring(r+1)),u};this.getCountryCode=function(n){var t=f("",n),i=t.mask.indexOf(" ");return i>0?t.mask.slice(0,i):"+1"};this.getMask=function(n){var t=f("",n),i=t.mask.indexOf(" ");return i>0?t.mask.slice(i).trim():"XXX-XXX-XXXX"};this.populateDropdown=function(){var n=this;return o||(u.forEach(function(t,i){t.code=n.getCountryCode(t.locale);t.mask=n.getMask(t.locale);t.display=t.code+" - "+t.country;t.locale==="US"&&(s=t,l=i)}),o=!0),u};this.selectCountryCode=function(n){n=n.toUpperCase();for(var t=0;t<e;t++)if(n===u[t].locale)return r=u[t],c=t,u[t];return s};this.checkIfValidNumber=function(n){return n.number.length!==0&&!f(n.number,this.getCurrentLocale()).isValid};this.getValidNumber=function(n){if(n.number.length<=0)return n;var t=f(n.number,this.getCurrentLocale());return t.isValid?(n.invalidNumber=!1,n.number=this.getFormattedNumber(t.formattedContact,this.getCurrentLocale())):n.invalidNumber=!0,n};this.avoidIEParser=function(n){return n.substring(0,1)+"<span class='hidden'>_<\/span>"+n.substring(1)};n.$on("CompassContentReady",h);this.init()}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("PhoneScreenShareController",["$rootScope","$scope","$timeout","$log","rccService","compassService","flightService","clientConfig","chatStateService","nativeAppService","contactCommands","agentChatService","messageTypes","qosTelemetryService",function(n,t,i,r,u,f,e,o,s,h,c,l,a,v){function y(){t.content=f.getPasscode();t.content&&(t.status.waitingOnCompass=!1)}function p(){t.reconnectTimer||(t.reconnectTimer=i(function(){(t.showReconnectingMessage||t.showClientReconnectingMessage)&&(t.showReconnectingMessage=!1,t.showClientReconnectingMessage=!1,t.showDisconnectMessage=!0,v.createEvent(v.eventTypes.awasa.chatReconnectTimedOut).reject(),s.clearState(),u.endChat())},t.config.reconnectWaitTime))}function w(){t.showDisconnectMessage||t.showReconnectingMessage||t.showClientReconnectingMessage||t.reconnectTimer&&i.cancel(t.reconnectTimer)}t.config={timeout:o.ChatConfig.ChatDefaultTimeout,reconnectWaitTime:o.ChatConfig.ChatReconnectWaitTime,chatScreenShareEnabled:o.ChatConfig.AllowChatScreenShare&&h.hasCapability("ScreenSharing")};t.reset=function(){t.status={waitingOnRcc:!0,waitingOnCompass:!0};t.isNative=h.isNative();t.hasValidPasscode=!1;t.failedConnect=!1;t.agent=null;t.waitingOnAgent=!1;t.displayChatScreenShare=!1;t.sharingScreen=!1;t.showClientReconnectingMessage=!1;t.showReconnectingMessage=!1;t.showDisconnectMessage=!1;t.messages=[];t.sessionId="";t.subjectId="";y();u.isRatMode()||u.toggleRatMode();u.initLazy(function(){t.status.waitingOnRcc=!1})};t.connectToAgent=function(n){t.agent=n;n&&n.AgentId&&(t.failedConnect=!1,t.waitingOnAgent=!0,s.setAgent(n),s.setSubject(t.subjectId),u.enqueueChat({agentId:t.sessionId,ignoreAvailability:!0}))};t.cancel=function(){s.clearState();n.$broadcast("ChatBack")};t.$on("CompassContentReady",y);t.$on("PasscodeSuccess",function(n,i){t.hasValidPasscode=!0;t.waitingOnAgent=!0;t.sessionId=i.SessionId;t.subjectId=i.SubjectId;l.lookupAgent(i.ViewerId)});t.$on("ChatMessageReceived",function(n,i){(i.chatSender===a.SystemInfo||i.chatSender===a.SystemError)&&t.messages.push(i)});t.$on("AgentDataReady",function(n,i){t.connectToAgent(i)});t.$on("EnqueueChatFailure",function(n,i){t.failedConnect=!0;r.error("EunqueChatFailure was broadcast",JSON.stringify(i))});t.$on("ChatSessionEstablished",function(){t.waitingOnAgent=!1});t.$on("ChatSessionClosed",function(){t.displayChatScreenShare=!1;t.sharingScreen=!1});t.$on("ChatScreenShareRequest",function(){t.displayChatScreenShare=!0});t.$on("ChatScreenShareDenied",function(){t.displayChatScreenShare=!1});t.$on("ChatScreenShareClosed",function(){t.displayChatScreenShare=!1;t.sharingScreen=!1});t.$on("ChatScreenShareEstablished",function(){t.sharingScreen=!0});t.$on("ChatScreenShareConnectFailed",function(){t.displayChatScreenShare=!1});t.$on("MessageWindowTryAgain",function(){t.cancel()});t.$on("AgentDisconnected",function(){t.showClientReconnectingMessage||(t.showReconnectingMessage=!0);p()});t.$on("AgentReconnected",function(){t.showReconnectingMessage=!1;w()});t.$on("ChatChannelDisconnected",function(){t.showReconnectingMessage||(t.showClientReconnectingMessage=!0);p()});t.$on("ChatChannelReconnected",function(){t.showClientReconnectingMessage=!1;w()});t.$on("RATPhonePageTimeout",function(){t.isReady||n.$broadcast("500Error",{reason:"Timeout occurred on passcode page",data:t.status})});t.$on("$destroy",function(){u.isRatMode()&&u.toggleRatMode()});t.$watchCollection("status",function(n){t.isReady=n&&!Object.keys(n).some(function(t){return n[t]})});t.reset()}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).filter("timeslotDisplay",["$filter",function(n){return function(t){return t instanceof Date?n("date")(t,"shortTime"):t}}]),function(n){n.service("agentChatService",["$rootScope","contentApiService",function(n,t){this.lookupAgent=function(i){var r=t.getAgentById(i);r.then(function(t){t.data&&n.$broadcast("AgentDataReady",t.data)},function(){})}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("autoScrollContent",["$document","$interval","$q","$timeout",function(n,t,i,r){function u(n,r,u){var f=i.defer(),e=(u-$(n).scrollTop())/r*33,o=t(function(){var i=$(n).scrollTop();$(n).scrollTop(i+e);(i>=u||i===$(n).scrollTop())&&(t.cancel(o),f.resolve())},33);return f.promise}function f(n,t){t[0].documentElement?t[0].documentElement.scrollTop=n.scrollHeight:t[0].body.scrollTop=n.scrollHeight}function e(n,t){var i=n[0].scrollHeight,r,e,u,f;if(t){r=t.split(";");for(e in r)if(u=n.find(r[e]),u.length){f=u.last();i=f.position()&&f.position().top-20||i;break}}return i}return{restrict:"A",link:function(t,i,o){function a(t){if(!h)if(h=!0,s.tagName==="BODY")f(s,n),h=!1;else if(o.speed){var r=e(i,t);u(s,o.speed,r).then(function(){h=!1})}else $(s).scrollTop(s.scrollHeight),h=!1}var c=o.target&&$(o.target)||i,s=c[0],h=!1,l=o.childSelector||"";t.$watch(function(){return s.offsetTop+s.scrollHeight},function(){r(function(){a(l)},50)})}}}]);angular.module(microsoft.support.moduleName).directive("chatConnectingProgress",["$interval","$rootScope","compassService","chatStateService","clientConfig",function(n,t,i,r,u){function s(n){n.extendedWait=!1;n.positionInQueue=null;n.timeRemaining=o.defaultWaitTime;f=1e3}function h(i,u){i.timeRemaining--;r.getChatEstablished()?n.cancel(u):i.timeRemaining<=0&&(t.$broadcast("ChatExtendedWait"),i.timeRemaining=0,i.extendedWait=!0,n.cancel(u))}function e(t){t&&n.cancel(t)}var f,o={defaultWaitTime:u.ChatConfig.ChatDefaultWaitTime};return{restrict:"A",templateUrl:"/PartialViews/Contact/Chat/Connecting.html",scope:!0,link:function(t){var i;s(t);i=n(function(){h(t,i)},f);t.$on("500Error",e.bind(null,i));t.$on("$destroy",e.bind(null,i));t.$on("ChatQueueStatus",function(n,i){t.positionInQueue=i.position})}}}]),function(n){n.service("chatContextService",["$http",function(n){var t="/api/chatContext/set/";this.setValues=function(i){return n({method:"POST",url:t,data:{values:JSON.stringify(i)}})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("ChatController",["$scope","$rootScope","$timeout","$log","$routeParams","$window","$location","agentChatService","chatStateService","clientConfig","languageService","messageTypes","messageService","nativeAppService","compassService","sessionStorageService","qosTelemetryService","navigationService","flightService","emailTranscriptService","modalityTags","chatService","unauthNames",function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt){function it(n,i,r){var u=a.createMessage({text:n,senderName:i},r);return t.$broadcast("ChatMessageReceived",u),u}function ft(){n.chat=y.getChat();n.status.waitingOnCompass=!n.chat}function ot(){return n&&n.chat&&n.chat.chatting&&n.chat.chatting.sendFailure}function et(){return n&&n.chat&&n.chat.chatting&&n.chat.chatting.userDisplayName}function rt(){return n&&n.chat&&n.chat.chatting&&n.chat.chatting.systemDisplayName}function st(){return n&&n.chat&&n.chat.chatting&&n.chat.chatting.agentTransferred}n.chatWizard={};n.config={MaxChatMsgChars:h.ChatConfig.ChatMaxMessageChars,timeout:h.ChatConfig.ChatDefaultTimeout,chatTypingBoxId:"chat-client-message-input-textbox",chatReconnectWaitTime:h.ChatConfig.ChatReconnectWaitTime,hoopsEnabled:h.ChatConfig.AllowHoursOfOperation,chatTranscriptEnabled:k.isUserInFlight("ct"),chatScreenShareEnabled:h.ChatConfig.AllowChatScreenShare&&v.hasCapability("ScreenSharing"),userPauseResumeEnabled:v.hasCapability("PauseSharing"),templateUrl:"/PartialViews/Contact/Chat/ChatControl.html"};n.senderTypes=l;n.isInNotificationFlight=k.isUserInFlight("chat-notifications-1");n.audioAlert=null;n.firstChatMessageRecieved=!1;var ut="Chat-Room";n.chatWizard.resetChat=function(){var r=c.langLocale(),i;n.isNative=v.isNative();n.displayChatScreenShare=!1;n.sharingScreen=!1;n.status={waitingOnHoops:!1,waitingOnRcc:!0,waitingOnCompass:!0};n.chatWizard.templateUrl="";n.chatWizard.agentInfo={};n.chatWizard.chatInitialized=!1;n.chatWizard.chatInputBoxText="";n.chatWizard.inputIsDisabled=!1;n.chatWizard.chatMessages=[];n.chatWizard.typingStatus=nt.getTypingStatus();n.chatWizard.showReconnectingMessage=!1;n.chatWizard.showClientReconnectingMessage=!1;n.chatWizard.showDisconnectMessage=!1;n.chatWizard.showCancelButton=!b.isRoot();n.chatWizard.submitDisabled=!1;n.chatWizard.sendButtonIcon=null;n.chatWizard.chatEnded=!1;n.chatWizard.displayChatSurvey=!1;n.chatWizard.displayChatEndConfirmation=!1;n.longQueue=null;t.$broadcast("ChatReset");i=!p.get(tt.storage)&&!u.unauth;nt.init({isAuth:i,typingBoxId:n.config.chatTypingBoxId,room:ut}).then(function(){return n.status.waitingOnRcc=!1,n.status.waitingOnHoops=!0,nt.isOpen()}).then(function(t){n.status.waitingOnHoops=!1;t?(nt.enqueueChat(),n.chatWizard.templateUrl=n.config.templateUrl):e.path("/hoops/chat/"+s.getSubject())});ft()};n.chatWizard.cancelChat=function(){t.$broadcast("ChatBack")};n.chatWizard.connectionFail=function(){n.chatWizard.templateUrl="/PartialViews/Contact/Chat/ConnectionFailed.html"};n.chatWizard.chatSubmitClick=function(t){if(n.chatWizard.chatInputBoxText!==""){n.chatWizard.chatInputBoxText=n.chatWizard.chatInputBoxText.replace(/(?:\r\n|\r|\n)/g,"<br />");var i=it(n.chatWizard.chatInputBoxText,et(),l.User);nt.sendMessage(i);n.chatWizard.chatInputBoxText="";t&&t.preventDefault()}};n.userEndChat=function(){t.$broadcast("ChatSessionClosed",{})};n.backToChat=function(){n.chatWizard.inputIsDisabled=!1;n.chatWizard.submitDisabled=!1;n.chatWizard.displayChatEndConfirmation=!1};n.showEndConfirmation=function(){n.chatWizard.chatEnded||(t.$broadcast("EndChatClicked"),n.chatWizard.inputIsDisabled=!0,n.chatWizard.submitDisabled=!0,n.chatWizard.displayChatEndConfirmation=!0)};n.endChat=function(){n.chatWizard.displayChatEndConfirmation=!1;n.chatWizard.displayChatSurvey=!0;t.$broadcast("chatSurveyDisplayed");n.chatWizard.surveyData={agent:n.chatWizard.agentInfo.AgentId,chatId:s.getChatId()};n.chatWizard.inputIsDisabled=!0;n.chatWizard.submitDisabled=!0;n.chatWizard.chatEnded=!0;it(n.chat.chatting.answerTechDisconnect,rt(),l.SystemInfo);nt.endChat()};n.chatWizard.handleChatInterrupted=function(){n.chatWizard.submitDisabled=!0;n.chatWizard.inputIsDisabled=!0;n.chatReconnectTimer=i(function(){(n.chatWizard.showReconnectingMessage||n.chatWizard.showClientReconnectingMessage)&&(n.chatWizard.showReconnectingMessage=!1,n.chatWizard.showClientReconnectingMessage=!1,n.chatWizard.showDisconnectMessage=!0,n.displayChatScreenShare=!1,n.sharingScreen=!1,t.$broadcast("ChatScreenShareClosed"),w.createEvent(w.eventTypes.awasa.chatReconnectTimedOut).reject(),nt.endChat(),n.chatWizard.chatInitialized||t.$broadcast("500Error",{reason:"Disconnected in Queue"}))},n.config.chatReconnectWaitTime)};n.chatWizard.handleChatReconnected=function(){n.chatWizard.showDisconnectMessage||n.chatWizard.showReconnectingMessage||n.chatWizard.showClientReconnectingMessage||(n.chatReconnectTimer&&i.cancel(n.chatReconnectTimer),n.chatWizard.submitDisabled=!1,n.chatWizard.inputIsDisabled=!1)};n.$on("ChatScreenShareRequest",function(){n.displayChatScreenShare=!0});n.$on("ChatScreenShareDenied",function(){n.displayChatScreenShare=!1});n.$on("ChatScreenShareEstablished",function(){n.sharingScreen=!0});n.$on("ChatScreenShareClosed",function(){n.displayChatScreenShare=!1;n.sharingScreen=!1});n.$on("ChatScreenShareConnectFailed",function(){n.displayChatScreenShare=!1});n.$on("ChatSessionClosed",function(){n.displayChatScreenShare=!1;n.sharingScreen=!1});n.$on("CompassContentReady",function(){ft()});n.$on("ChatError",function(t,i){i.nextStep==="callback"?e.path("/contact/callback/"+s.getSubject()+"/"):i.nextStep==="fail"&&n.chatWizard.connectionFail(t,i)});n.$on("ChatMessageSendError",function(){it(ot(),rt(),l.SystemError)});n.$on("EnqueueChatFailure",function(n,i){t.$broadcast("500Error",{reason:"Failed to enqueue chat",data:i})});n.$on("EnqueueChatSuccess",function(){n.longQueue=i(function(){t.$broadcast("ChatLongQueue")},h.ChatConfig.ChatLongQueue)});n.$on("DisplayCallback",function(){n.chatWizard.scheduleCallback()});n.$on("ChatSessionEstablished",function(t,r){if(i.cancel(n.longQueue),o.lookupAgent(r.agentId),s.setChatEstablished(!0),n.chatWizard.chatInitialized=s.getChatEstablished(),s.getProblemText()){var u=it(s.getProblemText(),et(),l.User);nt.sendMessage(u)}});n.$on("AgentDataReady",function(t,i){i&&i!=="null"&&(n.chatWizard.agentInfo=i)});n.$on("ChatMessageReceived",function(i,r){if(n.chatWizard.chatMessages=a.getMessages(ut),n.firstChatMessageRecieved==!1){if(t.$broadcast("ShowToast",r.chatMessage),n.isInNotificationFlight&&("Notification"in f?Notification.permission==="granted"||f.document.hasFocus()?Notification.permission==="granted"&&t.$broadcast("Html5Notification","HasPermission"):(t.$broadcast("Html5Notification","NotificationPermissionRequested"),Notification.requestPermission(function(n){n==="denied"?t.$broadcast("Html5Notification","NotificationPermissionDenied"):n==="default"?t.$broadcast("Html5Notification","NotificationPermissionDismissed"):t.$broadcast("Html5Notification","NotificationPermissionGranted")})):t.$broadcast("Html5Notification","NotSupported"),!f.document.hasFocus()&&"Notification"in f&&Notification.permission==="granted"))var u=new Notification(r.chatMessage);n.firstChatMessageRecieved=!0}f.document.hasFocus()||(!n.audioAlert&&n.chat&&n.chat.audioAlertLink&&(n.audioAlert=new Audio(n.chat.audioAlertLink)),n.audioAlert&&!!(n.audioAlert.canPlayType&&n.audioAlert.canPlayType("audio/mpeg;"))&&n.audioAlert.play())});n.$on("ChatSessionClosed",function(){n.endChat()});n.$on("ChatTransferred",function(n,t){t.agentId&&(o.lookupAgent(t.agentId),it(st(),rt(),l.SystemInfo))});n.$on("$destroy",function(){(s.getChatEstablished()||s.getEnqueueId())&&nt.endChat();s.clearState();i.cancel(n.longQueue)});n.$on("AgentDisconnected",function(t,i){!i.agentId||n.chatWizard.showClientReconnectingMessage||n.chatWizard.showReconnectingMessage||(n.chatWizard.showReconnectingMessage=!0,n.chatWizard.handleChatInterrupted())});n.$on("AgentReconnected",function(t,i){i.agentId&&n.chatWizard.showReconnectingMessage&&(n.chatWizard.showReconnectingMessage=!1,n.chatWizard.handleChatReconnected())});n.$on("ChatChannelDisconnected",function(){n.chatWizard.showReconnectingMessage||n.chatWizard.showClientReconnectingMessage||(n.chatWizard.showClientReconnectingMessage=!0,n.chatWizard.handleChatInterrupted())});n.$on("ChatChannelReconnected",function(){n.chatWizard.showClientReconnectingMessage&&(n.chatWizard.showClientReconnectingMessage=!1,n.chatWizard.handleChatReconnected())});n.$on("MessageWindowTryAgain",function(){n.chatWizard.cancelChat()});n.$on("ChatPageTimeout",function(){n.isReady||t.$broadcast("500Error",{reason:"Timeout occurred on a chat page",data:n.status})});n.$watch("chatWizard.chatInputBoxText",function(){n.chatWizard.submitDisabled=n.chatWizard.chatInputBoxText===""?!0:!1});n.$watchCollection("status",function(t){n.isReady=t&&!Object.keys(t).some(function(n){return t[n]})});n.chatWizard.resetChat()}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("chatQueue",[function(){return{restrict:"A",templateUrl:"/PartialViews/Contact/Chat/ChatQueue.html",scope:{view:"="},link:function(n){n.positionInQueue=null;n.$on("ChatQueueStatus",function(t,i){n.positionInQueue=i.position})}}}]),function(n){n.controller("ChatScreenShareController",["$scope","$rootScope","nativeAppService","messageTypes","messageService","contactCommands","compassService",function(n,t,i,r,u,f,e){function o(n,i,r){var f=u.createMessage({text:n,senderName:i},r);t.$broadcast("ChatMessageReceived",f)}function a(){return n&&n.chat&&n.chat.error&&n.chat.error.genericError}function v(){return n&&n.chat&&n.chat.chatting&&n.chat.chatting.screenEnd}function y(){return n&&n.chat&&n.chat.chatting&&n.chat.chatting.annotationStart}function p(){return n&&n.chat&&n.chat.chatting&&n.chat.chatting.annotationStop}function w(){return n&&n.chat&&n.chat.chatting&&n.chat.chatting.screenError}function s(){return n&&n.chat&&n.chat.chatting&&n.chat.chatting.systemDisplayName}function b(){return n&&n.chat&&n.chat.chatting&&n.chat.chatting.screenShareDeny}function l(){n.chat=e.getChat()}function k(){n.sharingScreen&&o(v(),s(),r.SystemInfo);n.reset()}var h=0,c={Reserved:0,Annotation:1,View:2,Interactive:3};n.config={maxRetry:3,userPauseResumeEnabled:i.hasCapability("PauseSharing")};n.reset=function(){n.displayChatScreenShare=!1;n.sharingScreen=!1;n.screenSharePaused=!1;n.waitingForResponse=!1;n.currentMode=null;n.requestedMode=null;n.reconnecting=!1;n.agentCommands={beginsharing:null};h=0;l()};n.grantScreenShare=function(){n.agentCommands.beginsharing&&(t.$broadcast("ChatScreenShareAccept"),i.sendAppCommand(n.agentCommands.beginsharing),n.waitingForResponse=!0)};n.denyScreenShare=function(){n.displayChatScreenShare=!1;n.agentCommands.beginsharing=null;o(b(),s(),r.SystemInfo);t.$broadcast("ChatScreenShareDenied");i.sendAgentRequestResponse(f.beginSharing,!1,"The user denied the request for remote assistance","")};n.toggleScreenShare=function(){var t;t=n.screenSharePaused?f.resumeSharingByUser:f.pauseSharingByUser;i.sendAgentUserRequest(t);n.waitingForResponse=!0};n.$on("CompassContentReady",l);n.$on("ChatScreenShareRequest",function(t,i){n.agentCommands.beginsharing=i;n.displayChatScreenShare=!0});n.$on("ChatScreenShareReconnect",function(){n.sharingScreen&&(n.screenSharePaused?t.$broadcast("ChatScreenShareClosed"):(n.reconnecting=!0,n.waitingForResponse=!0))});n.$on("ChatScreenShareEstablished",function(){n.reconnecting||(n.sharingScreen=!0,n.currentMode=c.Interactive);n.waitingForResponse=!1;n.reconnecting=!1;n.agentCommands.beginsharing=null});n.$on("ChatScreenShareClosed",k);n.$on("SetSharingModeRequest",function(t,i){i!==n.currentMode&&(n.requestedMode=i)});n.$on("SetSharingMode",function(){n.requestedMode&&(n.currentMode===c.Annotation&&o(p(),s(),r.SystemInfo),n.currentMode=n.requestedMode,n.requestedMode=null,n.currentMode===c.Annotation&&o(y(),s(),r.SystemInfo))});n.$on("ToggleScreenShare",function(t,i){n.screenSharePaused=i;n.waitingForResponse=!1});n.$on("ChatScreenShareConnectFailed",function(){h>=n.config.maxRetry?(o(a(),s(),r.SystemError),n.reset(),i.sendAgentUserRequest(f.sharingSessionFailed)):(h++,n.grantScreenShare())});n.$on("ChatScreenShareError",function(){o(w(),s(),r.SystemError);n.waitingForResponse=!1});n.$on("ChatSessionClosed",function(){n.reset()});n.reset()}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("chatscreenshare",[function(){return{restrict:"A",templateUrl:"/PartialViews/Contact/Chat/ScreenShare.html",controller:"ChatScreenShareController"}}]),function(n){n.service("chatService",["$q","$log","$rootScope","rccService","modalityTags","chatStateService","messageService","agentChatService","supportLinkService",function(n,t,i,r,u,f,e,o,s){function p(){l.isAgentTyping=!1;h.isConnected=!1;h.agent=null;h.prevAgent=null;c.isConnected=!1}var a=null,v=null,y=null,l=Object.seal({isAgentTyping:!1}),h=Object.seal({agent:null,prevAgent:null,isConnected:!1}),c=Object.seal({isConnected:!1});this.getCurrentMessageRoom=function(){return a};this.setCurrentMessageRoom=function(n){a=n};this.init=function(t){var i=this;return v||(v=n(function(n){r.init(t.isAuth,function(){t.typingBoxId&&r.setChatTypingBoxId(t.typingBoxId);t.room&&i.setCurrentMessageRoom(t.room);n()})}))};this.initLazy=function(t){var i=this;return y||(y=n(function(n){r.initLazy(function(){t.typingBoxId&&r.setChatTypingBoxId(t.typingBoxId);t.room&&i.setCurrentMessageRoom(t.room);n()})}))};this.checkHours=function(n,t){var u=angular.copy(n),e=s.getModalities(u),i=s.getHoopsModalities(u);return t=t||f.getSubject(),r.isWithinOperatingHours(t,Object.keys(i)).then(function(n){for(hoopsModality in i)i[hoopsModality].isOpen=n[hoopsModality].isOpen;return e})};this.isOpen=function(n){return n=n||f.getSubject(),r.isWithinOperatingHours(n,u.chat).then(function(n){return!!(n[u.chat]&&n[u.chat].isOpen)},function(){return!1})};this.enqueueChat=function(t){return this.init(t).then(function(){return r.isWithinOperatingHours(f.getSubject(),u.chat).then(function(t){if(t[u.chat].isOpen)return i.$broadcast("ChatRequested"),r.enqueueChat().then(function(n){return n},function(t){return n.reject(t)})})})};this.endChat=function(){return f.clearState(),r.endChat()};this.sendMessage=function(n){return r.sendMessage(n).then(function(i){t.log("Message was sent:",n,i)},function(n){t.error("Message failed:",n)})};this.getTypingStatus=function(){return l};this.getAgentStatus=function(){return h};this.getChannelStatus=function(){return c};i.$on("ChatSessionClosed",function(){this.endChat()}.bind(this));i.$on("ChatMessageReceived",function(n,t){e.appendMessage(this.getCurrentMessageRoom(),t,t.messageType)}.bind(this));i.$on("ChatSessionEstablished",function(n,t){p();o.lookupAgent(t.agentId);f.setChatEstablished(!0);h.isConnected=!0;c.isConnected=!0});i.$on("AgentDataReady",function(n,t){f.setAgent(t);h.agent=t});i.$on("ChatTransferred",function(n,t){h.prevAgent=h.agent;o.lookupAgent(t.agentId)});i.$on("AgentTyping",function(n,t){l.isAgentTyping=t});i.$on("ChatMessageSendError",function(n,t){e.failedMessage(t,this.getCurrentMessageRoom())}.bind(this));i.$on("EnqueueChatFailure",function(n,i){t.error("Chat enqueue failed:",JSON.stringify(i));this.endChat()}.bind(this));i.$on("AgentDisconnected",function(){h.isConnected=!1});i.$on("AgentReconnected",function(){h.isConnected=!0});i.$on("ChatChannelDisconnected",function(){c.isConnected=!1});i.$on("ChatChannelReconnected",function(){c.isConnected=!0})}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("chatStateService",["$rootScope","$routeParams","$location","clientConfig","sessionStorageService",function(n,t,i,r,u){function h(){f=JSON.parse(JSON.stringify(s.defaultState));e()}function e(){u.set(s.chatStateKey,f)}function o(){var n=u.get(s.chatStateKey);return n?(f=n,!0):!1}var f,s={chatStateKey:"ChatState",defaultState:{visitId:null,token:null,agent:null,subject:null,validationKey:null,chatEstablished:!1,appStartContext:null,enqueueId:null,chatId:null,parentCv:null,survey:null,problem:null,wasRouted:null}};this.reset=function(){o()?(f.chatEstablished=!1,f.visitId=null,f.enqueueId=null,f.chatId=null,e()):h()};this.setParentCv=function(n){f.parentCv=n;e()};this.getParentCv=function(){return o(),f.parentCv};this.setVisitId=function(n){f.visitId=n;e()};this.getVisitId=function(){return o(),f.visitId};this.setEnqueueId=function(n){f.enqueueId=n;e()};this.getEnqueueId=function(){return o(),f.enqueueId};this.setChatId=function(n){f.chatId=n;e()};this.getChatId=function(){return o(),f.chatId};this.setToken=function(n){f.token=n;e()};this.getToken=function(){return o(),f.token};this.setAgent=function(n){f.agent=n;e()};this.getAgent=function(){return o(),f.agent};this.setSubject=function(n){f.subject=n;e()};this.getSubject=function(){var n=i.search().subject||t.subject;return n?parseInt(n,10):(o(),f.subject)};this.setValidationKey=function(n){f.validationKey=n;e()};this.getValidationKey=function(){return o(),f.validationKey};this.setChatEstablished=function(n){f.chatEstablished=n;e()};this.getChatEstablished=function(){return o(),f.chatEstablished};this.setAppStartContext=function(n){f.appStartContext=n;e()};this.getAppStartContext=function(){return o(),f.appStartContext};this.setPrechatSurvey=function(n){f.survey=n;e()};this.getPrechatSurvey=function(){return o(),f.survey};this.setProblemText=function(n){f.problem=n;e()};this.getProblemText=function(){return o(),f.problem};this.setUserRouted=function(n){f.wasRouted=n;e()};this.getUserRouted=function(){return o(),f.wasRouted};this.clearState=function(){var n=f.visitId,t=f.token;h();f.visitId=n;f.token=t;e()};this.isReconnectValid=function(){return!1};this.reset()}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("chatSurvey",["$rootScope","$routeParams","compassService","chatStateService","flightService","emailTranscriptService","clientConfig",function(n,t,i,r,u,f,e){function s(i){function s(n){return i.view.optional&&i.view.optional.indexOf(n)>=0}i=o(i);i.survey={userFeedback:null,userChoice:0,sendTranscript:u.isUserInFlight("ct"),userEmail:e.authInfo&&e.authInfo.displayName?e.authInfo.displayName:"",question1:0,question2:0,question3:0,question4:0,freeForm:""};i.disableSend=function(){return!i.survey.userFeedback&&!i.survey.userChoice&&!s("resolved")||i.view.surveyRatingQuestion1&&!i.survey.question1&&!s("sr1")||i.view.surveyRatingQuestion2&&!i.survey.question2&&!s("sr2")||i.view.surveyRatingQuestion3&&!i.survey.question3&&!s("sr3")||i.view.surveyRatingQuestion4&&!i.survey.question4&&!s("sr4")};i.closeSurvey=function(){i.displayChatSurvey&&(i.submitAction&&i.submitAction(),i.displayChatSurvey=!1);n.$broadcast("ChatSurvey",!1)};i.submitSurvey=function(){var o=u.isUserInFlight(/^survey-/g,!0)?"ChatFeedbackFlighted":"ChatFeedback";n.$broadcast(o,{id:"1",helped:i.survey.userFeedback,choice:parseInt(i.survey.userChoice),optional:i.view&&i.view.optional,question1:i.survey.question1,question2:i.survey.question2,question3:i.survey.question3,question4:i.survey.question4,freeForm:i.survey.freeForm,flighted:i.view&&i.view.flighted,version:i.view&&i.view.version,agentId:i.chatData.agent,chatId:i.chatData.chatId,mode:typeof t.mode!="undefined"?t.mode:e.ChatConfig.Mode});i.survey.sendTranscript&&f.emailChatTranscript(r.getVisitId(),i.survey.userEmail,(new Date).getTimezoneOffset()).then(function(t){n.$broadcast("EmailTranscriptSuccess",t.data)},function(t){n.$broadcast("EmailTranscriptFailure",t)});i.closeSurvey()};i.$on("CompassContentReady",function(){i=o(i)})}function o(n){var t=i.getChat();return n.view=n.view||(t&&t.survey?t.survey:null),n}return{restrict:"A",templateUrl:"/PartialViews/Contact/Chat/ChatSurvey.html",scope:{displayChatSurvey:"=visible",chatData:"=chat",view:"=?",submitAction:"&?"},replace:!0,link:s}}]),function(n){n.service("chatTokenService",["$http","chatStateService",function(n,t){function r(t,r){var u={sessionId:r.sessionId};return r.phoneNumber&&(u.phoneNumber=r.phoneNumber),n.post(i.baseUrl+t,u)}var i={baseUrl:"/api/Token"};this.getTokenForUser=function(t){return t?n.get(i.baseUrl+"/GetRatToken/"):n.get(i.baseUrl+"/GetToken/")};this.getUnauthTokenForUser=function(t){return n.post(i.baseUrl+"/GetUnauthenticatedToken/",t)};this.refreshToken=function(r,u){if(u)return this.getTokenForUser(r);var f=t.getToken();return n.post(i.baseUrl+"/RefreshUnauthenticatedToken/",{token:f})};this.getEncryptedValueCookie=function(n,t){return r("/GetUserStateCookie/",{sessionId:n,phoneNumber:t})};this.getUnauthEncryptedValueCookie=function(n,t){return r("/GetUnauthenticatedUserStateCookie/",{sessionId:n,phoneNumber:t})}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("chatVideo",["$window","$document","$rootScope","$timeout","widgetService","messageTypes","flightService","chatStateService","chatService",function(n,t,i,r,u,f,e,o,s){function a(n,u,o){var w=t[0].createElement("script"),b=t[0].getElementsByTagName("script")[0],a=u.find(".video-section"),y=null,p=null;v(n);w.src=h;b.parentNode.insertBefore(w,b);n.view=n.view||o.view;n.videoId=n.videoId||o.videoId;n.isPlaylist=n.isPlaylist&&n.isPlaylist()||o.isPlaylist;n.videoDescription=n.videoDescription||o.videoDescription;n.agent=null;n.isWatchingVideo=!0;n.inChatWithAgent=!1;n.isAgentTyping=!1;n.numMessagesReceived=0;n.typingStatus=s.getTypingStatus();n.toggleVideo=function(t){n.isWatchingVideo=!n.isWatchingVideo;t?i.$broadcast("ChatVideoAutoToggle"):i.$broadcast("ChatVideoToggled",n.isWatchingVideo);a.removeClass("slidedown slideup");a[0].offsetWidth=a[0].offsetWidth;n.numMessagesReceived>0&&(i.$broadcast("ChatVideoAlertResponse",(new Date).getTime()-p.getTime()),p=null);n.isWatchingVideo?a.toggleClass("slidedown"):(n.player.pauseVideo(),n.numMessagesReceived=0,n.isAgentTyping=!1,a.toggleClass("slideup"))};i.$broadcast("ChatVideoSession");y=r(function(){i.$broadcast("ChatVideoMinTimeEngaged")},l);n.$on("AgentDataReady",function(t,i){n.agent=i});n.$on("ChatSessionEstablished",function(){a.toggleClass("slideup");n.isWatchingVideo=!1;n.inChatWithAgent=!0;n.numMessagesReceived=0;n.player.pauseVideo();r.cancel(y)});n.$on("ChatMessageReceived",function(t,i){n.isWatchingVideo&&i.chatSender!==f.User?e.isUserInFlight(c)?n.toggleVideo(!0):(n.numMessagesReceived===0&&(p=new Date),n.numMessagesReceived++):i.chatSender===f.User&&(n.numMessagesReceived=0)});n.$on("$destroy",function(){r.cancel(y)})}function v(t){n.onYouTubeIframeAPIReady=function(){var n={enablejsapi:1,fs:0,modestbranding:1,disablekb:1,cc_load_policy:1,list:t.isPlaylist?t.videoId:""};t.player=new YT.Player("player",{playerVars:n,videoId:t.isPlaylist?"":t.videoId});t.player.addEventListener("onStateChange","onPlayerStateChange");t.player.addEventListener("onError","onPlayerError")};n.onPlayerStateChange=function(n){var u={videoUrl:t.player.getVideoUrl(),videoTime:t.player.getCurrentTime(),playListIndex:t.player.getPlaylistIndex()},r=o.getChatEstablished();n.data===YT.PlayerState.PLAYING?i.$broadcast("ChatVideoPlaying",r):n.data===YT.PlayerState.PAUSED?i.$broadcast("ChatVideoPaused",r):n.data===YT.PlayerState.ENDED&&i.$broadcast("ChatVideoEnded",r);i.$broadcast("ChatVideoInfo",u)};n.onPlayerError=function(n){i.$broadcast("ChatVideoError",n)}}var h="https://www.youtube.com/iframe_api",c="chv-at-1",l=1e4;return{restrict:"A",templateUrl:"/PartialViews/Contact/Chat/ChatVideo.html",scope:{view:"=?",videoId:"@?",videoDescription:"@?",isPlaylist:"&?"},replace:!0,link:function(n,t){u.getWidgetConfig("Chat-Video").then(function(r){n.isVideoEnabled=!!r;n.isVideoEnabled&&a(n,t,r);i.$broadcast("ChatVideoPresent",n.isVideoEnabled)})}}}]);angular.module(microsoft.support.moduleName).directive("imageFallback",[function(){return{restrict:"A",link:function(n,t,i){t.bind("error",function(){t.attr("src")!==i.imageFallback&&t.attr("src",i.imageFallback)})}}}]);angular.module(microsoft.support.moduleName).directive("messageWindow",["compassService","messageTypes",function(n,t){function u(){return i&&i.chatting&&i.chatting.reconnectingMessage}function f(){return i&&i.chatting&&i.chatting.reconnectingClientMessage}function e(){return i&&i.error&&i.error.tryAgainButton}function o(){return i&&i.error&&i.error.chatDisconnected}function r(r){i=n.getChat();r.senderTypes=t;r.reconnectingAgent=u();r.reconnectingClient=f();r.tryAgain=e();r.disconnected=o()}var i;return{restrict:"A",templateUrl:"/PartialViews/Contact/Chat/MessageWindow.html",scope:{messages:"=",isClientReconnecting:"=",isAgentReconnecting:"=",isDisconnected:"="},replace:!0,link:function(n){n.retry=function(){n.$emit("MessageWindowTryAgain")};n.isMessageType=function(n,t){return n&&n.messageType===t};n.$on("CompassContentReady",function(){r(n)});r(n)}}}]);angular.module(microsoft.support.moduleName).directive("agentHeader",["compassService",function(n){function t(t){var i=n.getChat();i&&i.chatting&&(t.view=i.chatting)}return{restrict:"A",templateUrl:"/PartialViews/Contact/Chat/AgentHeader.html",scope:{agent:"="},replace:!0,link:function(n){n.$on("CompassContentReady",function(){t(n)});t(n)}}}]);angular.module(microsoft.support.moduleName).component("agentInfo",{templateUrl:"/PartialViews/Contact/Common/AgentInfo.html",bindings:{agent:"<",view:"<",isJoining:"<"},controller:[function(){this.$onChanges=function(n){!this.agentClone&&n.agent&&n.agent.currentValue&&(this.agentClone=angular.copy(this.agent))}}]});angular.module(microsoft.support.moduleName).component("agentTransfer",{templateUrl:"/PartialViews/Contact/Common/AgentTransfer.html",bindings:{oldAgent:"<",newAgent:"<",view:"<"},controller:function(){this.$onChanges=function(n){!this.oldAgentClone&&n.oldAgent&&n.oldAgent.currentValue&&(this.oldAgentClone=angular.copy(this.oldAgent));!this.newAgentClone&&n.newAgent&&n.newAgent.currentValue&&(this.newAgentClone=angular.copy(this.newAgent))}}}),function(n){n.directive("card",[function(){return{restrict:"A",templateUrl:"/PartialViews/Common/Card.html",scope:{header:"=",showCancel:"=",cancelAction:"&",cancelText:"="},transclude:!0,replace:!0}}])}(angular.module(microsoft.support.moduleName)),function(n){n.value("channelStatuses",{UNAVAILABLE:0,OPEN:1,CLOSED:2});n.service("channelReaderService",["$log","$filter","$routeParams","channelStatuses",function(n,t,i,r){function u(n){var t=n.split(" ")[0].split(":"),i=new Date,r=parseInt(t[0],10),u=parseInt(t[1],10),f=parseInt(t[2],10);return i.setUTCHours(r,u,f),i}function e(){var i=[],n=new Date,t;for(n.setDate(n.getDate()-n.getDay()),t=0;t<7;t++)i.push(new Date(n)),n.setDate(n.getDate()+1);return i}function o(n,t){var i=n.getMonth(),r=t.getMonth();return i===r?n.getDate()<t.getDate()?-1:n.getDate()>t.getDate()?1:0:i<r?-1:1}function s(n){var s=[],o;if(n&&n.length===7){var a=e(),i,r="",u="",f=[];for(o=1;o<8;o++){var l=o%7,h=n[l],c=t("date")(a[l],"EEE");i?i.join(", ")==h.join(", ")?u=c:(f=u==""?[r]:[r,u],s.push({days:f,shifts:i}),r=c,u="",i=h):(r=c,i=h)}f=u==""?[r]:[r,u];s.push({days:f,shifts:i})}return s}var f=this;this.getChannelOperations=function(n,t){var i={e2eSchedule:{}};return t.forEach(function(t){i[t]=f.getChannelOperation(n,t);i.e2eSchedule[t]=i[t].e2eSchedule}),i};this.getChannelOperation=function(t,i){t&&Array.isArray(t)||(t=t?[t]:[]);i!==""&&(i=i.toLowerCase(),t=t.filter(function(n){return n.Type&&(n.Type=n.Type.toLowerCase()),n&&n.Type===i}));t.length===0&&n.error("No channels found for channelType:",i);var r={e2eSchedule:null,isOpen:!0,isAvailable:!1,status:this.getStatus(!0,!1),schedule:[]};return t.some(function(n){return r=this.getOperationStatus(n),r.isOpen&&r.isAvailable}.bind(this)),r};this.getChannelOutages=function(n){var t=[];return Object.keys(n).forEach(function(i){n[i].status===r.UNAVAILABLE&&t.push(i)}),t};this.getStatus=function(n,t){return n?t||typeof i.scheduleAsOf!="undefined"?r.OPEN:r.UNAVAILABLE:r.CLOSED};this.getOperationStatus=function(i){var a,f,e;if(typeof i=="undefined"||typeof i.IsAvailable=="undefined"||typeof i.HOOPsStatus=="undefined")return n.error("malformatted status",JSON.stringify(i)),{e2eSchedule:null,isAvailable:!0,isOpen:!0,status:this.getStatus(!0,!0),schedule:[]};var h=i.HOOPsStatus!==r.CLOSED,c=i.Type==="phone"||i.IsAvailable,l=[];if(!h||!c){for(a=0;a<7;a++)l[a]=[];for(f=0;f<7;f++){if(e=i.HoopsSchedule[f],e&&!Array.isArray(e))return n.error("malformatted channel schedule",JSON.stringify(e)),{e2eSchedule:null,isAvailable:c,isOpen:h,status:this.getStatus(h,c),schedule:[]};e&&e.length>0&&e.forEach(function(n){var i=u(n.StartTime),r=u(n.EndTime),e=t("date")(i,"shortTime")+"-"+t("date")(r,"shortTime"),s;o(i,r)<0?(s=f-1<0?6:f-1,l[s].push(e)):l[f].push(e)})}}return{e2eSchedule:i.HoopsSchedule,isAvailable:c,isOpen:h,status:this.getStatus(h,c),schedule:s(l)}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("ContactDisplayController",["$scope","$rootScope","$window","$location","nativeAppService","navigationService","compassService","chatStateService","languageService","widgetService","flightService","partnerDataService",function(n,t,i,r,u,f,e,o,s,h,c,l){function a(){n.isNative=u.isNative()}function v(){n.contactHeader=e.getContactHeader();n.msLogo=e.getMicrosoftLogo();n.msLogoAlt=e.getMicrosoftLogoAlt();n.comingSoon=e.getComingSoon()}function y(){return r.search()&&typeof r.search().disableassistedsupport!="undefined"&&r.search().disableassistedsupport==="true"}n.config={disableAssistedSupport:y()};n.reset=function(){h.hasWidgets("Chat-Video").then(function(t){n.hasChatVideo=t});v();a()};n.navInterruptCondition=function(){return!u.isNative()&&o.getChatEstablished()};n.navInterruptedMessage=function(){return e.getNavigationInterrupted()};n.$on("CompassContentReady",v);n.$on("NativeCookieUpdate",a);n.$on("$viewContentLoaded",function(){f.update()});n.$on("NativeSignInFailed",function(){f.isRoot()?t.$broadcast("500Error"):i.history.back()});n.$on("ChatBack",function(){var n=l.returnUrl();n?i.open(n,"_self"):f.isRoot()||(i.document.referrer.indexOf("live.com")>=0?f.goToRoot():i.history.back())});n.reset()}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("ContactFrameController",["$scope","$rootScope","$route","navigationService","compassService","languageService","partnerDataService",function(n,t,i,r,u,f,e){function h(){n.contactHeader=u.getContactHeader();n.backText=u.getBackText();n.icon=u.getContactSupportIcon()}function o(){n.headerText="";n.headerImage="";var t=i.current.data&&i.current.data.isLandingPage,u=r.isRoot(),f=e.returnUrl();n.showBackButton=!1;n.showIcon=!1;s||!f&&(t||u)?n.showIcon=!0:n.showBackButton=!0}var s=!1;n.reset=function(){n.chatSource="/"+f.langLocale()+"/contact/menu/";n.showBackButton=!0;n.isRTL=f.currentDirection()==="rtl";h();o()};n.backClick=function(){t.$broadcast("ChatBack")};n.endChat=function(){t.$broadcast("ChatSessionClosed",{})};n.startOver=function(){t.$broadcast("VirtualAgentReset")};n.$on("CompassContentReady",h);n.$on("ChatSessionEstablished",function(){s=!0;o()});n.$on("ChatSessionClosed",function(){s=!1;o()});n.$on("ChatFrameHeader",function(t,i){i&&(n.headerText=i.text,n.headerImage=i.image,n.showIcon=i.showIcon,n.endText=i.endText,n.showEndChat=i.showEnd,n.showReset=i.showReset,n.resetLabel=i.resetLabel)});n.$on("$routeChangeSuccess",function(){o()});n.reset()}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("contactUsStep",["compassService","smoothScrollService",function(n){function t(t){t.userHelpStatesConfig=n.getStepConfig();t.userHelpStatesConfig&&(t.step=t.userHelpStatesConfig[t.stepNumber-1])}return{restrict:"A",templateUrl:"/PartialViews/ContactUs/Step.html",scope:{stepNumber:"=",activeStepNumber:"="},transclude:!0,link:function(n){n.$on("CompassContentReady",t.bind(this,n));t(n)}}}]),function(n){n.service("emailTranscriptService",["$http",function(n){this.emailChatTranscript=function(t,i,r){var u={params:{visitId:t,email:i,timeOffset:r}};return n.get("/api/emailTranscript",u)}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("HoopsController",["$rootScope","$scope","$location","compassService","chatStateService","rccService","clientConfig","modalityTags",function(n,t,i,r,u,f,e,o){function s(){var n=i.path().split("/");return n.length>=3?n[2]:""}function h(n){return n&&n.metaTags.indexOf(o.scheduleCallback)>-1}function c(){t.options=t.options||[];t.options=t.options.filter(h)}function l(){r.getHoursOfOperationView().then(function(n){t.hoursOfOperation=n;r.getMenuOptionsForId(u.getSubject()).then(function(n){t.options=n;c()});t.status.waitingOnCompass=!t.hoursOfOperation})}t.config={timeout:e.ChatConfig.ChatDefaultTimeout};t.reset=function(){t.status={waitingOnRcc:!0,waitingOnCompass:!0,waitingOnHoops:!0};f.initLazy(function(){t.status.waitingOnRcc=!1;var n=s();f.isWithinOperatingHours(u.getSubject(),n).then(function(i){t.status.waitingOnHoops=!1;t.hoopsSchedule=i[n].schedule})});l()};t.$on("HoopsMenuPageTimeout",function(){t.isReady||n.$broadcast("500Error",{reason:"Timeout occurred on a hours of operation page",data:t.status})});t.$watchCollection("status",function(n){t.isReady=n&&!Object.keys(n).some(function(t){return n[t]})});t.reset()}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("menuExtras",["$rootScope","$document","$location","$window",function(n,t,i,r){function u(n){n.wasButtonClicked=!1;n.wasElemClicked=!1;n.isMenuShown=!1}function f(n){n.wasButtonClicked||n.wasElemClicked||!n.isMenuShown||(n.isMenuShown=!1);n.wasButtonClicked=!1;n.wasElemClicked=!1}function e(n){n.wasButtonClicked||(n.wasElemClicked=!0)}return{restrict:"A",templateUrl:"/PartialViews/SupportMenu/MenuExtras.html",scope:{extras:"=",icon:"="},link:function(o,s){var h=function(){e(o);o.$apply()},c=function(){f(o);o.$apply()};o.menuExtraClick=function(t){t.externalLink?r.open(t.link.linkUrl):i.path(t.link.linkUrl);n.$broadcast("MenuExtraClicked",t)};o.toggleMenu=function(){o.isMenuShown=!o.isMenuShown;o.wasButtonClicked=!0};t.bind("click",c);s.bind("click",h);o.$on("$destroy",function(){t.unbind("click",c);s.unbind("click",h)});u(o)}}}]),function(n){n.directive("message",["messageTypes",function(n){function t(n,t){return n.messageType===t}return{restrict:"E",templateUrl:"/PartialViews/Contact/Common/Message.html",scope:{message:"=content"},link:function(i){i.messageTypes=n;i.isMessageType=t;i.action=function(){typeof i.message.action=="function"&&i.message.action()}}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.value("messageTypes",{User:0,Agent:1,SystemInfo:2,SystemError:3,VirtualAgent:4,InstantAnswer:5,Results:6,ModalitySelection:7,AgentEnd:8,Survey:9,Transfer:10});n.service("messageService",["messageTypes","localStorageService",function(n,t){function r(){return{messages:[]}}function u(n,t){n.index=t.messages.length;t.messages.push(n)}var i={};this.createMessage=function(n,t){return angular.extend({},n,{messageType:t,timeStamp:(new Date).getTime(),reachedDestination:!0})};this.appendMessage=function(n,t,f){i[n]||(i[n]=r());var e=this.createMessage(t,f);return u(e,i[n]),e};this.getMessages=function(n){return i[n].messages};this.failedMessage=function(n,t){i[t]&&i[t].messages[n.index]&&(i[t].messages[n.index].reachedDestination=!1)};this.clearMessages=function(n){if(n)i[n]=r();else for(room in i)i[room]=r()};this.restoreMessages=function(n){var r=t.getCacheContent("messages-"+n);return r&&r.messages&&(i[n]=r),i[n]&&i[n].messages};this.storeMessages=function(n){i[n]&&t.commit("messages-"+n,i[n])};this.removeMessagesFromStorage=function(n){t.commit("messages-"+n,{})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("modality",["$filter","$rootScope","widgetService","compassService","rccService","locationService","modalityTags","chatStateService","channelStatuses","supportLinkService","waitTimeService","languageService",function(n,t,i,r,u,f,e,o,s,h,c,l){function y(n,t){n.followLink=function(t){t.isModality=!0;t.fromOldFlow=n.oldFlow;h.followLink(t)};n.modalitiesReady=!!n.links;n.view=n.view||!n.oldFlow&&t.view;r.getHoursOfOperationView().then(function(n){a=n});n.links?(n.displayLinks=angular.copy(n.links),v(n)):r.getContactUsMenu(f.getPathSubset(2)).then(function(t){t&&t.hasModality&&(n.displayLinks=t.links,n.modalitiesReady=!0,v(n))})}function v(n){u.initLazy(function(){var t=h.getHoopsModalities(n.displayLinks);Object.keys(t).length>0&&u.isWithinOperatingHours(o.getSubject(),Object.keys(t)).then(function(i){n.e2eSchedule=i.e2eSchedule;for(modality in t)i[modality]&&i[modality].status===s.CLOSED&&(t[modality].description=a&&a.currentlyClosed,t[modality].link.linkUrl="/hoops"+t[modality].link.linkUrl,t[modality].clickableLink=!0),i[modality]&&i[modality].status===s.UNAVAILABLE&&(t[modality].description=a&&a.outage,t[modality].link.linkUrl=a&&a.globalSupport,t[modality].externalLink=!0,t[modality].clickableLink=!0);p(n)})})}function p(n){n.waitTimeText={chat:null,callback:null};c.getChatWaitTimeText().then(function(t){n.waitTimeText.chat=t});c.getCallbackWaitTimeText().then(function(t){n.waitTimeText.callback=t})}var a;return{restrict:"A",templateUrl:"/PartialViews/ContactUs/Modality.html",scope:{view:"=?",links:"=?",oldFlow:"&?",fallbackUrl:"@?",hideTitle:"@?"},link:function(n){n.oldFlow=!!(n.oldFlow&&n.oldFlow());n.oldPath=n.oldFlow?"/"+l.langLocale()+"/contact"+f.getCurrentPath():null;i.getWidgetConfig("Modality",n.oldPath).then(function(i){n.isModalityEnabled=!!i;n.useGeoLocation=i&&i.useGeoLocation;n.onGeoContinue=function(i){i&&t.$broadcast("GeoContinue",l.langLocale());n.useGeoLocation=!1};n.onGeoSelection=function(i){n.modalitiesReady=!1;t.$broadcast("GeoAccess",i.locale);var u=f.switchLocale(i.locale,n.oldPath),e=n.oldFlow?r.getMenu(f.getPathSubset(3,u.length,u)):r.getContactUsMenu(f.getPathSubset(2,u.length,u));e.then(function(i){i&&i.hasModality&&i.links&&i.links.length>0?f.setPathAndReload(u):(t.$broadcast("GeoNotAvailable",u),f.setPathAndReload(n.fallbackUrl))})};n.isModalityEnabled&&y(n,i)})}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("navigationService",["$rootScope","$window","$location","$log","sessionStorageService",function(n,t,i,r,u){this.update=function(){var n=u.get("contactapphistory");n||(basePage=t.location.pathname,u.set("contactapphistory",basePage))};this.isRoot=function(){this.update();var n=u.get("contactapphistory");return n?n===t.location.pathname:!1};this.goToRoot=function(){var n=u.get("contactapphistory");n&&(t.location.pathname=n)}}])}(angular.module(microsoft.support.moduleName)),function(n){n.value("oemParameters",{manufacturer:"manufacturer",deviceModel:"devicemodel",manufacturerSupportLink:"manufacturersupportlink",mobileOperatorSupportLink:"mobileoperatorsupportlink",mobileOperator:"mobileoperator"});n.factory("oemTags",["clientConfig",function(n){return{customDevice:"device-custom",anonManufacturer:"anon-oem",manufacturer:"manufacturer",msDevice:"ms-device",operator:"operator",msManufacturerID:n.AppConfig.MicrosoftManufacturerName}}]);n.service("oemService",["$rootScope","$filter","$routeParams","oemParameters","oemTags","nativeAppService","osService",function(n,t,i,r,u,f,e){function c(){return{manufacturerName:i[r.manufacturer]||"",deviceModel:i[r.deviceModel]||"",manufacturerLink:i[r.manufacturerSupportLink]||"",mobileOperatorLink:i[r.mobileOperatorSupportLink]||"",mobileOperator:i[r.mobileOperator]||""}}function l(n,t){var i=a(n);return h?(v(t,i)?s||t.deviceModel||(n.link.linkText=n.link.linkText.replace(/\(.+?\)/,"")):n.link.linkText="",n):(n.link.linkText="",n)}function a(n){var t=n.metaTags||"";return s?t.indexOf(u.operator)>-1?o.mobileOperator:t.indexOf(u.msDevice)>-1?o.msMobileOEM:t.indexOf(u.manufacturer)>-1?o.customMobileOEM:o.anonMobileOEM:t.indexOf(u.msDevice)>-1?o.msDesktopOEM:t.indexOf(u.anonManufacturer)>-1?o.anonDesktopOEM:o.customDesktopOEM}function v(n,t){if(t==o.msDesktopOEM&&n.manufacturerName!==u.msManufacturerID)return!1;if(t!=o.customDesktopOEM||n.manufacturerName&&n.manufacturerName!=u.msManufacturerID&&n.manufacturerLink){if(t==o.anonDesktopOEM&&(n.manufacturerName||!n.manufacturerLink))return!1;if(t!=o.mobileOperator||n.mobileOperator&&n.mobileOperatorLink)if(t!=o.msMobileOEM||n.manufacturerName===u.msManufacturerID&&n.deviceModel)if(t!=o.customMobileOEM||n.deviceModel&&n.manufacturerName&&n.manufacturerLink&&n.manufacturerName!=u.msManufacturerID){if(t==o.anonMobileOEM&&(n.deviceModel&&n.manufacturerName&&n.manufacturerLink||n.manufacturerName==u.msManufacturerID&&n.deviceModel))return!1}else return!1;else return!1;else return!1}else return!1;return!0}var h=f.isNative(),s=e.isMobile(),o={customDesktopOEM:"customDesktopOEM",anonDesktopOEM:"anonDesktopOEM",msDesktopOEM:"msDesktopOEM",mobileOperator:"mobileOperator",customMobileOEM:"customMobileOEM",anonMobileOEM:"anonMobileOEM",msMobileOEM:"msMobileOEM"};this.applyOEM=function(n){var i=c();n&&n.links&&i&&(n.header=t("compassFormat")(n.header,i),n.links=n.links.map(function(n){return n.metaTags.indexOf(u.customDevice)>-1&&(n=l(n,i),n.description=t("compassFormat")(n.description,i),n.link.linkText=t("compassFormat")(n.link.linkText,i),n.link.linkUrl=t("compassFormat")(n.link.linkUrl,i)),n}))}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("passcode",["$rootScope","passcodeService","clientConfig",function(n,t,i){function u(n){n.config=r;n.code="";n.hasError=!1;n.hasValidPasscode=!1;n.waitingForResponse=!1;n.passcodeSuccess=n.passcodeSuccess||null;n.passcodeFailure=n.passcodeFailure||null}var r={passcodeLength:i.PasscodeConfig.PasscodeLength};return{restrict:"A",templateUrl:"/PartialViews/Passcode/Passcode.html",scope:{view:"=",passcodeSuccess:"@",passcodeFailure:"@"},link:function(i){i.sendCode=function(r){i.waitingForResponse=!0;t.getRatRequest(r).then(function(t){i.waitingForResponse=!1;t&&(i.hasValidPasscode=!0,i.passcodeSuccess&&n.$broadcast(i.passcodeSuccess,t))},function(t){i.waitingForResponse=!1;t.status===404?(i.hasError=!0,i.passcodeFailure&&n.$broadcast(i.passcodeFailure,r)):n.$broadcast("500Error",{reason:"Azure table down or multiple request objects made for same passcode"})})};i.isValid=function(n){return!isNaN(n)&&n.length===r.passcodeLength};i.resetError=function(){i.hasError=!1};u(i)}}}]),function(n){n.service("passcodeService",["$http",function(n){this.getRatRequest=function(t){var i={params:{passcode:t}};return n.get("/api/passcode/RatRequest/",i).then(function(n){return n.data})}}])}(angular.module(microsoft.support.moduleName));awasaServicesSettings=awasaServicesSettings||{},function(n){n.service("rccService",["$log","$cookies","$interval","$q","$timeout","$rootScope","$routeParams","$location","clientConfig","languageService","channelReaderService","chatTokenService","messageService","chatStateService","messageTypes","qosTelemetryService","nativeAppService","correlationVectorService","flightService","authenticationHelperService","getScriptService","chatContextService","modalityTags",function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g){function kt(){awasaServicesSettings.developerKey=rt?s.ChatConfig.RatPartnerId:s.ChatConfig.PartnerId;awasaServicesSettings.language=h.lang();awasaServicesSettings.country=h.locale();awasaServicesSettings.messaging=!0;awasaServicesSettings.callback=fi;awasaServicesSettings.chatTypingBoxId=ct.chatTypingBoxId;awasaServicesSettings.reset=!0;awasaServicesSettings.disableCookie=!0;awasaServicesSettings.correlationVector=b.getValue();ot=!0}function dt(n){ht.push(n);f.$broadcast("ChatInitStart");var t;t=it?l.getTokenForUser(rt):l.refreshToken(rt,it);t.then(function(n){ot?ft&&!et&&(awasaServicesSettings.session=!0,awasaServicesSettings.token=n.data,v.setToken(n.data),et=!0,nt.load(v.getToken())):(awasaServicesSettings.token=n.data,awasaServicesSettings.session=!0,kt(),v.setToken(n.data),et=!0,v.isReconnectValid()&&(awasaServicesSettings.reconnectChat=!0,awasaServicesSettings.restoreId=v.getVisitId()),e.visitId&&(awasaServicesSettings.restoreId=e.visitId,awasaServicesSettings.reconnect=!1),lt());ei();bt=p.createEvent(p.eventTypes.awasa.initialize)},function(n){n.status===401&&f.$broadcast("ProcessUserSignIn",!0)})}function lt(){at=!1;var t=p.createEvent(p.eventTypes.awasa.download);g.addScript(s.ChatConfig.ChannelSdkServerPath).then(function(){n.log("Adding new channel-services-sdk");t.resolve()},function(n){t.reject(n)})}function vt(){b.extendCv();awasaServicesSettings.correlationVector=b.getValue()}function fi(t,i){var s,o,r,e;switch(i.type){case"exception":s=p.createEvent(p.eventTypes.awasa.error);n.error("Exception received: Sender: "+JSON.stringify(t),i);wt.indexOf(i.errorCode)===-1&&s.reject(i);break;case"FacadeReady":nt=nt?nt:i.instance;u(function(){st.forEach(function(n){n()});st=[];ft=!0;f.$broadcast("ChatInitComplete")});break;case"loaded":if(n.log("Loaded callback received"),nt=i.instance,bt.resolve(),o=nt.getVisitId(),f.$broadcast("awasaVisitId",o),v.setVisitId(o),nt.subscribe(nt.events.AgentTyping,tt.AgentTyping),nt.subscribe(nt.events.ChatMessageReceived,tt.ChatMessageReceived),nt.subscribe(nt.events.ChatQueueStatus,tt.ChatQueueStatus),nt.subscribe(nt.events.ChatQueued,tt.ChatQueued),nt.subscribe(nt.events.ChatRejected,tt.ChatRejected),nt.subscribe(nt.events.ChatSessionClosed,tt.ChatSessionClosed),nt.subscribe(nt.events.ChatSessionEstablished,tt.ChatSessionEstablished),nt.subscribe(nt.events.ChatSessionReconnected,tt.ChatSessionReconnected),nt.subscribe(nt.events.ChatTimeout,tt.ChatTimeout),nt.subscribe(nt.events.ChatTransferred,tt.ChatTransferred),nt.subscribe(nt.events.CommandMessageReceived,tt.CommandMessageReceived),nt.subscribe(nt.events.EstimatedWaitTime,tt.EstimatedWaitTime),nt.subscribe(nt.events.SessionRestored,tt.SessionRestored),nt.subscribe(nt.events.TransferSessionEstablished,tt.TransferSessionEstablished),nt.subscribe(nt.events.Validation,tt.Validation),nt.subscribe(nt.events.ChatChannelDisconnected,tt.ChatChannelDisconnected),nt.subscribe(nt.events.ChatChannelReconnected,tt.ChatChannelReconnected),nt.subscribe(nt.events.AgentDisconnected,tt.AgentDisconnected),nt.subscribe(nt.events.AgentReconnected,tt.AgentReconnected),i&&i.restored)for(r=0;r<i.attributes.length;r++)i.attributes[r].name=="AgentId"&&(e=v.getAgent(),e||(e={}),e.AgentId=i.attributes[r].value,v.setAgent(e));u(function(){v.getToken()&&(nt.setToken(v.getToken()),ht.forEach(function(n){n()}),ht=[],ft=!0,f.$broadcast("ChatInitComplete"))})}}function gt(){ut&&i.cancel(ut)}function ei(){gt();ut=i(function(){oi()},ct.tokenRefreshInterval)}function oi(){var t=function(t){v.setToken(t);typeof nt=="undefined"?ut&&i.cancel(ut):(n.log("User token refreshed"),nt.setToken(v.getToken()))};l.refreshToken(rt,it).then(function(n){t(n.data)})}function ni(t){var i=p.createEvent(p.eventTypes.awasa.chat);return vt(),r(function(r,u){var e=nt.enqueue("chat",v.getSubject(),t,function(n){var t=ui.getEstimatedChatWaitTime();n.visitId=v.getVisitId();n.waitTimeEstimate=t?t.AverageWaitTime:0;n.enqueueId=e;i.resolve(n);f.$broadcast("EnqueueChatSuccess",n);r(n)},function(t){t.visitId=v.getVisitId();i.reject(t);n.error("Chat failed to enqueue",t);f.$broadcast("EnqueueChatFailure",t);u(t)});f.$broadcast("awasaEnqueueId",e);v.setEnqueueId(e)})}function ti(t,i,r,u){var o={test:s&&s.ChatConfig&&s.ChatConfig.UseTestCallbackQueue,attributes:t},e,h;u&&(o.timeslot=u);e=p.createEvent(p.eventTypes.awasa.callback);vt();h=nt.enqueue("callback",i,o,function(n){n.visitId=v.getVisitId();n.locale=r;e.resolve(n);f.$broadcast("EnqueueCallbackSuccess",n)},function(t){t&&t.errorCode&&(wt.indexOf(t.errorCode)!=-1||(ri.indexOf(t.errorCode)!=-1?(t.status="400",e.reject(t)):e.reject(t)));n.error("Callback failed to enqueue"+JSON.stringify(t));t.locale=r;f.$broadcast("EnqueueCallbackFailure",t)});v.setEnqueueId(h)}function si(n,t){for(var i in n)if(n[i].Id==t)return n[i].Name;return null}function ii(n,t,i){var u,r;for(u in n)if(n[u].Id==i)return r=n[u].Channels.filter(function(n){return n.Type==t})[0],r&&(r.AverageWaitTime=r.AverageWaitTime*1),r;return null}function yt(n){if(nt&&typeof nt.disengageChat=="function"){var t=p.createEvent(p.eventTypes.awasa.disengage);nt.disengageChat(function(i){return f.$broadcast("NotifyAppClosingComplete"),i.visitId=v.getVisitId(),f.$broadcast("ChatDisengageSuccess",i),t.resolve(i),n&&lt(),!0},function(i){return f.$broadcast("NotifyAppClosingComplete"),i.visitId=v.getVisitId(),f.$broadcast("ChatDisengageFailure",i),t.reject(i),n&&lt(),!0})}else f.$broadcast("NotifyAppClosingComplete");return!1}function pt(n){for(var i=[],t=0;t<n.length;t++)i.push({name:n[t].Key,value:n[t].Value,encrypted:!0});return i}var nt,ut,ot=!1,ft=!1,at=!1,st=[],ht=[],ct={tokenRefreshInterval:18e4},wt=["CHAT_MESSAGE_ERROR","CHANNEL_CONTACTSCHEDULED"],ri=["CHANNEL_CONTACTINVALID","CHANNEL_APPTUNAVAILABLE"],bt,ui=this,rt=!1,et=!1,it=!1,tt={AgentTyping:function(n){u(function(){f.$broadcast("AgentTyping",n.isTyping)})},ChatMessageReceived:function(t){u(function(){n.log("Chat Message Received"+JSON.stringify(t));f.$broadcast("ChatMessageReceived",{text:t.msg,senderName:v.getAgent().DisplayName,messageType:y.Agent});f.$broadcast("AgentTyping",!1)})},ChatQueueStatus:function(t){u(function(){n.log("Chat Queue Status"+JSON.stringify(t));f.$broadcast("ChatQueueStatus",t)})},ChatQueued:function(t){n.log("Chat Queued"+JSON.stringify(t))},ChatRejected:function(t){n.log("Chat Rejected"+JSON.stringify(t))},ChatSessionClosed:function(t){u(function(){n.log("Chat Session Closed"+JSON.stringify(t));f.$broadcast("ChatSessionClosed",{})})},ChatSessionEstablished:function(t){u(function(){n.log("Chat Session Established"+JSON.stringify(t));f.$broadcast("awasaChatId",t.chatId);v.setChatId(t.chatId);f.$broadcast("ChatSessionEstablished",{agentId:t.agentId})})},ChatSessionReconnected:function(t){u(function(){n.log("Chat Session Reconnected"+JSON.stringify(t));f.$broadcast("ChatSessionRestored",t)})},ChatTimeout:function(t){n.log("Chat Timeout"+JSON.stringify(t))},ChatTransferred:function(t){u(function(){n.log("Chat Transferred"+JSON.stringify(t));f.$broadcast("awasaChatId",t.chatId);v.setChatId(t.chatId);vt();f.$broadcast("ChatTransferred",t)})},CommandMessageReceived:function(t){u(function(){n.log("Command Message Received"+JSON.stringify(t));f.$broadcast("CommandMessageReceived",t)})},EstimatedWaitTime:function(n){u(function(){f.$broadcast("ChatEstimateWaitTimeUpdate",n)})},SessionRestored:function(t){n.log("Session Restored"+JSON.stringify(t))},TransferSessionEstablished:function(t){n.log("Transfer Session Established"+JSON.stringify(t))},Validation:function(t){n.log("Validation"+JSON.stringify(t))},AgentReconnected:function(t){u(function(){p.createEvent(p.eventTypes.awasa.agentReconnect).resolve();n.log("Agent Connection Restored"+JSON.stringify(t));f.$broadcast("AgentReconnected",{agentId:t.agentId})})},AgentDisconnected:function(t){u(function(){p.createEvent(p.eventTypes.awasa.agentDisconnect).reject();n.log("Agent Connection Disconnected"+JSON.stringify(t));f.$broadcast("AgentDisconnected",{agentId:t.agentId})})},ChatChannelReconnected:function(){u(function(){p.createEvent(p.eventTypes.awasa.channelReconnect).resolve();n.log("Customer Connection Restored");f.$broadcast("ChatChannelReconnected")})},ChatChannelDisconnected:function(){u(function(){p.createEvent(p.eventTypes.awasa.channelDisconnect).reject();n.log("Customer Connection Disconnected");f.$broadcast("ChatChannelDisconnected")})}};this.toggleRatMode=function(){rt=!rt};this.isRatMode=function(){return rt};this.init=function(n,t){if(it=it||n,ot&&et){ft?t():ht.push(t);return}it?d.mobileSignIn(function(){dt(t)}):dt(t)};this.initLazy=function(n){et?this.init(!1,n):(st.push(n),ot?ft?n():st.push(n):(awasaServicesSettings.lazyLoad=!0,kt(),lt()))};this.getChatTypingBoxId=function(){return ct.chatTypingBoxId};this.setChatTypingBoxId=function(n){awasaServicesSettings&&(awasaServicesSettings.chatTypingBoxId=n)};this.enqueueChat=function(t){var r,i,u;if(v.getChatEstablished()){f.$broadcast("DoubleChatEnqueued");n.error("Chat already exists. Can't enqueue again.",t);return}t=t||{};t.attributes=t.attributes||[];t.mode=t.mode||(typeof e.mode!="undefined"?e.mode:s.ChatConfig.Mode);t.disability=t.disability||v.getSubject()==s.ChatConfig.DisabilityAnswerDeskId;t.accessibility=t.accessibility||v.getSubject()==s.ChatConfig.DisabilityAnswerDeskId;v.getAppStartContext()&&t.attributes.push({name:"AppStartContext",value:JSON.stringify(v.getAppStartContext()),encrypted:!1});r="";try{r=parent&&parent.window&&parent.window.location&&parent.window.location.href}catch(c){}return t.attributes.push({name:"WebStartContext",value:JSON.stringify({url:window&&window.location&&window.location.href,parentUrl:r,userAgent:navigator&&navigator.userAgent}),encrypted:!1}),rt?ni(t):(e.rejoin==="true"&&(t.rejoin=!0,t.agentId=v.getAgent().AgentId),s.ChatConfig&&s.ChatConfig.ExplicitAgentId&&s.ChatConfig.ExplicitAgentId>0&&(t.agentId=s.ChatConfig.ExplicitAgentId),i="/"+h.langLocale()+"/contact/chat/"+v.getSubject()+"/?visitId="+v.getVisitId()+"&rejoin=true",it||(i+="&unauth=true"),i=w.isNative()?"ms-contact-support://rejoin"+i+"&isNative=true":"https://"+o.host()+i,t.attributes.push({name:"rejoinurl",value:i,encrypted:!1}),u=it?l.getEncryptedValueCookie(v.getVisitId(),null):l.getUnauthEncryptedValueCookie(v.getVisitId(),null),u.then(function(n){for(var r=pt(n.data),i=0;i<r.length;i++)console.log(r[i]),t.attributes.push(r[i]);return ni(t)}))};this.getChatTypingBoxId=function(){return ct.chatTypingBoxId};this.getCallbackTime=function(t,i,r){var e={test:s&&s.ChatConfig&&s.ChatConfig.UseTestCallbackQueue,count:i},u=p.createEvent(p.eventTypes.awasa.times);nt.getCallbackTime(r,t,e,function(n){n.visitId=v.getVisitId();u.resolve(n);f.$broadcast("GetCallbackTimeSuccess",n)},function(t){t.visitId=v.getVisitId();u.reject(t);n.error("failure: "+t);f.$broadcast("GetCallbackTimeFailure",t)})};this.enqueueCallback=function(n,t,i,r){var u=this.validateNumber(n,i);f.$broadcast("CallbackPhoneValidation",u);u&&u.isValid&&(it?l.getEncryptedValueCookie(v.getVisitId(),u.formattedContact).then(function(n){var u=pt(n.data);ti(u,t,i,r)}):l.getUnauthEncryptedValueCookie(v.getVisitId(),u.formattedContact).then(function(n){var u=pt(n.data);ti(u,t,i,r)}))};this.validateNumber=function(n,t){return nt?nt.validate("callback",n,{country:t}):null};this.sendMessage=function(t){return r(function(i,r){var e,u;at?(t.text=="agentend"?f.$broadcast("ChatSessionClosed",{}):(e=a.createMessage({text:"Echo: "+t.text,senderName:"Emulator Agent"},y.Agent),v.setAgent(),f.$broadcast("ChatMessageReceived",e)),i()):(u=p.createEvent(p.eventTypes.awasa.sendMessage),nt.sendChat(t.text,function(n){n.visitId=v.getVisitId();u.resolve();f.$broadcast("ChatMessageSendSuccess",n);i(n)},function(i){i.visitId=v.getVisitId();u.reject(i);n.error("Failed to send message"+JSON.stringify(i));f.$broadcast("ChatMessageSendError",t);r(i)}))})};this.getEstimatedCallbackWaitTime=function(n){var t=nt.getEstimatedWaitTime();return n||(n=v.getSubject()),ii(t,"Callback",n)};this.getEstimatedChatWaitTime=function(n){var t=nt.getEstimatedWaitTime();return n||(n=v.getSubject()),ii(t,"Chat",n)};this.getSubjectName=function(n){var t=nt&&nt.getEstimatedWaitTime();return n||(n=v.getSubject()),si(t,n)};this.isWithinOperatingHours=function(n,t){var u=p.createEvent(p.eventTypes.awasa.channelStatus),o={mode:typeof e.mode!="undefined"?e.mode:s.ChatConfig.Mode},h={isOpen:!1,isAvailable:!1,status:c.getStatus(!1,!1),schedule:[]},f={},i={description:"",subjectId:n?n:" ",channels:[]};return(typeof e.scheduleAsOf!="undefined"&&(o.scheduleAsOf=e.scheduleAsOf),!t||t.length===0)?(i.description="no channels provided",i.status=400,u.reject(i),r.resolve(f)):(t=Array.isArray(t)?t:[t],t.forEach(function(n){f[n]=h}),i.channels=t.join("|"),!n)?(i.description="subject id is blank",i.status=400,u.reject(i),r.resolve(f)):r(function(r){nt.getChannelStatus(n,o,function(n){var e=c.getChannelOperations(n,t),f=c.getChannelOutages(e);f&&f.length>0?(i.description="The following are unavailable for this subject",i.channels=f.join("|"),u.reject(i)):(i.description="The following are available for this subject",u.resolve(i));r(e)},function(n){u.reject(n);r(f)})})};this.endChat=function(n){return yt(n)};f.$on("ChatSessionClosed",function(){gt()});f.$on("NativeAppClosing",function(){yt()});f.$on("ForwardToAgent",function(n,t){var i=p.createEvent(p.eventTypes.awasa.sendCommand);nt.sendCommand(t,function(n){i.resolve();f.$broadcast("ForwardToAgentSuccess",n)},function(n){i.reject(n);f.$broadcast("ForwardToAgentFailure",n)})});s&&s.TestConfig&&s.TestConfig.AllowChatEmulator&&f.$on("ChatEmulate",function(){at=!0;yt(!1);f.$broadcast("ChatSessionEstablished",{agentId:123456789})})}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("relayService",["$http","clientConfig",function(n,t){this.getNearestRelay=function(){return n.get(t.ChatConfig.NearestRelayProbeUrl)}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("selfHelp",["virtualAgentService","searchResultsService","flightService","widgetService",function(n,t,i,r){function e(r,f){if(f.virtualAgentEnabled=i.isUserInFlight("virtualagent-searchresults-1"),r.view=r.view||f.view,r.answer=null,r.selfHelpLinks=null,r.selfHelpReady=!1,r.searchResultsPageUrl=t.getSearchResultsUrl(r.query),r.query&&r.query.length>0){var e={query:r.query,page:1};f.virtualAgentEnabled?n.fetchContent(e).then(u.bind(this,r)):t.fetchResults(e).then(u.bind(this,r))}else r.selfHelpReady=!0}function u(n,t){t.instantAnswer?n.answer=t.instantAnswer:t.results&&t.results.length>0&&(n.selfHelpLinks=t.results.slice(0,f.maxSelfHelpLinks));n.selfHelpReady=!0}var f={maxSelfHelpLinks:5,virtualAgentEnabled:!1};return{restrict:"A",templateUrl:"/PartialViews/ContactUs/SelfHelp.html",scope:{query:"@",view:"=?"},link:function(n){r.getWidgetConfig("Self-Help").then(function(t){n.isSelfHelpEnabled=!!t;n.isSelfHelpEnabled&&e(n,t)})}}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).value("modalityTags",{callback:"callback",scheduleCallback:"schedule-call",chat:"chat",tollFree:"phone"}).factory("hoopsModalities",["modalityTags",function(n){return[n.chat,n.callback,n.tollFree]}]).service("supportLinkService",["$filter","$window","$log","$location","$rootScope","$cookies","languageService","clientConfig","chatStateService","modalityTags","hoopsModalities",function(n,t,i,r,u,f,e,o,s,h,c){function l(t){return t&&t.link&&t.link.linkUrl&&(t.link.linkUrl=n("compassFormat")(t.link.linkUrl,{"subject-id":s.getSubject()})),t}function a(n,t){return n&&n.metaTags&&n.metaTags.split(";").some(function(n){return n===t})}function v(n){return"https://"+r.host()+"/"+e.langLocale().toLowerCase()+"/contact"+n}var y="smcpartner",p="smc";this.extractSubject=function(n){if(this.isModality(n)){var t=n.link.linkUrl.split("/");if(t.length>=3&&t[2]!=="{subject-id}")return parseInt(t[2],10)}return-1};this.extractSubjectFromList=function(n){for(var i=-1,r=n&&n.length||0,t=0;t<r;t++)if((i=this.extractSubject(n[t]))>-1)return i;return-1};this.hasModality=function(n,t){var i=this.getModalities(n);return!!i[t]};this.hasAnyModalities=function(n,t){var i=this.getModalities(n);return t.some(function(n){return!!i[n]})};this.hasModalities=function(n,t){var i=this.getModalities(n);return!t.some(function(n){return!i[n]})};this.isModality=function(n,t){return t?a(n,t):Object.keys(h).some(function(t){return a(n,h[t])})};this.getModalities=function(n){var t={};return n&&n.forEach(function(n){this.isModality(n)&&(t[this.getModalityName(n)]=n)}.bind(this)),t};this.isHoopsModality=function(n){return c.some(function(t){return this.isModality(n,t)}.bind(this))};this.getHoopsModalities=function(n){var t=this.getModalities(n);return Object.keys(t).forEach(function(n){this.isHoopsModality(t[n])||delete t[n]}.bind(this)),t};this.getLinkId=function(n){return n=l(n),n.link.linkUrl};this.getModalityName=function(n){for(var t in h)if(this.isModality(n,h[t]))return h[t];return null};this.openContactWindow=function(n,i){i=i||{};var r=v(n),u=["width="+(i.width||o.ContactUsConfig.CadPopupWidth),"height="+(i.height||o.ContactUsConfig.CadPopupHeight),"resizable=yes","scrollbars=yes"];t.open(r,"contactSupport",u.join(","),!0)};this.followLink=function(n){if(!n||n.clickableLink&&(!n.link||!n.link.linkUrl))return i.error("Invalid Link: ",n);if(n.clickableLink){if(n.isModality&&(n=l(n)),n.externalLink)t.open(n.link.linkUrl,"_blank");else if(n.isModality&&!n.fromOldFlow)if(f.get(y)==p)u.$broadcast("setParentCv"),this.openContactWindow(n.link.linkUrl);else{var o=v(n.link.linkUrl);t.open(o,"_self")}else n.fromOldFlow?r.path(n.link.linkUrl):r.path("/"+e.langLocale().toLowerCase()+"/"+n.link.linkUrl);n.fromOldFlow?u.$broadcast("MenuLinkClicked",n):u.$broadcast("ContactUsLinkClicked",n)}}}]),function(n){n.controller("SupportMenuController",["$scope","$rootScope","$location","$filter","$window","$route","$routeParams","compassService","clientConfig","chatStateService","osService","nativeAppService","supportLinkService","oemService",function(n,t,i,r,u,f,e,o,s,h,c,l,a,v){function p(n){var t=n&&n.hasModality?o.getPageSubjectId(n):null;h.setSubject(t)}function y(){var t=o.getServiceAgreement(),r=o.getMenuExtras();o.getMenu(i.path().substring(1)).then(function(t){t&&(n.menuWizard.page=t,n.status&&(n.status.waitingOnCompass=!1),p(t),v.applyOEM(t))});r&&(n.menuWizard.menuExtras=r);t&&(n.menuWizard.serviceAgreement=t.serviceAgreement,n.menuWizard.serviceAgreementLink=t.serviceAgreementLink)}n.config={timeout:s.ChatConfig.ChatDefaultTimeout};n.menuWizard={};n.menuWizard.reset=function(){n.status={waitingOnRcc:!1,waitingOnCompass:!0,waitingOnHoops:!1};n.isLandingPage=f.current.data.isLandingPage;n.isMobile=c.isMobile();n.isNative=l.isNative();y()};n.openServiceAgreement=function(){n.menuWizard.serviceAgreementLink&&n.menuWizard.serviceAgreementLink.linkUrl&&u.open(n.menuWizard.serviceAgreementLink.linkUrl)};n.followLink=function(n){n.fromOldFlow=!0;a.followLink(n)};n.getLinkId=a.getLinkId;n.$on("CompassContentReady",y);n.$on("SupportMenuPageTimeout",function(){n.isReady||t.$broadcast("500Error",{reason:"Timeout occurred on a support menu page",data:n.status})});n.$watchCollection("status",function(t){n.isReady=t&&!Object.keys(t).some(function(n){return t[n]})});n.menuWizard.reset()}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).service("waitTimeService",["$filter","$q","rccService","compassService",function(n,t,i,r){function f(n){return t(function(t){i.initLazy(function(){var r;return r=n==="chat"?i.getEstimatedChatWaitTime():i.getEstimatedCallbackWaitTime(),t(r?Math.ceil(Math.max(r.AverageWaitTime/60,1)):1)})})}function o(n){return u?f(n).then(function(n){return s(n)}):t.resolve(null)}function s(t){return t&&t>1?n("compassFormat")(u.plural,{"wait-time":t}):u.singular}function e(){return r.getWaitTimeText().then(function(n){u=n})}var u;this.reset=function(){u=null;e()};this.getChatWaitTime=function(){return f("chat")};this.getCallbackWaitTime=function(){return f("callback")};this.getChatWaitTimeText=function(){return e().then(function(){return o("chat")})};this.getCallbackWaitTimeText=function(){return e().then(function(){return o("callback")})};this.reset()}]),function(n){n.service("widgetService",["$location","$q","contentApiService",function(n,t,i){function e(){return u?u.then(function(n){return n}):(r||(r=i.getCompassContentForPage("widgetconfig")),r.then(s,h))}function s(n){n=n&&n.data;var i=n&&n.areaPathWidgetConfig;return u=i&&t.resolve(i),f=n&&n.defaultWidgets,i}function h(n){return r=null,t.reject(n)}function c(n,t){var i=null;return t.some(function(t){var r=new RegExp(t,"i").test(n);return r&&(i=t),r}),i}function o(n){return e().then(function(t){var i=c(n,Object.keys(t));return i&&t[i]})}var u=null,r=null,f=null;this.init=function(){e()};this.clearCaching=function(){u=null;r=null};this.hasWidgets=function(t,i){i=i&&i.toLowerCase()||n.path()&&n.path().toLowerCase();var r={},u=angular.isArray(t);return u||(t=[t]),t.forEach(function(n){r[n]=!1}),o(i).then(function(n){return t.forEach(function(t){r[t]=!!n&&!!n[t&&t.toLowerCase()]}),u?r:r[t[0]]},function(){return u?r:r[t[0]]})};this.getDefaultWidgets=function(){return e().then(function(){return f},function(){return null})};this.getWidgetConfig=function(t,i){return i=i&&i.toLowerCase()||n.path()&&n.path().toLowerCase(),o(i).then(function(n){return n&&n[t&&t.toLowerCase()]||f[t&&t.toLowerCase()]},function(){return null})};this.init()}])}(angular.module(microsoft.support.moduleName)),function(n){n.value("yesNoResults",{yes:"POSITIVE",weakYes:"POSITIVE-",maybe:"NEUTRAL",no:"NEGATIVE"});n.service("chatRoutingService",["$q","$http","$window","$rootScope","contactUsMenuService","compassService","locationService","messageTypes","virtualAgentService",function(n,t,i,r,u,f,e,o,s){function l(n){return n&&n.Product&&c.indexOf(n.Product)==-1?n.Issue&&c.indexOf(n.Issue)==-1?{product:n.Product,issue:n.Issue}:{product:n.Product,issue:null}:{product:null,issue:null}}var h="/api/chatClassification",c=["other","n/a","bad","fraud","support"];this.getRoute=function(n){return t({url:h+"/Routing/",method:"POST",data:{query:n,referrer:e.getReferrerDomain(),sessionId:s.sessionId()||""}}).then(function(n){var t=l(n.data);return r.$broadcast("RoutingServiceResult",t),t})};this.getMenuLinksForRoute=function(t){return this.getRoute(t).then(u.getLinkForRoutingResult).then(function(t){return t.externalLink?n.reject(t):t.link&&t.link.linkUrl?f.getContactUsMenuLinks(t.link.linkUrl):n.reject(null)})};this.getMenuLinksForConversation=function(t){if(!t||!t.length)return n.reject(null);var i=t.map(function(n){return n.messageType===o.User?n.text:""}).join(" ");return this.getMenuLinksForRoute(i)};this.getYesNoForAnswer=function(n,i){return t({url:h+"/YesNo/",method:"POST",params:{query:n,question:i,sessionId:s.sessionId()}}).then(function(t){return r.$broadcast("VirtualAgentSolutionFeedback",{text:n,result:t.data}),t.data})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("ContactUsController",["$scope","$rootScope","$location","$window","$route","compassService","languageService","clientConfig","chatStateService","flightService","locationService","chatRoutingService","supportLinkService","oemService","contactUsMenuService","modalityTags",function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){function tt(){var n=c.getPathSubset(2);return n&&(n[n.length-1]!=="/"?n+"/":n)}function ut(n){return g(n)&&"contactus/"+g(n)+"/"}function ft(n){var t=n&&n.hasModality?f.getPageSubjectId(n):null;s.setSubject(t)}function it(t){t.externalLink?i.path(n.config.homePage+t.metaTags+"/"):a.followLink(t)}function et(){ct(tt());f.getContactUsView().then(function(t){t&&(n.contactUsView=t);b()});f.getContactUsProducts().then(function(t){t&&(n.contactUsProducts=t);w?ot():(n.pageState.currentView=d.collection,b())})}function ot(){n.pageState.selectedProduct=y.getLinkByMetatag(w,n.contactUsProducts.links);n.pageState.selectedProduct?n.pageState.selectedProduct.externalLink?(n.pageState.currentView=d.result,n.externalLinkCard=!0,b()):f.getContactUsMenu(ut(i.path())).then(function(t){t?(n.pageState.currentView=d.result,n.productView=t,selectedIssueName&&st(),b()):k({status:404},!0)},function(n){k(n,!0)}):(w=null,k({status:404},!0))}function st(){n.pageState.selectedIssue=y.getLinkByMetatag(selectedIssueName,n.productView.links);n.pageState.selectedIssue&&f.getContactUsMenu(tt()).then(function(t){t?(h.isUserInFlight("vac-2")&&(t.links=lt(t)),v.applyOEM(t),ft(t),n.issueView=t,b()):k({status:404},!1)},function(n){k(n,!1)})}function g(n){return n&&/(?:contactus)\/(?!products).+?\//.test(n)&&n.match(/(?:contactus)\/(.+?)\//)[1]}function ht(n){return n&&/contactus\/(?!:products).+?\/.+?\//.test(n)&&n.match(/contactus\/.+?\/(.+?)\//)[1]}function ct(n){w=g(n);selectedIssueName=ht(n)}function b(){n.pageState.currentView&&n.contactUsView&&n.contactUsProducts&&(!w||n.pageState.selectedProduct)&&(!selectedIssueName||n.issueView)&&(n.status.waitingOnCompass=!1)}function lt(n){return n.links.filter(function(n){return a.isModality(n,p.chat)||a.isModality(n,p.callback)||a.isModality(n,p.tollFree)?!0:!1})}function k(r,u){r&&r.status==404&&t.$broadcast("404Error",{location:i.absUrl(),preventError:!0});u&&(w=null,selectedIssueName=null,n.changeProblem())}function rt(){n.pageState.selectedProduct=null;n.pageState.selectedIssue=null;n.productView=null;n.issueView=null}var w,nt="contactus",d={collection:"/PartialViews/ContactUs/Collection.html",result:"/PartialViews/ContactUs/Result.html"};n.reset=function(){n.config={homePage:"/"+e.langLocale().toLowerCase()+"/"+nt+"/",productsPage:"/"+e.langLocale().toLowerCase()+"/"+nt+"/products/",inContactUsFlight:h.isUserInFlight("mlc-1")||h.isUserInFlight("vac-1")||h.isUserInFlight("vac-2"),timeout:o.ChatConfig.ChatDefaultTimeout,viewMoreLinkNumber:o.ContactUsConfig.ViewMoreLinkNumber};n.status={loadingResults:!1,waitingOnCompass:!0};n.pageState={currentView:null};n.externalLinkCard=!1;n.trainingData=s.getProblemText()||null;n.showTextBox=!!n.trainingData;et();n.config.inContactUsFlight||i.search().forceorigin==="esmc"||(n.status.isRedirecting=!0,r.location.href+=r.location.search===""?"?forceorigin=esmc":"&forceorigin=esmc")};n.startExp=function(){h.isUserInFlight("vac-1")?a.openContactWindow("/virtual-agent",{width:o.ContactUsConfig.VirtualAgentWidth}):n.showTextBox=!0};n.selectProduct=function(t){rt();n.pageState.selectedProduct=t;it(t)};n.selectIssue=function(t){rt();n.pageState.selectedIssue=t;a.followLink(t)};n.openExternalLink=function(n){a.followLink(n)};n.changeProblem=function(){i.path(n.config.homePage)};n.changeProduct=function(){i.path(n.config.productsPage)};n.submitData=function(){var t=r.document.getElementById("contactus-ml-training").value;n.trainingData=t;n.status.loadingResults=!0;s.setProblemText(n.trainingData);l.getRoute(t).then(function(t){s.setUserRouted(t.product?!0:!1);y.getLinkForRoutingResult(t).then(function(t){n.status.loadingResults=!1;it(t)},function(){n.changeProduct()})},function(){n.changeProduct()})};n.showAllProducts=function(t){n.pageState.showAllProducts=t};n.$on("ContactUsPageTimeout",function(){t.$broadcast("500Error",{reason:"Timeout occurred on the contact us page content",data:n.status})});n.$on("$routeChangeSuccess",function(){n.showProductsList=u.current&&u.current.data&&u.current.data.showProductsList==!0});n.reset()}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("contactUsMenuService",["$q","compassService",function(n,t){var i=this;this.getLinkByMetatag=function(n,t){for(var r,i=0;i<t.length;i++)if(r=t[i],r.metaTags.indexOf(n)!=-1)return r;return null};this.getLinkForRoutingResult=function(r){return r.product?t.getContactUsProducts().then(function(u){var f=i.getLinkByMetatag(r.product,u.links);return f?f.externalLink||!r.issue?f:t.getContactUsMenu(f.link.linkUrl).then(function(n){var t=i.getLinkByMetatag(r.issue,n.links);return t?t:f}):n.reject()}):n.reject()}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("hipScript",["clientConfig","languageService","qosTelemetryService","getScriptService",function(n,t,i,r){function u(){return Math.floor(Math.random()*1e11)}var f=function(f,e){var o=i.createEvent(i.eventTypes.hip.download),s=n.HipConfig.WebEndpoint+"/GetHIP/GetHipObject/"+e+"?mkt="+t.langLocale()+"&fid="+u()+"&id="+n.HipConfig.PartnerId+"&type=visual&rnd="+u();r.addScript(s,{element:f}).then(function(){o.resolve()},function(n){o.reject(n)})};return{restrict:"A",compile:function(n,t){f(n,t.objectName)}}}])}(angular.module(microsoft.support.moduleName));WLSPHIP0={error:0,cssSet:{cssCdHIPInput:"form-control"},holder:"ispHIPHIP",scriptHolder:"ispHIPScript",type:"visual",postLoad:function(){},getSolution:function(){},reloadHIP:function(){},switchHIP:function(){},setFocus:function(){},clientValidation:function(){},verify:function(){}},function(n){n.value("hipFormObject",WLSPHIP0);n.service("hipService",["$rootScope","$http","rccService","chatTokenService","chatStateService","hipFormObject",function(n,t,i,r,u,f){function e(t,i){r.getUnauthTokenForUser(JSON.stringify({Solution:t,Token:i,Datacenter:f.dataCenter,FlowId:f.urlFid})).then(function(t){u.setToken(t.data);n.$broadcast("HipSuccess")},function(){f.reloadHIP();n.$broadcast("HipFailure")})}this.verifyHip=function(){f.verify(e,"")};this.cycleHip=function(){f.reloadHIP();f.setFocus()}}])}(angular.module(microsoft.support.moduleName)),function(n){n.value("unauthNames",{storage:"noAuth"});n.controller("UnauthFormController",["$scope","$rootScope","$location","$routeParams","chatStateService","rccService","compassService","sessionStorageService","flightService","hipService","clientConfig","chatContextService","unauthNames",function(n,t,r,u,f,e,o,s,h,c,l,a,v){function k(t){var r={attributes:{},prechatSurvey:[]};for(i=0;i<t.length;i++)n.form.questions[i].contextName?r.attributes[n.form.questions[i].contextName]=t[i]:r.prechatSurvey.push({name:n.form.questions[i].questionText.text,value:t[i]});return r}function p(){var t=o.getUnauthForm();t&&(n.form=t[u.name],y())}function w(){var t=!0;for(i=0;i<n.form.questions.length;i++)n.form.questions[i].isRequired&&!n.responses[i]&&(t=!1,n.form.questions[i].hasError=!0);return t}function b(){u.modality==="call"?r.path("/callback/"+u.id+"/"):r.path("/chat/"+u.id+"/")}function y(){n.form&&n.form.authFallback&&l.authInfo.authStatus()===1?(s.set(v.storage,!1),b()):n.form&&l.authInfo.authStatus()!=2&&(s.set(v.storage,!0),n.isReady=!0)}n.config={timeout:l.ChatConfig.ChatDefaultTimeout};n.reset=function(){n.responses=[];n.wrongCaptcha=!1;n.awaitingResponse=!1;p()};n.removeError=function(t){n.form.questions[t].hasError=!1};n.submit=function(){w()&&(n.awaitingResponse=!0,c.verifyHip())};n.reset();n.$on("CompassContentReady",p);n.$on("HipSuccess",function(){if(n.awaitingResponse=!1,w()){var t=k(n.responses),i=t.attributes;i.prechatsurvey=JSON.stringify(t.prechatSurvey);a.setValues(i).then(function(){b()})}else c.cycleHip()});n.$on("UserSignedIn",y);n.$on("UserSignedOut",y);n.$on("HipFailure",function(){n.awaitingResponse=!1;n.wrongCaptcha=!0})}])}(angular.module(microsoft.support.moduleName));app.directive("asset",["$compile","$location","$document","$filter","assetService",function(n,t,i,r,u){return{restrict:"A",transclude:!0,scope:{asset:"=",preview:"=?",assetObjectToPreview:"="},link:function(t,i,f){function e(){var e,o,l,a;if(t.data&&t.data.details){t.assetId=t.data.details.id?t.data.details.id:0;switch(t.data.details.assetType){case"image":var s="",h="",c=0,u=null;if(f.props){t.props=JSON.parse(f.props);switch(t.props.size){case"half":h="width:50%;";break;case"quarter":h="width:25%;"}switch(t.props.float){case"right":s="pull-right";break;case"left":s="pull-left"}switch(t.props.padding){case"small":c=10;break;case"medium":c=20}t.props.link&&(e=t.props.link,e.article&&e.article.details&&e.article.details.type&&e.article.details.id?u='<a managed-link href="" data-content-type="'+e.article.details.type+'" data-content-id="'+e.article.details.id:e.target&&(u='<a managed-link href="'+e.target),u&&e.newWindow&&(u=u+'" target="_blank'),u=u?u+'">':null)}o="";l="";s&&s!="none"&&(o+='<div style="overflow: hidden">',l+="<\/div>");a=t.data.altText||t.data.details.title||"";o+='<div style="'+h+';" class="imageAsset '+s+'">';o+='<img style="padding:'+c+'px;" src="'+t.data.fileUrl+'" alt="'+a+'" />';t.data.details.published||(o+='<div class="caption" ng-include=\'"/PartialViews/Asset/ImagePreview.html"\'><\/div>',o+="<\/div>");o+=l;t.content=o;u&&(t.content=u+t.content+"<\/a>");break;case"video":t.data&&t.data.url&&(t.content='<div class="responsive-iframe-16-9"><iframe src="'+t.data.url+'" frameborder="0" allowfullscreen="true"><\/iframe><\/div>');break;case"sideNav":t.content="<side-nav-render links='data.links'><\/side-nav-render>";break;case"htmlSnippet":t.content='<div content-section-list="data.renderHtml"><\/div>';break;case"inlineContent":i.html(t.data.renderHtml);break;case"imageTextBlock":t.content="<div ng-include=\"'/PartialViews/Asset/ImageTextBlock.html'\"><\/div>";break;case"faq":t.content="<div ng-include=\"'/PartialViews/Asset/Faq.html'\"><\/div>";t.faq={showAllIsActive:!0,links:angular.copy(t.data.links)};t.updateExpandAll=function(n){n.isCollapsed=!n.isCollapsed;t.faq.showAllIsActive=r("filter")(t.faq.links,{isCollapsed:!0}).length>0};t.showOrHideAll=function(){angular.forEach(t.faq.links,function(n){n.isCollapsed=!t.faq.showAllIsActive});t.faq.showAllIsActive=!t.faq.showAllIsActive}}i.html(t.content);n(i.contents())(t)}}t.data={details:null};t.$watch("asset",function(){t.asset&&(t.assetObjectToPreview||u.getAsset(t.asset).then(function(n){t.data=n.data;e()},function(){i.html("Asset not found")}))});t.$watch("assetObjectToPreview",function(){t.data=t.assetObjectToPreview;e()},!0)}}}]);app.service("assetService",["contentApiService",function(n){var t={},i=this;this.getAsset=function(i){if(t&&t[i])return t[i];var r=n.getAsset(i);return t[i]=r,r}}]);angular.module(microsoft.support.moduleName).filter("compassFormat",["languageService",function(n){return function(t,i){var r=t,u,f;if(r=r&&r.replace(/{lang-locale}/g,n.langLocale()),!r||!angular.isObject(i))return r;for(u in i)while(r.indexOf("{"+u+"}")>=0)f=new RegExp("\\{"+u+"\\}","g"),(i[u]===null||i[u]===undefined)&&(r=r.replace(f,"")),r=r.replace(f,i[u]);return r}}]),function(n){n.service("compassService",["$q","$log","$rootScope","$cookies","contentApiService","currentLanguageService","clientConfig","localStorageService","locationService",function(n,t,i,r,u,f,e,o){function l(n){var t=s(n);return t||s("commercial"),t}function s(n,t){return t&&h&&h[n]&&h[n][t]?h[n][t]:!t&&h&&h[n]?h[n]:null}function c(n,t){var r;return a[n]?r=a[n]:(r=u.getCompassContentForPage(n),a[n]=r,r.then(function(n){if(n&&n.data){if(t)t(n.data);else for(var r in n.data)h[r]=n.data[r];o.commit(b(),h);i.$broadcast("CompassContentReady")}else i.$broadcast("500Error",{reason:"Failed to load compass content",response:n})},function(){})["finally"](function(){a[n]&&(a[n]=null)})),r}function b(){return p.compassContentKey}function d(t){return h[t.key]?n.when(h[t.key]):c(t.url).then(function(n){return n.data[t.key]})}var h={},a={},p={compassContentKey:"CompassContent",contentNodes:[{condition:"",key:"search",url:""},{condition:"menu",key:"menus",url:"menu/"},{condition:"contactus",key:"landingPage",url:"contactus/"},{condition:"chat",key:"chat",url:"menu/"},{condition:"callback",key:"callback",url:"menu/"},{condition:"schedulecallback",key:"callback",url:"menu/"},{condition:"form",key:"form",url:"menu/"},{condition:"allproducts",key:"allProducts",url:"allproducts/"},{condition:"products",key:"productHubPage",url:"products/"},{condition:"topics",key:"productHubPage",url:"topics/"},{condition:"search",key:"searchResults",url:"searchresults/"},{condition:"enterprise",key:"menus",url:"menu/"},{condition:"partner",key:"menus",url:"menu/"},{condition:"rat-phone",key:"menus",url:"menu/"},{condition:"commercial",key:"commercial",url:"commercial/"},{condition:"premier",key:"commercial",url:"commercial/"},{condition:"devices",key:"devices",url:"devices/"},{condition:"virtual-agent",key:"virtualAgent",url:"virtual-agent/"},{condition:"lifecycle",key:"lifecycle",url:"lifecycle/"},{condition:"answerdesk",key:"answerdesk",url:"answerdesk/"}]},v="productMenus",y="productHubPages",w="contactus",k="answerdesk";this.getContentNodes=function(){return p.contentNodes};this.clearCache=function(){h={};a={};o.invalidateCache()};this.fetchContent=function(n){var o,s,e,u;for(r.get("smc_preview")&&(t.info("Preview mode: cache wiped for new fetch"),this.clearCache()),o=f.getLang(),pathParts=n.split("/"),o&&pathParts[0].toUpperCase()===o.toUpperCase()&&pathParts.shift(),s=pathParts&&pathParts.length>=1?pathParts[0]:null,e=0;e<p.contentNodes.length;e++)if(u=p.contentNodes[e],u&&s===u.condition){h&&h[u.key]?(t.info("Cache hit for node",u),i.$broadcast("CompassContentReady")):(t.info("fetchContent internalFetch:"+n),c(u.url));break}h&&h.search||c("")};this.getContent=function(n){return s(n)};this.getPageInfo=function(){return s("basePage")};this.getMenu=function(t){return s("menus",t)?n.resolve(s("menus",t)):c("menu").then(function(){return s("menus",t)})};this.getContactUsHeader=function(){return h.contactUsHeader?n.resolve(h.contactUsHeader):c(w).then(function(n){return n.data.contactUsHeader})};this.getVirtualAgent=function(){return d({key:"virtualAgent",url:"virtual-agent/"})};this.getAccessibilityView=function(){return h.accessibilityView?n.when(h.accessibilityView):c(k).then(function(n){return n.data.accessibilityView})};this.getHoursOfOperationView=function(){return h.hoursOfOperationView?n.resolve(h.hoursOfOperationView):c(w).then(function(n){return n.data.hoursOfOperationView})};this.getContactUsView=function(){return h.contactUsView?n.resolve(h.contactUsView):c(w).then(function(n){return n.data.contactUsView})};this.getContactUsProducts=function(){return h.landingPage?n.resolve(h.landingPage):c(w).then(function(n){return n.data.landingPage})};this.getContactUsMenu=function(t){if(t==="contactus/")return this.getContactUsProducts();var i=s(v,t);return i?n.resolve(i):c(t,function(n){var t=n[v];h[v]||(h[v]={});for(contactusProductPage in t)h[v][contactusProductPage]=t[contactusProductPage]}).then(function(){return s(v,t)})};this.getContactUsMenuLinks=function(n){return this.getContactUsMenu(n).then(function(n){return n.links&&n.links.length>0?n.links:null})};this.getMenuExtras=function(){var n=s("menuExtras");return n&&n.menuExtras?{icon:n.menuExtraIcon,extras:n.menuExtras.links}:null};this.getPageSubjectId=function(n){var t=n&&n.subjectId;return(!t||t<0)&&n.links.some(function(n){var i=n.link.linkUrl,r;if((i.indexOf("/chat/")>-1||i.indexOf("/callback/")>-1||i.indexOf("/phone/")>-1||i.indexOf("/form/")>-1)&&(r=i.split("/"),r.length>=3&&r[2]!=="{subject-id}"))return t=parseInt(r[2],10),!0}),t};this.getMenuOptionsForId=function(n){return this.getMenu().then(function(t){var i,r;if(t)for(r in t)if(i=t[r],i.hasModality&&this.getPageSubjectId(i)===n)return i.links;return null}.bind(this))};this.getChat=function(){return s("chat")};this.getChatSurvey=function(){return s("chat","survey")};this.getCallback=function(){return s("callback")};this.getWaitTimeText=function(){return this.getContactUsView().then(function(n){return n&&{singular:n.waitTimeSingular,plural:n.waitTimePlural}})};this.getSupportedLocales=function(){return s("callback","supportedLocales")};this.getUnauthForm=function(){return s("form")};this.getServiceAgreement=function(){var n=s("serviceAgreement"),t=s("serviceAgreementLink");return n&&t?{serviceAgreement:n,serviceAgreementLink:t}:null};this.getComingSoon=function(){return s("comingSoon")};this.getContactHeader=function(){return s("contactHeader")};this.getStepConfig=function(){return s("stepListConfig")};this.getContactSupportIcon=function(){return s("contactSupportIcon")};this.getPasscode=function(){return s("passcode")};this.getMicrosoftLogo=function(){return s("microsoftLogo")};this.getMicrosoftLogoAlt=function(){return s("microsoftLogoAlt")};this.getNavigationInterrupted=function(){return s("navigationInterrupted")};this.getSearchView=function(){return s("search")};this.getSearchResultsView=function(){return s("searchResults")};this.getProductView=function(){return s("products")};this.getProductHubPage=function(){return s("products")};this.getProductsMasterList=function(){return s("productsMasterList")};this.getDevicesView=function(){return s("devicesView")};this.getlifecycleHomepageView=function(){return s("lifecycleHomepageView")};this.getlifecycleSearchPageView=function(){return h.lifecycleSearchPageView?n.when(h.lifecycleSearchPageView):c("lifecycle").then(function(n){return n.data.lifecycleSearchPageView})};this.getOrdersView=function(){return s("ordersView")};this.getDeviceRegistrationView=function(){return s("deviceRegistrationView")};this.getProductDetails=function(n){var i=langLocale="/"+f.getLang().toLowerCase()+"/"+n,t=s(y,n);return t||(t=s(y,i),t||c(n,function(n){var t=n[y];h[y]||(h[y]={});for(ProductHubPage in t)h[y][ProductHubPage]=t[ProductHubPage]})),t};this.getLinkFarm=function(){return s("linkFarm")};this.getCommercialHubView=function(){return l("commercialHub")};this.getCommercialIncidentsHub=function(){return l("commercialIncidentsHub")};this.getCreateIncidentsHub=function(){return l("createIncidentsHub")};this.getIncidentDetailHub=function(){return l("incidentDetailHub")};this.getPremierHomeView=function(){return l("premierHomepage")};this.getManageAccountHub=function(){return l("manageAccountHub")};this.getCommercialContactsHub=function(){return l("commercialContactsHub")};this.getBackText=function(){return s("basePage","contactSupportBack")};this.getCloseText=function(){return s("basePage","contactSupportClose")};this.getLanguageSelectorTitle=function(){return s("basePage","languageSelectorTitle")};this.getLanguages=function(){return s("basePage","languages")?n.resolve(s("basePage","languages")):c("").then(function(){return s("basePage","languages")})};this.getFeedbackCtrl=function(){return s("basePage","feedback")};this.getF1Footer=function(){return s("basePage","f1Footer")};this.getSelfhostFeedback=function(){return s("basePage","selfHostFeedbackView")};this.getOfflineMessage=function(){return s("basePage","offlineMessage")};this.getNotificationBanner=function(){return s("basePage","notificationBanner")};this.getAllProducts=function(){return s("allProducts")};this.getProductPage=function(){return s("productHubPage")};this.getProductPageCommonView=function(){return s("productPagesCommonView")};this.getFrePage=function(t){var i=n.defer();return h&&h.fre&&h.fre[t]?i.resolve(h.fre[t]):c("fre/"+t).then(function(n){h.fre=h.fre||{};h.fre[t]=n.data;i.resolve(n.data)},function(n){i.reject(n)}),i.promise};this.getContentSurvey=function(){return s("contentView","contentSurvey")};this.getContentProperties=function(){return s("contentView","contentProperties")};this.getContentProductPicker=function(){return s("contentView","contentProductPicker")};this.getContentMediaWidget=function(){return s("contentView","contentMediaWidget")};this.getKbReferenceText=function(){return s("contentView","kbReference")};this.getMachineTranslation=function(){return s("contentView","machineTranslation")};this.getProductList=function(){var t=n.defer();return h.productsInformation&&h.productsInformation.products?t.resolve(h.productsInformation.products):c("productsConfig").then(function(n){n&&n.data&&n.data.productsInformation&&n.data.productsInformation.products?t.resolve(n.data.productsInformation.products):t.reject("Products missing from compass config")}),t.promise};this.getProduct=function(t){var i=n.defer();return this.getProductList().then(function(n){var r=n.filter(function(n){return n&&n.ecoId==t});r.length==1?i.resolve(r[0]):i.reject("Product not found")}),i.promise};this.getLocaleMapping=function(){var t=n.defer();return h.mappingRules?t.resolve(h.mappingRules):c("localeMapping").then(function(n){n&&n.data&&n.data.mappingRules?t.resolve(n.data.mappingRules):t.reject("Locale mappings list not found")}),t.promise};this.getCollapsibleContentProperties=function(){return s("contentView","collapsibleContentProperties")};this.getInternalContentProperties=function(){return s("contentView","internalContentProperties")};h=e.SiteContentConfig&&e.SiteContentConfig.ClientCompassCachingEnabled&&e.SiteContentConfig.ClientCompassCacheTimeout?o.getCacheContent(b())||{}:{}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("contentApiService",["$rootScope","$http","$cookies","$routeParams","clientConfig","$q","$rootScope",function($rootScope,n,t,i,r,u){var o={},e=microsoft&&microsoft.support&&microsoft.support.prefetchedArticle,s,f;e&&e.details.id&&e.details.locale&&(o[e.details.locale+"/"+e.details.id]=e);s="/api/content/";f=function(t,i){var u=s+t,r={httpAppOptions:{cacheBust:!0,allowPreview:!0}};return i?angular.extend(i,r):i=r,n.get(u,i)};this.getAgentById=function(n){return f("GetAgent/"+n)};this.getCompassContentForPage=function(n){return f("GetCompassContentForPage/"+n)};this.getKbArticle=function(n,t){var r="kb/"+n,i=null;return t!=null&&t.kbPreview!=null&&t.kbPreview==="true"&&(i={kbPreview:!0}),f(r,i).then(function(n){return{kbArticle:n.data,noIndex:n.headers("x-kb-noindex")}},function(n){return u.reject(n)})};this.getGwtArticle=function(n){return f("Gwt/"+n)};this.getGenericArticle=function(n){return f("Article/"+n)};this.getHelpArticle=function(n,t){var i=o[t+"/"+n];return i?u.when(i):f("Help/"+n).then(function(n){var t=n.data;return t&&t.details.locale&&t.details.id&&(o[t.details.locale+"/"+t.details.id]=t),t})};this.getInstantAnswer=function(n){return f("InstantAnswers/"+n)};this.getAsset=function(n){return f("Asset/"+n)};this.getOneSiteResources=function(){return r&&r.SiteContentConfig&&r.SiteContentConfig.OneSiteEnabled?f("OneSite"):null};this.getDevices=function(){return f("devices/")}}])}(angular.module(microsoft.support.moduleName));app.directive("contentSection",["compassService",function(n){return{restrict:"A",scope:{contentSection:"="},templateUrl:"/PartialViews/Content/Section.html",link:function(t){t.contentSection&&t.contentSection.meta&&t.contentSection.meta.products&&t.contentSection.meta.products.length>0&&n.getProductList().then(function(n){t.products=n.filter(function(n){for(var i=0;i<t.contentSection.meta.products.length;i++)if(n&&n.ecoId===t.contentSection.meta.products[i])return!0;return!1})});t.applicableProducts=function(){var i=[],n;if(t.products)for(n=0;n<t.products.length;n++)t.products[n].name&&i.push(t.products[n].ecoId);return i};t.getStyleClass=function(){var n=[];if(t.contentSection&&t.contentSection.meta)switch(t.contentSection.meta.type){case"single-column":n=["col-xs-24"];break;case"two-column":n=["col-sm-24 col-md-12"];break;case"three-column":n=["col-sm-24 col-md-8"];break;case"four-column":n=["col-sm-24 col-md-6"]}return n};t.isInternalSection=function(){return t.contentSection&&t.contentSection.meta&&t.contentSection.meta.isInternalContent===!0||t.contentSection.meta.isInternalContent==="true"};t.$on("CompassContentReady",function(){t.isInternalSection()&&(t.internalProperties=n.getInternalContentProperties())});t.isInternalSection()&&(t.internalProperties=n.getInternalContentProperties())}}}]);app.directive("contentSectionList",[function(){return{restrict:"A",templateUrl:"/PartialViews/Content/SectionList.html",scope:{contentSectionList:"="},link:function(n){typeof n.contentSectionList=="string"&&(n.isString=!0)}}}]);app.directive("faqPanelContent",[function(){return{scope:{panel:"=faqPanelContent"},templateUrl:"/PartialViews/Content/FaqPanel.html",require:"^?faqSection",link:function(n,t,i,r){n.$watch("panel.isOpen",function(){n.panel.class=n.panel.isOpen?"win-icon-ChevronUpSmall":"win-icon-ChevronDownSmall"});n.toggle=function(){n.panel.isOpen=!n.panel.isOpen;r.update()}}}}]);app.directive("faqSection",["$filter","compassService",function(n,t){return{restrict:"A",template:'<div class="faq-section"><div class="spacer-12-bottom"><a ng-if="items.length > 1" ng-click="showOrHideAll()"> {{ allExpanded ? props.hideAllLabel : props.showAllLabel }} <\/a><\/div><div class="faq-panel" ng-repeat="item in items" faq-panel-content="item"><\/div><\/div>',transclude:!0,scope:{},replace:!0,controller:["$scope",function(n){this.update=function(){n.update()}}],link:function(i,r,u,f,e){function o(){i.props=t.getCollapsibleContentProperties()}e(function(n){i.items=[];angular.forEach(n,function(n){var t=angular.element(n).find("[faq-panel-heading]").text(),r=angular.element(n).find("[faq-panel-body]").html();i.items.push({title:t,body:r,isOpen:!1})})});i.update=function(){i.allExpanded=n("filter")(i.items,{isOpen:!1}).length==0};i.showOrHideAll=function(){angular.forEach(i.items,function(n){n.isOpen=!i.allExpanded});i.update()};i.$on("CompassContentReady",function(){o()});o()}}}]);app.component("internalContent",{templateUrl:"/PartialViews/Content/InternalContent.html",controller:["$rootScope","compassService",function(n,t){function i(){r.internalProperties=t.getInternalContentProperties()}var r=this;n.$on("CompassContentReady",i);i()}],controllerAs:"ic"});app.directive("machineTranslation",["compassService","$routeParams","$location",function(n,t,i){return{scope:{},templateUrl:"/PartialViews/Content/MachineTranslation.html",link:function(r){var u=function(){var u=n.getMachineTranslation();u&&(r.machineTranslated=u,r.articleId=t.articleId,r.originalUrl=i.path().replace(t.langLocale,"en-us"),r.originalLink='<a href="view-original" href="'+r.originalUrl+'" target="_self">'+t.articleId+"<\/a>")};r.$on("CompassContentReady",function(){u()});u()}}}]);app.directive("managedLink",["compassService","languageService","locationService",function(n,t,i){return{restrict:"A",link:function(r,u,f){function e(n,t,i){var u=t,f,r;for(f in i)if(r=i[f],n&&n.indexOf(r.domain)>=0){u=r.outgoingLocales[t]||t;break}return u}function o(){var s,r,o;if(f.contentType&&f.contentId){s=null;switch(f.contentType){case"gwt":s="/help/"+f.contentId;break;case"article":s="/help/"+f.contentId}f.bookmarkId&&f.bookmarkId!="undefined"&&(s+="#"+f.bookmarkId);s&&u.attr("href","/"+t.langLocale()+s)}else if(f.bookmarkId&&f.bookmarkId!="undefined")u.on("click",function(n){i.scrollTo(f.bookmarkId);n.preventDefault()});else f.href?(r=u.attr("href"),r&&r.indexOf("{lang-locale}")>=0&&(o=t.langLocale(),u.addClass("disabled"),n.getLocaleMapping().then(function(n){o=e(r,o,n);u.attr("href",r.replace(/{lang-locale}/g,o));u.removeClass("disabled")})),u.attr("target")||u.attr("target","_self")):f.link&&(r=f.link,r&&r.indexOf("{lang-locale}")>=0&&(o=t.langLocale(),u.addClass("disabled"),n.getLocaleMapping().then(function(n){o=e(r,o,n);u.attr("href",r.replace(/{lang-locale}/g,o));u.removeClass("disabled")})),f.chat&&f.chat=="true"&&u.click(function(){var n=f.link;window.open(n,"contactSupport","width=420,height=630,scrollbars=yes,resize=yes",!0)}))}o()}}}]);app.directive("mediaWidget",["$rootScope","$location","compassService","$filter",function(n,t,i,r){return{restrict:"A",templateUrl:"/PartialViews/Content/MediaWidget.html",scope:{title:"@"},link:function(u,f,e){function s(){u.emailHref=r("compassFormat")(o,{url:u.url,title:u.title})}function h(){var t=i.getContentMediaWidget(),n;t&&(n=t,o="mailto:?subject="+n.emailTitle+"&body="+n.emailBody,u.emailHref=r("compassFormat")(o,{url:u.url,title:u.title}),u.emailCaption=n.emailCaption,u.printCaption=n.printCaption)}n.$broadcast("UpdateTitle",u.title);u.printCaption=e.printCaption;u.emailCaption=e.emailCaption;u.url=t.absUrl();var o="mailto:?subject="+e.emailTitle+"&body="+e.emailBody;s();e.title&&e.$observe("title",function(){u.title=e.title;n.$broadcast("UpdateTitle",u.title);s()});e.emailTitle&&e.emailBody&&e.emailCaption&&e.printCaption||(h(),u.$on("CompassContentReady",function(){h()}))}}}]),function(n){n.service("partnerDataService",["$rootScope","$cookies","$location","$q","chatStateService","contentApiService","resourceLoaderService","flightService","sessionStorageService","chatContextService",function(n,t,i,r,u,f,e,o,s,h){function p(){var n=t.get("smcpartner");return l?l.then(function(n){return n}):f.getCompassContentForPage("partnerconfig").then(function(t){var i=t.data&&t.data.configList&&t.data.configList[n]&&t.data.configList[n].partnerDefinition;return l=i&&r.resolve(i),i},function(n){return l=null,r.reject(n)})}var v="blue",l=null,c=i.search(),y="returnUrl",a;if(this.init=function(){p()},this.getPartnerData=function(n){return p().then(function(t){return t&&(n?t[n]:t)})},this.loadTheme=function(){return c&&angular.isString(c.theme)?e.loadCSS("/content/themes/"+c.theme+".css"):this.getPartnerData("theme").then(function(n){return e.loadCSS("/content/themes/"+(n||v)+".css")},function(){return e.loadCSS("/content/themes/"+v+".css")})},this.returnUrl=function(){return s.get(y)},c&&angular.isString(c.context))try{a=angular.fromJson(c.context);n.$broadcast("PrechatText",a);h.setValues({prechatsurvey:JSON.stringify(a)}).then(function(){i.search("context",null).replace()})}catch(w){console.log(w)}i.search().return&&(s.set(y,i.search().return),i.search("return",null).replace());this.init()}])}(angular.module(microsoft.support.moduleName));app.directive("productPicker",["assetService","compassService","osService","$location",function(n,t,i,r){return{restrict:"A",templateUrl:"/PartialViews/Content/ProductPicker.html",scope:{productPicker:"=",articleSections:"=?"},link:function(n){function f(){var i=t.getContentProductPicker();i&&(n.productPickerStrings=i)}n.os=i.getOS();switch(n.os){case"Windows XP":n.thisPc="1173";case"Windows 7":n.thisPc="14019";break;case"Windows 8":case"Windows 8.1":n.thisPc="17655";break;case"Windows 10":n.thisPc="18474"}n.productPickerStrings=t.getContentProductPicker();n.hasPicker=function(){var t=$(".content-article [applies-to-products]");return t.filter(":not([applies-to-products='[]'])").length>0&&n.productPicker.length>0};n.$on("CompassContentReady",function(){f()});n.products=[];n.selectedProduct=null;angular.forEach(n.productPicker,function(i){t.getProduct(i).then(function(t){n.products.push(t)})});var u=r.hash();u&&angular.forEach(n.articleSections,function(t){t.meta.id&&t.meta.id===u&&t.meta.products&&t.meta.products.length>0&&(n.selectedProduct=$.inArray(t.meta.products[0],n.products)?t.meta.products[0]:null)});n.selectedProduct===null&&$.inArray(n.thisPC,n.products)&&(n.selectedProduct=n.thisPc);n.$watchCollection(function(){return $(".content-article [applies-to-products]").filter(":not([applies-to-products*='"+n.selectedProduct+"'])").filter(":not([applies-to-products='[]'])")||n.selectedProduct},function(t,i){if($("[applies-to-products]").show(),t!=i&&n.selectedProduct){var r=$(".content-article [applies-to-products]"),u=r.filter(":not([applies-to-products*='"+n.selectedProduct+"'])").filter(":not([applies-to-products='[]'])");r.length!=u.length&&u.hide()}})}}}]);app.component("sideNavRender",{templateUrl:"/PartialViews/Asset/SideNav.html",bindings:{links:"<"},controller:["$location","languageService",function(n,t){function s(n,t){var i=null;switch(t){case"gwt":i="/help/"+n;break;case"article":i="/help/"+n}return i?f+i:null}var u={},o=n.absUrl(),f=t.langLocale(),e,i,r;this.selectedLink={};this.navLinks=[];for(i in this.links)e=angular.copy(this.links[i]),this.navLinks.push(e);angular.forEach(this.navLinks,function(n){n.articleId&&n.articleType&&(n.link=s(n.articleId,n.articleType));n.level===1?u=n.id:n.parentId=u});for(i in this.navLinks)r=null,this.navLinks[i].link.indexOf("{lang-locale}")>=0?r=this.navLinks[i].link.replace(/{lang-locale}/g,f):this.navLinks[i].link.indexOf(this.navLinks[i].articleId)>=0&&(r=this.navLinks[i].link),o.indexOf(r)>=0&&["https://","http://","",null].indexOf(r)===-1&&(this.selectedLink=this.navLinks[i],this.selectedLink.parentId||(this.selectedLink.expandChildId=this.selectedLink.id))}],controllerAs:"nav"}),function(n){n.controller("AddPaymentController",["$scope","$window","$routeParams",function(n,t,i){i.errorCode!=null&&(i.errorCode==20&&t.parent&&t.parent.postMessage(JSON.stringify({type:"$broadcast",name:"AddPaymentCPStatusError",args:i.errorCode}),"*"),i.errorCode==10&&t.parent&&t.parent.postMessage(JSON.stringify({type:"$broadcast",name:"AddPaymentCPStatusCancel",args:i.errorCode}),"*"));i.piid!=null&&t.parent&&t.parent.postMessage(JSON.stringify({type:"$broadcast",name:"AddPaymentCPStatusSuccess",args:i.errorCode}),"*")}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("DevicesController",["$scope","$window","$location","$modal","$routeParams","$sce","$rootScope","geographyService","hardwareService","orderService","flightService","clientConfig","authenticationHelperService","languageService","compassService","profileService",function(n,t,r,u,f,e,o,s,h,c,l,a,v,y,p,w){if(n.devicesflightEnabled=l.isUserInFlight("odc-1"),n.devicesflightEnabled){var b="Fulfillment",k="Repair",d="AdvancedExchange",nt="VMF",tt="CP",it="CaculateTax",rt="Controller35mm",ut="Controller",ft="Headset35mm",et="Headset",ot="CancelRequest",st="Other",ht="PaymentOnDelivery",ct="COD",g="BRA";n.chkDeviceOrderCheckAcceptTerms=!1;n.chkDeviceOrderPaymentTerms=!1;n.deviceNewOrderInformation=c.getNewDeviceOrder();n.cancelServiceOrderDetails=c.getDeviceCancelOrder();n.deviceWicLocationInfo=c.getWicLocationInformation();n.displayWicLocations=!1;n.currentCreateOrderStep=0;n.showWicLocations=!1;n.wicAllowedStates=[];n.deviceActiveOrderSummary=[];n.ChargebackFee=0;n.showDescriptionText=!1;n.pid={};n.pid.pidValue="";n.paymentCardNumber=null;n.paymentCardType=null;n.problemTypessList="";n.deviceShippingEmail=null;n.deviceOrderConfirmation={};n.deviceOrderConfirmation.problemTypeDevice=null;n.deviceSpecialAddress=[];n.deviceSpecialAddress.HouseNumber="";n.deviceSpecialAddress.Complement="";n.deviceSpecialAddress.Neighbourhood="";n.getWicLocations=function(t){c.getHardwareWicLocations(t).then(function(t){var i,r,u;if(t.Message&&t.Message.length>0){n.createOrderErrorMessage=t.Message;return}for(n.wicLocaleValue=y.langLocale(),n.wicLocations=t,n.wicAllowedStates=[],i=0;i<n.statesList.length;i++)for(r=0;r<n.wicLocations.length;r++)if(n.statesList[i].code==n.wicLocations[r].State){u={};u.code=n.statesList[i].code;u.name=n.statesList[i].name;n.wicAllowedStates.push(u);break}})};n.changeWicStateName=function(t){n.wicSelectedState=t};n.getDeviceRepairOffers=function(t,i,r,u,f,e){c.getHardwareRepiarOffers(t,i,r,u,f,e).then(function(t){if(t.Message&&t.Message.length>0){n.createOrderErrorMessage=t.Message;return}n.deviceAccessoryOffers=t;n.deviceNewOrderInformation.Currency=t.Currency})};n.getAccessoryFulfillmentOffers=function(t,i,r,u,f){n.xboxAccessoryType&&(u=n.xboxAccessoryType);c.getHardwareAccessoryFulfillmentOffers(t,i,r,u,f,n.pidWarrantyStartDate,n.pidWarrantyEndDate).then(function(t){if(t.Message&&t.Message.length>0){n.createOrderErrorMessage=t.Message;return}n.deviceAccessoryOffers=t;n.deviceNewOrderInformation.Currency=t.Currency})};n.getDeviceShippingOffers=function(t,i,r,u,f,e){c.getHardwareShippingOffers(t,i,r,u,f,e).then(function(t){if(t.Message&&t.Message.length>0){n.createOrderErrorMessage=t.Message;return}n.deviceAccessoryShippingOffers=t})};n.getFulfillmentShippingOffers=function(t,i,r,u,f,e){c.getHardwareFulfillmentShippingOffers(t,i,r,u,f,e).then(function(t){if(t.Message&&t.Message.length>0){n.createOrderErrorMessage=t.Message;return}n.deviceAccessoryShippingOffers=t})};n.getHardwareProfileInformation=function(){w.getUserHardwareProfile().then(function(t){if(t.Message&&t.Message.length>0){n.createOrderErrorMessage=t.Message;return}n.userProfileInformation=t;n.customerDetailsInfo()})};n.customerDetailsInfo=function(){a.authInfo!=null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerName.First=a.authInfo.firstName,n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerName.Last=a.authInfo.lastName,n.deviceNewOrderInformation.Puid=JSON.stringify(parseInt(a.authInfo.puid,16)),n.deviceNewOrderInformation.Shipments[0].ShipTo.Email.push(a.authInfo.displayName),n.userProfileInformation[0].ContactNumbers[0].CountryCode!=null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.PhoneNumber.Number=n.deviceNewOrderInformation.Shipments[0].ShipTo.PhoneNumber.Number+n.userProfileInformation[0].ContactNumbers[0].CountryCode),n.userProfileInformation[0].ContactNumbers[0].AreaCode!=null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.PhoneNumber.Number=n.deviceNewOrderInformation.Shipments[0].ShipTo.PhoneNumber.Number+" ("+n.userProfileInformation[0].ContactNumbers[0].AreaCode+") "),n.userProfileInformation[0].ContactNumbers[0].Number!=null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.PhoneNumber.Number=n.deviceNewOrderInformation.Shipments[0].ShipTo.PhoneNumber.Number!=null?n.deviceNewOrderInformation.Shipments[0].ShipTo.PhoneNumber.Number+n.userProfileInformation[0].ContactNumbers[0].Number:n.userProfileInformation[0].ContactNumbers[0].Number),n.userProfileInformation[0].ContactNumbers[0].Extension!=null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.PhoneNumber.Number=n.deviceNewOrderInformation.Shipments[0].ShipTo.PhoneNumber.Number+" x"+n.userProfileInformation[0].ContactNumbers[0].Extension),n.userProfileInformation[0].Addresses[0].Address1!=null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Address1=n.userProfileInformation[0].Addresses[0].Address1),n.userProfileInformation[0].Addresses[0].Address2!=null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Address2=n.userProfileInformation[0].Addresses[0].Address2),n.userProfileInformation[0].Addresses[0].City!=null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.City=n.userProfileInformation[0].Addresses[0].City),n.userProfileInformation[0].Addresses[0].RegionCode!=null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.StateOrProvince=n.userProfileInformation[0].Addresses[0].RegionCode),n.userProfileInformation[0].Addresses[0].CountryCode!=null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country=n.userProfileInformation[0].Addresses[0].CountryCode,n.updateStateList()),n.userProfileInformation[0].Addresses[0].PostalCode!=null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.PostalCode=n.userProfileInformation[0].Addresses[0].PostalCode))};n.fillAccessorydata=function(t){n.xboxAccessoryType=t};n.fillShippingdata=function(t){n.selectWicLocation=!0;t.VirtualSku==nt?(n.showWicLocations=!0,n.getWicLocations(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country),n.deviceNewOrderInformation.LineItems[0].ItemAttributes=k,n.selectWicLocation=!1):n.showWicLocations=!1;n.deviceNewOrderInformation.Shipments[0].Sku=t.Sku;n.deviceNewOrderInformation.Shipments[0].Price=t.Price};n.fillWicData=function(t){n.selectWicLocation=!0;n.deviceNewOrderInformation.Payments[0].BillTo==null&&(n.deviceNewOrderInformation.Payments[0].BillTo=angular.copy(n.deviceNewOrderInformation.Shipments[0].ShipTo));n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Address1=t.AddressLine1;n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Address2=t.AddressLine2;n.deviceNewOrderInformation.Shipments[0].ShipTo.Email=[];n.deviceNewOrderInformation.Shipments[0].ShipTo.Email.push(t.EmailAddress);n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.City=t.City;n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.StateOrProvince=t.State;n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.PostalCode=t.Zipcode;n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country=t.Country;n.deviceNewOrderInformation.Shipments[0].ShipTo.PhoneNumber.Number=t.PhoneNumber};n.fillOffersdata=function(t){n.deviceNewOrderInformation.LineItems[0].Sku=t.Sku;n.deviceNewOrderInformation.LineItems[0].Price=t.Price;n.ChargebackFee=t.ChargebackFee;n.deviceNewOrderInformation.LineItems[0].ItemAttributes=k;n.deviceNewOrderInformation.LineItems[0].ServiceContract=t.MatchedServiceContract;n.deviceNewOrderInformation.Payments[0].PaymentOption=t.PaymentOptions;n.deviceNewOrderInformation.Payments[0].PaymentOption==ht&&(n.deviceNewOrderInformation.Payments[0].Gateway=ct);t.ItemAttributes==k||t.ItemAttributes==d?n.getDeviceShippingOffers(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country,n.deviceNewOrderInformation.Brand,n.deviceNewOrderInformation.LineItems[0].DeviceKey.Key,n.deviceNewOrderInformation.LineItems[0].ProblemCode,n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.PostalCode,n.deviceNewOrderInformation.LineItems[0].Sku):t.ItemAttributes==b&&(n.deviceNewOrderInformation.LineItems[0].ItemAttributes=b,n.getFulfillmentShippingOffers(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country,n.deviceNewOrderInformation.Brand,n.deviceNewOrderInformation.LineItems[0].DeviceKey.Key,n.deviceNewOrderInformation.LineItems[0].ProblemCode,n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.PostalCode,n.deviceNewOrderInformation.LineItems[0].Sku))};n.fillPaymentdata=function(t){n.showAddPaymentInstrument=!1;n.deviceNewOrderInformation.Payments[0].AccountId=t.AccountId;n.deviceNewOrderInformation.Payments[0].InstrumentId=t.Id;n.deviceNewOrderInformation.Payments[0].Gateway=tt;n.paymentCardNumber=t.AccountNumberLastFour;n.paymentCardType=t.CardType;n.createOrderErrorMessage="";n.calculateTaxInfo()};n.calculateTaxInfo=function(){n.ChargebackFee>0&&n.deviceNewOrderInformation.LineItems[0].Price==0&&n.deviceNewOrderInformation.Shipments[0].Price==0||(n.deviceNewOrderInformation.OrderOperation=it,n.calculateTaxCompleted=!1,c.calculateTax(n.deviceNewOrderInformation).then(function(t){if(n.calculateTaxCompleted=!0,t.Message&&t.Message.length>0){n.createOrderErrorMessage=t.Message;return}n.taxation=t;t.LineItems!=null&&(n.deviceNewOrderInformation.LineItems[0].Tax=t.LineItems[0].Tax);t.Shipments!=null&&(n.deviceNewOrderInformation.Shipments[0].Tax=t.Shipments[0].Tax,n.deviceNewOrderInformation.Shipments[0].Name=t.Shipments[0].Name,n.deviceNewOrderInformation.Shipments[0].LineItemRef=t.Shipments[0].LineItemRef);t.Payments!=null&&(n.deviceNewOrderInformation.Payments[0].Amount=t.Payments[0].Amount)}))};n.getPaymentsList=function(){c.getCommercePayments(n.selectedCountryShortCode).then(function(t){if(n.iFrameSuccessMessage="",t.Message&&t.Message.length>0){n.createOrderErrorMessage=t.Message;n.iFrameSuccessMessage=t.Message;return}n.paymentInformation=t})};n.getProblemTypesDescriptionList=function(t){c.getHardwareProblemTypes(t).then(function(t){if(t.Message&&t.Message.length>0){n.createOrderErrorMessage=t.Message;return}n.problemDescriptionsList=t})};n.getAccessoriesList=function(t){c.getHardwaregetAccessories(t).then(function(t){if(t.Message&&t.Message.length>0){n.createOrderErrorMessage=t.Message;return}n.accessoriesList=t;n.changeproductType(n.problemTypeDevice)})};n.changeproductType=function(t){n.deviceOrderConfirmation.problemTypeDevice=t;t.toLowerCase()=="accessories"?(n.showDescriptionText=!1,n.deviceNewOrderInformation.LineItems[0].ItemAttributes=b,n.problemTypessList=n.accessoriesList):(n.showDescriptionText=!0,n.deviceNewOrderInformation.LineItems[0].ItemAttributes=k,n.problemTypessList=n.problemDescriptionsList);n.deviceNewOrderInformation.LineItems[0].ProblemCode=null};n.reset=function(){f.deviceId!=null&&(n.allDevicesList(f.deviceId),n.getHardwareProfileInformation())};n.signInUrl=v.getUpdatedAuthenticationUrl(!0,!1);n.deviceRegistered=!1;n.seeAllDevices=function(){var n="SeeAllDevices",t=u.open({templateUrl:"/PartialViews/Devices/SeeAllDevicesModal.html",controller:"DevicesModalController",windowClass:"device-modal-seeall",resolve:{currentDevice:function(){return n}}})};n.abortRepairOrder=function(){var t="AbortRepairOrder",i=u.open({templateUrl:"/PartialViews/Devices/AbortRepairOrderModal.html",controller:"DevicesModalController",windowClass:"device-modal-seeall",resolve:{currentDevice:function(){return t}}});i.result.then(function(){n.createorderSteps(0,0);n.deviceAccessoryOffers=null;n.deviceAccessoryShippingOffers=null;n.deviceNewOrderInformation.Shipments[0].Price=0;n.deviceNewOrderInformation.Shipments[0].Tax=0;n.deviceNewOrderInformation.LineItems[0].Tax=0;n.deviceNewOrderInformation.LineItems[0].Price=0;n.deviceNewOrderInformation.Payments[0].Amount=0;n.deviceNewOrderInformation.LineItems[0].Sku=null;n.deviceNewOrderInformation.Shipments[0].Sku=null;n.paymentCardNumber=null;n.deviceNewOrderInformation.LineItems[0].ProblemCode=null;n.deviceAccessoryShippingOffers=null;n.deviceAccessoryOffers=null;n.paymentInformation=null})};n.toggleAddPaymentInstrument=function(){var t,i;n.showAddPaymentInstrument=!0;t=n.getUpdatedPcsIframePath(a.CommercePlatformConfig.PcsIFrameUrlFormat);t=n.getUpdatedPcsIframePath(t);n.pcsIframePath=e.trustAsResourceUrl(t);i=$("#device-center-pcs-iframe");i.show();i.attr("src",n.pcsIframePath);n.iFrameSuccessMessage=""};n.getUpdatedPcsIframePath=function(n){var t=n.replace(/hostUrlToReplace/g,r.host());return t.replace(/cpLocaleToReplace/g,y.langLocale())};n.BacktoDevicePage=function(){n.createorderSteps(0,0)};n.openGavModal=function(){n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country==g&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Address1+=" "+n.deviceSpecialAddress.HouseNumber,n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Address2=n.deviceSpecialAddress.Neighbourhood+" "+n.deviceSpecialAddress.Complement);var t={Address1:n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Address1,Address2:n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Address2,City:n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.City,StateOrProvince:n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.StateOrProvince,PostalCode:n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.PostalCode,CountryCode:n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country},i=u.open({templateUrl:"/PartialViews/Devices/GavModal.html",controller:"DevicesModalController",windowClass:"device-modal-seeall",resolve:{currentDevice:function(){return t}}});i.result.then(function(t){n.selectedGavAddressValue=t;n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Address1=t.Address1;n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Address2=t.Address2;n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.City=t.City;n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.State=t.State;t.State==null&&(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.State=t.StateOrProvince);n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.PostalCode=t.PostalCode;n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country=t.CountryCode;n.deviceNewOrderInformation.LineItems[0].ItemAttributes==b?n.pid.pidValue.length>0?n.verifyPidData():n.getAccessoryFulfillmentOffers(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country,n.deviceNewOrderInformation.Brand,n.deviceNewOrderInformation.LineItems[0].DeviceKey.Key,n.deviceNewOrderInformation.LineItems[0].ProblemCode,n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.PostalCode):n.getDeviceRepairOffers(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country,n.deviceNewOrderInformation.Brand,n.deviceNewOrderInformation.LineItems[0].DeviceKey.Key,n.deviceNewOrderInformation.LineItems[0].ProblemCode,n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.PostalCode,n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.State);n.wicSelectedState=n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.State;n.createorderSteps(1,2)})};n.createorderSteps=function(t,i){n.createOrderErrorMessage=null;n.showWicLocations=!1;n.currentCreateOrderStep=i;t==3&&(n.showAddPaymentInstrument=!1,n.getPaymentsList());t==5&&i==4&&n.deviceNewOrderInformation.LineItems[0].Price==0&&n.deviceNewOrderInformation.Shipments[0].Price==0&&(n.currentCreateOrderStep=3);t==3&&i==4&&n.ChargebackFee==0&&n.deviceNewOrderInformation.LineItems[0].Price==0&&n.deviceNewOrderInformation.Shipments[0].Price==0&&(n.currentCreateOrderStep=5);(t==3&&i==2||t==1&&i==2)&&(n.deviceNewOrderInformation.LineItems[0].Sku=null);(t==4&&i==3||t==2&&i==3)&&(n.deviceNewOrderInformation.Shipments[0].Sku=null);(t==5&&i==4||t==3&&i==4)&&(n.paymentCardNumber=null)};n.allDevicesList=function(t){h.getHardwareForUser().then(function(i){i.Message&&i.Message.length>0&&(n.createOrderErrorMessage=i.Message);n.myDevicesList=i;for(var r=0;r<n.myDevicesList.length;r++)n.myDevicesList[r].SerialNumber===t&&(n.currentDevice=n.myDevicesList[r],n.deviceNewOrderInformation.LineItems[0].DeviceKey.Key=n.currentDevice.DeviceType+":"+n.currentDevice.SerialNumber,n.deviceNewOrderInformation.LineItems[0].DeviceKey.Type=n.currentDevice.ProductSku,n.deviceNewOrderInformation.Brand=n.currentDevice.Brand,n.getProblemTypesDescriptionList(n.currentDevice.ProductSku),n.cannotCreateOrderHelpLink=n.getProductHelpLink(n.currentDevice.Brand),n.getAccessoriesList(n.currentDevice.ProductSku),n.orderRefresh(n.currentDevice.DeviceType+":"+n.currentDevice.SerialNumber),n.selectDevice(n.currentDevice.DeviceType+":"+n.currentDevice.SerialNumber))})};n.getProductHelpLink=function(t){for(var i=0;i<n.ordersView.orderResources.productHelpLinks.length;i++)if(n.ordersView.orderResources.productHelpLinks[i].product==t)return n.ordersView.orderResources.productHelpLinks[i].helpUrl;return null};n.selectDevice=function(t){h.getHardwareWarranty(t).then(function(t){t.Message&&t.Message.length>0&&(n.createOrderErrorMessage=t.Message);n.currentDeviceWarranty=t})};n.orderRefresh=function(t){n.userSignedIn&&c.getOrderForDevice(t).then(function(t){if(t.Message&&t.Message.length>0)n.createOrderErrorMessage=t.Message;else{var r=[];for(i=0;i<t.length;i++)r=[],n.deviceOrderDetails=t[i],n.deviceOrderDetails.LineItems[0].Status!=ot&&(n.deviceOrderDetails&&n.deviceActiveOrderSummary.push(n.deviceOrderDetails),(t[i].LineItems[0].ItemAttributes==k||t[i].LineItems[0].ItemAttributes==d)&&(n.isOpenDeviceRepairOrder=!0),t[i].LineItems[0].ItemAttributes==b&&(n.isOpenAccessoryRepairOrder=!0))}n.serviceOrderComplete=!0;n.problemTypeDevice=n.isOpenDeviceRepairOrder==!0?n.ordersView.deviceProblemList.accessories:n.ordersView.deviceProblemList.hardwareAndDrivers;n.changeproductType(n.problemTypeDevice)})};a.authInfo.authStatus()==1&&(n.userSignedIn=!0);n.changeProblemTypes=function(t){if(n.descriptionMandatory=!1,n.canCreateOrder=!0,n.showPIDInfo=!1,n.xboxController=!1,n.xboxHeadset=!1,t.RequiresAssistance==!0){n.canCreateOrder=!1;return}n.deviceNewOrderInformation.LineItems[0].ItemAttributes==b?(t.Identifier!=null&&t.Identifier.ImageUrl!=""&&(n.showPIDInfo=!0),(t.AccessorySku==rt||t.AccessorySku==ut)&&(n.xboxController=!0),(t.AccessorySku==ft||t.AccessorySku==et)&&(n.xboxHeadset=!0),n.deviceNewOrderInformation.LineItems[0].ProblemCode=t.AccessorySku,n.deviceOrderConfirmation.ProblemName=t.Name):(t.Name==st&&(n.descriptionMandatory=!0),n.deviceNewOrderInformation.LineItems[0].ProblemCode=t.ProblemTypeId,n.deviceOrderConfirmation.ProblemName=t.Name)};n.canCancelOrder=function(t){return c.isStandardExchangeOrder(t)&&c.shippingEventRecieved(t,n.ordersView.orderResources)?!0:!1};n.shippingAddressComplete=function(){var t=n.deviceNewOrderInformation.Shipments[0].ShipTo;return t.CustomerName.First&&t.CustomerName.Last&&t.CustomerAddress.Address1&&(t.CustomerAddress.PostalCode||n.hideZipcodeStatus)&&(t.CustomerAddress.City||n.hideCityStatus)&&(t.CustomerAddress.StateOrProvince||n.hideStateStatus)&&t.CustomerAddress.Country&&t.PhoneNumber.Number&&t.Email?!1:!0};n.canPrintShippingLabel=function(t){return c.isStandardExchangeOrder(t)&&c.shippingEventRecieved(t,n.ordersView.orderResources)&&c.hasSupportedShipCode(t,n.ordersView.orderResources)||c.isSelfPrintLabelOrder(t)?!0:!1};n.$on("UserSignedIn",function(){n.userSignedIn=!0});n.cancelServiceOrder=function(t){var i=u.open({templateUrl:"/PartialViews/Devices/CancelRepairOrderModal.html",controller:"DevicesModalController",windowClass:"device-modal-seeall",resolve:{currentDevice:function(){return{incidentNumber:t,hardwareId:n.userProfileInformation[0].HardwareCustomerId}}}});i.result.then(function(){n.orderRefresh(f.deviceId)})};n.Signin=function(){t.location.href=v.getUpdatedAuthenticationUrl(!0,!1)};n.$on("UserSignedOut",function(){n.userSignedIn=!1});n.processCreateorder=function(){n.deviceNewOrderInformation.LineItems[0].ItemAttributes==b&&(n.deviceNewOrderInformation.LineItems[0].ProblemCode="");n.deviceNewOrderInformation.OrderOperation=null;n.createOrderProcessCompleted=!1;c.createNewOrder(n.deviceNewOrderInformation).then(function(t){if(n.createOrderProcessCompleted=!0,t.Message&&t.Message.length>0){n.createOrderErrorMessage=t.Message;return}n.orderResponseObject=t;n.currentCreateOrderStep=6})};n.updateStateList=function(){n.devicesView&&n.devicesView.geographiesXml&&(n.selectedCountryInformation=s.getCountryInfo(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country,n.devicesView.geographiesXml),n.selectedCountryShortCode=n.selectedCountryInformation.ISOCountryShortCode,n.statesList=s.getStates(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country,n.devicesView.geographiesXml))};n.hideState=function(t){return(n.hideStateStatus=!1,s.isStateRequired(t,n.devicesView.geographiesXml))?!1:(n.hideStateStatus=!0,n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.StateOrProvince=null,n.wicSelectedState=null,!0)};n.verifyPidData=function(){h.getAccessoryWarranty(n.currentDevice.Brand,n.deviceOrderConfirmation.ProblemName,n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country,n.pid.pidValue).then(function(t){n.accessorywarrantyInformation=t;n.pidWarrantyStartDate=t[0].StartDate;n.pidWarrantyEndDate=t[0].EndDate;n.getAccessoryFulfillmentOffers(n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.Country,n.deviceNewOrderInformation.Brand,n.deviceNewOrderInformation.LineItems[0].DeviceKey.Key,n.deviceNewOrderInformation.LineItems[0].ProblemCode,n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.PostalCode)})};n.hideCity=function(t){return(n.hideCityStatus=!1,s.isCityRequired(t,n.devicesView.geographiesXml))?!1:(n.hideCityStatus=!0,n.deviceNewOrderInformation.Shipments[0].ShipTo.CustomerAddress.City=null,!0)};n.hideZipcode=function(t){return(n.hideZipcodeStatus=!1,s.isZipcodeRequired(t,n.devicesView.geographiesXml))?!1:(n.hideZipcodeStatus=!0,!0)};n.showBrazilData=function(n){return n!=g?!1:!0};o.$on("AddPaymentCPStatusError",function(){var i=$("#device-center-pcs-iframe"),t;i.hide();n.iFrameSuccessMessage=n.ordersView.failedToAddCard;t=n.getUpdatedPcsIframePath(a.CommercePlatformConfig.PcsIFrameUrlFormat);t=n.getUpdatedPcsIframePath(t);n.pcsIframePath=e.trustAsResourceUrl(t)});o.$on("AddPaymentCPStatusCancel",function(){var i=$("#device-center-pcs-iframe"),t;i.hide();n.iFrameSuccessMessage=n.ordersView.canceledAddingNewCard;t=n.getUpdatedPcsIframePath(a.CommercePlatformConfig.PcsIFrameUrlFormat);t=n.getUpdatedPcsIframePath(t);n.pcsIframePath=e.trustAsResourceUrl(t)});o.$on("AddPaymentCPStatusSuccess",function(){var t=$("#device-center-pcs-iframe");t.hide();n.iFrameSuccessMessage="**Added new card Successfully..!";n.getPaymentsList()});n.$on("CompassContentReady",function(){var t=p.getDevicesView(),i;t&&(n.devicesView=t);i=p.getOrdersView();i&&(n.ordersView=i);t&&t.geographiesXml&&(n.countriesListForRegistration=s.getCountries(t.geographiesXml,"register",n.ordersView.orderResources),n.countriesListForOrder=s.getCountries(t.geographiesXml,"order",n.ordersView.orderResources))});n.reset()}}])}(angular.module(microsoft.support.moduleName)),function(n){n.factory("devicesErrorInterceptor",["$rootScope","$q",function(n,t){var i={},r=[/api\/devices\/Orders/i,/api\/devices\/ProblemTypes/i,/api\/devices\/Accessories/i,/api\/devices\/RepairOffers/i,/api\/devices\/WicLocations/i,/api\/devices\/RepairShippingOffers/i,/api\/devices\/FulfillmentShippingOffers/i,/api\/devices\/AccessoryFulfillmentOffers/i,/api\/devices\/PaymentInstruments/i,/api\/devices\/VerifyAddress/i,/api\/devices\/CreateOrder/i,/api\/devices\/CancelOrder/i,/api\/devices\/CalculateTax/i,/api\/devices\/hardware/i,/api\/devices\/HardwareWarranty/i,/api\/devices\/UnregisterHardware/i,/api\/devices\/RegisterHardware/i,/api\/devices\/Profiles/];return i.response=function(n){var i=r.filter(function(t){return n&&n.config&&n.config.url.match(t)!==null}).length>0;return i&&n&&n.data&&n.data.Message&&n.data.Message.indexOf("Error Code")>-1?t.reject(n):n},i}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("DevicesModalController",["$scope","$modal","$location","$modalInstance","$window","languageService","hardwareService","orderService","currentDevice","geographyService","compassService",function(n,t,i,r,u,f,e,o,s,h,c){if(n.currentDevice=s,n.chkAcceptTerms=!1,n.registerDeviceInProgress=!1,n&&n.ordersView)var a=n.ordersView.countryIsRequired,l=n.ordersView.invalidSerialNumber;n.init=function(){var t=c.getDevicesView(),i,r;t&&(n.devicesView=t);i=c.getOrdersView();i&&(n.ordersView=i);r=c.getDeviceRegistrationView();r&&(n.deviceRegistrationView=r);n.countriesListForRegistration=h.getCountries(t.geographiesXml,"register",n.ordersView.orderResources);e.getHardwareForUser().then(function(t){n.myDevicesList=t});n.getGAVSuggestions=function(){n.userEnteredAddress=n.currentDevice;o.getAddressSuggestions(n.userEnteredAddress.Address1,n.userEnteredAddress.Address2,n.userEnteredAddress.City,n.userEnteredAddress.StateOrProvince,n.userEnteredAddress.PostalCode,n.userEnteredAddress.CountryCode).then(function(t){n.addressValidation=t})}};n.productFamiliesList=function(){for(var i=[],r=n.deviceRegistrationView.serialNumberImages,t=0;t<r.length;t++)i.indexOf(r[t].productFamily)>-1||i.push(r[t].productFamily);return i};n.deviceTypeList=function(t){for(var u=[],r=n.deviceRegistrationView.serialNumberImages,i=0;i<r.length;i++)r[i].productFamily!=t||u.indexOf(r[i].productSku)>-1||u.push(r[i].productSku);return u};n.getSerialNumberImage=function(t,i){for(var u=n.deviceRegistrationView.serialNumberImages,r=0;r<u.length;r++)if(u[r].productFamily==t&&u[r].productSku==i)return u[r].serialNumberImage.url;return null};n.cancel=function(){r.dismiss("cancel")};n.openUnregisterModal=function(i){var r=t.open({templateUrl:"/PartialViews/Devices/UnregisterDeviceModal.html",controller:"DevicesModalController",windowClass:"device-modal-window",resolve:{currentDevice:function(){return i}}});r.result.then(function(){n.init()})};n.closeAbortRepairOrder=function(){r.close()};n.closeCancelRepairOrder=function(t){n.cancelServiceOrderDetails=o.getDeviceCancelOrder();n.registerDeviceInProgress=!0;n.cancelServiceOrderDetails.IncidentNumber=t.incidentNumber;n.cancelServiceOrderDetails.HardwareCustomerId=t.hardwareId;o.cancelOrder(n.cancelServiceOrderDetails).then(function(t){if(n.registerDeviceInProgress=!1,t.Message&&t.Message.length>0){n.cancelOrderErrorMessage=t.Message;return}n.cancelOrderStatus=t;r.close()})};n.closeGavModal=function(){r.close(n.selectedAddress)};n.selectGavAddress=function(t){n.selectedAddress=t};n.unregisterDevice=function(t,i){n.registerDeviceInProgress=!0;e.unregisterHardwareForUser(t,i).then(function(t){if(n.registerDeviceInProgress=!1,t.Message&&t.Message.length>0){n.unregisterErrorMessage=t.Message;return}n.unRegisterStatus=t;r.close()})};n.registerDevice=function(){if(n.selectedCountryName)n.showCountryRequired=!1;else{n.showCountryRequired=!0;n.txtCountryRequired=a;return}if(n.registerSerialNumber)n.showInvalidSerialNumber=!1;else{n.showInvalidSerialNumber=!0;n.invalidSerialNumber=l;return}if(n.chkAcceptTerms)n.chkAcceptTermsAlert=!1;else{n.chkAcceptTermsAlert=!0;return}registerSerialNumber=n.registerSerialNumber;countryName=n.selectedCountryName;brand=n.selectedProductFamily;n.registerDeviceInProgress=!0;e.registerHardwareForUser(registerSerialNumber,countryName,brand).then(function(t){if(n.registerDeviceInProgress=!1,n.registerDeviceStatus=t,t.Message&&t.Message.length>0){n.showInvalidSerialNumber=!0;n.registerErrorMessage=t.Message;return}n.deviceRegistered=!1;r.close()},function(){n.registerErrorMessage=l})};n.SelectDevice=function(n){r.close();i.path("/"+f.langLocale().toLowerCase()+"/products/"+n.Brand+"/")};n.helpFindSerialNumber=function(){n.selectedProductFamily=="Phones"?u.open(n.deviceRegistrationView.lumiaSerialNumberLink.linkUrl,"_blank"):n.deviceRegistered=!n.deviceRegistered};n.init()}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("geographyService",["clientConfig",function(){function n(n,t){for(var i,r=0;r<t.xmlDocument.Geographies.Geography.length;r++)if(i=t.xmlDocument.Geographies.Geography[r],i.ISOType=="country"&&i.ISOCode==n)return i;return null}function t(n,t){for(var i,r=0;r<t.xmlDocument.Geographies.Geography.length;r++)if(i=t.xmlDocument.Geographies.Geography[r],i.ISOType=="country"&&i.ISOCode==n)return i.ISOCountryNumber;return null}this.getCountries=function(n,t,i){for(var e=[],r,u,f=0;f<n.xmlDocument.Geographies.Geography.length;f++)r=n.xmlDocument.Geographies.Geography[f],r.ISOType=="country"&&(u={},u.code=r.ISOCode,u.name=r.ISOName,u.shortCode=r.ISOCountryShortCode,(t!="order"||i.supportedCountries.indexOf(r.ISOCountryShortCode)>-1)&&e.push(u));return e};this.getStates=function(n,i){for(var o=["state","union territories","province","metropolitan city","capital metropolitan city","city","territory","federal lander","district","region","department","federal district","administrative unit","counsel area","municipality","autonomous Geography","capital district","county","metropolitan department","metropolitan region","overseas territory","overseas region/department","territorial collective","lander","administrative region","special administrative region","city of county right","parish","prefecture","commune","local council","special territory","indigenous region","capital","constitutional province","autonomous region","republic","autonomous district","administrative territory","autonomous city","autonomous community","major north african location","canton","emirate","district counsel area","unitary authority","counsel area","federal dependency"],e=[],r,u,s=t(n,i),f=0;f<i.xmlDocument.Geographies.Geography.length;f++)r=i.xmlDocument.Geographies.Geography[f],parseInt(r.ISOCountryNumber,10)==parseInt(s,10)&&o.indexOf(r.ISOType)>-1&&r.ISOName&&(u={},u.code=r.ISOCode,u.name=r.ISOName,e.push(u));return e};this.isCityRequired=function(t,i){var r=n(t,i);return r&&r["@displayCity"]&&r["@displayCity"]=="false"?!1:!0};this.isStateRequired=function(t,i){var r=n(t,i);return r&&r["@displayState"]&&r["@displayState"]=="false"?!1:!0};this.isZipcodeRequired=function(t,i){var r=n(t,i);return r&&(r["@displayZipcode"]&&r["@displayZipcode"]=="false"||r["@optionalZipcode"]&&r["@optionalZipcode"]=="true")?!1:!0};this.getCountryInfo=function(t,i){return n(t,i)}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("getShippingLabel",["$window","orderService",function(n,t){return{restrict:"A",link:function(i){i.openShippingLabelWindow=function(i,r){var f=t.getShippingLabel(i),e="<title>"+r+'<\/title> <embed style="height:100%; width:100%;" type="application/pdf" src="data:application/pdf,'+f+'">',u=n.open("","shippingLabel","locationbar=no,scrollbars=yes,menubar=yes,resizable");u.document.write(e);u.document.close()}}}}]),function(n){n.service("hardwareService",["$http","$q","$log","clientConfig","qosTelemetryService",function(n){function i(n){return n.data}function t(n){var t=n.data;return t.Message&&(t.Message=t.Message.slice(t.Message.indexOf(r),t.Message.indexOf(u))),t}function f(n){var t=n.data;return t!=null&&t.forEach(function(n){var t,u;if(n!=null){var i=new Date(n.EndDate),f=new Date(n.StartDate),r=i-(new Date).getTime();r<=0?(n.RemainingYears=0,n.RemainingMonths=0):(t=Math.round(r/864e5),n.RemainingYears=i.getFullYear()-f.getFullYear(),n.RemainingMonths=t/30,n.RemainingDays=t,u=100-n.RemainingMonths*100/12,n.progressPercentage="width: "+u+"%")}}),t}var r="Error Message:",u=", StackTrace";this.getHardwareForUser=function(){var r={params:{dateParam:(new Date).getTime()}};return n.get("/api/devices/hardware/",r).then(i,t)};this.getHardwareWarranty=function(i){var r={params:{serialNumber:i,country:"USA"}};return n.get("/api/devices/HardwareWarranty/",r).then(f,t)};this.getAccessoryWarranty=function(r,u,f,e){var o={params:{brand:r,accessoryType:u,country:f,serialNumber:e}};return n.get("/api/devices/AccessoryWarranty/",o).then(i,t)};this.unregisterHardwareForUser=function(r,u){var f={params:{serialNumber:r,country:u}};return n.delete("/api/devices/UnregisterHardware/",f).then(i,t)};this.registerHardwareForUser=function(r,u,f){var e={params:{serialNumber:r,country:u,brand:f}};return n.put("/api/devices/RegisterHardware/",e.params).then(i,t)}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("orderService",["$http",function(n){function t(n){return n.data}function i(n){var t=n.data;return t.Message&&(t.Message=t.Message.slice(t.Message.indexOf(s),t.Message.indexOf(h))),t}var r="Indeterminate",f="CancelOrder",e="NC",o="NotSubmitted",u="00000000-0000-0000-0000-000000000000",s="Error Message:",h=", StackTrace";this.getOrderForDevice=function(r){var u={params:{serialNumber:r}};return n.get("/api/devices/Orders/",u).then(t,i)};this.getDeviceCancelOrder=function(){var n={};return n.IncidentNumber="",n.HardwareCustomerId="",n.SerialNumber="",n.Puid="",n.Brand="",n.Name=null,n.DisplayName=null,n.OrderStatus=r,n.Indeterminate="",n.Currency=null,n.Date=new Date,n.LastModified=new Date,n.ModifiedBy=null,n.TradeScreened=!1,n.DataCenter=null,n.Number=null,n.LineItems=[],n.Shipments=[],n.Payments=[],n.Receipt=null,n.OrderSequence=null,n.ShippLabel=null,n.OrderOperation=f,n};this.getWicLocationInformation=function(){var n={};return n.AddressLine1="",n.AddressLine2="",n.CenterID="",n.City="",n.Country="",n.District="",n.EmailAddress="",n.HoursOfOperation="",n.Locale="",n.LocationId="",n.LocationType="",n.PhoneNumber="",n.State="",n.ZipCode="",n};this.getNewDeviceOrder=function(){var n={};return n.IncidentNumber="",n.HardwareCustomerId="",n.SerialNumber="",n.Puid="",n.CpfId="",n.Brand="",n.Name=null,n.DisplayName=null,n.OrderStatus=r,n.Currency=null,n.Date=new Date,n.LastModified=new Date,n.ModifiedBy=null,n.TradeScreened=!1,n.DataCenter=null,n.Number=null,n.LineItems=[],n.LineItems.push({Description:null,Comments:null,Number:0,EstimatedCompletion:null,Sku:null,VirtualSku:null,Status:null,Price:0,Tax:0,ItemAttributes:null,DeviceKey:{Key:null,Type:null},ServiceContract:null,ProofOfPurchaseId:u,ReturnedDeviceKey:null,ProblemCode:null,ServiceCenter:null,ServiceDisposition:null,SerialNumberUnreadable:!1}),n.Shipments=[],n.Shipments.push({Description:null,SpecialInstructions:null,Carrier:{ShipmentMethod:null,TrackingUrl:null,AirWaybillNumber:null,Name:null,TrackingNumber:null},ShipTo:{CustomerName:{Honorific:null,First:null,Middle:null,Last:null,GenerationalTitle:null,Suffix:null},CustomerAddress:{Address1:"",Address2:"",Address3:null,City:null,StateOrProvince:null,StateId:null,PostalCode:null,Country:null,CountryCode:null,CountryName:null,ExtendedPostalCode:null,ISO2CountryCode:null,Region:null,RegionCode:null,RegionName:null,RegionType:null,State:null,CountryNumber:null,ISO2RegionCode:null},PhoneNumber:{CountryCode:null,AreaCode:null,Number:null,Extension:null},Email:[]},LineItemRef:null,Sku:null,Id:u,VirtualSku:null,Status:null,Price:0,Tax:0}),n.Payments=[],n.Payments.push({BillTo:null,Tax:0,Amount:0,PaymentStatus:o,PaymentOption:null,TransactionNumber:null,InstrumentId:null,Gateway:e,AccountId:null,Date:new Date}),n.PageIndex="0",n.Receipt=null,n.OrderSequence=null,n.ShippLabel=null,n.OrderOperation=null,n};this.getHardwareProblemTypes=function(r){var u={params:{productSku:r}};return n.get("/api/devices/ProblemTypes/",u).then(t,i)};this.getHardwaregetAccessories=function(r){var u={params:{productSku:r}};return n.get("/api/devices/Accessories/",u).then(t,i)};this.getHardwareRepiarOffers=function(r,u,f,e,o,s){var h={params:{country:r,brand:u,serialNumber:f,problemCode:e,postalCode:o,state:s}};return n.get("/api/devices/RepairOffers/",h).then(t,i)};this.getHardwareWicLocations=function(r){var u={params:{country:r}};return n.get("/api/devices/WicLocations/",u).then(t,i)};this.getHardwareShippingOffers=function(r,u,f,e,o,s){var h={params:{country:r,brand:u,serialNumber:f,problemCode:e,postalCode:o,offersku:s}};return n.get("/api/devices/RepairShippingOffers/",h).then(t,i)};this.getHardwareFulfillmentShippingOffers=function(r,u,f,e,o,s){var h={params:{country:r,brand:u,serialNumber:f,accessoryType:e,postalCode:o,offersku:s}};return n.get("/api/devices/FulfillmentShippingOffers/",h).then(t,i)};this.getHardwareAccessoryFulfillmentOffers=function(r,u,f,e,o,s,h){var c={params:{country:r,brand:u,serialNumber:f,accessoryType:e,postalCode:o,startDate:s,endDate:h}};return n.get("/api/devices/AccessoryFulfillmentOffers/",c).then(t,i)};this.getCommercePayments=function(r){var u={params:{countryCode:r}};return n.get("/api/devices/PaymentInstruments/",u).then(t,i)};this.getAddressSuggestions=function(r,u,f,e,o,s){var h={params:{address1:r,address2:u,city:f,stateOrProvince:e,postalCode:o,country:s}};return n.get("/api/devices/VerifyAddress/",h).then(t,i)};this.createNewOrder=function(r){return n({url:"/api/devices/CreateOrder/",method:"POST",data:{request:JSON.stringify(r)}}).then(t,i)};this.cancelOrder=function(r){var u={params:{request:JSON.stringify(r)}};return n.put("/api/devices/CancelOrder/",u.params).then(t,i)};this.calculateTax=function(r){var u={params:{request:JSON.stringify(r)}};return n.put("/api/devices/CalculateTax/",u.params).then(t,i)};this.getShippingLabel=function(n){if(n&&n.ShippLabel&&n.ShippLabel.Label)return escape(atob(n.ShippLabel.Label))};this.hasSupportedShipCode=function(n){return["OSI","OSX","SOI","POI"].indexOf(n.Shipments[0].VirtualSku)>-1};this.shippingEventRecieved=function(n){return["InitiateRepairOrder","OrderSubmitted","PackingMaterialinTransit","PackingMaterialShipped","PackingMaterial"].indexOf(n.LineItems[0].Status)>-1};this.isStandardExchangeOrder=function(n){return n.LineItems[0].ItemAttributes=="Repair"?!0:!1};this.isSelfPrintLabelOrder=function(n){return n.Shipments[0].Description=="Self-Print Label"?!0:!1}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("profileService",["$http",function(n){function t(n){return n.data}this.getUserHardwareProfile=function(){return n.get("/api/devices/Profiles/").then(t)}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("showdevices",["$rootScope","$modal","$location","$route","$routeParams","languageService","clientConfig","hardwareService","authenticationHelperService",function(n,t,i,r,u,f,e,o,s){return{restrict:"A",templateUrl:"/PartialViews/Devices/ShowDevices.html",link:function(h,c,l){h.devicesRefresh=function(){o.getHardwareForUser().then(function(n){if(n.Message&&n.Message.length>0){h.getDevicesErrorMessage=n.Message;return}h.myDevicesList=n})};h.openUnregisterModal=function(n){var i=t.open({templateUrl:"/PartialViews/Devices/UnregisterDeviceModal.html",controller:"DevicesModalController",windowClass:"device-modal-window",resolve:{currentDevice:function(){return n}}});i.result.then(function(){h.devicesRefresh()})};h.openRegisterModal=function(){var n="RegisterDevice",i=t.open({templateUrl:"/PartialViews/Devices/RegisterDeviceModal.html",controller:"DevicesModalController",windowClass:"device-modal-window",resolve:{currentDevice:function(){return n}}});i.result.then(function(){h.devicesRefresh()})};h.signInUrl=s.getUpdatedAuthenticationUrl(!0,!1);n.$on("UserSignedIn",function(){h.userSignedIn=!0;h.devicesRefresh()});n.$on("UserSignedOut",function(){h.userSignedIn=!1});e.authInfo.authStatus()==1&&(h.userSignedIn=!0,h.devicesRefresh());h.reset=function(){h.userSignedIn&&u.deviceId!=null&&h.SelectDevice(u.deviceId)};h.SelectDevice=function(n){var t=r.current.$$route.originalPath;t.match("/devices")?i.path("/devices/"+n.SerialNumber+"/"):i.path("/"+f.langLocale().toLowerCase()+"/products/"+n.Brand+"/")};l.devicesperpage&&(h.devicesPageLimit=l.devicesperpage);h.reset()}}}]),function(n){n.controller("LifecycleController",["$scope","compassService","compassFormatFilter",function(n,t,i){function r(){var r=t.getlifecycleHomepageView();n.categories=r.lifecycleTopics;n.categoryParam=r.lifecycleTopics[0].sectionId;r.lifecycleTopicsTitle=r.lifecycleTopicsTitle;r.policyDisclaimerText=i(r.heroSection.policyDisclaimerStatementFormat,{"policy-disclaimer-link-html":i(r.heroSection.policyDisclaimerAnchorFormat,{"policy-disclaimer-url":r.heroSection.policyDisclaimerLink})});n.homePageView=r}n.$on("CompassContentReady",function(){r()})}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("LifecycleSearchController",["$scope","$rootScope","$q","$filter","$location","compassService","compassFormatFilter","lifecycleService",function(n,t,i,r,u,f,e,o){function h(t){!n.serviceRequestFailedOrTimedOut&&t&&(t.length>0?(n.searchResults=t,n.sortByProperty="name",n.sortReverse=!1,n.searchPageView&&n.searchPageView.gridSectionTitle&&(n.searchPageView.gridSectionTitleFormatedValue=e(n.searchPageView.gridSectionTitle,{searchTerm:n.searchCriteria.searchTerm})),n.displayNoResultsMessage=!1):(n.displayNoResultsMessage=!0,n.searchFailoverMessage=n.searchPageView.noResultsFound))}function c(){n.searchFailoverMessage=n.searchPageView.serviceCallFailureMessage;n.serviceRequestFailedOrTimedOut=!0}function l(t){var i=[],u;return n.products&&t&&(t=t.trim(),u=t.split(/[\s]+/),angular.forEach(n.products,function(n){var r,f,t,e;if(n.Name){for(r=n.Name,f=!0,t=0;t<u.length;t++)if(e=new RegExp("("+u[t]+")","i"),e.test(r))r=r.replace(u[t],"");else{f=!1;break}f&&i.push(n)}})),i=r("limitTo")(i,10),{suggestions:i}}function a(){o.getProductsList().then(function(t){s.resolve();n.products=t},function(n){s.reject();c(n)})}var s=i.defer();n.search=function(){n.searchResults=[];n.serviceRequestFailedOrTimedOut=!1;n.displayNoResultsMessage=!1;n.searchRequest=n.searchCriteria.gdsId?o.getProductsLifecycleForGdsId(n.searchCriteria.gdsId).then(h,searchRequestFailed):o.getProductsLifecycle(n.searchCriteria.searchTerm,n.searchCriteria.selectedTimeRange.configValue).then(h,c)};n.getCompleteText=function(n){return n.Name};n.getSuggestions=function(t){var r=i.defer();return t?n.products!=undefined?r.resolve(l(t)):s.promise.then(function(){r.resolve(l(t))}):r.reject("empty query"),r.promise};n.generateSuggestionHtml=function(n,t){if(n!=undefined&&t!=undefined){if(!n.length)return t;var i=new RegExp("("+n+")","i");return t.replace(i,"<b>"+n+"<\/b>")}return""};n.export=function(){};n.reset=function(){n.waitingOnCompass=!0;n.searchResults=[];n.searchCriteria={};n.searchPageView={};n.displayNoResultsMessage=!1;n.serviceRequestFailedOrTimedOut=!1;n.alphaQueryParam=u.search().alpha;n.c1LevelProductQueryParam=u.search().c1;n.p1LevelProductQueryParam=u.search().p1;var t=!1;n.alphaQueryParam&&(n.searchCriteria.searchTerm=n.alphaQueryParam,t=!0);n.c1LevelProductQueryParam?(n.searchCriteria.gdsId=n.c1LevelProductQueryParam,t=!0):n.p1LevelProductQueryParam&&(n.searchCriteria.gdsId=n.p1LevelProductQueryParam,t=!0);a();f.getlifecycleSearchPageView().then(function(i){n.searchPageView=i;n.searchPageView&&(n.waitingOnCompass=!1,n.searchCriteria.selectedTimeRange=n.searchPageView.selectTimeRangeCriteriaValues[0],t&&n.search())})};n.sortBy=function(t){n.sortReverse=t!==null&&n.sortByProperty===t?!n.sortReverse:!1;n.sortByProperty=t};n.$on("LifecycleSearchPageLoadTimeout",function(){t.$broadcast("500Error",{reason:"Timeout occurred on a lifecycle search page",data:{}})});n.$on("LifecycleSearchRequestTimeout",function(){searchRequestFailed()})}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("lifecycleService",["$http",function(n){this.getProductsLifecycle=function(t,i){t||(t="");i||(i="");var r="/api/lifecycle/GetProductsLifecycle?productNames="+t+"&years="+i;return n.get(r).then(function(n){return n.data})};this.getProductsLifecycleForGdsId=function(t){var i="/api/lifecycle/GetProductsLifecycleByGdsId?gdsId="+t;return n.get(i).then(function(n){return n.data})};this.getProductsList=function(){return n.get("/api/lifecycle/GetProductsList").then(function(n){return n.data})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("flightService",["$cookies",function(n){var t={flightCookie:"smc_f",flightSeparator:"|"};this.isUserInFlight=function(i,r){var u,f;return n&&typeof n.get(t.flightCookie)=="string"&&(r||typeof i=="string")?(u=n.get(t.flightCookie).toLowerCase(),f=u.split(t.flightSeparator),f.some(function(n){return r?n.match(new RegExp(i)):n.toLowerCase()===i.toLowerCase()})):!1};this.isUserInAnyFlight=function(n){var t=this;return n.some(function(n){return t.isUserInFlight(n)})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("FreController",["$scope","$route","$rootScope","$location","$routeParams","compassService",function(n,t,i,r,u,f){n.reset=function(){f.getFrePage(u.productId).then(function(t){n.fre=t})};n.reset()}])}(angular.module(microsoft.support.moduleName));app.controller("GenericArticleController",["$scope","$routeParams","$location","contentApiService",function(n,t,i,r){n.reset=function(){t.articleId!=null&&r.getGenericArticle(t.articleId,i.search()).then(function(t){n.article=t.data;n.article&&n.article.details&&n.article.details.noIndex&&$rootScope.$broadcast("NoIndex")})};n.reset()}]),function(n){n.controller("GwtController",["$rootScope","$scope","$location","$routeParams","gwtService",function(n,t,i,r,u){t.reset=function(){r.articleId!=null&&u.getGwtArticle(r.articleId,i.search()).then(function(i){t.article=i.data;t.article&&t.article.details&&t.article.details.noIndex&&n.$broadcast("NoIndex")})};t.reset()}])}(angular.module(microsoft.support.moduleName));app.service("gwtService",["contentApiService",function(n){this.getGwtArticle=function(t,i){return n.getGwtArticle(t,i)}}]);app.directive("genericArticle",["compassService",function(n){return{restrict:"A",templateUrl:"/PartialViews/GenericArticle/Container.html",scope:{article:"="},link:function(t){var i="/PartialViews/GenericArticle/BasicArticle.html";t.getTemplateUrl=function(){if(t.article&&t.article.details&&t.article.details.subType)switch(t.article.details.subType){case"side-nav":return"/PartialViews/GenericArticle/SideNavArticle.html";case"kb":var r=n.getKbReferenceText();return r&&(t.kbReferenceText=r),"/PartialViews/GenericArticle/KBArticle.html";default:return i}else return i}}}}]);app.directive("gwt",[function(){return{restrict:"A",templateUrl:"/PartialViews/Gwt/Container.html",scope:{article:"=",container:"@?"},link:function(n){n.article&&n.article.panes&&(n.paneList=[n.article.panes[0]],n.paneContext=[])},controller:["$scope","$timeout","linkTaggingService","$document",function(n,t,i){this.appendPane=function(r,u,f){var e=this.getPane(u);e&&(r>0&&r<n.paneList.length&&(n.paneList=n.paneList.slice(0,r),n.paneContext=n.paneContext.slice(0,r-1)),n.paneList.push(e),n.paneContext.push(f),t(function(){var t="step-"+(n.paneContext.length+1)+"-pane-"+u;i.tagContainerLinks("[id="+t+"]");n.container&&$(n.container).animate({scrollTop:angular.element("#"+t).offset().top},"medium")}))};this.getPane=function(t){for(var i=0;i<n.article.panes.length;i++)if(t==n.article.panes[i].id)return n.article.panes[i];return null};n.$watch(function(){return n.article&&n.article.panes&&n.article.panes[0]},function(t,i){t!==i&&(n.paneList=[n.article.panes[0]],n.paneContext=[])});n.article.panes&&n.article.panes[0]&&t(function(){var r,t;for(i.tagContainerLinks("#step-1-pane-"+n.article.panes[0].id,"pane-"+n.article.panes[0].id),r=".gwt-all-panes-list #pane-",t=0;t<n.article.panes.length;t++)i.tagContainerLinks(r+(t+1),"pane-"+(t+1))},100)}]}}]);app.directive("gwtPane",[function(){return{require:"^gwt",restrict:"A",templateUrl:"/PartialViews/Gwt/Pane.html",transclude:!0,scope:{pane:"=",paneList:"=",paneContext:"=",stepIndex:"=",article:"=",preview:"=?"},link:function(n,t,i,r){n.state={};n.state.selectedAction="";n.actions=[];n.$watchCollection("paneList",function(){var i,t;if(n.stepIndex>=n.paneList.length-1&&(n.state.selectedAction=""),n.pane&&n.pane.actions)for(n.actions=[],i=0;i<n.pane.actions.length;i++)for(t=0;t<n.article.actions.length;t++)n.pane.actions[i]==n.article.actions[t].id&&n.actions.push(n.article.actions[t])});var u=n.preview?"":n.paneContext.slice(0,n.stepIndex).join(".");n.prevContext=u?"-context:"+u:"";n.getEndpoint=function(n){var t=n?r.getPane(n):null;return t?t.isEndpoint&&t.endpoint?"-endpoint:"+t.endpoint:"":""};n.appendPane=function(t,i,u){currentContext="s"+u+"p"+n.pane.id+"a"+i;r.appendPane(u,t,currentContext)}}}}]);app.controller("HelpArticleController",["$rootScope","$scope","$routeParams","$location","compassService","contentApiService","locationService",function(n,t,i,r,u,f,e){t.reset=function(){function o(n,t){return{name:n,content:t}}function c(){t.internalContentProperties={disclaimerCaption:"This is the caption",disclaimerHeader:"Microsoft Caption"}}t.isGwt=!1;t.isGenericArticle=!1;var s="eADQi",h="XVcnh";i.articleId!=null&&f.getHelpArticle(i.articleId,i.langLocale).then(function(f){var c,a,l;t.article=f;switch(t.article.details.type){case"gwt":t.isGwt=!0;break;case"article":t.isGenericArticle=!0}if(t.article&&t.article.details){if((t.article.details.noIndex||i.preview)&&n.$broadcast("NoIndex"),c=[],t.article.details.locale&&c.push(o("contentLocale",t.article.details.locale)),t.article.details.keywords&&(c.push(o("keywords",t.article.details.keywords.join(","))),c.push(o("search.keywords",t.article.details.keywords.join(",")))),t.article.details.description&&(c.push(o("description",t.article.details.description)),c.push(o("search.description",t.article.details.description))),t.article.details.pageCategory&&c.push(o("ms.pageGroupCategory",t.article.details.pageCategory)),t.article.details.products&&t.article.details.products.length>0){c.push(o("search.products",t.article.details.products.join(",")));c.push(o("ms.product",t.article.details.products.join(",")));for(a in t.article.details.products)u.getProduct(t.article.details.products[a]).then(function(t){var i=o("search.product",s+t.name+h);n.$broadcast("AddMetaTags",[i])})}t.article.details.os&&t.article.details.os.length>0&&(c.push(o("search.ossku",t.article.details.os.join(" "))),c.push(o("search.supportedos",t.article.details.os.join(" "))));n.$broadcast("AddMetaTags",c);l=r.hash();l&&e.scrollTo(l)}});c()};t.reset()}]);app.controller("InstantAnswerController",["$rootScope","$scope","$routeParams","contentApiService","compassService",function(n,t,i,r){function u(n){var i=!1,r=0;for(var t in n)n.hasOwnProperty(t)&&(r++,angular.isObject(n[t])&&(n[t]=u(n[t])),i=t==="value");return i&&r===1?n.value:n}function f(n,t){return{name:n,content:t}}t.reset=function(){t.contentReady=!1;i.iaId!=null&&(r.getCompassContentForPage("searchresults").then(function(n){n&&n.data&&n.data.searchResults&&(t.view=n.data.searchResults.instantAnswer)})["finally"](function(){t.contentReady=!0}),r.getInstantAnswer(i.iaId).then(function(i){t.instantAnswer=u(i.data);var r=[];t.instantAnswer&&t.instantAnswer.solutions&&t.instantAnswer.solutions.length>0&&(r.push(f("description",t.instantAnswer.solutions[0].description)),n.$broadcast("AddMetaTags",r))}))};t.reset()}]),function(n){n.directive("comscore",["clientConfig",function(n){return{restrict:"A",link:function(t,i){n&&n.ComScore&&n.ComScore.ComScoreEnabled&&i.append($("<script>",{Src:n.ComScore.SurveySource,Async:"",Type:"text/javascript"}))}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("LinkFarmController",["$rootScope","$scope","compassService","flightService",function(n,t,i,r){function u(){t.notInHomepageFlight=!r.isUserInAnyFlight(["hp1-1"]);var n=i.getLinkFarm();n&&(t.view=n)}t.reset=function(){t.notInHomepageFlight=!0;u()};t.reset();t.$on("CompassContentReady",function(){u()})}])}(angular.module(microsoft.support.moduleName)),function(n){function t(n){return n.indexOf("vac-1")!==-1&&n.indexOf("mlc-1")!==-1&&(n=n.replace(/mlc-1\|?/,"")),n}(function(n){var i=n.length==2&&n.pop().split(";").shift()||"";$('meta[name="ms.flightId"]').attr("content",t(i))})(document.cookie.split("smc_f="));n.directive("metatags",["$window","$rootScope","$interval","$cookies","nativeAppService","chatStateService",function(n,i,r,u,f){function h(n,t){o(n)||$("head").append($('<meta name="'+n+'" content="" />'));e(n,t)}function e(n,t){$('meta[name="'+n+'"]').attr("content",t)}function o(n){return $('meta[name="'+n+'"]').attr("name")}function s(n){return $('meta[name="'+n+'"]').attr("content")}return{restrict:"A",link:function(i){i.$on("$locationChangeSuccess",function(h,c,l){var v=s("ms.refView"),a;(e("ms.refView",l),e("ms.pageType",c),o("ms.isNative")&&e("ms.isNative",(!!f.isNative()).toString()),o("ms.partnerId")&&e("ms.partnerId",u.get("smcpartner")||""),o("ms.flightId")&&e("ms.flightId",t(u.get("smc_f")||"")),o("ms.cV")&&n&&n.Asimov&&n.Asimov.cv&&e("ms.cV",n.Asimov.cv.getValue()||""),o("ms.muid")&&e("ms.muid",u.get("MUID")||""),v!="")&&(o("ms.auth")?s("ms.auth")?i.$emit("metaTagsUpdated"):a=r(function(){s("ms.auth")&&(i.$emit("metaTagsUpdated"),r.cancel(a))},250,20):i.$emit("metaTagsUpdated"))});i.$on("UserSignedIn",function(){e("ms.auth","1")});i.$on("UserSignedOut",function(){e("ms.auth","0")});i.$on("UpdateMetaTag",function(n,t){h(t.name,t.value)});i.$on("RemoveMetaTag",function(n,t){e(t.name,"")});i.$on("awasaChatId",function(n,t){e("ms.chatId",t.toString())});i.$on("awasaVisitId",function(n,t){e("ms.visitId",t.toString())});i.$on("awasaEnqueueId",function(n,t){e("ms.enqueueId",t.toString())})}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("currentLanguageService",["$document","$log","clientConfig","locationService",function(n,t,i){this.setLang=function(n){var i,t;return(i=n==null?location.pathname.substring(1):n.locale,t=h(i),t!=null?r("SMCsiteLang",t):r("SMCsiteLang",n.locale),e(n.direction),t!=null)?t:n.locale};this.getLang=function(){return u("SMCsiteLang")||"en-US"};this.getDirection=function(){return u("SMCsiteDir")||"ltr"};this.setDirection=function(n){return e(n)};this.getFallbackLocaleReverseLookup=function(n){var t=o();for(var i in t)if(t[i].Fallback==n)return t[i].Locale;return null};var s="."+window.location.host,f="; Domain="+s+";expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/",r=function(i,r){n[0].cookie=i+"="+r+f;t.info("Set Cookie to:"+i+"="+r+f)},u=function(t){return!t||!n[0]?null:decodeURIComponent(n[0].cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},e=function(n){var t=u("SMCsiteDir");return(r("SMCsiteDir",n),n!=t)?!0:!1},h=function(n){var t=o();for(var i in t)if(t[i].Locale==n)return t[i].Fallback;return null},o=function(){if(i&&i.SupportedLocalesConfig&&i.SupportedLocalesConfig.LanguageFallbacks)return i.SupportedLocalesConfig.LanguageFallbacks}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("LanguageController",["$window","$rootScope","$scope","$location","$document","languageService","clientConfig","compassService",function(n,t,r,u,f,e,o,s){var a=e.langLocale();r.displayLanguageSelector=!1;var h=function(){e.languages().then(function(n){r.languages=n;r.languagesListForLargeScreens=l()});r.currentLanguage=e.currentLanguage();r.currentTextDirection=e.currentDirection();r.languageSelectorTitle=s.getLanguageSelectorTitle()},c=function(){t.$digest();n.scrollTo(0,f[0].body.scrollHeight)},l=function(){var n=[],t=[];for($.each(r.languages,function(t,i){n.push(i)}),n=n.sort(function(n,t){return n.displayName<=t.displayName?-1:n.displayName>t.displayName?1:0}),i=0;i<=Math.floor(n.length/4);i++)t[i*4]=n[i];for(i=Math.floor(n.length/4)+1,j=0;i<=Math.floor(n.length/2);i++,j++)t[j*4+1]=n[i];for(i=Math.floor(n.length/2)+1,j=0;i<=Math.floor(n.length*(3/4));i++,j++)t[j*4+2]=n[i];for(i=Math.floor(n.length*(3/4))+1,j=0;i<=n.length;i++,j++)t[j*4+3]=n[i];return t};r.setLanguage=function(n){e.set(n)};r.closeClick=function(){r.displayLanguageSelector=!1;c()};r.$on("languageSelectorClicked",function(){o&&o.SiteContentConfig&&o.SiteContentConfig.LanguageSelectorEnabled&&(r.displayLanguageSelector=r.displayLanguageSelector?!1:!0,c())});r.$on("CompassContentReady",function(){h()});h()}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("languageService",["$rootScope","$routeParams","$location","$q","currentLanguageService","compassService","locationService",function(n,t,i,r,u,f,e){var o={},h="displayName",s="";this.set=function(n,t){var i=u.getLang().toLowerCase(),r=u.setLang(n),f;i!=r&&(e.getCurrentPath().indexOf(i)==-1&&(i=u.getFallbackLocaleReverseLookup(i)),f=e.getCurrentPath().replace(i.toLowerCase(),r).toLowerCase(),t||e.setPathAndReload(f))};this.redirectWithLocale=function(n){n==this.langLocale()||u.getFallbackLocaleReverseLookup(n)||i.path("/"+this.langLocale()+i.path()).replace()};this.langLocale=function(){return u.getLang().toLowerCase()};this.currentDirection=function(){return u.getDirection().toLowerCase()};this.currentLanguage=function(){var n=this.langLocale().toLowerCase();if(o[n])return o[n][h]};this.getLanguageInfo=function(n){var t,i;return!n||Object.keys(o).length===0||!(t=o[n.toLowerCase()])?null:(i=t.displayName.split("-"),angular.extend({country:i[0].trim(),language:i[1].trim()},t))};this.lang=function(){var t=this.langLocale(),n=t.split("-");return n.length>1&&n.pop(),n.join("-")};this.locale=function(){var t=this.langLocale(),n=t.split("-");return n[n.length-1]};this.languages=function(){return o[0]?r.resolve(o):f.getLanguages().then(function(n){return o=n})};this.languageSelectorTitle=function(){return s||(s=f.getLanguageSelectorTitle()),s};t.langLocale&&this.set(t.langLocale)}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("textDirection",["currentLanguageService",function(n){return{restrict:"A",compile:function(t){var i=n.getDirection();t.removeAttr("text-direction");t.attr("dir",i);i==="rtl"&&t.addClass("css-rtl")}}}]);app.component("locationBlock",{templateUrl:"/PartialViews/LocationServices/LocationBlockTemplate.html",bindings:{},controller:["locationBlockService","contentApiService",function(n,t){this.pageUpdating=!0;var i=this;t.getCompassContentForPage("location-block").then(function(n){i.content=n.data.locationBlockPageContent}).finally(function(){i.pageUpdating=!1});this.submitMacId=function(t){this.resultUpdating=!0;this.status=null;var r=n.removeMacIdUsingHip(t).then(function(){i.status=!0}).catch(function(){i.status=!1}).finally(function(){i.resultUpdating=!1})}}],controllerAs:"lb"});WLSPHIP1={error:0,cssSet:{cssCdHIPInput:"form-control"},holder:"ispHIPHIP",scriptHolder:"ispHIPScript",type:"visual",postLoad:function(){},getSolution:function(){},reloadHIP:function(){},switchHIP:function(){},setFocus:function(){},clientValidation:function(){},verify:function(){}},function(n){n.value("hipObject",WLSPHIP1);n.service("locationBlockService",["$rootScope","$http","hipObject","$q",function(n,t,i,r){var u={baseUrl:"/api/LocationServices/"};this.removeMacIdUsingHip=function(n){var f=r.defer();return i.verify(function(n,r,e){if(!n.trim())return f.reject("UnAuthorized"),i.reloadHIP(),f.promise;var o={macId:e,hip:{solution:n,token:r,datacenter:i.dataCenter,flowId:i.urlFid}};t.post(u.baseUrl+"locationblockusinghip/",JSON.stringify(o)).then(function(n){f.resolve(n)},function(n){f.reject(n);i.reloadHIP()})},n),f.promise}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("StoreLocationsController",["$rootScope","$scope","contentApiService","languageService",function(n,t,i,r){t.updating=!0;t.countryList=[];t.storeLocations=[];t.filter={};t.filter.countrySelection="";t.filter.fieldSelection="";t.countryStores=[];var u="CARE_LOCATION";t.filter.storeType=u.toLowerCase();initCountryList=function(n){for(var i,u,f,o=r.locale(),e=0;e<n.length;e++){if(i=n[e],u=i.countryNames.split(","),u.length>0)for(f=0;f<u.length;f++)t.countryList.push({name:u[f],id:i.countryName});o==i.countryCode&&(t.filter.countrySelection={name:i.countryName,id:i.countryName},t.applyCountryFilter())}};initStoreLocations=function(n){for(var i,r=0;r<n.length;r++)i=n[r],n[r].region=[i.state,i.city,i.town,i.zipcode].filter(function(n){return n}).join(", "),n[r].address=[i.street,i.town,i.city,i.state,i.zipcode].filter(function(n){return n}).join(", "),i.service&&i.service.length>0&&(n[r].serviceType=i.service.split(","),n[r].serviceType.forEach(function(n,i,r){r[i]=n==u?t.page.searchView.deviceCareType:t.page.searchView.recyclingType}),n[r].serviceType=n[r].serviceType?n[r].serviceType.join(", "):"");t.storeLocations=n};t.applyCountryFilter=function(){t.filter.countrySelection&&t.filter.countrySelection.name&&(t.countryStores=t.storeLocations.filter(function(n){return n.countryName==t.filter.countrySelection.id}))};t.applyFieldFilter=function(){t.filter.fieldSelection&&t.filter.fieldSelection.region&&(t.countryStores=t.storeLocations.filter(function(n){return n.region==t.filter.fieldSelection.region}))};t.$watch("filter.fieldSelection",function(){t.filter.fieldSelection||t.applyCountryFilter()});i.getCompassContentForPage("lumialocations").then(function(i){t.page=i.data.locationsView;n.$broadcast("UpdateTitle",t.page.title);t.page.locations&&t.page.locations.length>0&&(initStoreLocations(JSON.parse(t.page.locations)),initCountryList(JSON.parse(t.page.localeDictionary)))}).finally(function(){t.updating=!1})}])}(angular.module(microsoft.support.moduleName));app.filter("storeLocationsFilter",function(){return function(n,t,i){return n&&i?n.filter(function(n){return n[t]?n[t].toUpperCase().indexOf(i.toUpperCase())>=0:!0}):n}}),function(n){n.controller("AllProductsController",["$scope","$window","compassService","languageService",function(n,t,i){function r(){var t=i.getAllProducts();t&&(n.allProducts=t,n.allProducts.productCategories=n.allProducts.productCategories.filter(function(n){return n.links=n.links.filter(function(n){return n.linkUrl!==""&&n.linkUrl!=="tbd"&&n.linkText!==""}),n.links.length>0}))}n.reset=function(){r();n.showColumns=[]};n.showMore=function(t){n.showColumns[t]=!0};n.showLess=function(t){n.showColumns[t]=!1};n.display=function(t,i,r){return r<t.collapseCount||n.showColumns[i]?!0:!1};n.isExternal=function(n){return t&&t.location&&t.location.origin&&typeof n=="string"&&!(n.indexOf(t.location.origin)>0||n.indexOf("://")==-1)};n.$on("CompassContentReady",function(){r()});n.reset()}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("ProductHubController",["$rootScope","$scope","$routeParams","$location","$window","$log","$modal","clientConfig","locationService","languageService","compassService","contentApiService","productPagesService","smoothScrollService","osService",function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function w(){var u,e,o,l,r,n,s,h;if(t.ChevronDown="E70D",t.ChevronUp="E70E",t.limitProducts=t.minLimit,t.limitAccessories=t.minLimit,t.hasBreadCrumb=!1,t.productPath)t.currentProductView=c.getProductDetails(t.productPath),t.currentPageView=c.getProductPage(),t.ProductPageTitles=c.getProductPageCommonView(),t.ProductPageTitles&&t.ProductPageTitles.productTitle&&(t.productTitleTemplate=t.ProductPageTitles.productTitle),t.currentProductView&&t.currentProductView.productItem&&(t.versionselected=t.currentProductView,t.productName=t.currentProductView.productItem.name,t.productTitleTemplate&&t.productName&&(t.pageTitle=t.productTitleTemplate.replace("{product_name}",t.productName)),t.currentProductView.parentProductName&&t.currentProductView.parentProductName!=""&&(t.hasBreadCrumb=!0));else return f.error("Invalid Product Path: ",t.productPath);if(t.currentProductView&&t.currentProductView.pageType&&(t.versionselected=t.currentProductView,t.status&&(t.status.waitingOnCompass=!1),nt(t.currentProductView.pageType.toLowerCase()),t.isProductSelectorPage||t.currentProductView&&t.currentProductView.productHubSelfHelpLinks&&(t.categories=t.currentProductView.productHubSelfHelpLinks,(t.categories||t.categories.length>0)&&(t.selfHelpTitle=t.currentProductView.productHubSelfHelpTitle,u=i.category,t.categoryParam=u?u:t.currentProductView.productHubSelfHelpLinks[0].sectionId||t.categoryParam))),t.subProductViews=[],t.accessoriesViews=[],t.hasSubProducts=!1,t.accessoriesLength=0,t.subProductsLength=0,t.currentProductView&&t.currentProductView.subProductsList&&(t.subproductsList=t.currentProductView.subProductsList,t.subproductsList.length>0)){for(t.accessoriesLength=t.subproductsList.filter(b).length,t.subProductsLength=t.subproductsList.filter(k).length,t.hasSubProducts=!0,t.productsSectionTitle=t.ProductPageTitles.productPageProductSelectionTitle,t.accessorySectionTitle=t.ProductPageTitles.productPageAccessorySelectionTitle,t.seeAllTitle=t.ProductPageTitles.seeAll,t.seeLessTitle=t.ProductPageTitles.seeLess,t.seeMoreProductsTitle=t.seeAllTitle,t.seeMoreAccessoryTitle=t.seeAllTitle,t.selectedSubVersion=t.subproductsList[0],e=0,o=0,n=0;n<t.subproductsList.length;n++)t.subproductsList[n].isAccessory=="false"?(t.subProductViews[o]=t.subproductsList[n],o++):(t.accessoriesViews[e]=t.subproductsList[n],e++);l=a.getVersionValue(t.osVersion);t.isProductSelectorPage||rt(l)}if(t.currentProductView&&t.currentProductView.productPromotionsList&&t.currentProductView.productPromotionsList.promotionSectionList&&(t.promotionSectionTitle=t.currentProductView.productPromotionsList.promotionSectionTitle,t.associatedProductsList=t.currentProductView.productPromotionsList.promotionSectionList),t.currentProductView&&t.currentProductView.metaTagsList&&t.currentProductView.metaTagsList.metaTags){for(r=t.currentProductView.metaTagsList.metaTags,t.productHubMetaTags=[],n=0;n<r.length;n++)s=r[n].key,h=r[n].value,t.productHubMetaTags.push({name:s,content:h}),s.toLowerCase()=="title"&&(t.metaTagTitle=h);t.metaTagTitle=t.metaTagTitle||t.pageTitle}}function tt(){var n=s.getPathSubset(2),r;return n=n[n.length-1]!=="/"?n+"/":n,t.osParam=i.os,r=p(),r&&!t.hasAppendedParam&&(t.productPath=t.productPath+"?os="+t.osParam,n=n+"?os="+t.osParam,t.hasAppendedParam=!0),n}function it(){var i=s.getPathSubset(2),n=a.getParentPath(i),f=n[n.length-1]!=="/"?n+"/":n,r=h.langLocale().toLowerCase()+"/"+f,e=i.split("/"),u;return e.length-2!=0&&(t.parentProductUrl=r),u=p(),u&&(t.parentProductUrl=r),n}function p(){return t.osParam&&t.osParam!="NA"&&t.osParam!=""?!0:!1}function rt(n){var h=p(),o,s,u,f,e;if(h)for(u=0;u<t.subproductsList.length;u++)f=t.subproductsList[u].version,f==i.os&&(t.selectedSubVersion=t.subproductsList[u]);else{for(t.currentProductView&&t.currentProductView.oSMappingsList&&(o=t.currentProductView.oSMappingsList,o[n]&&(n=o[n])),s=!1,u=0;u<t.subproductsList.length;u++)f=t.subproductsList[u].version,f==n&&(e=t.subproductsList[u].url,r.url(e).replace(),t.selectedSubVersion=t.subproductsList[u],s=!0);s||(e=t.subproductsList[0].url,r.url(e).replace(),t.selectedSubVersion=t.subproductsList[0])}}t.minLimit=6;t.reset=function(){t.isProductSelectorPage=!1;t.isProductHubPage=!1;t.isTopicHubPage=!1;t.seeAllProducts=!1;t.seeAllAccessories=!1;t.limitProducts=t.minLimit;t.limitAccessories=t.minLimit;t.status={waitingOnCompass:!0};var n=navigator.appVersion,i=navigator.appName;t.hasBreadCrumb=!1;t.osVersion=y.getOS();t.categoryParam="NA";gotDevices=!1;w()};t.categoryParam="NA";t.osParam="NA";t.hasAppendedParam=!1;t.productPath=tt();t.parentProductPath=it();var ut=function(n){if(!n||!n.url)return f.error("Invalid Link: ",n)},b=function(n){return n.isAccessory=="true"?!0:!1},k=function(n){return n.isAccessory=="false"?!0:!1},d=function(){var f,n,i,r,u;if(myDevices&&!(myDevices.length<=0)){for(f=!1,n=0;n<myDevices.length;n++)if(i=myDevices[n],i.FormFactor==="Phone"){for(r=0;r<t.view.length;r++)if(u=i.OSVersion.substring(0,t.view[r].versionNumber.length)===t.view[r].versionNumber,u===!0)break;u===!0?(i.FriendlyName===defaultFriendlyName?(myDevices[n].version=i.Manufacturer+" "+i.Model,t.versionselected=t.view[n]):(myDevices[n].FriendlyName=i.FriendlyName,myDevices[n].version=i.FriendlyName),myDevices[n].sectionList=t.view[r].sectionList,myDevices[n].versionNumber=t.view[r].versionNumber,i.Warranty||(t.view[n].Warranty="Warranty: "+i.Warranty)):(myDevices.splice(n,1),n--)}else myDevices.splice(n,1),n--;t.view=myDevices;t.versionselected=t.view[0]}},g=function(){gotDevices||o.DevicesUIConfiguration.DevicesEnabled&&o.authInfo.isLoggedIn()&&l.getDevices().then(function(n){n!=null&&(gotDevices=!0,myDevices=n.data,d())},function(){})},nt=function(n){t.isProductSelectorPage=!1;t.isProductHubPage=!1;t.isTopicHubPage=!1;switch(n){case"selector":t.isProductSelectorPage=!0;break;case"hub":t.isProductHubPage=!0;break;case"topic":t.isTopicHubPage=!0}};t.scrollToStep=function(n){s.scrollTo("#products-right-section-"+n)};t.followLink=function(n){if(!n||!n.pageUrl||!n.pageUrl.linkUrl)return f.error("Invalid Link: ",n);var t=n.pageUrl.linkUrl;a.checkUrlandFollowPath(t)};t.seeMoreProducts=function(n,i){var r={product:n,isAccessory:i};i?t.seeAllAccessories?(t.seeAllAccessories=!1,t.seeMoreAccessoryTitle=t.seeAllTitle,t.limitAccessories=t.minLimit):(t.seeAllAccessories=!0,t.seeMoreAccessoryTitle=t.seeLessTitle,t.limitAccessories=t.subproductsList.length):t.seeAllProducts?(t.seeAllProducts=!1,t.seeMoreProductsTitle=t.seeAllTitle,t.limitProducts=t.minLimit):(t.seeAllProducts=!0,t.seeMoreProductsTitle=t.seeLessTitle,t.limitProducts=t.subproductsList.length)};t.$on("CompassContentReady",function(){w();t.currentProductView&&t.currentProductView.pageType&&n.$broadcast("ProductPageLoaded",{pagetype:t.currentProductView.pageType});t.metaTagTitle&&n.$broadcast("UpdateTitle",t.metaTagTitle);t.productHubMetaTags&&n.$broadcast("AddMetaTags",t.productHubMetaTags)});t.$on("ProductPagesTimeout",function(){n.$broadcast("500Error",{reason:"Timeout occurred on a product page",data:t.status})});t.$on("UserSignedIn",function(){g()});t.reset()}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("ProductListController",["$rootScope","$scope","$location","$window","$log","clientConfig","languageService","compassService","contentApiService","flightService","productPagesService",function(n,t,r,u,f,e,o,s,h,c,l){var v,y,p=function(){y||e.authInfo.isLoggedIn()&&h.getDevices().then(function(n){n!=null&&(y=!0,v=n.data,b())},function(){})},b=function(){for(i=0;i<v.length;i++){var n=v[i];n.FormFactor==="Phone"?a("17947",n):n.FormFactor==="Tablet"?a("17688",n):n.FormFactor==="PC"||n.FormFactor==="Laptop"?a("509",n):n.FormFactor==="Console"&&a("7230",n)}},w=function(){var r,n,i,u;if(t.isHomePageFlight=c.isUserInAnyFlight(["hp1-1"]),t.productLimit=t.isHomePageFlight?18:12,r=s.getProductView(),r){if(t.view=r,n=r,n.products&&n.products.length>0){for(i=0;i<n.products.length;i++)n.products[i].subversions.length>0&&(u=l.checkProductforOSDetection(n.products[i]),n.products[i].pageUrl.linkUrl=u,n.products[i].url=u);t.view=n}p()}},a=function(n,i){var r=k(n);r[0]&&t.view.products.unshift({name:i.FriendlyName,model:i.Model,url:r[1],isUserDevice:!0,image:{url:i.IconSource},ecoId:n})},k=function(n){var i,r;if(t.view&&t.view.products)for(j=0;j<t.view.products.length;j++)if(i=t.view.products[j].ecoId.split(","),$.inArray(n,i)>-1&&!t.view.products[j].isUserDevice)return r=t.view.products[j].url,t.view.products.splice(j,1),[!0,r];return!1};t.followLink=function(n){if(!n||!n.url)return f.error("Invalid Link: ",n);var t=n.url;l.checkUrlandFollowPath(t)};t.reset=function(){y=!1;w()};t.reset();t.$on("CompassContentReady",function(){w()});t.$on("UserSignedIn",function(){p()})}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("ProductModalController",["$rootScope","$scope","$log","$modal","compassService","contentApiService","currentProduct",function(n,t,i,r,u,f,e){var o,h,s;if(t.config={},o=e.product,t.isAccessory=e.isAccessory,!o||!o.productItem||!o.productItem.url)return i.error("Invalid Link: ",o);h=o.productItem.url;s=u.getProductDetails(h);s&&(t.modalProductView=s);t.close=function(){t.$close(t.config)};t.cancel=function(){t.$dismiss("cancel")};t.assets={}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("productPagesService",["$rootScope","$log","$location","$window","languageService","locationService","osService",function(n,t,i,r,u,f,e){this.checkProductforOSDetection=function(n){var i,h,r,t,o,s;if(n&&n.url){if(i=n.url,h="products/",n.subversions.length>0){var c=e.getOS(),l=this.getVersionValue(c),f="/?os=",u=!1;for(r=0;r<n.subversions.length;r++)if(t=n.subversions[r],o=i.search(f),o!=-1){t=i;u=!0;break}else if(s=t.substring(f.length-1,t.length),s===l){t=i+n.subversions[r];u=!0;break}return u||(t=i+n.subversions[0]),t}return n.url}};this.getParentPath=function(n){var r=n.split("/"),u,t,i;if(r.length-2!=0){for(u=r.length-1,t="products/",i=1;i<u;i++)t=t+r[i]+"/";return t}return n[n.length-1]!=="/"?n+"/":n};this.getVersionValue=function(n){if(n){var t=n.toLowerCase();return t.split(" ").join("-")}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.config(["$httpProvider",function(n){n.interceptors.push("devicesErrorInterceptor")}]).run(["virtualAgentTelemetryService",function(){}])}(angular.module(microsoft.support.moduleName));app.directive("sarValueRender",["sarValueService",function(n){return{templateUrl:"/PartialViews/SarValue/SarValueTemplate.html",restrict:"A",scope:{},link:function(t){t.updating=!0;n.getCountryLanguage().then(function(n){t.countries=n.Countries;t.languages=n.Languages;t.updating=!1}).catch(function(){t.updating=!1});t.onCountrySelected=function(){t.updating=!0;n.getDevices(t.countrySelected.Id).then(function(n){t.devices=n;t.updating=!1}).catch(function(){t.updating=!1})};t.onDeviceSelected=function(){var i={countryId:t.countrySelected.Id,languageCode:t.languageSelected.Code,deviceModel:t.deviceSelected.Model};t.updating=!0;n.getSarValueDetail(i).then(function(n){t.sarValueDetail=n;t.updating=!1}).catch(function(){t.updating=!1})}}}}]),function(n){n.service("sarValueService",["$http","$document","$rootScope",function(n){function t(){return n.get("/api/sar/getcountrylanguageasync").then(function(n){return n.data})}function i(t){var i={params:{countryId:t}};return n.get("/api/sar/getdevicesasync",i).then(function(n){return n.data})}function r(t){var i={params:{countryId:t.countryId,languageCode:t.languageCode,deviceModel:t.deviceModel}};return n.get("/api/sar/getsarvaluedetailasync",i).then(function(n){return n.data})}this.getCountryLanguage=t;this.getDevices=i;this.getSarValueDetail=r}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("autoSuggest",["$rootScope","$timeout","$document",function(n,t,i){return{restrict:"A",templateUrl:function(n,t){return t.templateUrl},scope:{queryFunction:"&",submitHandler:"&",queryModelMapper:"&?",suggestionHtmlGenerator:"&?",inputQuery:"=",selectedSuggestion:"=?"},link:function(r,u,f){function v(n){if(o==0||n&&n.length>=o){e=n;var t=r.queryFunction({query:n});t.then(function(n){r.result=n})}}function a(){t(function(){r.isVisible=!1},0)}function y(){r.isVisible=!0;r.$digest()}function p(n,t){var u=r.result.suggestions.indexOf(r.selected),i=Math.abs(t-n);i=i==0?0:i/(t-n);u===-1?(r.selected=r.result.suggestions[n],r.selectedSuggestion&&(r.selectedSuggestion.selected=r.result.suggestions[n])):u===t?(r.selected=null,r.selectedSuggestion&&(r.selectedSuggestion.selected=null)):(r.selected=r.result.suggestions[u+i],r.selectedSuggestion&&(r.selectedSuggestion.selected=r.result.suggestions[u+i]));b()}function k(t){if(r.result&&r.result.suggestions&&r.result.suggestions.length)if(t.which===27)a();else{if(r.isVisible==!1&&y(),t.which===40)return p(0,r.result.suggestions.length-1),r.$digest(),!1;if(t.which===38)return p(r.result.suggestions.length-1,0),r.$digest(),!1;t.which===13&&(r.selected&&h&&n.$broadcast(h,{suggestion:r.selected,query:e}),r.result&&(r.result.suggestions=[]),r.$digest())}}function w(n){angular.equals(i[0].activeElement,s[0])&&(r.selected&&n===c(r.selected)||n===e||l||(l=!0,v(n),t(function(){l=!1;w(r.inputQuery)},300)))}function b(){r.inputQuery=r.selected!==null?c(r.selected):e}function c(n){if(r.queryModelMapper&&typeof r.queryModelMapper=="function")return r.queryModelMapper({suggestion:n});if(typeof n=="string")return n;throw new Error("queryModelMapper function missing");}var s=$(f.inputSource),e="",l=!1,h=f.telemetryEventName,o=f.minimumLetters?parseInt(f.minimumLetters,10):0;o=o<0?0:o;r.isVisible=!1;r.generateSuggestionHtml=function(n){if(r.suggestionHtmlGenerator&&typeof r.suggestionHtmlGenerator=="function"){var t=e.toLowerCase();return r.suggestionHtmlGenerator({query:t,suggestion:c(n)})}return c(n)};r.isSelected=function(n){return n===r.selected};r.clickSuggestion=function(i){r.selected=i;r.selectedSuggestion&&(r.selectedSuggestion.selected=i);b();a();t(function(){h&&n.$broadcast(h,{suggestion:r.selected,query:e});r.submitHandler({})},0)};r.$watch("inputQuery",w);s.keydown(k);s.focus(y);s.blur(a);v("")}}}]),function(n){n.factory("autoSuggestFactory",["$injector","clientConfig",function(n,t){var i=t.AutosuggestConfig;return i&&i.Utility&&i.Utility==="DGPS"?n.get("dgpsAutoSuggestService"):n.get("bingAutoSuggestService")}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("bingAutoSuggestService",["$http","$rootScope","clientConfig","languageService",function(n,t,i,r){var u=i.AutosuggestConfig;this.getSuggestions=function(t){if(t===""||!u.Enabled)return null;var r=e(t),i={};return n.get(r).then(function(n){f(n.data)||o(i,n.data)}),i};var f=function(n){return!n||!n.AS||!n.AS.Results?(t.$broadcast("AutoSuggestBadResults",n),!0):!1},e=function(n){var t=u.ServiceUri,i=u.AppId;return t.replace("{0}",i).replace("{1}",n).replace("{2}",r.langLocale())},o=function(n,t){var i=t.AS.Results.filter(function(n){return n.Type==="AS"})[0].Suggests;n.suggestions=i.map(function(n){return n.Txt})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("dgpsAutoSuggestService",["$http","$q","$filter","$log","clientConfig","languageService","osService","qosTelemetryService",function(n,t,i,r,u,f,e,o){function s(n){return!n||n==="null"?!0:n.AutoSuggestions?!1:!0}function h(n){var t=u.AutosuggestConfig.ServiceUri;return t=t.replace("{0}",encodeURIComponent(n)),t=t.replace("{1}",f.langLocale()),t.replace("{2}",e.getOS())}function c(n){return i("limitTo")(n.AutoSuggestions,10)}this.getSuggestions=function(i){var f=t.defer(),a=e.isCorsEnabled(),l;return!u.AutosuggestConfig.Enabled||!a?f.promise:(l=h(i),n.get(l).then(function(n){var t=n.data,i;s(t)?(t&&t!=="null"&&(r.error("Improperly structured Dynamic GPS result set",t),o.createEvent(o.eventTypes.dgps.invalid).reject({results:t})),f.reject(t)):(i=c(t),f.resolve({suggestions:i}))},function(n){f.reject(n)}),f.promise)}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).filter("icon",[function(){return function(n){return typeof n=="string"&&(n.indexOf("0x")===-1&&(n="0x"+n),n=String.fromCharCode(n)),n}}]),function(n){n.directive("instantAnswer",["$sce",function(n){var t={stepLimit:5,previewStepCount:4};return{restrict:"A",templateUrl:"/PartialViews/Search/InstantAnswer.html",scope:{answer:"=instantAnswer",view:"=",displayFeedback:"=?feedback",target:"=?",displayTitle:"=?",applyStepLimit:"=?applyStepLimit"},link:function(i){i.target=i.target||"_self";i.config=t;i.activeIndex=0;i.activeSolution=i.answer&&i.answer.solutions&&i.answer.solutions.length>0?i.answer.solutions[0]:null;angular.isUndefined(i.applyStepLimit)&&(i.applyStepLimit=!0);i.isLimited=i.applyStepLimit;angular.isUndefined(i.displayFeedback)&&(i.displayFeedback=!0);angular.isUndefined(i.displayTitle)&&(i.displayTitle=!0);i.switchSolution=function(n,t){i.activeSolution=n;i.activeIndex=t;i.applyStepLimit&&(i.isLimited=!0)};i.showMore=function(){i.isLimited=!1};i.trustSrc=function(t){return n.trustAsResourceUrl(t)}}}}])}(angular.module(microsoft.support.moduleName));angular.module(microsoft.support.moduleName).directive("paginator",["$document",function(n){return{restrict:"A",require:"ngModel",templateUrl:"/PartialViews/Search/Paginator.html",scope:{maxCount:"=",view:"="},link:function(t,i,r,u){function e(n){var o,i,e,u;for(t.lastPage=!1,o=n<f+1?1:n-f,i=n+f,i>t.maxCount/r.itemsPerPage&&(i=Math.ceil(t.maxCount/r.itemsPerPage),t.lastPage=n==i),e=[],u=o;u<=i;++u)e.push(u);return e}var f=4;t.ngModel=u;t.lastPage=!1;t.selectPage=function(i){u.$setViewValue(i);t.pages=e(i);n[0]&&n[0].activeElement&&n[0].activeElement.blur()};t.$watch("maxCount",function(){t.selectPage(u.$viewValue||1)})}}}]),function(n){n.controller("SearchController",["$scope","$rootScope","$route","$location","compassService","languageService","osService","clientConfig","flightService","autoSuggestFactory","searchResultsService","supportLinkService","authenticationHelperService","osService","productPagesService",function(n,t,i,r,u,f,e,o,s,h,c,l,a,e,v){function y(){var r=u.getSearchView(),t,i;r&&(n.view=r);t=u.getPremierHomeView();t&&(n.alerts=t.siteAlerts);i=u.getNotificationBanner();i&&(n.banner=i,w())}function p(){n.displayAllContent=i.current.data&&i.current.data.isLandingPage==!0;n.isCommercial=i.current.data&&i.current.data.isCommercial==!0;n.enablePremierAlert=i.current.data&&i.current.data.enablePremierAlert==!0;w()}function w(){var i,u,f,o,e,t;if(n.hasBanner=!1,i=!0,n.banner&&n.banner.exclusionPageList)for(u=n.banner.exclusionPageList,t=0;t<u.length;t++)r.path().search(u[t])>-1&&(i=!1);if(f=!1,n.banner&&n.banner.associatedOSList)for(o=v.getVersionValue(n.osVersion),e=n.banner.associatedOSList,t=0;t<e.length;t++)o==e[t]&&(f=!0);f==!0&&i==!0&&(n.hasBanner=!0)}var b=h,k={};n.reset=function(){n.userQuery=r.search().query||"";n.userQuery=unescape(n.userQuery);n.osVersion=e.getOS();p();y();k={contactUs:s.isUserInAnyFlight(["mlc-1","vac-2"]),virtualAgent:s.isUserInAnyFlight(["vac-1","vacfx-1"])}};n.primarySearchClicked=function(){n.userQuery&&(t.$broadcast("SearchPrimaryClicked",{Location:"Primary",SearchString:n.userQuery}),r.url(c.getSearchResultsUrl(n.userQuery)))};n.linkClick=function(n,t){switch(t){case"contact-support":l.openContactWindow("/menu");n.preventDefault()}};n.getCompleteText=function(n){return n.CompletionText};n.getSuggestions=function(n){return b.getSuggestions(n)};n.generateSuggestionHtml=function(n,t){return n!=undefined&&t!=undefined?(n=n.toLowerCase(),!n.length)?t:(n+=n==="b"?" ":"",t="<b>"+t.toLowerCase()+"<\/b>",t.replace(n,"<\/b>"+n+"<b>")):""};n.$on("$routeChangeSuccess",function(){p()});n.$on("CompassContentReady",function(){y()});n.reset()}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("searchResult",[function(){return{restrict:"A",templateUrl:"/PartialViews/Search/SearchResult.html",scope:{result:"=searchResult",id:"=",size:"=?",target:"=?"},link:function(n){n.size=n.size||"medium";n.target=n.target||"_self";n.selectResult=function(){n.pingbackUrl=n.result.pingbackUrl}}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("SearchResultsController",["$scope","$routeParams","$window","osService","searchResultsService","compassService","clientConfig","flightService","virtualAgentService","locationService",function(n,t,i,r,u,f,e,o,s,h){function y(){if(n.userQuery.length){n.results=[];n.answer=null;n.isSearching=!0;var t={query:n.userQuery,page:n.currentPage};o.isUserInAnyFlight(v)?s.fetchContent(t).then(c,l):u.fetchResults(t).then(c,l)}}function c(t){n.count=t.totalCount;n.results=t.results;n.answer=t.instantAnswer;n.isSearching=!1;r.isMobile()&&h.scrollTo("search-results-container")}function l(){n.isSearching=!1}function a(){var t=f.getSearchResultsView();t&&(n.view=t)}var v=["virtualagent-searchresults-1","vad-1","vadfx-1"];n.reset=function(){n.userQuery=t.query||"";n.userQuery=unescape(n.userQuery);n.currentPage=1;n.results=[];n.answer=null;n.isSearching=!1;n.devicesEnabled=e.SearchConfig.DeviceRefinementEnabled;a()};n.generalSearch=function(){i.location.href=n.view.generalSearchLink.linkUrl.replace("{0}",encodeURIComponent(n.userQuery))};n.$watch("currentPage",function(){y()});n.$on("SearchResultsTimeout",function(){n.isSearching=!1});n.$on("CompassContentReady",function(){a()});n.reset()}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("searchResultsService",["$http","$rootScope","languageService",function(n,t,i){function u(n){if(n&&n.HelpContent){helpContent=n.HelpContent.replace(new RegExp(String.fromCharCode(57356),"g"),"<strong>").replace(new RegExp(String.fromCharCode(57344),"g"),"<strong>").replace(new RegExp(String.fromCharCode(57357),"g"),"<\/strong>").replace(new RegExp(String.fromCharCode(57345),"g"),"<\/strong>");return r(JSON.parse(helpContent))}return null}function r(n){var i=!1,u=0;for(var t in n)n.hasOwnProperty(t)&&(u++,angular.isObject(n[t])&&(n[t]=r(n[t])),i=t==="value");return i&&u===1?n.value:n}function f(n){var t=n.Title.replace(/\<\/?strong\>/g,"");return{simpleTitle:t,title:n.Title,description:n.Description,link:n.Link,displayLink:n.DisplayLink,pingbackUrl:n.PingbackUrl}}this.fetchResults=function(i){var r={params:{query:encodeURIComponent(i.query),page:i.page}};return n.get("/api/search/index",r).then(function(n){var r=n.data.Results.map(f),i={};return i.results=r,i.totalCount=n.data.TotalCount,i.instantAnswer=u(n.data),t.$broadcast("SearchResponse",i),i})};this.getSearchResultsUrl=function(n){return"/"+i.langLocale()+"/search?query="+encodeURIComponent(n)}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("appCommandQosTelemetryService",["$rootScope","$timeout","clientConfig","qosTelemetryService","contactCommands","nativeAppService",function(n,t,i,r,u,f){function s(n){return h.some(function(t){return n===t})}function c(t){var i,r;f.isUnderstoodCommand(t)?(i="//app/command-error",r="Command: "+t+" failed"):(i="//app/unknown-command",r="Unknown command: "+t+" failed");n.$broadcast("Qos",{operation:i,status:500,custom:r})}var h=[u.beginSharing,u.pauseSharingByUser,u.resumeSharingByUser,u.endSharingByUser],e=this,o={timeout:i.AppConfig&&i.AppConfig.AppCommandTimeoutInMilliseconds};this.qosActions={};n.$on("AppActionStart",function(n,i){if(s(i)){e.qosActions[i]?e.qosActions[i].length>=1&&r.createEvent(r.eventTypes.app.dupeCommandError).reject(i):e.qosActions[i]=[];var u=r.createEvent(i);e.qosActions[i].push({promise:u,timer:t(function(){u.reject(i+" timed out after "+o.timeout+" milliseconds.")},o.timeout)})}});n.$on("AppActionEnd",function(n,i){var r=i.command,u;s(r)?e.qosActions[r]&&e.qosActions[r].length>0&&(u=e.qosActions[r].shift(),t.cancel(u.timer),i.success?u.promise.resolve():u.promise.reject(r)):c(r)})}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("callbackTelemetryService",["$rootScope","$cookies","clientConfig","clientTelemetryService","nativeAppService","languageService","rccService","serverInfo","phoneNumberService","chatStateService",function(n,t,i,r,u,f,e,o,s,h){var c={unknown:"unknown",EnqueueImmediateCallback:"enqueueImmediateCallback",EnqueueScheduledCallback:"enqueueScheduledCallback",EnqueueCallback:"enqueueCallback"},l=function(n,i){var u={name:"Microsoft.Mac.SelfAssist.CallbackAction",content:{"Microsoft.Mac.SelfAssist.CallbackAction":{actionName:n,callbackTime:i&&i.timeslot?i.timeslot:"",errorCode:i&&i.errorCode?i.errorCode:"",immediateCallbackDelay:i&&!(i.immediateCallbackDelay==null)?i.immediateCallbackDelay:1,subjectName:e.getSubjectName()?e.getSubjectName():"",countryCode:i.locale?s.selectCountryCode(i.locale).code:"",subjectId:h.getSubject()?h.getSubject().toString():"",visitId:h.getVisitId()?h.getVisitId():"",enqueueId:h.getEnqueueId()?h.getEnqueueId().toString():"",interactionId:i&&i.interactionId?i.interactionId:"",wedcsId:t.get("MSFPC"),context:i?JSON.stringify(i):""}}};u=r.populateDefaultFields(u);r.pushEvent(u)};n.$on("EnqueueCallbackFailure",function(n,t){l(c.EnqueueCallback,t)});n.$on("EnqueueCallbackSuccess",function(n,t){var r=JSON.parse(t.methodParameters.context),i;r.timeslot?(t.timeslot=r.timeslot,l(c.EnqueueScheduledCallback,t)):(i=e.getEstimatedCallbackWaitTime(t.methodParameters.subject),i&&(t.immediateCallbackDelay=i.AverageWaitTime),l(c.EnqueueImmediateCallback,t))})}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("chatTelemetryService",["$rootScope","$window","$cookies","clientConfig","serverInfo","chatStateService","clientTelemetryService","rccService",function(n,t,i,r,u,f,e,o){var s={unknown:"unknown",chatFeedback:"chatFeedback",chatFeedbackFlighted:"chatFeedbackFlighted",chatRequested:"chatRequested",chatEnded:"chatEnded",endChatClicked:"endChatClicked",chatMessageSent:"chatMessageSent",chatMessageRecieved:"chatMessageRecieved",chatSessionEstablished:"chatSessionEstablished",agentDataReady:"agentDataReady",chatInitComplete:"chatInitComplete",enqueueChat:"enqueueChat",dequeueChat:"dequeueChat",chatExtendedWait:"chatExtendedWait",chatQueueStatus:"chatQueueStatus",chatTransferred:"chatTransferred",chatLongQueue:"chatLongQueue",chatScreenShareAccept:"chatScreenShareAccept",chatScreenShareDenied:"chatScreenShareDenied",chatScreenShareEstablished:"chatScreenShareEstablished",chatScreenShareRequest:"chatScreenShareRequest",chatScreenShareError:"chatScreenShareError",chatScreenShareConnectFailed:"chatScreenShareConnectFailed",html5Hotification:"html5Hotification",chatSurveyDisplayed:"chatSurveyDisplayed",cvExtention:"cvExtention",awasaVisitId:"awasaVisitId",awasaEnqueueId:"awasaEnqueueId",awasaChatId:"awasaChatId",chatReset:"chatReset",doubleChatEnqueued:"doubleChatEnqueued",passcodeSuccess:"passcodeSuccess",passcodeFailure:"passcodeFailure",prechatText:"prechatText",chatVideoPresent:"chatVideoPresent",chatVideoToggled:"chatVideoToggled",chatVideoPlaying:"chatVideoPlaying",chatVideoPaused:"chatVideoPaused",chatVideoEnded:"chatVideoEnded",chatVideoError:"chatVideoError",chatVideoSession:"chatVideoSession",chatVideoMinTimeEngaged:"chatVideoMinTimeEngaged",chatVideoAlertResponse:"chatVideoAlertResponse",chatVideoInfo:"chatVideoInfo",chatVideoAutoToggle:"chatVideoAutoToggle"},h=function(n,r,u){r=typeof r!="undefined"?r:"";u=u?u.toString():f.getEnqueueId()?f.getEnqueueId().toString():"";var s={name:"Microsoft.Mac.SelfAssist.ChatAction",content:{"Microsoft.Mac.SelfAssist.ChatAction":{actionName:n,agentID:f.getAgent()&&f.getAgent().AgentId?f.getAgent().AgentId.toString():"",activityID:f.getVisitId()?f.getVisitId():"",subjectName:o.getSubjectName()?o.getSubjectName():"",subjectId:f.getSubject()?f.getSubject().toString():"",visitId:f.getVisitId()?f.getVisitId():"",enqueueId:u,chatId:f.getChatId()?f.getChatId().toString():"",pageHasFocus:t.document.hasFocus(),isRatMode:o.isRatMode(),wedcsId:i.get("MSFPC"),custom1:r}}};s=e.populateDefaultFields(s);e.pushEvent(s)};n.$on("ChatReset",function(){h(s.chatReset)});n.$on("DoubleChatEnqueued",function(){h(s.doubleChatEnqueued)});n.$on("ChatRequested",function(){h(s.chatRequested)});n.$on("AgentDataReady",function(){h(s.agentDataReady)});n.$on("ChatSessionEstablished",function(){h(s.chatSessionEstablished)});n.$on("ChatInitComplete",function(){h(s.chatInitComplete)});n.$on("ChatMessageReceived",function(){h(s.chatMessageRecieved)});n.$on("EndChatClicked",function(){h(s.endChatClicked)});n.$on("ChatSessionClosed",function(){h(s.chatEnded)});n.$on("ChatMessageSendSuccess",function(){h(s.chatMessageSent)});n.$on("ChatExtendedWait",function(){h(s.chatExtendedWait)});n.$on("ChatQueueStatus",function(n,t){h(s.chatQueueStatus,t.position+"")});n.$on("ChatFeedback",function(n,t){h(s.chatFeedback,JSON.stringify(t))});n.$on("ChatFeedbackFlighted",function(n,t){h(s.chatFeedbackFlighted,JSON.stringify(t))});n.$on("EnqueueChatSuccess",function(n,t){h(s.enqueueChat,t.waitTimeEstimate+"",t.enqueueId)});n.$on("ChatScreenShareAccept",function(){h(s.chatScreenShareAccept)});n.$on("ChatScreenShareDenied",function(){h(s.chatScreenShareDenied)});n.$on("ChatScreenShareEstablished",function(){h(s.chatScreenShareEstablished)});n.$on("ChatScreenShareRequest",function(){h(s.chatScreenShareRequest)});n.$on("ChatScreenShareError",function(n,t){h(s.chatScreenShareError,t.command+"")});n.$on("ChatScreenShareConnectFailed",function(){h(s.chatScreenShareConnectFailed)});n.$on("ChatDisengageSuccess",function(){h(s.dequeueChat)});n.$on("ChatTransferred",function(){h(s.chatTransferred)});n.$on("ChatLongQueue",function(){h(s.chatLongQueue)});n.$on("setParentCv",function(){t&&t.Asimov&&t.Asimov.cv&&f.setParentCv(t.Asimov.cv.getValue())});n.$on("chatSurveyDisplayed",function(){h(s.chatSurveyDisplayed)});n.$on("Html5Notification",function(n,t){h(s.html5Hotification,t)});n.$on("cvExtention",function(n,t){h(s.cvExtention,t)});n.$on("awasaVisitId",function(n,t){h(s.awasaVisitId,t.toString())});n.$on("awasaEnqueueId",function(n,t){h(s.awasaEnqueueId,t.toString())});n.$on("awasaChatId",function(n,t){h(s.awasaChatId,t.toString())});n.$on("PasscodeSuccess",function(){h(s.passcodeSuccess)});n.$on("PasscodeFailure",function(n,t){h(s.passcodeFailure,t)});n.$on("PrechatText",function(n,t){h(s.prechatText,t)});n.$on("ChatVideoPresent",function(n,t){h(s.chatVideoPresent,t+"")});n.$on("ChatVideoToggled",function(n,t){h(s.chatVideoToggled,t+"")});n.$on("ChatVideoPlaying",function(n,t){h(s.chatVideoPlaying,t+"")});n.$on("ChatVideoPaused",function(n,t){h(s.chatVideoPaused,t+"")});n.$on("ChatVideoEnded",function(n,t){h(s.chatVideoEnded,t+"")});n.$on("ChatVideoInfo",function(n,t){h(s.chatVideoInfo,JSON.stringify(t))});n.$on("ChatVideoError",function(n,t){h(s.chatVideoError,JSON.stringify(t))});n.$on("ChatVideoSession",function(){h(s.chatVideoSession)});n.$on("ChatVideoMinTimeEngaged",function(){h(s.chatVideoMinTimeEngaged)});n.$on("ChatVideoAlertResponse",function(n,t){h(s.chatVideoAlertResponse,t+"")});n.$on("ChatVideoAutoToggle",function(){h(s.chatVideoAutoToggle)})}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("clientTelemetryService",["clientConfig","$window","$location","$cookies","nativeAppService","languageService","chatStateService","osService",function(n,t,i,r,u,f,e,o){var s;t&&t.Asimov&&(t.Asimov.appId="JS:"+i.host());this.pushEvent=function(n){t&&t.Asimov&&t.Asimov.writeEvent&&t.Asimov.writeEvent(n)};this.populateDefaultFields=function(i){i.content[i.name].userAgent=t.navigator.userAgent;i.content[i.name].server=n.UserPropertyConfig&&n.UserPropertyConfig.EnvironmentType!==undefined?n.UserPropertyConfig.EnvironmentType:"";i.content[i.name].muid=r.get("MUID");i.content[i.name].puid=n.authInfo&&n.authInfo.puid!==undefined?n.authInfo.puid:"0";i.content[i.name].language=f.lang()?f.lang():"";i.content[i.name].locale=f.locale()?f.locale():"";i.content[i.name].isNative=u.isNative()?!0:!1;i.content[i.name].isMobile=o.isMobile();i.content[i.name].partnerId=r.get("smcpartner");i.content[i.name].flightId=r.get("smc_f");i.content[i.name].parentCv=e.getParentCv()?e.getParentCv().toString():"";var s=r.get("ANON");return s!=null&&s.length>2&&(i.content[i.name].anid=s.substring(2,s.indexOf("&"))),i};n&&n.ClientLogConfig&&n.ClientLogConfig.ScriptErrorLogging&&(t.onerror=function(n,t,i,r,u){var f;return f=u?u.stack:(new Error).stack,!0});s=r.get("MS-CV");t&&t.Asimov&&t.Asimov.CorrelationVector&&(s!==null&&t.Asimov.CorrelationVector.isValid(s)?t.Asimov.cv.setValue(s):t.Asimov.CorrelationVector.init&&(s=t.Asimov.CorrelationVector.init()),r.put("MS-CV",s));t&&t.location&&t.location.host&&t.location.host.indexOf("partner")<0&&(u.isNative()?r.put("smcpartner","csapp"):r.put("smcpartner","smc")),function(){if(t&&t.Asimov){var n=t.Asimov._validateAndTranslateEvent;t.Asimov._validateAndTranslateEvent=function(i){var r;return r=n.call(t.Asimov,i),t.Asimov.appId!=null&&(r.event.appId=self.Asimov.appId),r}}}()}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("commercialTelemetryService",["$rootScope","wedcsService","clientTelemetryService",function(n,t,i){function u(n,t){var r={name:n,content:{}};r.content[n]=t;r=i.populateDefaultFields(r);i.pushEvent(r)}var f="commercialAction",r={incidentCreation:{productPicked:"premierIncidentCreationProductPicked"}};this.logUpdateIncident=function(n,t,i,r){u("Microsoft.Mac.SelfAssist.CommercialIncidentAction",{incidentId:n,fileCount:i,timeInMs:t,actionName:"UpdateIncidentInclusive",actionResult:r})};this.logCreateIncident=function(n,t,i,r){u("Microsoft.Mac.SelfAssist.CommercialIncidentAction",{incidentId:n,fileCount:i,timeInMs:t,actionName:"CreateIncidentInclusive",actionResult:r})};n.$on(r.incidentCreation.productPicked,function(n,i){t.logCustomEvent(r.incidentCreation.productPicked,f,{"ms.scvalue":i})})}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("contactUsTelemetryService",["$rootScope","clientTelemetryService","wedcsService",function(n,t,i){n.$on("RoutingServiceResult",function(n,t){i.logCustomEvent("cadworkflow","machinelearning",{"ms.scvalue":JSON.stringify(t)})})}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("correlationVectorService",["$window","$rootScope","$cookies",function(n,t,i){this.extendCv=function(){if(n&&n.Asimov&&n.Asimov.cv){n.Asimov.cv.extend();var r=i.get("MS-CV");r&&n.Asimov.CorrelationVector.isValid(r)&&i.put("MS-CV",n.Asimov.cv.getValue(),{domain:"microsoft.com",path:"/"});t.$broadcast("cvExtention",n.Asimov.cv.getValue())}};this.getValue=function(){return n&&n.Asimov&&n.Asimov.cv?n.Asimov.cv.getValue():""}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("geoTelemetryService",["$rootScope","wedcsService",function(n,t){var i={geoOptionsPresented:"geoOptionsPresented",geoAccess:"geoAccess",geoContinue:"geoContinue",geoNotAvailable:"geoNotAvailable"},r="geoAction";n.$on("GeoOptionsPresented",function(n,u){t.logCustomEvent(i.geoOptionsPresented,r,{"ms.scvalue":u})});n.$on("GeoContinue",function(n,u){t.logCustomEvent(i.geoContinue,r,{"ms.scvalue":u})});n.$on("GeoAccess",function(n,u){t.logCustomEvent(i.geoAccess,r,{"ms.scvalue":u})});n.$on("GeoNotAvailable",function(n,u){t.logCustomEvent(i.geoNotAvailable,r,{"ms.scvalue":u})})}])}(angular.module(microsoft.support.moduleName)),function(n){var t=function(n,t,i,r,u){var f={name:"Microsoft.Mac.SelfAssist.KbArticleAction",content:{"Microsoft.Mac.SelfAssist.KbArticleAction":{actionName:t,title:i,locale:r,articleId:u}}};return n.populateDefaultFields(f)},i={machineTranslatedArticleLoaded:"machineTranslatedArticleTranslated",machineTranslationFailed:"machineTranslationFailed"};n.service("kbTelemetryService",["clientTelemetryService",function(n){this.logMtArticleTranslated=function(r,u,f){var e="translation of articleId "+r+" succeeded in "+f+"ms",o=t(n,i.machineTranslatedArticleLoaded,e,u,r);n.pushEvent(o)};this.logMtArticleTranslationFailed=function(r,u,f){angular.isString(u)&&u.length!=0||(u="unspecified");var e="translation of articleId "+r+" failed for reason "+u,o=t(n,i.machineTranslationFailed,e,f,r);n.pushEvent(o)}}])}(angular.module(microsoft.support.moduleName));app.service("linkTaggingService",["$document",function(n){this.tagContainerLinks=function(t,i){i=i?i+"-":"";angular.forEach(n.find(t+" a"),function(n,t){angular.element(n).attr("id",i+"link-"+(t+1))})}}]),function(n){n.service("menuTelemetryService",["$window","$rootScope","$location","clientConfig","clientTelemetryService","nativeAppService","languageService","serverInfo",function(n,t,i,r,u){var f={unknown:"unknown",menuLinkClicked:"menuLinkClicked",menuExtraClicked:"menuExtraClicked"},e={nativeAppClosing:"nativeAppClosing",notifyAppClosingComplete:"notifyAppClosingComplete"},o=function(n,t){var i={name:"Microsoft.Mac.SelfAssist.SupportMenuAction",content:{"Microsoft.Mac.SelfAssist.SupportMenuAction":{actionName:n,link:t&&t.link&&t.link.linkUrl?t.link.linkUrl:""}}};i=u.populateDefaultFields(i);u.pushEvent(i)},l=function(n,t){var i={name:"Microsoft.Mac.SelfAssist.ContactUsAction",content:{"Microsoft.Mac.SelfAssist.ContactUsAction":{actionName:n,link:t&&t.link&&t.link.linkUrl?t.link.linkUrl:""}}};i=u.populateDefaultFields(i);u.pushEvent(i)},c=function(n){var t={name:"Microsoft.Mac.SelfAssist.SiteFeedback",content:{"Microsoft.Mac.SelfAssist.SiteFeedback":{actionName:"SiteFeedback",type:n&&n.type?n.type:"",comment:n&&n.comment?n.comment:""}}};t=u.populateDefaultFields(t);u.pushEvent(t)},s=function(){var n={name:"Microsoft.Mac.SelfAssist.PageAction",content:{"Microsoft.Mac.SelfAssist.PageAction":{actionName:"PageUnload",custom1:i.absUrl()}}};n=u.populateDefaultFields(n);u.pushEvent(n)},h=function(n){var t={name:"Microsoft.Mac.SelfAssist.SupportAppAction",content:{"Microsoft.Mac.SelfAssist.SupportAppAction":{actionName:n}}};t=u.populateDefaultFields(t);u.pushEvent(t)};t.$on("MenuLinkClicked",function(n,t){o(f.menuLinkClicked,t)});t.$on("MenuExtraClicked",function(n,t){o(f.menuExtraClicked,t)});t.$on("SiteFeedback",function(n,t){c(t)});t.$on("NativeAppClosing",function(){h(e.nativeAppClosing)});t.$on("NotifyAppClosingComplete",function(){h(e.notifyAppClosingComplete)});$(n).bind("unload",s);$(n).bind("onunload",s)}])}(angular.module(microsoft.support.moduleName)),function(n){n.factory("qosTelemetryInterceptor",["$q","$rootScope","$log",function(n,t,i){function u(n){return e.some(function(t){return t.test(n)})}function f(n){var i={};i.latency=(new Date).getTime()-n.config.startTime;i.status=n.status;i.operation=n.config.url;n.config&&n.config.httpAppOptions&&n.config.httpAppOptions.qosOperation&&(i.qosOperation=n.config.httpAppOptions.qosOperation);t.$broadcast("QoS",i)}function o(n){var i={};i.operation="//app/invalid-request";i.status=500;i.latency=0;i.custom=JSON.stringify(n);t.$broadcast("QoS",i)}var r={},e=[/html$/,/^\/\/caribe/];return r.request=function(n){return n.startTime=(new Date).getTime(),n},r.response=function(n){return n&&n.config&&!u(n.config.url)&&f(n),n},r.responseError=function(t){return t&&t.config&&!u(t.config.url)?f(t):o(t),i.error("Error occurred during http request",JSON.stringify(t)),n.reject(t)},r}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("qosTelemetryService",["$rootScope","$q","$window","$location","clientTelemetryService","chatStateService",function(n,t,i,r,u,f){function c(n){var t=n.operation.replace(/[?].*/,"");return t.match(/^\/api/)?t=t.split("/").splice(0,4).join("/"):t.match(/^https:\/\/dgps/)&&(t=o.dgps.suggest),t===o.awasa.error&&n.custom&&n.custom.errorCode&&(t=t+"/"+n.custom.errorCode.toLowerCase()),t}function l(n){return n.latency="latency"in n?n.latency:-1,n.operation="operation"in n?n.operation:"",n.status="status"in n?n.status+"":"",n.error="error"in n?n.error:-1,n.custom="custom"in n?n.custom:"",n.subject=f.getSubject()||"",n}function s(n,t){var i,o,n;t=l(t);i=t.qosOperation!=null?t.qosOperation.name:c(t);o=t.qosOperation!=null?t.qosOperation.description:e[i]?e[i].description:"";angular.isObject(t.custom)&&(t.custom=JSON.stringify(t.custom));n={name:"Ms.Webi.OutgoingRequest",content:{"Ms.Qos.OutgoingServiceRequest":{operationName:i,dependencyName:"SelfAssistWeb",dependencyType:"WebService",dependencyOperationName:"",latencyMs:t.latency,targetUri:t.operation,succeeded:t.status>=200&&t.status<400,serviceErrorCode:t.error,protocolStatusCode:t.status},"Ms.Webi.OutgoingRequest":{description:o,route:r.url(),visitId:f.getVisitId(),custom1:t.custom}}};n=u.populateDefaultFields(n);u.pushEvent(n)}var h=this,o={app:{exception:"//app/exception",error:"//app/error",unknownRoute:"//app/unknown-route",unknownCommand:"//app/unknown-command",commandError:"//app/command-error",dupeCommandError:"//app/dupe-command-error",invalidRequest:"//app/invalid-request",beginsharing:"//app/begin-sharing",pausesharingbyuser:"//app/pause-sharing-by-user",resumesharingbyuser:"//app/resume-sharing-by-user",endsharingbyuser:"//app/end-sharing-by-user",downloadCSS:"//app/download-css"},awasa:{error:"//awasa/error",callback:"//awasa/callback",chat:"//awasa/chat",times:"//awasa/times",sendMessage:"//awasa/message",disengage:"//awasa/disengage",download:"//awasa/download",initialize:"//awasa/initialize",channelDisconnect:"//awasa/channel-disconnect",channelReconnect:"//awasa/channel-reconnect",agentDisconnect:"//awasa/agent-disconnect",agentReconnect:"//awasa/agent-reconnect",sendCommand:"//awasa/send-command",channelStatus:"//awasa/channel-status",chatReconnectTimedOut:"//awasa/chat-reconnect-timeout",getQueueLength:"//awasa/get-queue-length"},dgps:{suggest:"//dgps/suggestions",unknownLocale:"//dgps/unknownlocale",invalid:"//dgps/invalid"},"native":{appStartContext:"//app/appStartContext"},dbs:{invalid:"//dbs/invalid"},hip:{download:"//hip/download"},geo:{init:"//geo/init",changes:"//geo/changes"}},e;this.eventTypes=o;e={};e["/api/content/GetAgent"]={description:"Event triggered when agent information is requested from Awasa."};e["/api/content/GetCompassContentForPage"]={description:"Event triggered when resources such as strings and images are requested from Compass."};e["/api/content/GetCompassContentForPartner"]={description:"Event triggered when resources such as strings are requested from Compass for a partner."};e["/api/Devices/Index"]={description:"Event triggered when device information associated with the user is requested from DDS."};e["/api/kb/GetKbArticle"]={description:"Event triggered when a KB article is requested."};e["/api/search/index"]={description:"Event triggered to provide search results for a given search term"};e["/api/Token/GetToken"]={description:"Event triggered when a security token to allow the user to use the chat and callback functionality is requested from the Awasa Security service."};e["/api/Token/GetUserState"]={description:"Event triggered when encryption of user information is requested from Awasa."};e["/api/v1/AutoSuggestion"]={description:"Event triggered when autosuggestions are requested from DGPS. This request goes directly to the DGPS endpoint."};e["/app/ScheduleCallbackTimesTimeout"]={description:"Event triggered when a timeout occurs while waiting for the times available to schedule a call."};e[o.app.error]={description:"Event triggered when an error occurs in the code running on the client side."};e[o.app.exception]={description:"Event triggered when exception is caught by the AngularJS exception handler."};e[o.app.unknownRoute]={description:"Event triggered when the user attempts to go to a route not rendered by support.microsoft.com"};e[o.app.unknownCommand]={description:"Event triggered when the a command received from the native app is not understood or is unknown to web"};e[o.app.commandError]={description:"Event triggered when a command received from the native app has failed"};e[o.app.dupeCommandError]={description:"Event triggered when a duplicate command is sent to the app for processing, only one of a type should fire at a time."};e[o.app.beginsharing]={description:"Event triggered when beginsharing command is sent from web to app"};e[o.app.pausesharingbyuser]={description:"Event triggered when pausesharingbyuser command is sent from web to app"};e[o.app.resumesharingbyuser]={description:"Event triggered when resumesharingbyuser command is sent from web to app"};e[o.app.endsharingbyuser]={description:"Event triggered when endsharingbyuser command is sent from web to app"};e[o.app.downloadCSS]={description:"Event triggered when CSS is downloaded"};e[o.awasa.callback]={description:"Event triggered when a callback (either schedule or immediate) is requested from Awasa. This request goes directly to the Awasa endpoint."};e[o.awasa.chat]={description:"Event triggered when a chat is queued. This request goes directly to the Awasa endpoint."};e[o.awasa.disengage]={description:"Event triggered when a chat is ended or a user leaves the queue. This request goes directly to the Awasa endpoint."};e[o.awasa.error]={description:"Event triggered when an error occurs in the client-side Awasa framework."};e[o.awasa.sendMessage]={description:"Event triggered when a message is sent or received from the chat experience. This request goes directly to the Awasa endpoint."};e[o.awasa.times]={description:"Event triggered when a user request to see the open time slots to schedule a call. This request goes directly to the Awasa endpoint."};e[o.awasa.download]={description:"Event triggered when the Awasa SDK is downloaded to the client"};e[o.awasa.initialize]={description:"Event triggered when the 'loaded' callback is called from the Awasa SDK. Indicates that the Awasa SDK has successfully been initialized."};e[o.awasa.channelReconnect]={description:"Event triggered from the Awasa SDK when the user reconnects to the chat after being disconnected"};e[o.awasa.channelDisconnect]={description:"Event triggered from the Awasa SDK when a connection issue occurs on the user side of a chat"};e[o.awasa.agentDisconnect]={description:"Event triggered from the Awasa SDK when a connection issue occurs on the agent side of a chat"};e[o.awasa.agentReconnect]={description:"Event triggrered from the Awasa SDK when the agent reconnects to the chat after being disconnected"};e[o.awasa.sendCommand]={description:"Event triggered when a command is sent to the agent via the Awasa SDK."};e[o.awasa.channelStatus]={description:"Event triggered when chat and callback status is requested from the Awasa SDK."};e[o.awasa.chatReconnectTimedOut]={description:"Event triggered when attempting to reconnect chat times out."};e[o.native.appStartContext]={description:"Event triggered when the app starts and sends back context on how the app was launched."};e[o.awasa.getQueueLength]={description:"Event triggered from the Awasa SDK when it fails to retrieve the queue position."};e["//awasa/callback/channel_error"]={description:"Event triggered when there is an issue with the Awasa callback channel."};e["//awasa/callback/channel_contactinvalid"]={description:"Event triggered when the contact number is rejected as invalid by the telephony service"};e["//awasa/callback/request_unauthorized"]={description:"Event triggered when a callback API call is made with an invalid token"};e[o.geo.init]={description:"Event triggered by geoComponent when it is instantiated/used"};e[o.geo.changes]={description:"Event triggered by geoComponent when bindings are changed/updated"};this.createEvent=function(n){var i={operation:n},r=(new Date).getTime(),u=t.defer();return u.promise.then(function(n){i.latency=(new Date).getTime()-r;i.status=200;i.custom=n||"";s({},i)},function(n){i.latency=(new Date).getTime()-r;i.status=n&&n.status||500;i.custom=n||"";s({},i)}),u};n.$on("QoS",s);n.$on("AutoSuggestBadResults",function(){h.createEvent(o.dgps.invalid).reject()});n.$on("500Error",function(n,t){t&&s(n,{operation:o.app.error,status:"500",custom:t})});n.$on("404Error",function(n,t){t&&s(n,{operation:o.app.unknownRoute,status:"404",custom:t})});n.$on("AppStartContext",function(n,t){s(n,{operation:o.native.appStartContext,status:"200",custom:t})})}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("searchTelemetryService",["$rootScope","$location","clientTelemetryService","wedcsService",function(n,t,i,r){var f={unknown:"unknown",searchPrimaryClicked:"searchPrimaryClicked",instantAnswerFound:"instantAnswerFound"},u="searchAction",e=function(n,t,r){t=t||"";r=r||"";var u={name:"Microsoft.Mac.SelfAssist.SearchAction",content:{"Microsoft.Mac.SelfAssist.SearchAction":{actionName:n,custom1:t,custom2:r}}};u=i.populateDefaultFields(u);i.pushEvent(u)};n.$on("SearchPrimaryClicked",function(n,i){e(f.searchPrimaryClicked,i.Location,i.SearchString);r.logCustomEvent("search",u,{"ms.scnum":t.absUrl(),"ms.searchquery":i.SearchString})});n.$on("SearchResponse",function(n,t){t&&t.instantAnswer&&(e(f.instantAnswerFound),r.logCustomEvent("instant-answer-found",u,{"ms.scvalue":t.instantAnswer.sourceId||""}))});n.$on("AutoSuggestSelected",function(n,t){r.logCustomEvent("auto-suggest-selected",u,{"ms.sctype":t.suggestion.AutoSuggestionType,"ms.scvalue":t.suggestion.CompletionText,"ms.searchquery":t.query})})}])}(angular.module(microsoft.support.moduleName)),function(n){n.run(["chatTelemetryService","searchTelemetryService","geoTelemetryService","callbackTelemetryService","menuTelemetryService","qosTelemetryService","wedcsService","authenticationHelperService","seoService","appCommandQosTelemetryService","navigationOverrideService","contactUsTelemetryService","commercialTelemetryService",function(){}]);n.config(["$httpProvider",function(n){n.interceptors.push("qosTelemetryInterceptor");n.interceptors.push("errorInterceptor");n.interceptors.push("httpAppOptionsInterceptor")}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("virtualAgentService",["$http","$q","$rootScope","messageTypes",function(n,t,i){function f(n,u){if(!n.data.content||!n.data.content.webResults)return t.reject({error:"Invalid property values"});var f=e(n.data.content);return r=n.data.sessionId,results=angular.extend({results:n.data.content.webResults.items.map(o),totalCount:n.data.content.webResults.totalEstimatedMatches,summarizedQuery:n.data.content.webResults.query},f),u?i.$broadcast("VirtualAgentDialogResponse",results):i.$broadcast("SearchResponse",results),results}function e(n){var t={instantAnswer:null,dialogQuestion:null},i,r,u,f;return n.answers?(answersText=JSON.stringify(n.answers).replace(new RegExp(String.fromCharCode(57356),"g"),"<strong>").replace(new RegExp(String.fromCharCode(57357),"g"),"<\/strong>"),i=JSON.parse(answersText),i&&i.length&&(r=i.filter(function(n){return n.type==="InstantAnswer"})[0],u=i.filter(function(n){return n.type==="Dialog"&&!n.isChitChat})[0],r=r||u,f=i.filter(function(n){return n.type==="Dialog"&&n.isChitChat})[0],t.dialogQuestion=u&&u.question&&u.question.text,t.instantAnswer=r&&r.content&&r.content[0],t.instantAnswer&&(t.instantAnswer.sourceId=r.sourceId),t.chitChat=f&&f.content&&f.content[0],t.answerType=i[0].scriptAnswerType,t.sourceId=i[0].sourceId||""),t):t}function o(n){return{simpleTitle:n.title.replace(/\<\/?b\>/g,""),title:n.title,description:n.description,link:n.url,displayLink:n.displayUrl}}var r,u={};this.fetchContent=function(i){if(i.forceRefresh!==!0&&u[i.query])return t.when(u[i.query]);var e={query:encodeURIComponent(i.query),page:i.page,sessionId:r,withDialog:i.withDialog||!1};return n.post("/api/search/virtualagent",e).then(function(n){return f(n,e.withDialog)}).then(function(n){return i.cacheKey&&(u[i.cacheKey]=n),n})};this.sessionId=function(n){return n!==undefined&&(r=n),r}}])}(angular.module(microsoft.support.moduleName));app.directive("scrollTrack",["$window","wedcsService",function(n,t){return{restrict:"A",link:function(i){var r=!1;angular.element(n).off("scroll");angular.element(n).on("scroll",function(){!r&&n&&n.scrollY&&n.innerHeight&&(n.scrollY>n.innerHeight||n.scrollY+n.innerHeight+1>=$(document).height())&&(r=!0,t.logCustomEvent("fullview-scroll"))});i.$on("destroy",function(){angular.element(n).off("scroll")})}}}]),function(n){n.service("wedcsService",["$rootScope","$window","$location","$timeout","$route","rccService",function(n,t,i,r,u){function h(n){return n.type=="checkbox"?n.checked+"_"+n.value:n.nodeName=="A"?n.href:n.value}function c(n){var t="";return n.id&&(t="elemId_"+n.id),n.name&&(t=t+"_elemName_"+n.name),n.parentNode&&n.parentNode.id&&(t=t+"_parId_"+n.parentNode.id),n.parentNode&&n.parentNode.name&&(t=t+"_parName_"+n.parentNode.name),n.parentNode&&n.parentNode.parentNode&&n.parentNode.parentNode.id&&(t=t+"_parParId_"+n.parentNode.parentNode.id),n.parentNode&&n.parentNode.parentNode&&n.parentNode.parentNode.name&&(t=t+"_parParName_"+n.parentNode.parentNode.name),n.parentNode&&n.parentNode.parentNode&&n.parentNode.parentNode.parentNode&&n.parentNode.parentNode.parentNode.id&&(t=t+"_parParParId_"+n.parentNode.parentNode.parentNode.id),n.parentNode&&n.parentNode.parentNode&&n.parentNode.parentNode.parentNode&&n.parentNode.parentNode.parentNode.name&&(t=t+"_parParParName_"+n.parentNode.parentNode.parentNode.name),n.className&&(t=t+"_elemClass_"+n.className),n.type&&(t=t+"_elemType_"+n.type),t}function e(n){n.hasAttribute("data-nolog")||t&&t.MscomCustomEvent&&t.MscomCustomEvent("ms.scn",c(n),"ms.scvalue",h(n),"ms.scnct","userAction")}function s(n,i,r){if(n&&t&&t.MscomCustomEvent){var u=[];r=r||{};r["ms.scn"]=n;i&&(r["ms.scnct"]=i);angular.forEach(r,function(n,t){u.push(t+"="+n)});t.MscomCustomEvent.apply(t,u)}}var o=!1,f;this.logWEDCS=e;this.logCustomEvent=s;$(document).ready(function(){$(document).on("click","input[type='radio'], input[type='checkbox'], button, a:not(a[id]), li",function(){e(this)});$(document).on("change","textarea, select",function(){e(this)})});n.$on("ButtonClickedAndDisabled",function(n,t){e(t.target)});n.$on("ChatMessageReceived",function(){t&&t.MscomCustomEvent&&t.MscomCustomEvent("ms.scn","agent-chat-post","ms.scnct","chatAction")});n.$on("ChatMessageSendSuccess",function(){t&&t.MscomCustomEvent&&t.MscomCustomEvent("ms.scn","customer-chat-post","ms.scnct","chatAction")});n.$on("metaTagsUpdated",function(){t&&t.MscomCustomEvent&&t.MscomCustomEvent("ms.scnct","viewLoad")});n.$on("PageLoadComplete",function(){t&&t.MscomCustomEvent&&t.MscomCustomEvent("ms.scnct","viewLoad")});n.$on("ProductPageLoaded",function(n,i){t&&t.MscomCustomEvent&&t.MscomCustomEvent("ms.scn","product-page-loaded","ms.scnct",i.pagetype)});n.$on("$routeChangeSuccess",function(){u.current.controller!=="SupportMenuController"||o||(t&&t.MscomCustomEvent&&t.MscomCustomEvent("ms.scnct","CAD-Displayed"),o=!0);f&&r.cancel(f);f=r(function(){s("no-bounce");f=null},8e3)})}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("compileHtml",["$compile","$parse",function(n){return{restrict:"A",link:function(t,i,r){var u=!1;r.content==null||u||(u=!0,t.$watch(function(n){return n[r.content]},function(){t.kbArticle!=null&&(i.html(t.kbArticle),n(i.contents())(t))},!0))}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("contentProperties",["$filter","compassService",function(n,t){return{restrict:"A",templateUrl:"/PartialViews/Kb/contentProperties.html",scope:{},link:function(i,r,u){var f=function(){var n=t.getContentProperties();n&&(i.contentProperties=n)};i.$on("CompassContentReady",function(){f()});f();i.articleId=u.articleId;i.lastModified=n("date")(u.lastModified);i.revision=u.revision;i.products=u.products?JSON.parse(u.products):[];i.keywords=u.keywords?JSON.parse(u.keywords):null;i.appliesTo=u.appliesTo?JSON.parse(u.appliesTo):[];angular.forEach(i.products,function(n){t.getProduct(n).then(function(n){i.appliesTo.push(n.name)})})}}}])}(angular.module(microsoft.support.moduleName));app.directive("contentSurvey",["$rootScope","compassService","flightService",function(n,t){return{restrict:"A",templateUrl:"/PartialViews/Kb/survey.html",scope:{},link:function(i){var r=function(){var n=t.getContentSurvey();n&&(i.contentSurvey=n)};i.$on("CompassContentReady",function(){r()});r();i.showSurvey=!0;i.choiceCaptionClass="choice-caption";i.OnSubmit=function(){i.type!=null?(n.$broadcast("KbSurvey",{type:i.type,suggestion:i.suggestion}),i.showSurvey=!1):i.choiceCaptionClass+=" alert alert-error"};i.showButtons=!0;i.showTextBox=!1;i.onYesNoSomewhatClick=function(n){i.type=n;i.showButtons=!1;i.showTextBox=!0}}}}]),function(n){n.directive("fixIt",["$window",function(n){return{restrict:"A",templateUrl:"/PartialViews/Kb/fixIt.html",scope:{},link:function(t,i,r){t.link=r.link;t.caption=r.caption;t.text=r.text;t.nav=function(t){n.location.href=t}}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("guidedWalkThrough",["languageService",function(n){return{restrict:"A",templateUrl:"/PartialViews/kb/guidedWalkThrough.html",scope:{},link:function(t,i,r){var u=n.lang();t.gwt={link:"//support2.microsoft.com/common/survey.aspx?scid=sw;"+u+";"+r.gwtid+"&showpage=1",linkcaption:r.linkcaption,description:r.description}}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("hdabs",[function(){return{restrict:"A",templateUrl:"/PartialViews/kb/hdabs.html",scope:{},transclude:!0,link:function(n,t,i){n.hdabs={graphicSrc:i.graphicSrc,graphicAlt:i.graphicAlt}}}}])}(angular.module(microsoft.support.moduleName));app.directive("kbBanner",[function(){return{restrict:"A",templateUrl:"/PartialViews/Kb/banner.html",scope:{},link:function(n,t,i){n.title=i.title;n.description=i.description;n.imageUrl=i.imageUrl;n.linkText=i.linkText;n.linkUrl=i.linkUrl}}}]);app.directive("kbBingCtfWidget",["$document","$location","$log","kbTelemetryService",function(n,t,i,r){var u=null,e=function(){u.mtLoading=!0;$(".kb-article").hide()},f=function(){u.mtLoading=!1;$(".kb-article").show()},o=function(){var r="",n=t.path(),i;return n.charAt(n.length-1)=="/"&&(n=n.substr(0,n.length-1)),i=n.match(/[0-9]*$/),i&&(r=i[0]),r},s=function(n,t){var s,h,c;$("#bing-translate").length===0&&angular.isString(n)&&n.length>0&&angular.isString(t)&&t.length>0&&(s=o(),e(),h="https://ssl.microsofttranslator.com/ajax/v2/widget.aspx?siteData="+encodeURIComponent(t)+"&mode=manual&from=en&layout=ts&to="+n+"&originalDocument=/api/content/kbctf/"+s+"&category=e9b9dd63-c277-4572-9d08-fd459d9b844d_tech",c=Date.now(),$.getScript(h).done(function(){i.info("translator script element was loaded.");var t=Date.now();r.logMtArticleTranslated(s,n,t-c);u.$apply(f)}).fail(function(t,i,e){r.logMtArticleTranslationFailed(s,e,n);u.$apply(f)}))};return{restrict:"A",link:function(n,t,i){u=n;s(i.requestedlang,i.widgetsitedata)}}}]),function(n){n.controller("KbController",["$scope","$log","$window","$routeParams","$sce","$rootScope","$location","contentApiService",function(n,t,i,r,u,f,e,o){n.reset=function(){if(r.articleId!=null){var t=o.getKbArticle(r.articleId,e.search());t.then(function(t){n.kbArticle=t.kbArticle;t.noIndex&&f.$broadcast("NoIndex")})}};n.reset()}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("detectOperatingSystem",["osService",function(n){return{restrict:"A",templateUrl:"/PartialViews/Kb/DetectOS.html",scope:{},link:function(t,i,r){t.os32bitCaption=r.os32bitCaption;t.os64bitCaption=r.os64bitCaption;t.osOtherCaption=r.osOtherCaption;t.currentOS=n.isWindows()?n.is64bitWindows()?t.os64bitCaption:t.os32bitCaption:t.osOtherCaption}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("kbMetaTag",["$rootScope",function(n){return{restrict:"A",link:function(t,i,r){n.$broadcast("UpdateMetaTag",{name:r.name,value:r.value});t.$on("$destroy",function(){n.$broadcast("RemoveMetaTag",{name:r.name})})}}}])}(angular.module(microsoft.support.moduleName));app.directive("kbMsnSurvey",["$rootScope","$timeout","$window",function(){return{restrict:"A",templateUrl:"/PartialViews/Kb/msnsurvey.html",scope:{},link:function(n,t,i){n.caption=i.caption;n.yesCaption=i.yesCap;n.noCaption=i.noCap;n.yesTarget=i.yesTarget;n.noTarget=i.noTarget}}}]);app.directive("kbProductPicker",[function(){return{restrict:"A",templateUrl:"/PartialViews/Kb/productPicker.html",scope:{},link:function(n,t,i){n.products=n.$eval(i.products);n.products.unshift({BookMark:"all",ProductName:i.allProductsLabel});n.selectedProduct=n.products[0];n.$watch("selectedProduct",function(){n.scrollTo(n.selectedProduct.BookMark)});n.scrollTo=function(n){if(angular.isString(n))if(n=="all")$(".what-to-try").show();else{$(".what-to-try").hide();var t="."+n;$(t).show()}}}}}]);app.directive("kbMachineTranslated",[function(){return{restrict:"A",template:"<h4 class='kb-machine-translation-notice'>{{notice}}<\/h4>",scope:{},link:function(n,t,i){n.notice=i.caption}}}]),function(n){n.directive("mats",["$compile","$parse","$sce",function(n,t,i){return{restrict:"A",templateUrl:"/PartialViews/Kb/mats.html",scope:{},link:function(n,t,r){n.mats={htmlCurr:i.trustAsHtml(r.matsHtml),learnMore:r.learnMore,learnMoreCaption:r.learnMoreCaption,runNow:r.runNow,runNowCaption:r.runNowCaption}}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("MsnSurveyController",["$scope","$rootScope","$window",function(n,t,i){n.positiveSurvey=function(){i.location.href=n.yesTarget;t.$broadcast("KbMsnSurvey",{response:"yes"})};n.negativeSurvey=function(){n.noTarget&&(i.location.href=n.noTarget);t.$broadcast("KbMsnSurvey",{response:"no"})}}])}(angular.module(microsoft.support.moduleName)),function(n){n.directive("thirdParty",["$compile","$parse","languageService",function(n,t,i){return{restrict:"A",templateUrl:"/PartialViews/Kb/thirdParty.html",scope:{},link:function(n,t,r){n.thirdParty={tooltip:r.tooltip,tplink:r.tplink,tpcaption:r.tpcaption,thirdPartyImage:"http://support.microsoft.com/library/images/support/"+i.langLocale()+"/thirdparty.png"}}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.controller("VirtualAgentController",["$scope","$rootScope","$log","virtualAgentDialogService","messageService","messageTypes","chatService","chatStateService","chatRoutingService","clientConfig","compassService","flightService","chatContextService","yesNoResults","virtualAgentResetModalService",function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function d(t){n.virtualAgentRequest=r.fetchDialogContentAsMessage({query:t,cacheKey:n.messages[0].text}).then(function(t){t.forEach(function(t){t.view=n.view;p(t,t.messageType)});t.followWithModalities?b():t.followWithSurvey&&p({text:n.view.results.followUpQuestion,view:n.view},f.VirtualAgent)},function(){p({text:n.view&&n.view.introduction&&n.view.introduction.errorResponse},f.VirtualAgent);b()})["finally"](function(){n.isSearching=!1})}function g(t){return n.messages[n.messages.length-2].text==n.view.results.followUpQuestion?(s.getYesNoForAnswer(t,n.view.results.followUpQuestion).then(function(t){t.Result==v.yes?p({text:n.view.results.followUpSolutionSuccess},f.VirtualAgent):b()}),!0):!1}function b(){p({view:n.view,chatAction:n.initChat,callbackAction:n.initCallback,context:r.packageUserMessages(n.messages)},f.ModalitySelection);n.isInputDisabled=!0}function p(t,i){(i==f.InstantAnswer||i==f.Results)&&(t.header=n.view.results.answerHeader);var r=u.appendMessage(w,t,i);return n.messages=u.getMessages(w),r}function k(){return n.view&&n.view.resetModal&&n.view.resetModal.resetButtonLabel}var w="Virtual-Agent";n.reset=function(){n.isInputDisabled=!1;n.agentStatus=e.getAgentStatus();n.channelStatus=e.getChannelStatus();n.typingStatus=e.getTypingStatus();n.messageTypes=f;e.setCurrentMessageRoom(w);n.messages=u.restoreMessages(w);u.removeMessagesFromStorage(w);r.bindModalityCallbacks(n.messages,{chat:n.initChat,callback:n.initCallback});c.getVirtualAgent().then(function(i){n.view=i;n.view.instantAnswer=n.view&&n.view.results&&n.view.results.instantAnswer;t.$broadcast("ChatFrameHeader",{text:n.view.introduction.header,image:n.view.introduction.headerIcon,showReset:!0,resetLabel:k()});n.messages||p({text:n.view.introduction.message},f.VirtualAgent)})};n.initChat=function(){n.isInputDisabled=!0;h.authInfo.authStatus()!==1&&(u.storeMessages(w),r.storeSession());var t=JSON.stringify(r.packageMessages(n.messages));a.setValues({prechatsurvey:t}).then(function(){e.enqueueChat({isAuth:!0}).then(function(n){i.log("In queue:",n)},function(n){i.error("Queue failed:",n)})})};n.initCallback=function(){n.isInputDisabled=!0;h.authInfo.authStatus()!==1&&(u.storeMessages(w),r.storeSession())};n.onChatSurveyCompleted=function(){p({text:n.view.chat.followUp},f.VirtualAgent)};n.submit=function(i,r){if(i.preventDefault(),r){var u=p({text:r,errorView:n.view.chat.error.failedMessage},f.User);n.userInput="";o.getChatEstablished()?e.sendMessage(u):(t.$broadcast("VirtualAgentDialogUserResponse",{searchText:r}),n.isSearching=!0,g(r)||d(r))}};n.$on("AgentDataReady",function(i,r){n.isInputDisabled=!1;n.agentStatus.prevAgent&&p({header:n.view.chat.agent.agentTransferHeader,view:n.view.chat.agent,oldAgent:n.agentStatus.prevAgent,newAgent:r},f.Transfer);t.$broadcast("ChatFrameHeader",{text:n.view.introduction.header,image:{url:r.ImageUrl},showEnd:!0,endText:n.view.chat.endChat,showReset:!1,resetLabel:k()})});n.$on("ChatSessionClosed",function(r,u){i.log("Chat Ended:",u);p({header:n.view.chat.endingText,view:n.view.chat.agent,agent:n.agentStatus.agent,isJoining:!1},f.AgentEnd);t.$broadcast("ChatFrameHeader",{text:n.view.introduction.header,image:n.view.introduction.headerIcon,showEnd:!1,showReset:!0,resetLabel:k()});p({header:n.view.chat.survey.surveyTitle,view:n.view.chat.survey,surveyData:{agent:n.agentStatus.agent.AgentId,chatId:o.getChatId()},surveyAction:n.onChatSurveyCompleted},f.Survey)});n.$on("EnqueueCallbackSuccess",function(){n.isInputDisabled=!1;p({text:n.view.modalities.callbackFollowUp},f.VirtualAgent)});n.$on("VirtualAgentReset",function(){y.confirmReset().then(function(){n.isInputDisabled=!1;var t=n.view&&n.view.introduction&&n.view.introduction.resetMessage;r.clearHistory();u.clearMessages(w);u.appendMessage(w,{text:t},f.VirtualAgent);n.messages=u.getMessages(w)})});n.$on("UserSignedIn",function(){n.userName=h&&h.authInfo&&h.authInfo.firstName});n.$on("VirtualAgentDialogTimeout",function(){p({text:n.view&&n.view.introduction&&n.view.introduction.errorResponse},f.VirtualAgent);b()});n.reset()}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("virtualAgentDialogService",["$q","virtualAgentService","delayService","localStorageService","messageTypes",function(n,t,i,r,u){function s(n){var t=[],i=n.chitChat&&(n.chitChat.problem.name||n.chitChat.solutions[0].description);return n.instantAnswer?t.push({messageType:u.InstantAnswer,instantAnswer:n.instantAnswer}):i?t.push({messageType:u.VirtualAgent,text:i}):!n.dialogQuestion&&n.results.length&&t.push({messageType:u.Results,results:n.results}),n.dialogQuestion&&t.push({messageType:u.VirtualAgent,text:n.dialogQuestion}),t.followWithModalities=n.sourceId&&o.indexOf(n.sourceId.toUpperCase())!==-1,t.followWithSurvey=t.some(function(n){return n.messageType!=u.VirtualAgent})&&t.length===1,t}function h(){var n=r.getCacheContent(e);t.sessionId(n&&n.sessionId);r.commit(e,{})}function c(n){return{name:"***Instant answer: "+(n.instantAnswer&&n.instantAnswer.problem&&n.instantAnswer.problem.name&&n.instantAnswer.problem.name.replace(/<.*?>/g,""))||"",value:n.instantAnswer&&n.instantAnswer.solutions&&n.instantAnswer.solutions[0]&&n.instantAnswer.solutions[0].relatedHelpUrl||""}}function f(n){return n.text?n.text.replace(/<.*?>/g,""):n.messageType==u.Results?"**Self help links shown to user**":""}var o=["460AA932-32BC-4964-BE98-902434D067E0","22E44EA9-B89C-44A1-89C2-69AAD550F966"],e="virtual-agent-session";h();this.fetchDialogContentAsMessage=function(n){var r={page:1,withDialog:!0,forceRefresh:!0,delay:300},u;return angular.extend(r,n),u=t.fetchContent(r).then(s),i.delay(u,r.delay)};this.bindModalityCallbacks=function(n,t){n&&n.forEach(function(n){n.messageType==u.ModalitySelection&&(n.chatAction=t.chat,n.callbackAction=t.callback)})};this.clearHistory=function(){t.sessionId("")};this.storeSession=function(){r.commit(e,{sessionId:t.sessionId()})};this.packageMessages=function(n){var i=[],t;if(n)for(t=0;t<n.length;t++)n[t].messageType!=u.User?(n[t].messageType==u.InstantAnswer&&i.push(c(n[t])),t<n.length-1&&n[t+1].messageType==u.User?(i.push({name:f(n[t]),value:f(n[t+1])}),t+=1):i.push({name:f(n[t]),value:""})):i.push({name:"",value:f(n[t])});return i};this.packageUserMessages=function(n){return n.map(function(n){return n.messageType===u.User?n.text:""}).join(" ")}}])}(angular.module(microsoft.support.moduleName)),function(n){n.value("virtualAgentModalityStates",{Selecting:0,Connecting:1,Chatting:2,Callback:3,Error:4});n.directive("virtualAgentModality",["$log","$location","chatRoutingService","supportLinkService","modalityTags","virtualAgentModalityStates","messageService","chatService","compassService","chatStateService",function(n,t,i,r,u,f,e,o,s,h){function a(n){n.message.engaged.modality==u.callback?(n.callbackLink=n.message.engaged.link,n.callback()):(h.setSubject(n.message.engaged.subjectId),n.chat())}function v(n,t){t&&t.link&&t.link.linkUrl?n.externalLink=t:s.getContactUsProducts().then(function(t){n.products=t&&t.links})}function c(n,t){t&&t.length&&(r.hasAnyModalities(t,l)?(h.setSubject(r.extractSubjectFromList(t)),n.message.engaged={subjectId:h.getSubject(),modality:u.chat},o.initLazy({typingBoxId:"virtual-agent-chat-client-message-input-textbox"}).then(function(){return o.checkHours(t)}).then(function(t){n.chatLink=t[u.chat];n.callbackLink=t[u.callback];n.phoneLink=t[u.tollFree]})):n.linkOptions=t)}var l=[u.chat,u.callback,u.tollFree];return{restrict:"A",templateUrl:"/PartialViews/VirtualAgent/VirtualAgentModality.html",scope:{message:"=",view:"=",chatAction:"&",callbackAction:"&"},link:function(e){e.selections={};e.showCancel=!1;e.loadingModalities=!0;e.states=f;e.state=f.Selecting;e.contactUsLink="https://"+t.host()+"/{lang-locale}/contactus/";e.agentStatus=o.getAgentStatus();e.retryAction=null;e.reset=function(){e.message.engaged&&a(e);i.getMenuLinksForRoute(e.message.context).then(function(n){c(e,n)},function(n){v(e,n)})["finally"](function(){e.loadingModalities=!1})};e.selectLink=function(n){n.fromOldFlow=!0;r.followLink(n)};e.selectOption=function(n){e.chatLink="";e.callbackLink="";e.externalLink="";e.phoneLink="";n&&n.externalLink?e.externalLink=n:n&&s.getContactUsMenuLinks(n.link.linkUrl).then(function(n){c(e,n)})};e.chat=function(){e.state=f.Connecting;e.showCancel=!0;e.cancelAction=function(){e.state=f.Selecting;o.endChat();e.showCancel=!1};e.chatAction()};e.callback=function(){e.message.engaged={link:e.callbackLink,modality:u.callback};s.fetchContent(e.callbackLink.link.linkUrl.substring(1));e.state=f.Callback;e.showCancel=!0;e.cancelAction=function(){e.state=f.Selecting;e.showCancel=!1};e.callbackAction()};e.showModalities=function(){e.state=f.Selecting;e.showCancel=!1};e.$on("ChatSessionEstablished",function(){e.state=f.Chatting});e.$on("ChatFrameHeader",function(n,t){t.showEnd&&(e.showCancel=!1)});e.$on("EnqueueChatFailure",function(){e.state=f.Error;e.retryAction=e.chat});e.$on("EnqueueCallbackFailure",function(t,i){n.error("Callback enqueue failed:",JSON.stringify(i));e.state=f.Error;e.retryAction=e.callback});e.reset()}}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("virtualAgentResetModalService",["$modal",function(n){this.confirmReset=function(){var t=n.open({templateUrl:"/PartialViews/VirtualAgent/ResetConfirmationModal.html",backdropClass:"smc-modal-backdrop",controller:["$scope","$modalInstance","compassService",function(n,t,i){i.getVirtualAgent().then(function(t){n.view=t&&t.resetModal});n.confirm=function(){t.close()};n.cancel=function(){t.dismiss()}}]});return t.result}}])}(angular.module(microsoft.support.moduleName)),function(n){n.service("virtualAgentTelemetryService",["$rootScope","wedcsService","virtualAgentService",function(n,t,i){var r={response:"virtual-agent-dialog-user-response",content:"virtual-agent-dialog-content",feedback:"virtual-agent-dialog-feedback"},u="virtualAgentAction";n.$on("VirtualAgentDialogResponse",function(n,f){t.logCustomEvent(r.content,u,{"ms.scvalue":JSON.stringify({sourceId:f.sourceId||"",sessionId:i.sessionId(),question:!f.dialogQuestion?0:1,answer:!f.instantAnswer?0:1,chitchat:!f.chitChat?0:1,results:!f.results?0:1})})});n.$on("VirtualAgentDialogUserResponse",function(n,i){t.logCustomEvent(r.response,u,{"ms.scvalue":i.searchText})});n.$on("VirtualAgentSolutionFeedback",function(n,i){t.logCustomEvent(r.feedback,u,{"ms.scvalue":JSON.stringify({text:i.text,result:i.result.Result})})})}])}(angular.module(microsoft.support.moduleName))