(function(n){"use strict";(function(){function t(n,t){var i=n.closest("div.card").data("assetid");i&&(t["ms.actioncardid"]=i,t["ms.svi"]="300")}function e(t){t.find(".ocSmartFeedbackBegin").hide();t.find(".ocSmartFeedbackReply").removeClass("ocHidden");n("#ocHelp").css("padding-bottom",n("#ocFooterWrapper").height()+"px");n("#supWrapperToPreventFeedbackFlickering").addClass("supFeedbackFullTextIsOpen")}function i(t){t.find(".ocFeedbackFinalThankYouMessage").removeClass("ocHidden");n("#supWrapperToPreventFeedbackFlickering").removeClass("supFeedbackFullTextIsOpen");n("#ocHelp").css("padding-bottom",n("#ocFooterWrapper").height()+"px");t.find(".ocFeedbackFinalThankYouMessage").append('<h2 class="feedbackThankYou">'+occe.Resources.getLocalizedString("L_Feedback_ThankYou")+"<\/h2>")}function r(n,t){var i={actionType:"CL",contentTags:{sat:n["ms.sva"],fbnm:"Feedback",fbid:1,areaName:"Feedback"}};u(t,i);typeof analytics=="object"&&(i.behavior=typeof window.oneDS.Behavior=="object"?window.oneDS.Behavior.VOTE:140,window.analytics.capturePageAction(t[0],i,null))}function o(t){var r=n('[name="feedbackText"]'),i={actionType:"CL",contentTags:{fbnm:"Feedback",fbid:2,areaName:"Feedback",vtbm:t["ms.svv"]}};u(r,i);typeof analytics=="object"&&(i.behavior=typeof window.oneDS.Behavior=="object"?window.oneDS.Behavior.SURVEYCOMPLETE:142,window.analytics.capturePageAction(r[0],i,null))}function u(n,t){var i=n.closest(".card").data("assetid");i!==null&&(t.contentTags.compID=i)}n("#ocButtonSendNoComment").removeClass("ocHidden");var f=n(".ocSmartFeedbackTextArea").attr("aria-label");n(".smartFeedbackForm").on("change",".ocSmartFeedbackTextArea",function(){var t=n(this);t[0].value===""?t.attr("aria-label",f):t.attr("aria-label","")});n(".smartFeedbackForm").on("click",".feedbackSelection",function(){var f=n(this),u=f.closest(".ocFB"),o={"ms.interactiontype":occe.constants.wedcs.interactionType.completedFinalStepInSeries,"ms.ea_action":"FeedbackControlRate","ms.svq":"1","wcs.cot":"1","wcs.et":"2","wcs.cn":f[0].innerText||""},s;t(f,o);s=u.find(".ocSmartFeedbackTextArea");f.attr("name")==="buttonYes"?(u.find(".ocFeedbackHeaderIfArticleHelpful").removeClass("ocHidden"),s.attr("id","feedbackTextHelpful"),o["ms.sva"]="100"):(u.find(".ocFeedbackHeaderIfArticleNotHelpful").removeClass("ocHidden"),s.attr("id","feedbackTextNotHelpful"),o["ms.sva"]="0");r(o,n(this));u.find(".ocSmartFeedbackReply").length>0?(e(u),u.find(".ocButtonSendComment")[0].scrollIntoView(!1),u.find(".ocSmartFeedbackTextArea").focus()):(u.find(".ocSmartFeedbackBegin").hide(),i(u))}).submit(function(r){var e;r.preventDefault();var u=n(this),s=u.closest(".ocFB"),f=s.find(".ocSmartFeedbackTextArea").val();if(!f||!f.trim()){n(".ocSmartFeedbackTextArea").focus();return}u.addClass("ocHidden");e={"ms.interactiontype":occe.constants.wedcs.interactionType.formSubmit,"ms.ea_action":"Comment","ms.svq":"2","ms.svv":f};t(u,e);i(s);o(e)});n(".smartFeedbackForm").on("click",".ocButtonSendNoComment",function(){var f=n(this).closest(".ocFB"),u;f.find(".smartFeedbackForm").addClass("ocHidden");i(f);u={"ms.interactiontype":occe.constants.wedcs.interactionType.formSubmit,"ms.ea_action":"Comment","ms.svq":"2","ms.svv":""};t(n(this),u);r(u,n(this))})})()})(jQuery)