1jQuery(document).ready(function (l) { 2 console.log("Hello World"); 3 var a = 1, 4 c = "all", 5 r = !1, 6 d = 7 '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg>'; 8 function t(e, a, t) { 9 var s, o, i, n; 10 r || 11 ((r = !0), 12 (o = l( 13 (s = "all" === e) 14 ? "#all-sections-view .news-hub-all__grid" 15 : "#filtered-content", 16 )), 17 (i = l( 18 s ? "#all-sections-view .btn-view-all" : "#filtered-view .btn-view-all", 19 )), 20 (n = l( 21 s 22 ? "#all-sections-view .news-hub-section__cta" 23 : "#filtered-view .news-hub-section__cta", 24 )), 25 i.addClass("is-loading").html("Loading..."), 26 l.ajax({ 27 url: ajax_object.ajax_url, 28 type: "POST", 29 data: { 30 action: "filter_news_by_category", 31 category: e, 32 paged: a, 33 nonce: ajax_object.nonce, 34 }, 35 success: function (e) { 36 var a; 37 e.success 38 ? ((a = e.data.html), 39 parseInt(e.data.max_pages, 10), 40 (e = parseInt(e.data.post_count, 10)), 41 t ? o.append(a) : o.html(a), 42 0 === e 43 ? (n.hide(), 44 t 45 ? l("#no-more-post-message").fadeIn() 46 : l("#no-more-post-message").hide()) 47 : (l("#no-more-post-message").hide(), 48 n.show(), 49 i 50 .removeClass("is-loading") 51 .css({ "pointer-events": "", opacity: "", cursor: "" }) 52 .html("Load More " + d))) 53 : (t || 54 s || 55 ((a = c.charAt(0).toUpperCase() + c.slice(1)), 56 o.html( 57 '<div class="no-posts-message"><p>No ' + 58 a + 59 " Found.</p></div>", 60 )), 61 n.hide()); 62 }, 63 error: function () { 64 var e; 65 (t || 66 ((e = c.charAt(0).toUpperCase() + c.slice(1)), 67 o.html( 68 '<div class="no-posts-message"><p>No ' + e + " Found.</p></div>", 69 )), 70 n.hide()); 71 }, 72 complete: function () { 73 r = !1; 74 }, 75 })); 76 } 77 (console.log("Hello World"), 78 l.ajax({ 79 url: ajax_object.ajax_url, 80 type: "POST", 81 data: { 82 action: "filter_news_by_category", 83 category: "all", 84 paged: 1, 85 nonce: ajax_object.nonce, 86 }, 87 success: function (e) { 88 e.success && 89 (parseInt(e.data.max_pages, 10), 90 l("#all-sections-view .news-hub-section__cta").show()); 91 }, 92 }), 93 l(".news-hub-tabs__item").on("click", function () { 94 (l(".news-hub-tabs__item").removeClass("is-active"), 95 l(this).addClass("is-active")); 96 var e = l(this).data("filter"); 97 ((c = e), 98 (a = 1), 99 l("#no-more-post-message").hide(), 100 l("#news-hub-main").removeClass("announcement latest-update"), 101 "all" !== e && l("#news-hub-main").addClass(e), 102 "all" === e 103 ? (l("#all-sections-view").addClass("sections-view--active"), 104 l("#filtered-view").removeClass("sections-view--active"), 105 l("#all-sections-view .btn-view-all") 106 .html("Load More " + d) 107 .css({ "pointer-events": "", opacity: "", cursor: "" }), 108 l.ajax({ 109 url: ajax_object.ajax_url, 110 type: "POST", 111 data: { 112 action: "filter_news_by_category", 113 category: "all", 114 paged: 1, 115 nonce: ajax_object.nonce, 116 }, 117 success: function (e) { 118 e.success && 119 (parseInt(e.data.max_pages, 10), 120 l("#all-sections-view .news-hub-section__cta").show()); 121 }, 122 })) 123 : (l("#all-sections-view").removeClass("sections-view--active"), 124 l("#filtered-view").addClass("sections-view--active"), 125 l("#filtered-view .btn-view-all") 126 .html("Load More " + d) 127 .css({ "pointer-events": "", opacity: "", cursor: "" }), 128 l("#filtered-title").text(l(this).text().trim()), 129 l("#filtered-view .btn-view-all").data("category", e), 130 l("#filtered-content").html( 131 '<div class="loading-message">Loading...</div>', 132 ), 133 t(e, 1, !1))); 134 }), 135 l(document).on("click", ".btn-view-all", function (e) { 136 (e.preventDefault(), r || t(c, ++a, !0)); 137 })); 138 139 /* Upcoming Events Slider */ 140 var $upcomingSlider = l(".upcoming-events-slider"); 141 var $upcomingSection = l("#upcoming-events-section"); 142 143 144 145 if ($upcomingSection.length) { 146 l(".news-hub-tabs__item").on("click", function () { 147 var filterValue = l(this).data("filter"); 148 149 // Show only if the selected tab is "upcoming-events" or "events" 150 if (filterValue === "upcoming-events" || filterValue === "events") { 151 $upcomingSection.show(); 152 153 if ($upcomingSlider.hasClass("slick-initialized")) { 154 $upcomingSlider.slick("setPosition"); 155 } else { 156 initUpcomingSlider(); 157 } 158 } else { 159 $upcomingSection.hide(); 160 } 161 }); 162 } 163});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.