define(["require","exports","page","stApp","angular"],function(t,e){function o(){t(["shortcode-js"],function(t){var e="https://"+location.host;(s(".pl-rates-div").length||s(".pl-terms-box").length)&&t.SetPrsWidgets(window,e),(s(".cc-mini-box").length||s(".cc-list-buttons").length||s(".cc-editorial-box").length||s(".ct-author-box").length)&&(t.ClearBoxes(),t.SetBoxes(window,e))},function(t){console.error(t)})}var n=t("stApp"),l=t("angular"),s=l.element,r=t("page");n.angular.controller("IntroController",["$scope","$injector",function(t,e){function n(e){t.$applyAsync(function(){"intro"in r&&""!=(r.intro+"").trim()&&(t.pageintro=window.TruncateHTML.truncate(i,window.get_intro_limit()),t.pageintro2=c,setTimeout(function(){e&&window.requestIdleCallback?window.requestIdleCallback(o):o()}))})}var s=e.get("$stService");t.disclosure_scroll=function(){var t,e=l.element().cssSelect(".mob-disclosure");"block"==e.css("display")?(window.scrollTo(0,e.prop("offsetTop")-50),(t=e.cssSelect("p:last-child")).addClass("yellow"),t[0].focus(),setTimeout(function(){t.removeClass("yellow")},2e3)):(t=l.element().cssSelect(".sidebar .box:last-child p:last-child"),window.scrollTo(0,t.prop("offsetTop")-20),t.addClass("yellow"),t[0].focus(),setTimeout(function(){t.removeClass("yellow")},2e3))};var i=r.intro,c=r.intro2?r.intro2:"";l.element(window).on("resize",n),n(!0);var a=s.onIntroChange(function(t){(t.top||t.btm)&&((t.top||""==t.top)&&(i=t.top),(t.btm||""==t.btm)&&(c=t.btm),n())});t.$on("$destroy",function(){a(),l.element(window).off("resize",n)}),t.toggleIntro=function(t){var e=l.element(t.target).closest("[data-ng-html-content='pageintro']");e.toggleClass("more");var n=e.hasClass("more"),s=e[0].querySelector("[data-show-more]");s&&(s.setAttribute("aria-hidden",n?"true":"false"),s.setAttribute("tabindex",n?"-1":"0")),e[0].focus(),setTimeout(function(){e[0].focus(),o()})}}])});