ips.templates.set('core.alert.box'," <div class='ipsAlert' style='display: none' role='alertdialog' aria-describedby='{{id}}_message'>    <div class='modal-close'><i data-action='cancel' role='button' class='icon-close'></i></div> {{{icon}}} <div class='ipsAlert_msg ipsType_break' id='{{id}}_message'>  <strong>{{{text}}}</strong>  {{{subtext}}} </div> <ul class='ipsToolList ipsToolList_horizontal ipsPos_center ipsAlert_buttonRow ipsClear ipsClearfix'>  {{{buttons}}} </ul></div>");ips.templates.set('core.alert.icon'," <i id='alertIcon' class='ipsAlert_icon icon-info color-info' data-icon='{{icon}}'></i>");ips.templates.set('core.attachments.fileItem',"  <li class='ipsDataItem ipsAttach ipsContained {{#done}}ipsAttach_done{{/done}}' id='{{id}}' data-role='file' data-fileid='{{id}}' data-filesize='{{sizeRaw}}' data-filekey='{{securityKey}}'>  <div class='ipsDataItem_generic ipsDataItem_size2 ipsResponsive_hidePhone ipsResponsive_block ipsType_center' data-role='preview' {{#insertable}}data-action='insertFile'{{/insertable}} {{#thumb}}style='background-image: url( {{thumbnail}} )'{{/thumb}}>   {{#thumb}}    {{{thumb}}}   {{/thumb}}   <i class='fa fa-file ipsType_large' {{#thumb}}style='display: none'{{/thumb}}></i>  </div>  <div class='ipsDataItem_main' data-action='insertFile'>   <h2 class='ipsDataItem_title ipsType_medium ipsType_reset ipsAttach_title ipsTruncate ipsTruncate_line' data-role='title'>{{title}}</h2>   <p class='ipsDataItem_meta ipsType_light'>    {{size}}   </p>  </div>  <div class='ipsDataItem_generic ipsDataItem_size5'>   {{#status}}<span class='ipsAttachment_progress'><span data-role='progressbar'></span></span>{{/status}}   {{#statusText}}<span class='ipsType_light' data-role='status'>{{statusText}}</span>{{/statusText}}  </div>  <div class='ipsDataItem_generic ipsDataItem_size8 ipsType_right'>   <ul class='ipsList_inline'>    <li data-role='insert' {{#insertable}}style='display: none'{{/insertable}}>     <a href='#' data-action='insertFile' class='rb-btn-primary-sm-white-bg-small' data-ipsTooltip title='{{#lang}}insertIntoPost{{/lang}}'>      <i class='fa fa-plus'></i>     </a>    </li>    {{#supportsDelete}}<li data-role='deleteFileWrapper' {{#newUpload}}style='display: none'{{/newUpload}}>     <input type='hidden' name='{{field_name}}_keep[{{id}}]' value='1'>     <a href='#' data-role='deleteFile' class='rb-btn-primary-sm-white-bg-small' data-ipsTooltip title='{{#lang}}attachRemove{{/lang}}'>      <i class='fa fa-trash-o'></i> {{#lang}}delete{{/lang}}     </a>    </li>    {{/supportsDelete}}    {{^supportsDelete}}<li data-role='deleteFileWrapper' style='display: none'>     <input type='hidden' name='{{field_name}}_keep[{{id}}]' value='1'>     <a href='#' data-role='deleteFile'>&nbsp;</a>    </li>    {{/supportsDelete}}   </ul>  </div> </li>");ips.templates.set('core.attachments.imageItem',"  <div class='ipsGrid_span3 ipsAttach ipsImageAttach ipsPad_half ipsAreaBackground_light {{#done}}ipsAttach_done{{/done}}' id='{{id}}' data-role='file' data-fileid='{{id}}' data-fullsizeurl='{{imagesrc}}' data-thumbnailurl='{{thumbnail}}' data-fileType='image'>  <ul class='ipsList_inline ipsImageAttach_controls'>   <li data-role='insert' {{#insertable}}style='display: none'{{/insertable}}><a href='#' data-action='insertFile' class='rb-btn-primary-sm-white-bg-small' data-ipsTooltip title='{{#lang}}insertIntoPost{{/lang}}'><i class='fa fa-plus'></i></a></li>   </li>   <li class='ipsPos_right' {{#newUpload}}style='display: none'{{/newUpload}} data-role='deleteFileWrapper'>    <input type='hidden' name='{{field_name}}_keep[{{id}}]' value='1'>    <a href='#' data-role='deleteFile' class='rb-btn-primary-sm-white-bg-small' data-ipsTooltip title='{{#lang}}attachRemove{{/lang}}'><i class='fa fa-trash-o'></i></a>   </li>  </ul>  <div class='ipsImageAttach_thumb ipsType_center' data-role='preview' data-grid-ratio='65' data-action='insertFile' {{#thumb}}style='background-image: url( {{thumbnail}} )'{{/thumb}}>   {{#status}}    <span class='ipsImageAttach_status ipsType_light' data-role='status'>{{{status}}}</span>    <span class='ipsAttachment_progress'><span data-role='progressbar'></span></span>   {{/status}}   {{#thumb}}    {{{thumb}}}   {{/thumb}}  </div>  <h2 class='ipsType_reset ipsAttach_title ipsType_medium ipsTruncate ipsTruncate_line' data-role='title'>{{title}}</h2>  <p class='ipsType_light'>{{size}} {{#statusText}}&middot; <span data-role='status'>{{statusText}}</span>{{/statusText}}</p> </div>");ips.templates.set('core.attachments.videoItem',"  <div class='ipsGrid_span3 ipsAttach ipsImageAttach ipsPad_half ipsAreaBackground_light {{#done}}ipsAttach_done{{/done}}' id='{{id}}' data-role='file' data-fileid='{{id}}' data-fullsizeurl='{{imagesrc}}' data-thumbnailurl='{{thumbnail}}' data-fileType='video' data-mimeType='{{mime}}'>  <ul class='ipsList_inline ipsImageAttach_controls'>   <li data-role='insert' {{#insertable}}style='display: none'{{/insertable}}><a href='#' data-action='insertFile' class='rb-btn-primary-sm-white-bg-small' data-ipsTooltip title='{{#lang}}insertIntoPost{{/lang}}'><i class='fa fa-plus'></i></a></li>   </li>   <li class='ipsPos_right' {{#newUpload}}style='display: none'{{/newUpload}} data-role='deleteFileWrapper'>    <input type='hidden' name='{{field_name}}_keep[{{id}}]' value='1'>    <a href='#' data-role='deleteFile' class='rb-btn-primary-sm-white-bg-small' data-ipsTooltip title='{{#lang}}attachRemove{{/lang}}'><i class='fa fa-trash-o'></i></a>   </li>  </ul>  <div class='ipsImageAttach_thumb ipsType_center' data-role='preview' data-grid-ratio='65' data-action='insertFile'>   {{#status}}    <span class='ipsImageAttach_status ipsType_light' data-role='status'>{{{status}}}</span>    <span class='ipsAttachment_progress'><span data-role='progressbar'></span></span>   {{/status}}   {{#thumb}}    <video>     <source src='{{{thumb}}}' type='{{mime}}'>    </video>   {{/thumb}}  </div>  <h2 class='ipsType_reset ipsAttach_title ipsType_medium ipsTruncate ipsTruncate_line' data-role='title'>{{title}}</h2>  <p class='ipsType_light'>{{size}} {{#statusText}}&middot; <span data-role='status'>{{statusText}}</span>{{/statusText}}</p> </div>");;
;(function($,_,undefined){ips.controller.register('citrix.front.topic.createtopicform',{initialize:function(){this.on('paste','#elInput_topic_title',this.handlePaste);this.on('click','#topic-write-good-question',this.toggleWriteGoodQuestion);this.on('click','.similar-question-title-link',this.handleSimilarQuestionClickEvent);this.on('click','.title-ask-new-question',this.handleAskNewQuestionClickEvent);var that=this;function delay(callback,ms){let timer=0;return function(){let context=this,args=arguments;clearTimeout(timer);timer=setTimeout(function(){callback.apply(context,args);},ms||0);};}
$('#elInput_topic_title').keypress(delay(function(e){if($('#elInput_topic_title').val()===""||$('#elInput_topic_title').val().trim().length<=2||e.keyCode===32){if($('#elInput_topic_title').val().trim().length===0&&e.keyCode===32){$('#elInput_topic_title').val($('#elInput_topic_title').val().replace(/^\s+/,''));}}else{$('.find-similar-questions-text-warp').html("<div style='width:100%; text-align: center'><i class='icon-spinner2 ipsLoading_tinyIcon'></i></div>");$('.find-similar-questions-text-warp').slideDown(350);that.findSimilarQuestions(e);}},2000));$('#elInput_topic_title').keydown(delay(function(e){if(this.value===""||this.value.trim().length<=2){$('#elInput_topic_title').attr('data-oldvalue','');$(".find-similar-questions-text-warp").hide(350);}else{that.findSimilarQuestions(e);}},2000));if(this.scope.attr('data-action')=='add'){var url=ips.getSetting('baseURL')+'?app=core&module=system&controller=ajax&do=buildCacheForumSelector';var ctxMember=ips.utils.db.get('ctxMember',ips.getSetting('baseURL'));if(ctxMember&&_.isObject(ctxMember)){var dataToSend={memberId:ctxMember.memberId};this._ajaxObj=ips.getAjax()(url,{data:dataToSend}).fail(function(){Debug.error("Problem in building forum selection cache.");});}}},handlePaste:function(e){var that=this;var handleInputDelay;clearTimeout(handleInputDelay);handleInputDelay=setTimeout(function(){var titleSearch=$('#elInput_topic_title').val();if(titleSearch.length>2){that.findSimilarQuestions(e);}},10);},toggleWriteGoodQuestion:function(event){event.preventDefault();$('#topic-write-good-question-detail').toggleClass('show').slideToggle(350);$(event.currentTarget).find('i').toggleClass('icon-circle-with-down-arrow icon-circle-with-up-arrow');if($(event.currentTarget).attr('data-clicks')==0){ips.utils.insights.interactedEvent('How to write good question');}
$(event.currentTarget).attr('data-clicks',1);},findSimilarQuestions:function(event){var searchText=$('#elInput_topic_title').val().trim();var url=ips.getSetting('baseURL')+'?app=core&module=system&controller=ajax&do=getSimilarQuestions';var ctxMember=ips.utils.db.get('ctxMember',ips.getSetting('baseURL'));if(searchText.length>2&&searchText!==$('#elInput_topic_title').attr('data-oldvalue')){this._ajaxObj=ips.getAjax()(url,{showLoading:false,dataType:'json',type:'post',data:{memberId:ctxMember.memberId,title:searchText}}).done(function(response){$('.find-similar-questions-text-warp').html(response.html);$('.find-similar-questions-text-warp').slideDown(350);if(response.type==='error'){$('#topic-write-good-question-detail').slideDown(350);$('#topic-write-good-question').attr('data-clicks',1);}
$(document).click(function(e){if(e.target.id==='elInput_topic_title'){if($('#elInput_topic_title').val().length>2){$(".find-similar-questions-text-warp").slideDown(350);}}else{if(!(e.target.closest('.find-similar-questions-text-warp'))){$(".find-similar-questions-text-warp").hide(350);}}});$('#elInput_topic_title').attr('data-oldvalue',searchText);$('#elInput_topic_title').attr('data-totalresults',response.totalResults);$('#elInput_topic_title').attr('data-count',response.count);$('#elInput_topic_title').attr('data-urls',response.urls);$('#ctxBtnFindSimilarQuestions').removeClass('spl_button').addClass('spl_button-disable');$("#ctxBtnFindSimilarQuestions").css("cursor","auto");}).fail(function(){$('.find-similar-questions-text-warp').html("<span class='noresult'>Network error. Please try again</span>");$('.find-similar-questions-text-warp').slideDown(350);Debug.error("Problem in building similar topic.");});}},handleSimilarQuestionClickEvent:function(e){ips.utils.insights.interactedEvent('Similar question',{searchText:$('#elInput_topic_title').val().trim(),url:$(e.currentTarget).attr('href')});},handleAskNewQuestionClickEvent:function(e){$('.find-similar-questions-text-warp').hide(350);$('#elInput_topic_title').focus();this.sendInsightEvent('Add new question');},sendInsightEvent:function(odDescription){let insightObject={searchText:$('#elInput_topic_title').val(),totalResults:$('#elInput_topic_title').attr('data-totalresults'),count:$('#elInput_topic_title').attr('data-count'),urls:$('#elInput_topic_title').attr('data-urls'),};ips.utils.insights.interactedEvent(odDescription,insightObject);}});}(jQuery,_));;
$(document).ready(function(){$(document).click(function(){if($('.ipsAlert').length!=0&&$('#alertIcon').length!=0){if($('#alertIcon').data("icon")=='fa fa-info-circle'){$('#alertIcon').addClass('icon-info color-info');}
if($('#alertIcon').data("icon")=='fa fa-exclamation-triangle'){$('#alertIcon').addClass('icon-warning color-warning');$('#alertIcon').removeClass('icon-info color-info');}
if($('#alertIcon').data("icon")=='fa fa-check-circle'){$('#alertIcon').addClass('icon-success color-success');$('#alertIcon').removeClass('icon-info color-info');}
if($('#alertIcon').data("icon")=='fa fa-question-circle'){$('#alertIcon').addClass('icon-warning color-warning');$('#alertIcon').removeClass('icon-info color-info');}}});$('#ctxForumSelector').closest('.ipsDialog').attr('id','ctxForumSelectorDialog');$('.toggle').click(function(e){e.preventDefault();var $this=$(this);if($this.next().hasClass('show')){$this.next().removeClass('show');$this.next().slideUp(350);$this.find('i').addClass('icon-circle-with-down-arrow').removeClass('icon-circle-with-up-arrow');}else{$this.parent().parent().find('li .inner').removeClass('show').parent().find('i').removeClass('icon-circle-with-up-arrow').addClass('icon-circle-with-down-arrow');$this.parent().parent().find('li .inner').slideUp(350);$this.find('i').addClass('icon-circle-with-up-arrow').removeClass('icon-circle-with-down-arrow');$this.next().toggleClass('show');$this.next().slideToggle(350);}});var isIE11=!!window.MSInputMethodContext&&!!document.documentMode;if(isIE11===true){$('.IE-support').show();}
$('#topicTags').css('display','block');$('.search-icon-wrap').click(function(){$('.search-feedback-wrap, #cUserLink, .cNotifications, #elSignInLink, .ipsNavBar_noSubBars').hide();$('.search-input-box').show().css({right:'400px'}).animate({"right":"35px"},"slow");});$('.search-close-wrap').click(function(){$('.search-feedback-wrap, #cUserLink, .cNotifications, #elSignInLink, .ipsNavBar_noSubBars').show();$('.search-input-box').hide();$('#elSearchExpanded').hide();$('#elSearchField').val('');});$(document).mouseup(function(e){if(!$(".search-input-box").is(e.target)&&$(".search-input-box").has(e.target).length===0){$(".search-input-box").hide();$('.search-feedback-wrap, #cUserLink, .cNotifications, #elSignInLink, .ipsNavBar_noSubBars').show();$('#elSearchExpanded').hide();$('#elSearchField').val('');}});$('.search-mobile-icon-wrap').click(function(){$('.mobile-menu, .search-mobile-icon-wrap, .mobile-logo-wrap').hide();$('.search-mobile-input-box').show().css({right:'0'}).animate({"right":"35px"},"slow");});$('.search-mobile-close-wrap').click(function(){$('.mobile-menu, .search-mobile-icon-wrap, .mobile-logo-wrap').show();$('.search-mobile-input-box').hide();$('#elSearchExpanded').hide();$('#elSearchField').val('');});$(document).on('scroll',function(){var scrollBottom=$(document).height()-$(window).height()-$(window).scrollTop();if($(window).scrollTop()>175){$('.scroll-top-wrapper').addClass('show');}else{$('.scroll-top-wrapper').removeClass('show');}
if(scrollBottom===0){$('.scroll-top-wrapper').animate({"bottom":"115px"},{'duration':'0'},500,'linear');}else{$('.scroll-top-wrapper').stop().css({"bottom":"20px"});}
if($(window).scrollTop()>175){$('.scroll-top-wrapper').addClass('show');}else{$('.scroll-top-wrapper').removeClass('show');}});$('.scroll-top-wrapper').on('click',(function(){$('html, body').animate({scrollTop:0},250,'linear');}));$('.profile-menu').on('click',function(){document.getElementById("myDropdown").classList.toggle("dropdown-show");});$(document).mouseup(function(e){if(!$("#myDropdown").is(e.target)&&$("#myDropdown").has(e.target).length===0){$("#myDropdown").removeClass('dropdown-show');}});$('.go-button').on('click',function(){window.open($('select[name="selectRegion"]').val());});$(window).resize(function(){if(window.innerWidth<1080){$('#elNavSecondary_10, #elNavSecondary_15, #elNavSecondary_5, #elNavSecondary_17, #elNavSecondary_21').hide();}else{$('#elNavSecondary_10, #elNavSecondary_15, #elNavSecondary_5, #elNavSecondary_17, #elNavSecondary_21').show().removeClass('ipsHide');}});});if($('banner').length){new Vue({components:{banner:AlertsBanner,},methods:{handleBannerLink(obj){ips.utils.insights.sendEvent('clicked','Alert Banner Link',{bannerTitle:obj.bannerTitle,bannerContent:obj.bannerContent,bannerLink:obj.bannerLink,bannerLinkText:obj.bannerLinkText,});},},}).$mount("#web-alerts-banner");};
;(function(window){{var unknown='-';var screenSize='';if(screen.width){width=(screen.width)?screen.width:'';height=(screen.height)?screen.height:'';screenSize+=''+width+" x "+height;}
var nVer=navigator.appVersion;var nAgt=navigator.userAgent;var browser=navigator.appName;var version=''+parseFloat(navigator.appVersion);var majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if((verOffset=nAgt.indexOf('Opera'))!=-1){browser='Opera';version=nAgt.substring(verOffset+6);if((verOffset=nAgt.indexOf('Version'))!=-1){version=nAgt.substring(verOffset+8);}}
if((verOffset=nAgt.indexOf('OPR'))!=-1){browser='Opera';version=nAgt.substring(verOffset+4);}
else if((verOffset=nAgt.indexOf('MSIE'))!=-1){browser='Microsoft Internet Explorer';version=nAgt.substring(verOffset+5);}
else if((verOffset=nAgt.indexOf('Chrome'))!=-1){browser='Chrome';version=nAgt.substring(verOffset+7);}
else if((verOffset=nAgt.indexOf('Safari'))!=-1){browser='Safari';version=nAgt.substring(verOffset+7);if((verOffset=nAgt.indexOf('Version'))!=-1){version=nAgt.substring(verOffset+8);}}
else if((verOffset=nAgt.indexOf('Firefox'))!=-1){browser='Firefox';version=nAgt.substring(verOffset+8);}
else if(nAgt.indexOf('Trident/')!=-1){browser='Microsoft Internet Explorer';version=nAgt.substring(nAgt.indexOf('rv:')+3);}
else if((nameOffset=nAgt.lastIndexOf(' ')+1)<(verOffset=nAgt.lastIndexOf('/'))){browser=nAgt.substring(nameOffset,verOffset);version=nAgt.substring(verOffset+1);if(browser.toLowerCase()==browser.toUpperCase()){browser=navigator.appName;}}
if((ix=version.indexOf(';'))!=-1)version=version.substring(0,ix);if((ix=version.indexOf(' '))!=-1)version=version.substring(0,ix);if((ix=version.indexOf(')'))!=-1)version=version.substring(0,ix);majorVersion=parseInt(''+version,10);if(isNaN(majorVersion)){version=''+parseFloat(navigator.appVersion);majorVersion=parseInt(navigator.appVersion,10);}
var mobile=/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(nVer);var cookieEnabled=(navigator.cookieEnabled)?true:false;if(typeof navigator.cookieEnabled=='undefined'&&!cookieEnabled){document.cookie='testcookie';cookieEnabled=(document.cookie.indexOf('testcookie')!=-1)?true:false;}
var os=unknown;var clientStrings=[{s:'Windows 10',r:/(Windows 10.0|Windows NT 10.0)/},{s:'Windows 8.1',r:/(Windows 8.1|Windows NT 6.3)/},{s:'Windows 8',r:/(Windows 8|Windows NT 6.2)/},{s:'Windows 7',r:/(Windows 7|Windows NT 6.1)/},{s:'Windows Vista',r:/Windows NT 6.0/},{s:'Windows Server 2003',r:/Windows NT 5.2/},{s:'Windows XP',r:/(Windows NT 5.1|Windows XP)/},{s:'Windows 2000',r:/(Windows NT 5.0|Windows 2000)/},{s:'Windows ME',r:/(Win 9x 4.90|Windows ME)/},{s:'Windows 98',r:/(Windows 98|Win98)/},{s:'Windows 95',r:/(Windows 95|Win95|Windows_95)/},{s:'Windows NT 4.0',r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:'Windows CE',r:/Windows CE/},{s:'Windows 3.11',r:/Win16/},{s:'Android',r:/Android/},{s:'Open BSD',r:/OpenBSD/},{s:'Sun OS',r:/SunOS/},{s:'Linux',r:/(Linux|X11)/},{s:'iOS',r:/(iPhone|iPad|iPod)/},{s:'Mac OS X',r:/Mac OS X/},{s:'Mac OS',r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:'QNX',r:/QNX/},{s:'UNIX',r:/UNIX/},{s:'BeOS',r:/BeOS/},{s:'OS/2',r:/OS\/2/},{s:'Search Bot',r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}];for(var id in clientStrings){var cs=clientStrings[id];if(cs.r.test(nAgt)){os=cs.s;break;}}
var osVersion=unknown;if(/Windows/.test(os)){osVersion=/Windows (.*)/.exec(os)[1];os='Windows';}
switch(os){case'Mac OS':case'Mac OS X':osVersion=/(?:Mac OS|Mac OS X|MacPPC|MacIntel|Mac_PowerPC|Macintosh) ([\.\_\d]+)/.exec(nAgt)[1];break;case'Android':osVersion=/Android ([\.\_\d]+)/.exec(nAgt)[1];break;case'iOS':osVersion=/OS (\d+)_(\d+)_?(\d+)?/.exec(nVer);osVersion=osVersion[1]+'.'+osVersion[2]+'.'+(osVersion[3]|0);break;}
var flashVersion='no check';if(typeof swfobject!='undefined'){var fv=swfobject.getFlashPlayerVersion();if(fv.major>0){flashVersion=fv.major+'.'+fv.minor+' r'+fv.release;}else{flashVersion=unknown;}}}
window.jscd={screen:screenSize,browser:browser,browserVersion:version,browserMajorVersion:majorVersion,mobile:mobile,os:os,osVersion:osVersion,cookies:cookieEnabled,flashVersion:flashVersion};}(this));var cxsObj=cxsObj||{};var fbCaptchaWidget;(function(){cxsObj.feedback={kampyleHandlers:function(){var feedbackBtn=document.querySelector('#forumsSFDCFeedback span');var errorFeedbackBtn=document.querySelector('#errorFeedback');$("#forumsSFDCFeedback span").on("click",function(){cxsObj.feedback.startKampyle();});if(!!errorFeedbackBtn){errorFeedbackBtn.addEventListener("click",function(){cxsObj.feedback.startKampyle();});}},startKampyle:function(){this.addFeedbackContainer();cxsObj.feedback.addOverlay();if(!!this.userEmail){document.getElementById('userEmail').value=this.userEmail;}
if(!!this.userName){document.getElementById('name').value=this.userName;}
document.getElementById('fbContainer').style.display="block";this.submitFeedback();},addFeedbackContainer:function(){if(document.querySelectorAll('#fbContainer').length==0){$('body').append(this.getFormData());document.querySelector('#cxsFeedbackForm #captchaSettings').value='';fbCaptchaWidget=grecaptcha.render('fbCaptcha',{'sitekey':ipsSettings.siteKey});}},addOverlay:function(){if(document.querySelectorAll('#cxsOverlay').length==0){$('body').append('<div id="cxsOverlay"></div>');}
document.getElementById('cxsOverlay').style.display="block";},removeOverlay:function(){document.getElementById('cxsOverlay').style.display="none";},getFormData:function(){var returnUrl=window.location.href,browser=jscd.browser+" "+jscd.browserVersion;var formData=''
+'<div id="fbContainer">'
+'  <div class="fbHeader">'
+'      <h1>Please tell us how we can help</h1>'
+'      <span id="fbClose" onClick="cxsObj.feedback.closeFeedback()">x</span>'
+'  </div>'
+'  <div class="fbBody">'
+'      <form id="cxsFeedbackForm" action="'+ipsSettings.sfUrl+'" method="POST">'
+'          <input type=hidden id="captchaSettings" name="captcha_settings" value="">'
+'          <input type=hidden name="orgid" value="'+ipsSettings.sfOrgId+'">'
+'          <input type=hidden name="retURL" value="'+returnUrl+'">'
+'          <input type=hidden id="recordType" name="recordType" value="01260000000M4ED">'
+'          <input type=hidden id="00N300000013SFk" name="00N300000013SFk" value="eService">'
+'          <input type=hidden id="00N60000002oB6M" name="00N60000002oB6M" value="discussions.citrix.com">'
+'          <input type=hidden id="00N60000002tY7S" name="00N60000002tY7S" value="'+window.location.href+'"/>'
+'          <input type=hidden id="00N60000002tY8e" name="00N60000002tY8e" value="'+cxsObj.feedback.title+'"/>'
+'          <input type=hidden id="00N60000002tY7R" name="00N60000002tY7R" value="'+cxsObj.feedback.productFamily+","+cxsObj.feedback.productVersion+'"/>'
+'          <input type=hidden id="00N60000002tY7O" name="00N60000002tY7O" value=""/>'
+'          <input type=hidden id="00N60000002tY7N" name="00N60000002tY7N" value=""/>'
+'          <input type=hidden id="00N60000001Hm2m" name="00N60000001Hm2m" value="en"/>'
+'          <input type=hidden id="00N60000002oA80" name="00N60000002oA80" value="en_US"/>'
+'          <input type=hidden id="00N60000002oB6j" name="00N60000002oB6j" value="'+browser+'"/>'
+'          <input type=hidden id="00N60000002tY7X" name="00N60000002tY7X" value="'+jscd.screen+'"/>'
+'          <input type=hidden id="00N60000002tY7T" name="00N60000002tY7T" value="'+jscd.os+'"/>'
+'          <div class ="fbTopic-wrap mbottm15">'
+'              <label for="fbTopic">Topic <span>*</span></label>'
+'              <div class="selectOpt"><select id="fbTopic"><option>Website Feedback</option><option>Article Feedback</option><option>Other</option></select></div>'
+'          </div>'
+'          <div class ="fbSubject-wrap mbottm15">'
+'              <label for="subject">Subject<span>*</span></label><input class="inputType" id="subject" maxlength="80" name="subject" size="20" type="text"/>'
+'          </div>'
+'          <div class ="fbDescription-wrap mbottm15">'
+'              <label for="description">Description</label><textarea id="description" name="description"></textarea>'
+'          </div>'
+'          <div class ="fbPriority-wrap mbottm15">'
+'              <span class="label">Priority</span>'
+'              <div class="selectOpt"><select><option>Low</option><option>Medium</option><option>High</option><option>Critical</option></select></div>'
+'          </div>'
+'          <div class="fbName-wrap mbottm15">'
+'              <label for="name">Name<span>*</span></label><input class="inputType" id="name" maxlength="80" name="name" size="20" type="text" />'
+'          </div>'
+'          <div class ="fbMail-wrap mbottm15">'
+'              <label for="userEmail">Email<span>*</span></label><input class="inputType" id="userEmail" maxlength="80" name="email" size="20" type="text" value=""/>'
+'          </div>'
+'          <div class ="fbPhone-wrap mbottm15">'
+'              <label for="phone">Phone</label><input class="inputType" id="phone" maxlength="40" name="phone" size="20" type="text"/>'
+'          </div>'
+'          <div class ="fbCaptcha-wrap mbottm15">'
+'              <label for="fbCaptcha"></label><div id="fbCaptcha"></div>'
+'          </div>'
+'          <div class="submitCont">'
+'              <input class="rb-btn-secondary-sm" type="button" id="fbCancel" onclick="cxsObj.feedback.closeFeedback()" value="Cancel">'
+'              <input class="rb-btn-primary-sm" type="submit" id="fbSubmit" value="Submit">'
+'          </div>'
+'      </form>'
+'  </div>'
+'</div>';return formData;},closeFeedback:function(){if(!!document.getElementById('fbClose')){cxsObj.feedback.removeOverlay();$('#cxsFeedbackForm #subject').val('');$('#cxsFeedbackForm #description').val('');$('#cxsFeedbackForm #phone').val('');$('#fbContainer').remove();}},submitFeedback:function(){var self=this;document.getElementById('fbSubmit').addEventListener("click",function(event){console.log('submit click');if(self.validateForm()){ips.utils.insights.interactedEvent('Report an Issue - Feedback Submit');return true;}
event.preventDefault();});},validateForm:function(){var txtVal=[],checkFlag=[];txtVal[0]=document.querySelector('#cxsFeedbackForm #subject');txtVal[1]=document.querySelector('#cxsFeedbackForm #name');txtVal[2]=document.querySelector('#cxsFeedbackForm #userEmail');for(var i=0;i<txtVal.length;i++){if(!txtVal[i].value){checkFlag.push(txtVal[i].getAttribute('name'));txtVal[i].classList.add('fbError');}else{if(txtVal[i].getAttribute('name')==="userEmail"){var regex=/^[a-z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*)?@[a-z][a-zA-Z-0-9]*\.[a-z]+(\.[a-z]+)?$/;if(!regex.test(txtVal[i].value)){checkFlag.push(txtVal[i].getAttribute('name'));txtVal[i].classList.add('fbError');}else{txtVal[i].classList.remove('fbError');}}else{txtVal[i].classList.remove('fbError');}}}
if(grecaptcha.getResponse(fbCaptchaWidget)){document.querySelector('#cxsFeedbackForm #captchaSettings').value=JSON.stringify({"keyname":ipsSettings.sfKeyname,"fallback":"true","orgId":ipsSettings.sfOrgId,"ts":new Date().getTime()});}
if(!document.querySelector('#cxsFeedbackForm #captchaSettings').value){document.querySelector('#cxsFeedbackForm #fbCaptcha').classList.add('fbError');return false;}
document.querySelector('#cxsFeedbackForm #fbCaptcha').classList.remove('fbError');if(checkFlag.length>0){return false;}
return true;},setFormFieldValues:function(productFamily,productVersion,userEmail,userName){this.productFamily=productFamily;this.productVersion=productVersion;this.userEmail=userEmail;this.userName=userName;},init:function(){var articleTitle=null;if(!!document.querySelector('.topic_info .theader_title')){articleTitle=document.querySelector('.topic_info .theader_title').innerHTML||'';this.title=articleTitle;}
this.kampyleHandlers();}}})();$(document).ready(function(){cxsObj.feedback.setFormFieldValues(ips.utils.insights.getInsightsMeta('category'),ips.utils.insights.getInsightsMeta('forum'),email,displayName);cxsObj.feedback.init();$('#announcementsWidget').responsiveSlides({auto:true,speed:500});cxsObj.getCurrentYear=function getCurrentYear(){var date=new Date();return date.getFullYear();};cxsObj.getPageUrl=function getPageUrl(){return encodeURIComponent(window.location.href);};cxsObj.getPageTitle=function getPageTitle(){if(!!document.querySelector("meta[name='title']")){return document.querySelector("meta[name='title']").getAttribute("content");}
return"";};cxsObj.getPageDescription=function getPageDescription(){if(!!document.querySelector("meta[name='description']")){return document.querySelector("meta[name='description']").getAttribute("content");}
return"";};cxsObj.popUpWindow=function popUpWindow(url,title,windowWidth,windowHight){var left=(screen.width / 2)-(windowWidth / 2),top=(screen.height / 2)-(windowHight / 2);return window.open(url,title,'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+windowWidth+', height='+windowHight+', top='+top+', left='+left);};cxsObj.handleTwitter=function handleTwitter(){cxsObj.popUpWindow('https://twitter.com/home?status='+cxsObj.getPageTitle()+' '+cxsObj.getPageUrl(),'Support Knowledge Center',600,450);};cxsObj.handleFacebook=function handleFacebook(){cxsObj.popUpWindow('https://www.facebook.com/sharer/sharer.php?u='+cxsObj.getPageUrl()+'&title='+cxsObj.getPageTitle()+'&description='+cxsObj.getPageDescription(),"Support Knowledge Center",600,450)};cxsObj.handleLinkedIn=function handleLinkedIn(){cxsObj.popUpWindow('http://www.linkedin.com/shareArticle?mini=true&url='+cxsObj.getPageUrl()+'&title='+cxsObj.getPageTitle()+'&source=Support Knowledge Center','Support Knowledge Center',600,450);};cxsObj.handleGooglePlus=function handleGooglePlus(){cxsObj.popUpWindow('https://plus.google.com/share?url='+cxsObj.getPageUrl(),'Support Knowledge Center',600,450);};cxsObj.handleMail=function handleMail(){var pageUrl=cxsObj.getPageUrl(),el=document.querySelector('.icon-email-round');if(!!cxsObj.getPageTitle()&&!!cxsObj.getPageDescription()){el.setAttribute('href','mailto:?subject='+cxsObj.getPageTitle()+'&body='+cxsObj.getPageDescription()+'%20%0d%0a'+pageUrl);}else if(!!cxsObj.getPageTitle()&&!cxsObj.getPageDescription()){el.setAttribute('href','mailto:?subject='+cxsObj.getPageTitle()+'&body=%20%0d%0a'+pageUrl);}else if(!cxsObj.getPageTitle()&&!!cxsObj.getPageDescription()){el.setAttribute('href','mailto:?body='+cxsObj.getPageDescription()+'%20%0d%0a'+pageUrl);}else{el.setAttribute('href','mailto:?body='+pageUrl);}};});;
;(function($,_,undefined){ips.createModule('ips.utils.insights',function(){var events=null;var init=function(){setInsightDomain();},getPageDomain=function(){var pageDomain=window.location.hostname;if(!!pageDomain.length){return pageDomain;}
return'';},parseUrl=function(url){var a=document.createElement('a');a.href=url;return a;},getPageURL=function(){var pageURL=window.location.pathname;if(!!pageURL.length){return pageURL;}
return'';},getPageRef=function(){if(document.referrer!='undefined'){return ips.utils.insights.parseUrl(document.referrer).hostname;}
return'';},getInsightsMeta=function(name){var element=document.querySelector('meta[name="Insights_'+name+'"]'),content=element&&element.getAttribute("content");if(!!content){return content;}
return'';},commentURL=function(urlObject,pid){return urlObject.origin+urlObject.pathname+'?do=findComment&comment='+pid;},setInsightDomain=function(){let ep=(getPageDomain()==='discussions.citrix.com')?'prod':((getPageDomain()==='discussionsqa.citrix.com')?'qa':'qa');if(!!ep){this.events=Insights.endpoint(ep).init(getPageDomain());return true;}
return false;},getContext=function(){return{referrer:ips.utils.insights.getPageRef(),category:ips.utils.insights.getInsightsMeta('category'),forum:ips.utils.insights.getInsightsMeta('forum'),resolution:ips.utils.insights.getInsightsMeta('resolution')};},sendEvent=function(verbDisplay,objectDefinationName,context){let pageUrl=ips.utils.insights.getPageURL();let ep=(getPageDomain()==='discussions.citrix.com')?'prod':((getPageDomain()==='discussionsqa.citrix.com')?'qa':'qa');if(!!ep){console.log(ep);events=Insights.endpoint(ep).init(getPageDomain());events.send((userName=='Guest'?null:userName),verbDisplay,pageUrl,objectDefinationName,context);return true;}},pageVisited=function(){sendEvent('visited','page visited',ips.utils.insights.getContext());},interactedEvent=function(odDescription,object){if(typeof(object)==='undefined'){object=false;}
let context=this.getContext();if(!!object){Object.keys(object).forEach(function(key){context[key]=object[key];});}
sendEvent('interacted',odDescription,context);};return{init:init,getPageDomain:getPageDomain,parseUrl:parseUrl,getPageURL:getPageURL,getPageRef:getPageRef,getInsightsMeta:getInsightsMeta,commentURL:commentURL,getContext:getContext,sendEvent:sendEvent,pageVisited:pageVisited,interactedEvent:interactedEvent};});$(window).load(function(){ips.utils.insights.pageVisited();});}(jQuery,_));;(function($,_,undefined){$('#cUserLink').unbind().on('click',function(){ips.utils.insights.interactedEvent('Profile dropdown - Header');});$('#announcementsWidget li').on('click',function(){ips.utils.insights.interactedEvent('Announcements Banner',{link:$(this).find('.announcements-section-link').attr('href')});});$('#elTopContributors a[id^="el_topContributors"]').unbind().on('click',function(){ips.utils.insights.interactedEvent('Top Contributors Widget',{time:$(this).text()});});$(document).on("click",'a[data-swapid="ctxProfileHovercardIgnore"]',function(){ips.utils.insights.interactedEvent('Profile Hovercard Ignore User');});$(document).on("click",'a[data-swapid="ctxProfileHovercardFindContent"]',function(){ips.utils.insights.interactedEvent('Profile Hovercard Find Content');});$('#elUserLink').unbind().on('click',function(){ips.utils.insights.interactedEvent('Profile dropdown - Header');});$('#forumsSFDCFeedback').unbind().on('click',function(){ips.utils.insights.interactedEvent('Report an Issue - Feedback');});$('[data-swapid="social-share-facebook"] a').unbind().on('click',function(){ips.utils.insights.interactedEvent('Social Share in Footer',{icon:'facebook'});});$('[data-swapid="social-share-twitter"] a').unbind().on('click',function(){ips.utils.insights.interactedEvent('Social Share in Footer',{icon:'twitter'});});$('[data-swapid="social-share-linkdn"] a').unbind().on('click',function(){ips.utils.insights.interactedEvent('Social Share in Footer',{icon:'linkdn'});});$('[data-swapid="social-share-mail"] a').unbind().on('click',function(){ips.utils.insights.interactedEvent('Social Share in Footer',{icon:'mail'});});$('#elFullNotifications').unbind().on('click',function(){ips.utils.insights.interactedEvent('Notifications Bell Icon');});$('[data-swapid="ctx-notifications-login"]').unbind().on('click',function(){ips.utils.insights.interactedEvent('Notifications Sign-in');});$('#reply-icon').unbind().on('click',function(){ips.utils.insights.interactedEvent('Topic Reply Icon');});$('#reply-text').unbind().on('click',function(){ips.utils.insights.interactedEvent('Topic Reply Text');});$('.post-flag-text').unbind().on('click',function(){ips.utils.insights.interactedEvent('Flag',{commentURL:ips.utils.insights.commentURL(window.location,$(this).closest('article').attr('id').split('_')[1])});});$('.profile-activity-flag-text').unbind().on('click',function(){ips.utils.insights.interactedEvent('Flag',{commentURL:ips.utils.insights.commentURL(ips.utils.insights.parseUrl($(this).attr('href')),$(this).closest("article").attr('id').split('_')[1])});});$('ul.topic-page-pin-featured-section a.cAnswerRate_up').unbind().on('click',function(){ips.utils.insights.interactedEvent('Topic Upvote');});$('ul.cPostRating_controls li.cPostRating_up a.cAnswerRate_up').unbind().on('click',function(){ips.utils.insights.interactedEvent('Comment Upvote',{commentURL:ips.utils.insights.commentURL(window.location,$(this).closest("article").attr('id').split('_')[1])});});$('ul.cPostRating_controls li.cPostRating_bestAnswer a').unbind().on('click',function(){ips.utils.insights.interactedEvent(($(this).hasClass('cBestAnswerIndicator_off'))?'Mark Best Answer':'Unmark Best Answer',{commentURL:ips.utils.insights.commentURL(window.location,$(this).closest("article").attr('id').split('_')[1])});});$('div.cTopicPostArea form').unbind().on("submit",function(event){let pageUrl=ips.utils.insights.getPageURL().split('/');if(pageUrl.length>2&&pageUrl[1]==='topic'){ips.utils.insights.interactedEvent('Submit Reply',{notifyMeOfReplies:($('div.cTopicPostArea form form span.ipsToggle_on').length)?1:0});}});$('div.ipsItemControls ul.ipsItemControls_left li a').unbind().on('click',function(){if($(this).data('action')==='quoteComment'){ips.utils.insights.interactedEvent('Quote',{commentURL:ips.utils.insights.commentURL(window.location,$(this).parent().attr('data-ipsQuote-target').split('-')[1])});}});$('div.ipsItemControls ul.ipsItemControls_left li button').unbind().on('click',function(){if($(this).data('action')==='multiQuoteComment'){ips.utils.insights.interactedEvent('MultiQuote',{commentURL:ips.utils.insights.commentURL(window.location,$(this).parent().attr('data-ipsQuote-target').split('-')[1])});}});$('[data-swapid="ctxIdFollowCount"]').unbind().on('click',function(){ips.utils.insights.interactedEvent('See who follows this');});$('.comment-tooltip div div.ttclose').on('click',function(){ips.utils.insights.interactedEvent('Exit Topic Upvote Tooltip')});$('.follow-topic-tooltip div div.ttclose, .follow-topic-mobile-tooltip div div.ttclose, .follow-forum-tooltip div div.ttclose, .follow-forum-mobile-tooltip div div.ttclose').on('click',function(){ips.utils.insights.interactedEvent('Exit Follow Tooltip')});$('.comment-upvote-tooltip div div.ttclose').on('click',function(){let comment=$(this).attr('data-commentid');ips.utils.insights.interactedEvent('Exit Comment Upvote Tooltip',{commentURL:window.location.origin+window.location.pathname+'?do=findComment&comment='+comment})});$('.bestans-tooltip div div.ttclose').on('click',function(){let comment=$(this).attr('data-commentid');ips.utils.insights.interactedEvent('Exit Mark Best Answer Tooltip',{commentURL:window.location.origin+window.location.pathname+'?do=findComment&comment='+comment})});}(jQuery,_));;
;(function($,_,undefined){ips.controller.register('citrix.front.core.instantNotifications',{_pollTimeout:60,_windowInactivePoll:0,_pollMultiplier:1,_messagesEnabled:null,_ajaxObj:null,_debugPolling:true,_browserNotifications:{},_paused:false,_interval:null,initialize:function(){this.on(document,ips.utils.events.getVisibilityEvent(),this.windowVisibilityChange);this.on(window,'storage',this.storageChange);this.setup();},setup:function(){if(!ips.utils.db.isEnabled()||!_.isFunction(JSON.parse)){Debug.warn("Sorry, your browser doesn't support localStorage or JSON so we can't load instant notifications for you.");return;}
this._messagesEnabled=this.scope.find('[data-notificationType="inbox"]').length;this._setInterval(this._pollTimeout);this._doInitialCheck();},storageChange:function(e){var event=e.originalEvent;if(event.key!=='notifications.'+ips.getSetting('baseURL')){return;}
if(this._debugPolling){Debug.log('Notifications: updating instantly from storage event');}
try{var data=JSON.parse(event.newValue);var counts=this._getCurrentCounts();this._updateIcons({messages:parseInt(data.messages),notifications:parseInt(data.notifications)},counts);}catch(err){}},windowVisibilityChange:function(){var hiddenProp=ips.utils.events.getVisibilityProp();if(!_.isUndefined(hiddenProp)&&!document[hiddenProp]){this._updateBrowserTitle(0);this._pollMultiplier=1;this._windowInactivePoll=0;if(this._paused){document.title=document.title.replace("❚❚ ",'');this._checkNotifications();this._setInterval(this._pollTimeout);}
if(this._debugPolling){Debug.log("Notifications: Resetting inactive poll.");}}},_setInterval:function(timeoutInSecs){clearInterval(this._interval);this._interval=setInterval(_.bind(this._checkNotifications,this),timeoutInSecs*1000);},_doInitialCheck:function(){var storage=ips.utils.db.get('notifications',ips.getSetting('baseURL'));var counts=this._getCurrentCounts();if(!storage||!_.isObject(storage)){return;}
if((this._messagesEnabled&&counts.messages>storage.messages)||counts.notifications>storage.notifications){if(this._debugPolling){Debug.log("Notifications: bubbles reporting higher counts for notifications or messages.");}
var dataToSend={notifications:storage.notifications};if(this._messagesEnabled){dataToSend=_.extend(dataToSend,{messages:storage.messages});}
this._doAjaxRequest(dataToSend);}},_checkNotifications:function(){var storage=ips.utils.db.get('notifications',ips.getSetting('baseURL'));var timestamp=ips.utils.time.timestamp();var counts=this._getCurrentCounts();var currentTimeout=this._pollTimeout*this._pollMultiplier;if(document[ips.utils.events.getVisibilityProp()]){if(this._windowInactivePoll>=3&&this._pollMultiplier===1){if(this._debugPolling){Debug.log("Notifications: Polled over 3 minutes, increasing multiplier to 2");}
this._pollMultiplier=2;this._setInterval(this._pollTimeout*this._pollMultiplier);}else if(this._windowInactivePoll>=7&&this._pollMultiplier===2){if(this._debugPolling){Debug.log("Notifications: Polled over 10 minutes, increasing multiplier to 3");}
this._pollMultiplier=3;this._setInterval(this._pollTimeout*this._pollMultiplier);}else if(this._windowInactivePoll>=25&&this._pollMultiplier===3){if(this._debugPolling){Debug.log("Notifications: Polled over 60 mins, stopping polling");}
this._stopPolling();return;}
this._windowInactivePoll++;}
if((storage&&_.isObject(storage))&&parseInt(storage.timestamp)>(timestamp-((currentTimeout-1)*1000))){this._updateIcons(storage,counts);if(this._debugPolling){Debug.log("Notifications: fetching from localStorage");}}else{var dataToSend={notifications:counts.notifications};if(this._messagesEnabled){dataToSend=_.extend(dataToSend,{messages:counts.messages});}
this._doAjaxRequest(dataToSend);}},_doAjaxRequest:function(dataToSend){var self=this;var url=ips.getSetting('baseURL')+'?app=core&module=system&controller=ajax&do=instantNotifications';if(this._debugPolling){Debug.log("Notifications: sending ajax request");}
var ctxMember=ips.utils.db.get('ctxMember',ips.getSetting('baseURL'));if(ctxMember&&_.isObject(ctxMember)){this._updateTimestamp();this._ajaxObj=ips.getAjax()(url,{data:_.extend(dataToSend,{memberId:ctxMember.memberId}),method:'POST'}).done(_.bind(this._handleResponse,this)).fail(function(){self._stopPolling(true);Debug.error("Problem polling for new notifications; stopping.");});}},_handleResponse:function(response){try{if(response.error&&response.error=='auto_polling_disabled'){this._stopPolling(true);return;}
var counts=this._getCurrentCounts();if(response.notifications.count>counts.notifications&&this._debugPolling){Debug.log("Notifications: I'm the winner! I found there's "+response.notifications.count+" new notifications");}
this._updateIcons({messages:response.messages.count,notifications:response.notifications.count},counts);ips.utils.db.set('notifications',ips.getSetting('baseURL'),{timestamp:ips.utils.time.timestamp(),messages:response.messages.count,notifications:response.notifications.count});var total=response.messages.data.length+response.notifications.data.length;if(response.notifications.data.length){this._showNotification(this._buildNotifyData(response.notifications.data,'notification'),'notification');}
if(response.messages.data.length){this._showNotification(this._buildNotifyData(response.messages.data,'message'),'message');}}catch(err){this._stopPolling(true);return;}
if(total>0){ips.utils.notification.playSound();if(document[ips.utils.events.getVisibilityProp()]){this._updateBrowserTitle(total);}}},_updateBrowserTitle:function(count){var cleanTitle=document.title.replace(/^\(\d+\)/,'').trim();if(count){document.title="("+count+") "+cleanTitle;}else{document.title=cleanTitle;}},_buildNotifyData:function(items,type){var self=this;var notifyData={count:items.length};if(items.length===1){notifyData=_.extend(notifyData,{title:ips.getString(type+'GeneralSingle'),icon:items[0].author_photo,body:items[0].title,url:items[0].url,onClick:function(){try{window.focus();}catch(err){}
window.location=items[0].url;}});}else{notifyData=_.extend(notifyData,{title:ips.pluralize(ips.getString(type+'GeneralMultiple'),[items.length]),body:items[0].title,icon:ips.getSetting(type+'_imgURL'),onClick:function(){try{window.focus();}catch(err){}
self._getIcon((type=='message')?'inbox':'notify').click();}});}
return notifyData;},_showNotification:function(notifyData,type){if(document[ips.utils.events.getVisibilityProp()]&&ips.utils.notification.hasPermission()){this._showBrowserPopup(notifyData,type);}else{this._showFlashMessage(notifyData,type);}},_showBrowserPopup:function(notifyData,type){notifyData=_.extend(notifyData,{timeout:15});if(this._browserNotifications[type]){try{this._browserNotifications[type].hide();}catch(err){}}
this._browserNotifications[type]=ips.utils.notification.create(notifyData);this._browserNotifications[type].show();},_showFlashMessage:function(notifyData,type){var html='';var self=this;if(notifyData.count===1){notifyData=_.extend(notifyData,{text:ips.getString(type+'FlashSingle')});html=ips.templates.render('core.notification.flashSingle',notifyData);}else{notifyData=_.extend(notifyData,{text:ips.pluralize(ips.getString(type+'FlashMultiple'),[notifyData.count])});html=ips.templates.render('core.notification.flashMultiple',notifyData);}
if($('#elFlashMessage').is(':visible')&&$('#elFlashMessage').find('[data-role="newNotification"]').length){$('#elFlashMessage').find('[data-role="newNotification"]').replaceWith(html);}else{ips.ui.flashMsg.show(html,{timeout:8,position:'bottom',extraClasses:'cNotificationFlash ipsPadding:half',dismissable:function(){self._stopPolling();},escape:false});}},_updateTimestamp:function(){var storage=ips.utils.db.get('notifications',ips.getSetting('baseURL'));storage=_.extend(storage,{timestamp:ips.utils.time.timestamp()});ips.utils.db.set('notifications',ips.getSetting('baseURL'),storage);},_updateIcons:function(newData,oldData){var reportBadge=this.scope.find('[data-notificationType="reports"]');var reportCount=reportBadge.length?parseInt(reportBadge.text()):0;var notifyData={total:parseInt(newData.notifications)+reportCount,notifications:parseInt(newData.notifications),reports:reportCount};if(parseInt(newData.notifications)!==oldData.notifications){this._updateIcon('notify',newData.notifications);this.scope.trigger('clearUserbarCache',{type:'notify'});}
if(this._messagesEnabled){if(parseInt(newData.messages)!==oldData.messages){this._updateIcon('inbox',newData.messages);this.scope.trigger('clearUserbarCache',{type:'inbox'});}
notifyData.total+=parseInt(newData.messages);notifyData.messages=parseInt(newData.messages);}
this.scope.trigger('notificationCountUpdate',notifyData);},_updateIcon:function(type,count){var icon=this._getIcon(type);var countText=(type=='notify'&&count>9)?'9+':count;icon.attr('data-currentCount',count).text(countText);if(parseInt(count)){ips.utils.anim.go((!icon.is(':visible'))?'zoomIn':'pulseOnce',icon.removeClass('ipsHide'));}else{icon.fadeOut();}},_getIcon:function(type){return $('body').find('[data-notificationType="'+type+'"]');},_getCurrentCounts:function(){var messages=this.scope.find('[data-notificationType="inbox"]');var notifications=this.scope.find('[data-notificationType="notify"]');return{notifications:parseInt(notifications.attr('data-currentCount')),messages:(messages.length)?parseInt(messages.attr('data-currentCount')):null};},_stopPolling:function(fatal){Debug.info("Stopping instant notification polling");clearInterval(this._interval);this._paused=true;document.title="❚❚ "+document.title.replace("❚❚ ","");}});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.register('citrix.front.core.mobileNav',{initialize:function(){this.on(document,'notificationCountUpdate',this.updateCount);},updateCount:function(e,data){if(!_.isUndefined(data.total)){if(data.total<=0){this.scope.find('[data-notificationType="total"]').hide();}else{var countText=(parseInt(data.total)>9)?'9+':data.total;this.scope.find('[data-notificationType="total"]').text(countText);}}}});}(jQuery,_));;
;(function($,_,undefined){ips.controller.register('citrix.front.notifications.flyout',{initialize:function(){this.on('click','a.mark-read',this.markAllAsRead);if(ips.utils.db.isEnabled()&&_.isFunction(JSON.parse)&&parseInt(ipsSettings.memberID)>0){ips.utils.db.set('ctxMember',ips.getSetting('baseURL'),{timestamp:ips.utils.time.timestamp(),memberId:ipsSettings.memberID});}},markAllAsRead:function(e,data){var self=this;var ajaxObj=ips.getAjax();ips.utils.insights.interactedEvent('Notifications Mark all as read');ajaxObj(ips.getSetting('baseURL')+'index.php?app=core&module=system&controller=notifications&do=markasread',{dataType:'json'}).done(function(returnedData){if(returnedData.data=='success'){$('#elNotifyContent div.red-dot i').removeClass('fa');$('#elNotifyContent div.red-dot i').removeClass('fa-circle');}}).fail(function(){Debug.log('citrix.front.notifications.markallread failed');});},});}(jQuery,_));;
;(function($,_,undefined){ips.controller.register('citrix.front.core.quickSearch',{_initialSize:0,_expanded:false,_blurTimeout:null,_focused:false,initialize:function(){this.on('focus','#elSearchField',this.focusSearch);this.setup();},setup:function(){this._expanded=false;},focusSearch:function(e){var self=this;var url=ips.getSetting('baseURL')+'index.php?app=core&module=search&controller=search&do=globalFilterOptions&checked='+this.scope.attr('data-default');if(this._expanded){return;}
$('#elSearch').addClass('cSearchExpanded');$('#elSearchFilter').show();if(this.scope.find('[data-role="globalSearchMenuOptions"]').length){ips.getAjax()(url).done(function(response){self.scope.find('[data-role="globalSearchMenuOptions"]').replaceWith(response);});}
this._expanded=true;},});}(jQuery,_));;
(function($,window,i){$.fn.responsiveSlides=function(options){var settings=$.extend({"auto":true,"speed":500,"timeout":4000,"pager":false,"nav":false,"random":false,"pause":false,"pauseControls":true,"prevText":"Previous","nextText":"Next","maxwidth":"","navContainer":"","manualControls":"","namespace":"rslides","before":$.noop,"after":$.noop},options);return this.each(function(){i++;var $this=$(this),vendor,selectTab,startCycle,restartCycle,rotate,$tabs,index=0,$slide=$this.children(),length=$slide.length,fadeTime=parseFloat(settings.speed),waitTime=parseFloat(settings.timeout),maxw=parseFloat(settings.maxwidth),namespace=settings.namespace,namespaceIdx=namespace+i,navClass=namespace+"_nav "+namespaceIdx+"_nav",activeClass=namespace+"_here",visibleClass=namespaceIdx+"_on",slideClassPrefix=namespaceIdx+"_s",$pager=$("<ul class='"+namespace+"_tabs "+namespaceIdx+"_tabs' />"),visible={"float":"left","position":"relative","opacity":1,"zIndex":2},hidden={"float":"none","position":"absolute","opacity":0,"zIndex":1},supportsTransitions=(function(){var docBody=document.body||document.documentElement;var styles=docBody.style;var prop="transition";if(typeof styles[prop]==="string"){return true;}
vendor=["Moz","Webkit","Khtml","O","ms"];prop=prop.charAt(0).toUpperCase()+prop.substr(1);var i;for(i=0;i<vendor.length;i++){if(typeof styles[vendor[i]+prop]==="string"){return true;}}
return false;})(),slideTo=function(idx){settings.before(idx);if(supportsTransitions){$slide.removeClass(visibleClass).css(hidden).eq(idx).addClass(visibleClass).css(visible);index=idx;setTimeout(function(){settings.after(idx);},fadeTime);}else{$slide.stop().fadeOut(fadeTime,function(){$(this).removeClass(visibleClass).css(hidden).css("opacity",1);}).eq(idx).fadeIn(fadeTime,function(){$(this).addClass(visibleClass).css(visible);settings.after(idx);index=idx;});}};if(settings.random){$slide.sort(function(){return(Math.round(Math.random())-0.5);});$this.empty().append($slide);}
$slide.each(function(i){this.id=slideClassPrefix+i;});$this.addClass(namespace+" "+namespaceIdx);if(options&&options.maxwidth){$this.css("max-width",maxw);}
$slide.hide().css(hidden).eq(0).addClass(visibleClass).css(visible).show();if(supportsTransitions){$slide.show().css({"-webkit-transition":"opacity "+fadeTime+"ms ease-in-out","-moz-transition":"opacity "+fadeTime+"ms ease-in-out","-o-transition":"opacity "+fadeTime+"ms ease-in-out","transition":"opacity "+fadeTime+"ms ease-in-out"});}
if($slide.length>1){if(waitTime<fadeTime+100){return;}
if(settings.pager&&!settings.manualControls){var tabMarkup=[];$slide.each(function(i){var n=i+1;tabMarkup+="<li>"+"<a href='#' class='"+slideClassPrefix+n+"'>"+n+"</a>"+"</li>";});$pager.append(tabMarkup);if(options.navContainer){$(settings.navContainer).append($pager);}else{$this.after($pager);}}
if(settings.manualControls){$pager=$(settings.manualControls);$pager.addClass(namespace+"_tabs "+namespaceIdx+"_tabs");}
if(settings.pager||settings.manualControls){$pager.find('li').each(function(i){$(this).addClass(slideClassPrefix+(i+1));});}
if(settings.pager||settings.manualControls){$tabs=$pager.find('a');selectTab=function(idx){$tabs.closest("li").removeClass(activeClass).eq(idx).addClass(activeClass);};}
if(settings.auto){startCycle=function(){rotate=setInterval(function(){$slide.stop(true,true);var idx=index+1<length?index+1:0;if(settings.pager||settings.manualControls){selectTab(idx);}
slideTo(idx);},waitTime);};startCycle();}
restartCycle=function(){if(settings.auto){clearInterval(rotate);startCycle();}};if(settings.pause){$this.hover(function(){clearInterval(rotate);},function(){restartCycle();});}
if(settings.pager||settings.manualControls){$tabs.bind("click",function(e){e.preventDefault();if(!settings.pauseControls){restartCycle();}
var idx=$tabs.index(this);if(index===idx||$("."+visibleClass).queue('fx').length){return;}
selectTab(idx);slideTo(idx);}).eq(0).closest("li").addClass(activeClass);if(settings.pauseControls){$tabs.hover(function(){clearInterval(rotate);},function(){restartCycle();});}}
if(settings.nav){var navMarkup="<a href='#' class='"+navClass+" prev'>"+settings.prevText+"</a>"+"<a href='#' class='"+navClass+" next'>"+settings.nextText+"</a>";if(options.navContainer){$(settings.navContainer).append(navMarkup);}else{$this.after(navMarkup);}
var $trigger=$("."+namespaceIdx+"_nav"),$prev=$trigger.filter(".prev");$trigger.bind("click",function(e){e.preventDefault();var $visibleClass=$("."+visibleClass);if($visibleClass.queue('fx').length){return;}
var idx=$slide.index($visibleClass),prevIdx=idx-1,nextIdx=idx+1<length?index+1:0;slideTo($(this)[0]===$prev[0]?prevIdx:nextIdx);if(settings.pager||settings.manualControls){selectTab($(this)[0]===$prev[0]?prevIdx:nextIdx);}
if(!settings.pauseControls){restartCycle();}});if(settings.pauseControls){$trigger.hover(function(){clearInterval(rotate);},function(){restartCycle();});}}}
if(typeof document.body.style.maxWidth==="undefined"&&options.maxwidth){var widthSupport=function(){$this.css("width","100%");if($this.width()>maxw){$this.css("width",maxw);}};widthSupport();$(window).bind("resize",function(){widthSupport();});}});};})(jQuery,this,0);;
;(function($,_,undefined){ips.controller.register('citrix.front.topic.selectforum',{initialize:function(){this.on('click','.modal-forum-selected',this.selectForum);},selectForum:function(event){event.preventDefault();$('#topic_select_forum').val($(event.currentTarget).attr('data-id'));$('.topic-forum-title').text($(event.currentTarget).attr('data-title'));$('#topicForumSelector').html('Change Forum');if($(event.currentTarget).closest('.recent-forums-breadcrumbs').length){ips.utils.insights.interactedEvent('Recent Forums',{forumId:$(event.currentTarget).attr('data-id'),forumTitle:$(event.currentTarget).attr('data-title')});}
if(this.scope.closest('.ipsDialog').length){this.scope.closest('.ipsDialog').trigger('closeDialog');}},});}(jQuery,_));;
;(function($,_,undefined){ips.controller.register('citrix.front.streams',{initialize:function(){this.on('click','[data-action="loadMore"]',this.loadMoreResults);},loadMoreResults:function(event,data){event.preventDefault();this.scope.find('[data-role="loadMoreContainer"] [data-action="loadMore"]').hide();this.scope.find('[data-role="loadMoreContainer"]').append(ips.templates.render('core.general.loading'));},});}(jQuery,_));;
;(function($,_,undefined){if(tooltipEnabled){if(userName==='Guest'){if($('.cPostRating_bestAnswer').length){$('.comment-upvote-tooltip').css('margin-top','120px');}else{$('.comment-upvote-tooltip').css('margin-top','80px');}
$('.follow-forum-tooltip').css('right','175px');$('.follow-topic-tooltip').css('right','140px');}
(function(){var pageLoadTooltips=[];var onMouseOverTooltips=[];var pageURL=window.location.pathname.split('/');var toolTipInterval;if(pageURL.length>2&&pageURL[1]=='forum'){if(window.innerWidth>768){pageLoadTooltips.push('.follow-forum-tooltip');}else{pageLoadTooltips.push('.follow-forum-mobile-tooltip');}}
if(pageURL.length>2&&pageURL[1]=='topic'){pageLoadTooltips=['.comment-tooltip'];if(window.innerWidth>768){pageLoadTooltips.push('.follow-topic-tooltip');if(canShowToolTip('.bestans-tooltip')){onMouseOverTooltips.push('.bestans-tooltip');}
onMouseOverTooltips.push('.comment-upvote-tooltip');}else{if(canShowToolTip('.bestans-tooltip')){pageLoadTooltips.push('.bestans-tooltip:first');}
$('.comment-upvote-tooltip').css('margin-top','-14px');pageLoadTooltips.push('.comment-upvote-tooltip:first');pageLoadTooltips.push('.follow-topic-mobile-tooltip');}}
function toolTipsToReadyToShow(toolTips){if(typeof(toolTips)==='undefined'){toolTips=pageLoadTooltips;}
var ctxDiscussionsToolTips=localStorage.getItem('ctxDiscussionsToolTips');var ctxDiscussionsToolTip=[];if(!!ctxDiscussionsToolTips){ctxDiscussionsToolTip=JSON.parse(ctxDiscussionsToolTips);}
var toolTipsAlreadyShown=[];$.each(ctxDiscussionsToolTip,function(i,val){var lastShownDate=new Date(ctxDiscussionsToolTip[i].lastShown),today=new Date(),timeDiff=Math.abs(today.getTime()-lastShownDate.getTime()),lastShownDateDiffDays=Math.ceil(timeDiff /(1000*3600*24));var lastClosedDate=new Date(ctxDiscussionsToolTip[i].closedDate),today=new Date(),timeDiff=Math.abs(today.getTime()-lastClosedDate.getTime()),lastClosedDateDiffDays=Math.ceil(timeDiff /(1000*3600*24));if(!!ctxDiscussionsToolTip[i].closedDate&&lastClosedDateDiffDays<7){toolTipsAlreadyShown.push(ctxDiscussionsToolTip[i].toolTip);}
if(lastShownDateDiffDays<=7){if($.inArray(ctxDiscussionsToolTip[i].toolTip,toolTipsAlreadyShown)==-1){toolTipsAlreadyShown.push(ctxDiscussionsToolTip[i].toolTip);}}});return $(toolTips).not(toolTipsAlreadyShown).get();}
function selectToolTip(toolTips){if(typeof(toolTips)==='undefined'){toolTips=pageLoadTooltips;}
$.each(toolTipsToReadyToShow(toolTips),function(i,toolTip){if(window.innerWidth>768&&toolTip=='.comment-tooltip'&&pageURL[1]=='topic'){if(canShowToolTip('.comment-tooltip')){showToolTip('.comment-tooltip');}
if(canShowToolTip('.follow-topic-tooltip')){setTimeout(function(){showToolTip('.follow-topic-tooltip');},3000);}}else{if(canShowToolTip(toolTip)){showToolTip(toolTip);}}
return false;});}
function canShowToolTip(toolTip){if(window.location.href.indexOf("#comment-")>-1&&(toolTip=='.comment-tooltip'||toolTip=='.follow-topic-tooltip')){return false;}
if(toolTip=='.bestans-tooltip'&&($('.cPostRating_bestAnswer').length==0||$('.cBestAnswerIndicator_off').length==0)){return false;}
if(!$('div[data-role="followButton"]').length||((toolTip=='.follow-topic-tooltip'||toolTip=='.follow-topic-mobile-tooltip'||toolTip=='.follow-forum-tooltip'||toolTip=='.follow-forum-mobile-tooltip')&&$('div[data-role="followButton"]').data('following')==true)){return false;}
return true;}
function setLocalStorage(toolTip,closedDate){if(typeof(closedDate)==='undefined'){closedDate='';}
ctxDiscussionsToolTips=localStorage.getItem('ctxDiscussionsToolTips');if(!!ctxDiscussionsToolTips){ctxDiscussionsToolTip=JSON.parse(ctxDiscussionsToolTips);}
var lastShown=new Date();var toolTipToBeStored={toolTip:toolTip,lastShown:lastShown,closedDate:closedDate};if(!!ctxDiscussionsToolTips||!!closedDate){if(!isKeyExistsinLocalStorage(ctxDiscussionsToolTip,toolTip)){ctxDiscussionsToolTip.push(toolTipToBeStored);}else{$.each(ctxDiscussionsToolTip,function(i,val){if(toolTip===ctxDiscussionsToolTip[i].toolTip){if(!!closedDate){console.log('updating the close date '+closedDate);ctxDiscussionsToolTip[i].closedDate=closedDate;}else{ctxDiscussionsToolTip[i].lastShown=new Date();}}});}}else{ctxDiscussionsToolTip=[toolTipToBeStored];}
localStorage['ctxDiscussionsToolTips']=JSON.stringify(ctxDiscussionsToolTip);}
function isKeyExistsinLocalStorage(Storage,toolTip){let contains=false;Object.keys(Storage).forEach(function(key){contains=typeof Storage[key]==='object'?isKeyExistsinLocalStorage(Storage[key],toolTip):Storage[key]===toolTip;return contains;});return contains;}
function showToolTip(toolTip,commentId){if(typeof(commentId)==='undefined'){commentId='';}
if(!!commentId){$.each(onMouseOverTooltips,function(i,toolTip){$(toolTip+'-'+commentId).fadeOut('slow');});$(toolTip+'-'+commentId).fadeIn("slow");setLocalStorage(toolTip);}else{setTimeout(function(){$(toolTip).fadeIn("slow");setLocalStorage(toolTip);},3000);}}
$('.ttclose').click(function(){var toolTipToBeClosed="."+$(this).parent().parent().attr('class').split(' ')[0];setLocalStorage(toolTipToBeClosed,new Date());$(toolTipToBeClosed).fadeOut("slow");});$('body').on({mouseenter:function(){var commentId=$(this).attr('data-commentid');var counter=0;toolTipInterval=setInterval(function(){counter++;if(counter==3){$.each(toolTipsToReadyToShow(onMouseOverTooltips),function(i,toolTip){if(toolTip=='.comment-upvote-tooltip'){$('.comment-upvote-tooltip').css('margin-top',($('#elComment_'+commentId+' .cPostRating_bestAnswer ').length)?'120px':'80px');}
if(canShowToolTip(toolTip)&&$(toolTip+'-'+commentId).length>0){showToolTip(toolTip,commentId);}
return false;});}},1000);},mouseleave:function(){clearTimeout(toolTipInterval);return false;}},'.comment-box');selectToolTip(pageLoadTooltips);})();}}(jQuery,_));;
;(function($,_,undefined){ips.controller.register('citrix.front.core.userbar',{loaded:{},initialize:function(){this.on(document,'menuOpened',this.menuOpened);this.on(document,'clearUserbarCache',this.clearUserbarCache);},menuOpened:function(e,data){if(data.elemID=='elFullInbox'||data.elemID=='elMobInbox'){this._loadMenu('inbox',ips.getSetting('baseURL')+'index.php?app=core&module=messaging&controller=messenger&overview=1&_fromMenu=1','inbox');}else if((data.elemID=='elFullNotifications'||data.elemID=='elMobNotifications')&&ips.getSetting('memberID')>0){this._loadMenu('notify',ips.getSetting('baseURL')+'index.php?app=core&module=system&controller=notifications','notify');}else if(data.elemID=='elFullReports'||data.elemID=='elMobReports'){this._loadMenu('reports',ips.getSetting('baseURL')+'index.php?app=core&module=modcp&controller=modcp&tab=reports&overview=1','reports');}},clearUserbarCache:function(e,data){this.loaded[data.type]=false;},_loadMenu:function(type,url,contentID){if(!this.loaded[type]){var self=this;var ajaxObj=ips.getAjax();$('[data-role="'+contentID+'List"]').html('').css({height:'100px'}).addClass('ipsLoading');ajaxObj(url,{dataType:'json'}).done(function(returnedData){$('[data-role="'+contentID+'List"]').css({height:'auto'}).removeClass('ipsLoading').html(returnedData.data);self.loaded[type]=true;if(contentID!='reports'){var thisTotal=$('[data-notificationType="'+contentID+'"]').html();var globalCount=parseInt($('[data-notificationType="total"]').html());ips.utils.anim.go('fadeOut',$('[data-notificationType="'+contentID+'"]'));}
$(document).trigger('contentChange',[$('[data-role="'+contentID+'List"]')]);}).fail(function(){});}}});}(jQuery,_));;