PageSourceSearch

https://www.uri.org/themes/custom/uri/build/libraries/global/global.js?v=1.7.x

js uri.org collected 2026-09-24 18:50:44 UTC 7,608 bytes, 217 lines download raw bytes

1require = (function e(t, n, r) {
2  function s(o, u) {
3    if (!n[o]) {
4      if (!t[o]) {
5        var a = typeof require == "function" && require;
6        if (!u && a) return a(o, !0);
7        if (i) return i(o, !0);
8        var f = new Error("Cannot find module '" + o + "'");
9        throw f.code = "MODULE_NOT_FOUND", f
10      }
11      var l = n[o] = {
12        exports: {}
13      };
14      t[o][0].call(l.exports, function (e) {
15        var n = t[o][1][e];
16        return s(n ? n : e)
17      }, l, l.exports, e, t, n, r)
18    }
19    return n[o].exports
20  }
21  var i = typeof require == "function" && require;
22  for (var o = 0; o < r.length; o++) s(r[o]);
23  return s
24})({
25  2: [function (require, module, exports) {
26    'use strict';
27
28    (function ($) {
29
30      $(document).ready(function () {
31
32        // Add your code here
33        var $container = $('#cc-links');
34        var $file = $('span.file--application-pdf');
35
36        if (!checkExists($container) || !checkExists($file)) {
37          return;
38        }
39
40        $container.append($file);
41      });
42
43      function checkExists($el) {
44        return $el.length > 0;
45      }
46
47
48      if (jQuery('.nt-action-icon-list .views-row').length > 0) {
49          jQuery('.nt-action-icon-list .views-row').each(function () {
50              jQuery(this).find('.action-box .default-state a, .action-box .hover-state a, .action-box .action-title a').on('click', function (e) {
51                  if(jQuery(this).attr('href') == "#") {
52                      e.preventDefault();
53                      return;
54                  }
55                    var redirect_url = jQuery(this).attr('href');
56                    //window.location.href = jQuery(this).attr('href');
57                    window.open(redirect_url,  '_blank');
58                  //window.open(jQuery(this).attr('href'), '_blank', 'location=yes,height=' + window.outerHeight - 60 + ',width=' + window.outerWidth - 60 + ',scrollbars=yes,status=yes');
59                  e.preventDefault();
60                  return;
61
62              })
63          });
64      }
65
66      // Main Slider
67      if (jQuery('.nt-main-slider .mc-owl-carousel').length > 0) {
68
69        jQuery('.nt-main-slider .mc-owl-carousel').owlCarousel({
70          margin: 0,
71          nav: true,
72          dots: true,
73          loop: true,
74          items: 1,
75          smartSpeed: 5000,
76          animateOut: 'fadeOut',
77          autoplay: true,
78          touchDrag: true
79        });
80
81        jQuery('.nt-main-slider .mc-owl-carousel .paragraph--slider-media').each(function () {
82          var $_pself = jQuery(this);
83          jQuery(this).find('.uri-microsite-slider-overlay').on('click', function () {
84            var slider_link = $_pself.find('.field--name-field-sli
84der-link').text();
85            if (slider_link) {
86              window.location.href = slider_link;
87            }
88          })
89        });
90      }
91
92      // Masonry 
93      if (jQuery('.nt-masonry-grid-view .views-view-grid').length > 0) {
94        jQuery('.nt-masonry-grid-view .views-view-grid').masonry({
95          itemSelector: '.nt-grid-item',
96          columnWidth: '.nt-grid-sizer',
97          percentPosition: true,
98          gutter: 0,
99          gutter: 52,
100        });
101      }
102
103       //Home Masonry Grid Click
104       jQuery('.nt-masonry-grid-view .nt-grid-item').each(function () {
105        var $_pself = jQuery(this);
106        jQuery(this).on('click', function () {
107            var block_link = $_pself.find('.grid-default-state .title a').attr('href');
108            if (block_link) {
109              window.location.href = block_link;
110            }
111        })
112      });
113      
114      // Grid Item Link
115      jQuery('.nt-grid-item .nt-block-column .field__item').each(function () {
116        var $_pself = jQuery(this);
117        jQuery(this).on('click', function () {
118          var block_link = $_pself.find('.nt-block-column').data('url');
119          if (block_link) {
120            window.location.href = block_link;
121          }
122        })
123      });
124
125      // Mega Menu Left/Right Column
126      var _menu_item_selector = jQuery('.tbm-submenu .tbm-block .field--name-field-mega-menu-group-column .field--name-field-link .field__item');
127
128      if (_menu_item_selector.length > 0) {
129        _menu_item_selector.each(function () {
130          var _self = jQuery(this);
131          var _link = jQuery(this).find('a');
132          if (_link.hasClass('nt-right-menu')) {
133            _self.addClass('nt-right-menu--item');
134          }
135          if (_link.hasClass('nt-left-menu')) {
136            _self.addClass('nt-left-menu--item');
137          }
138        })
139      }
140
141      // Footer MailChimp Form
142      if (jQuery('#mailchimp-signup-subscribe-block-mailchimp-signup-form-form').length > 0) {
143        jQuery('#mailchimp-signup-subscribe-block-mailchimp-signup-form-form').prepend('<div class="mc-title">Receive news and information about URI.</div>');
144
145        jQuery('#edit-mergevars-lname').attr('placeholder', 'First Name*');
146        jQuery('#edit-mergevars-fname').attr('placeholder', 'Last Name*');
147        jQuery('#edit-mergevars-email').attr('placeholder', 'Email*');
148        // jQuery('#edit-mergevars-mmerge5').attr('placeholder', 'Country*');
149        jQuery('.form-item-mergevars-lname').after(jQuery('.js-form-type-email'));
150        jQuery('.form-item-mergevars-lname').after(jQuery('.form-item-mergevars-fname'));
151
152      }
153
154      if (jQuery('#search-block-form').length > 0) {
155        jQuery('.search-form .search-form__input').attr('placeholder', 'Search the Site');
156      }
157
158      // Set Timeout for highlights
159      setTimeout(function () {
160        jQuery('.nt-bare-regions').fadeOut();
161      }, 3000);
162      
163      //URI Grid item link
164      if(jQuery('.nt-uri-grid-item .nt-block-column').length > 0) {
165        jQuery('.nt-uri-grid-item .nt-block-column').each(function() { 
166          var _link = jQuery(this).data('url'); 
167          if(_link) {
168            jQuery(this).on('click', function() {
169              window.location.href = _link; 
170           }); 
171          }
172          
173        });
174      }
175
176      // Add pagination Active class
177      let currentHref = location.search;
178      jQuery.each(jQuery('.pager ul.pager__items li.pager__item a.pager__link'), function() { 
179          if(jQuery(this).attr('href') == currentHref){
180              jQuery(this).addClass('active')
181          } else{
182              jQuery(this).removeClass('active')
183          }
184      });
185    })(jQuery);
186
187  }, {}]
188}, {}, [2]);
189
190
191/* Mutation Observer for Mega Menu */
192
193var TbMegaMenuEl = document.querySelector('#tbm-main');
194if (TbMegaMenuEl) {
195  let observer = new MutationObserver(mutationRecords => {
196    var is_tbm_mobile_show = TbMegaMenuEl.classList.contains('tbm--mobile-show');
197    var _body_element = document.querySelector("body");
198    _body_element.classList.remove("nt-open-mobile-menu");
199    if (is_tbm_mobile_show) {
200      _body_element.classList.add("nt-open-mobile-menu");
201      var _menue_lement = document.querySelector('.header__menu-main');
202      var _rect = _menue_lement.getBoundingClientRect();
203      var _top_position = _rect.top + 40 + 25;
204      var _drop_menu = document.querySelector('.tbm-collapse');
205      _drop_menu.style.top = _top_position + 'px';
206    }
207  });
208  observer.observe(TbMegaMenuEl, {
209    attributes: true,
210    childList: false,
211    subtree: false
212  });
213}
214
215if(document.querySelectorAll('.nt-blog-featured-action-body') && document.querySelectorAll('.nt-blog-featured-action-body')[0] && document.querySelectorAll('.nt-blog-featured-action-body')[0].innerHTML == '') { 
216  document.querySelector('#block-views-block-blog-related-action-areas-block-1 h2').innerHTML = ''
217}

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.